From owner-freebsd-current@FreeBSD.ORG Wed Nov 26 11:19:07 2003 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2096A16A4CE for ; Wed, 26 Nov 2003 11:19:07 -0800 (PST) Received: from smtp.web.de (smtp01.web.de [217.72.192.180]) by mx1.FreeBSD.org (Postfix) with ESMTP id EE53F43FF2 for ; Wed, 26 Nov 2003 11:19:05 -0800 (PST) (envelope-from nakal@web.de) Received: from [217.81.249.41] (helo=[217.81.249.41]) by smtp.web.de with esmtp (TLSv1:DES-CBC3-SHA:168) (WEB.DE 4.99 #516) id 1AP5Bo-0006Xz-00 for freebsd-current@freebsd.org; Wed, 26 Nov 2003 20:19:04 +0100 From: Martin To: freebsd-current@freebsd.org Content-Type: text/plain Message-Id: <1069874342.704.18.camel@klotz.local> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.5 Date: Wed, 26 Nov 2003 20:19:02 +0100 Content-Transfer-Encoding: 7bit Sender: nakal@web.de Subject: Panic with ugen X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 26 Nov 2003 19:19:07 -0000 Hi, I'm still trying to write a webcam application for my "Creative Videoblaster Webcam Go". I have not much luck, but I accidently discovered how to cause panic with few lines of code while using ugen. Here is the code: >------------------------------------------< #include #include #include #include #include #include #include #define DEVNAME "/dev/ugen0" static char dev_name[MAXPATHLEN]; int main(int argc, char *argv[]) { int fdout; int i; sprintf(dev_name,"%s",DEVNAME); fdout=open(dev_name, O_RDWR, 0); if (fdout<0) { perror("open"); fprintf(stderr, "Cannot open device: %s\n",DEVNAME); exit(-1); } i=0; /* PANIC here in ioctl (during second run) */ if(ioctl(fdout, USB_SET_CONFIG, &i) < 0) { perror("ioctl(USB_SET_CONFIG)"); exit(-1); } close(fdout); return 0; } >------------------------------------------< Run it once, you'll get an error. The second run will cause a panic. Additional info: 5.1-CURRENT FreeBSD 5.1-CURRENT #1: Tue Nov 18 00:30:15 CET 2003 i386 usb0: on uhci0 ugen0: WINBOND W9967CF, rev 1.10/1.10, addr 3 Martin