From owner-freebsd-usb@FreeBSD.ORG Sun Jan 16 01:47:01 2005 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1113A16A4CE for ; Sun, 16 Jan 2005 01:47:01 +0000 (GMT) Received: from salmon.maths.tcd.ie (salmon.maths.tcd.ie [134.226.81.11]) by mx1.FreeBSD.org (Postfix) with SMTP id 1400543D4C for ; Sun, 16 Jan 2005 01:47:00 +0000 (GMT) (envelope-from iedowse@maths.tcd.ie) Received: from walton.maths.tcd.ie by salmon.maths.tcd.ie with SMTP id ; 16 Jan 2005 01:46:58 +0000 (GMT) To: irchat@free.fr In-Reply-To: Your message of "Sat, 15 Jan 2005 18:14:38 +0100." <1105809278.41e94f7ed0e32@imp3-q.free.fr> Date: Sun, 16 Jan 2005 01:46:58 +0000 From: Ian Dowse Message-ID: <200501160146.aa23537@salmon.maths.tcd.ie> cc: freebsd-usb@freebsd.org Subject: Re: Prism54 USB Wireless Adapters X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Jan 2005 01:47:01 -0000 In message <1105809278.41e94f7ed0e32@imp3-q.free.fr>, irchat@free.fr writes: >Hello, >I am trying to port the prism54-usb Linux driver to FreeBSD (see >http://jbnote.free.fr/prism54usb/index.html). >There's a big problem, I don't get the interrupt which should occur right >after the firmware upload to the ISL3886. >I have spent hours trying to debug this, I can't figure out why it doesn't >work. The interrupt callback functions seems to be properly set up, when I >unplug the device it is called to report the error (but should it be when the >device sends the interrupt, according to the way I've set up the pipe ?). Try removing the USBD_NO_COPY flag from all the transfer setups. I happen to have a USB Prism54 device here, and removing that flag appears to cause the p54u_int_rx_cb function to get called. As far as I can tell, the USBD_NO_COPY flag should only ever be used in conjunction with the usbd_alloc_buffer() function. Normally the USB code copies data into a DMA buffer for writes and copies it back after reads, but if you have set up your own buffer then it is more efficient to access the buffer directly to avoid the copying. Ian From owner-freebsd-usb@FreeBSD.ORG Sun Jan 16 11:24:10 2005 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 07C5F16A4CE for ; Sun, 16 Jan 2005 11:24:10 +0000 (GMT) Received: from postfix4-1.free.fr (postfix4-1.free.fr [213.228.0.62]) by mx1.FreeBSD.org (Postfix) with ESMTP id B4E2E43D1F for ; Sun, 16 Jan 2005 11:24:09 +0000 (GMT) (envelope-from irchat@free.fr) Received: from imp6-q.free.fr (imp6-q.free.fr [212.27.42.6]) by postfix4-1.free.fr (Postfix) with ESMTP id 77392257C15; Sun, 16 Jan 2005 12:24:08 +0100 (CET) Received: by imp6-q.free.fr (Postfix, from userid 33) id 1857771BF; Sun, 16 Jan 2005 12:24:08 +0100 (MET) Received: from AAmiens-152-1-32-57.w83-192.abo.wanadoo.fr (AAmiens-152-1-32-57.w83-192.abo.wanadoo.fr [83.192.206.57]) by imp6-q.free.fr (IMP) with HTTP for ; Sun, 16 Jan 2005 12:24:07 +0100 Message-ID: <1105874647.41ea4ed7f035f@imp6-q.free.fr> Date: Sun, 16 Jan 2005 12:24:07 +0100 From: irchat@free.fr To: Ian Dowse MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit User-Agent: Internet Messaging Program (IMP) 3.2.5 X-Originating-IP: 83.192.206.57 cc: freebsd-usb@freebsd.org Subject: Re: Prism54 USB Wireless Adapters X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Jan 2005 11:24:10 -0000 On Sunday 16 January 2005 02:46, Ian Dowse wrote: > Try removing the USBD_NO_COPY flag from all the transfer setups. I > happen to have a USB Prism54 device here, and removing that flag > appears to cause the p54u_int_rx_cb function to get called. It worked. But I had to disable EHCI support in my kernel, is that a bug in FreeBSD ? I'm running the 5.3 version, which seems to have support for interrupt pipes on EHCI controllers. Testing my driver with or without USBD_NO_COPY and the EHCI makes the interrupt callback never called. With UHCI and without USBD_NO_COPY, my code fails when the xfers using the buffers that don't support DMA are submitted. > As far as I can tell, the USBD_NO_COPY flag should only ever be > used in conjunction with the usbd_alloc_buffer() function. Normally > the USB code copies data into a DMA buffer for writes and copies > it back after reads, but if you have set up your own buffer then > it is more efficient to access the buffer directly to avoid the > copying. Done. Thanks ! Sebastien From owner-freebsd-usb@FreeBSD.ORG Sun Jan 16 14:50:25 2005 Return-Path: Delivered-To: freebsd-usb@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6D8AE16A4CE for ; Sun, 16 Jan 2005 14:50:25 +0000 (GMT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4386E43D45 for ; Sun, 16 Jan 2005 14:50:25 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.1/8.13.1) with ESMTP id j0GEoPgG094704 for ; Sun, 16 Jan 2005 14:50:25 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.1/8.13.1/Submit) id j0GEoPmk094703; Sun, 16 Jan 2005 14:50:25 GMT (envelope-from gnats) Date: Sun, 16 Jan 2005 14:50:25 GMT Message-Id: <200501161450.j0GEoPmk094703@freefall.freebsd.org> To: freebsd-usb@FreeBSD.org From: Jean-Sebastien Roy Subject: Re: kern/65436: QUIRK: [patch] to add support for PNY Attache 256MB USB 2.0 Flash Drive X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Jean-Sebastien Roy List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Jan 2005 14:50:25 -0000 The following reply was made to PR kern/65436; it has been noted by GNATS. From: Jean-Sebastien Roy To: freebsd-gnats-submit@FreeBSD.org Cc: Subject: Re: kern/65436: QUIRK: [patch] to add support for PNY Attache 256MB USB 2.0 Flash Drive Date: Sun, 16 Jan 2005 15:48:55 +0100 FWIW, this patch works fine on my system too (FreeBSD 4.9). From owner-freebsd-usb@FreeBSD.ORG Sun Jan 16 16:32:38 2005 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3C25516A4E4 for ; Sun, 16 Jan 2005 16:32:38 +0000 (GMT) Received: from rproxy.gmail.com (rproxy.gmail.com [64.233.170.192]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9610143D45 for ; Sun, 16 Jan 2005 16:32:37 +0000 (GMT) (envelope-from babak.ashrafi@gmail.com) Received: by rproxy.gmail.com with SMTP id r35so141076rna for ; Sun, 16 Jan 2005 08:32:36 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:mime-version:content-type:content-transfer-encoding; b=BI+EiKtZ9AhDiGXAT0LuM0lSRCHLKony8bMAjMzaJ8/3E9av30jQxXwf61E6GBB7988XQyHmaa187b4NkaUa34EbrKMMSqLLg99VnuxLXtUQXFL0Tf+SMn9GqxJDSK+y/H0RyGu6qpEO8O0RJuz0iXyA2pdktzICzWcBW1HaTkQ= Received: by 10.38.81.75 with SMTP id e75mr411874rnb; Sun, 16 Jan 2005 08:32:36 -0800 (PST) Received: by 10.38.73.27 with HTTP; Sun, 16 Jan 2005 08:32:36 -0800 (PST) Message-ID: <75322a58050116083243499650@mail.gmail.com> Date: Sun, 16 Jan 2005 11:32:36 -0500 From: Babak Ashrafi To: freebsd-usb@freebsd.org Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: long idle times X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Babak Ashrafi List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Jan 2005 16:32:38 -0000 I recently upgraded to 5.3-RELEASE without any problem other than this: I have an external USB HD. It literary takes minutes to mount the ufs volume on the drive. There is more than 100G of data on that drive that was written about a year ago. That would have been FreeBSD 4.6 or 4.7, I think. After more than 24 hours of copying it back using tar, only 8G were copied and I gave up. Iozone gives perfectly respectable read and write numbers for the USB disk, but there are long long long pauses between each read or write. When I test my internal disks, there are no such pauses. I have similar problems with an USB CDRW and a CF reader. In all cases it eventually works, just unusably slow. Here is the relevant part of dmesg: usb0: on ohci0 usb0: USB revision 1.0 uhub0: OPTi OHCI root hub, class 9/0, rev 1.00/1.00, addr 1 uhub0: 2 ports with 2 removable, self powered Is there some configuration I am missing? Any advice much appreciated. From owner-freebsd-usb@FreeBSD.ORG Sun Jan 16 17:50:55 2005 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id AF47116A4CE for ; Sun, 16 Jan 2005 17:50:55 +0000 (GMT) Received: from smtpout.mac.com (smtpout.mac.com [17.250.248.87]) by mx1.FreeBSD.org (Postfix) with ESMTP id 693A443D1F for ; Sun, 16 Jan 2005 17:50:55 +0000 (GMT) (envelope-from ziutek@mac.com) Received: from mac.com (smtpin07-en2 [10.13.10.152]) by smtpout.mac.com (Xserve/MantshX 2.0) with ESMTP id j0GHosls018609 for ; Sun, 16 Jan 2005 09:50:54 -0800 (PST) Received: from [192.168.1.100] (pd9ebf2c6.dip.t-dialin.net [217.235.242.198]) (authenticated bits=0) by mac.com (Xserve/smtpin07/MantshX 4.0) with ESMTP id j0GHoqu4006663 for ; Sun, 16 Jan 2005 09:50:54 -0800 (PST) Mime-Version: 1.0 (Apple Message framework v619) Content-Transfer-Encoding: 7bit Message-Id: <2DEE1D04-67E7-11D9-BF02-000D93C8CD9C@mac.com> Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed To: freebsd-usb@freebsd.org From: Joseph Rothstein Date: Sun, 16 Jan 2005 18:50:58 +0100 X-Mailer: Apple Mail (2.619) Subject: APPLE USB extended keyboard not working X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Jan 2005 17:50:55 -0000 Hi there, I've come across a strange problem while trying to install FreeBSD 5.3. I am attempting to install 5.3 on a PC suing the only keyboard I have available, which is an Apple USB extended one. I can get tot he sysinstall screen, but the keyboard at this point does not respond. It will respond earlier in the install process. The space bar works, and I can stop the countdown to the boot mode. Verbose booting shows that the keyboard is detected. I found this link, but am not sure how (or if I should) adjust the loader.conf to use the USB keyboard only. http://www.freebsd.org/cgi/man.cgi? query=ukbd&sektion=4&manpath=FreeBSD+5.3-RELEASE Any help would be appreciated. Regards to all, Joe From owner-freebsd-usb@FreeBSD.ORG Mon Jan 17 11:02:23 2005 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B2EF816A514 for ; Mon, 17 Jan 2005 11:02:23 +0000 (GMT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8545F43D2F for ; Mon, 17 Jan 2005 11:02:23 +0000 (GMT) (envelope-from owner-bugmaster@freebsd.org) Received: from freefall.freebsd.org (peter@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.1/8.13.1) with ESMTP id j0HB2NpT071310 for ; Mon, 17 Jan 2005 11:02:23 GMT (envelope-from owner-bugmaster@freebsd.org) Received: (from peter@localhost) by freefall.freebsd.org (8.13.1/8.13.1/Submit) id j0HB2MLa071304 for freebsd-usb@freebsd.org; Mon, 17 Jan 2005 11:02:22 GMT (envelope-from owner-bugmaster@freebsd.org) Date: Mon, 17 Jan 2005 11:02:22 GMT Message-Id: <200501171102.j0HB2MLa071304@freefall.freebsd.org> X-Authentication-Warning: freefall.freebsd.org: peter set sender to owner-bugmaster@freebsd.org using -f From: FreeBSD bugmaster To: freebsd-usb@FreeBSD.org Subject: Current problem reports assigned to you X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Jan 2005 11:02:24 -0000 Current FreeBSD problem reports Critical problems Serious problems S Submitted Tracker Resp. Description ------------------------------------------------------------------------------- f [2001/12/12] kern/32713 usb [usb] mouse detaches from hub and doesnt f [2002/01/13] kern/33839 usb usb0: host controller halted (involving A f [2002/04/07] i386/36850 usb Page Fault using ppp with USB Modem [4.9] f [2002/06/24] kern/39805 usb 4.6R install panics with umass0 device co o [2002/07/19] kern/40792 usb signals lead to data loss on device ugen o [2002/12/10] kern/46176 usb umass causes kernel panic if device remov o [2002/12/19] i386/46371 usb USB controller cannot be initialized on I o [2002/12/29] kern/46618 usb USB (UHCI/ICH3) PALM connect/disconnect/c o [2003/02/17] kern/48359 usb SiS 5597/8 USB + uscanner breakage a [2003/03/02] kern/48849 usb Maxtor XT5000 causes panic in boot o [2003/03/05] kern/48952 usb uscanner0 hangs a [2003/03/20] kern/50149 usb Using Alcatel SpeedTouch results in "usb0 a [2003/08/14] kern/55587 usb null dereference in usbdi.c: usb_transfer o [2003/09/26] bin/57255 usb usbd and multi-function devices f [2003/12/11] kern/60131 usb [usb] Page fault on disconnect of USB dev s [2003/12/15] kern/60276 usb [usb] Kernel panic when plugging in USB ( o [2004/01/11] kern/61191 usb [usb] panic: USB vs. Serial problems o [2004/01/15] kern/61377 usb [kbd] usb keyboard not functional after b o [2004/01/20] kern/61627 usb [usb] [patch] New USB printer not support f [2004/01/23] kern/61804 usb [panic] panic with hitachi travelstar USB o [2004/01/24] kern/61841 usb [boot] 5.2 Boot freeze if memorybird (USB f [2004/01/30] kern/62088 usb [usb] Logitech Cordless/Optical Mouse not o [2004/01/30] kern/62123 usb [usb] LaCie 160GB USB drive umass: BBB re o [2004/02/23] i386/63251 usb [usb] USB stops working after 2nd APM sus o [2004/02/26] kern/63375 usb [patch] panic: unplugging USB devices pan o [2004/03/01] kern/63621 usb [usb] USB MemoryStick Reader stalls/crash o [2004/04/07] kern/65292 usb [panic] random page faults (usb-related?) o [2004/04/19] i386/65783 usb [panic] Panic when attaching card reader o [2004/07/13] kern/69006 usb [patch] Apple Cinema Display hangs USB po o [2004/08/30] kern/71155 usb [usb] misbehaving usb-printer hangs proce o [2004/09/27] kern/72119 usb Detaching USB Memory Stick w/o umount cau f [2004/10/11] i386/72497 usb WD USB Disk Panics -stable and 5.2.1 o [2004/10/29] kern/73295 usb Lock order reversal in USB code. o [2004/10/30] kern/73307 usb Kernel panics on USB disconnect o [2004/11/18] kern/74088 usb ohci ehci uhub: port disabled on connecti o [2005/01/08] usb/75941 usb system halted during booting due to ehci o [2005/01/13] usb/76204 usb panic while using usb attached modem o [2005/01/14] usb/76240 usb USB camera panics kernel 38 problems total. Non-critical problems S Submitted Tracker Resp. Description ------------------------------------------------------------------------------- o [2001/09/30] conf/30929 usb [patch] use usbd to initialize USB ADSL m o [2001/12/09] kern/32652 usb [patch] A new ioctl to uscanner s [2001/12/09] ports/32653 usb Added patches to improve USB scanner supp f [2002/04/23] kern/37374 usb [PATCH] closing ums0 blocks with wmesg uh f [2002/05/04] conf/37732 usb usbd start in wrong place in /etc/rc in 4 o [2002/05/23] kern/38452 usb [usb] Logitech USB iFeel: device_probe_an o [2002/07/16] kern/40657 usb [usb] Logitech iFeel usb mouse will not a o [2002/07/24] kern/40948 usb [usb] USB HP CDW8200 does not work o [2002/08/07] kern/41415 usb [usb] [patch] Some USB scanners cannot ta f [2002/08/30] bin/42213 usb moused(8) seems to delay some mouse event f [2002/10/25] kern/44450 usb USB support FAILURE for device that was s o [2003/01/18] kern/47200 usb USB port is disabled when Kodak DX4900 is o [2003/02/06] kern/48014 usb [usb] moused fails to correctly identify o [2003/02/16] bin/48342 usb [PATCH] usbd dynamic device list. o [2003/03/19] kern/50110 usb [usb] Astra 2100U scanner being detected o [2003/05/08] kern/51958 usb [usb] [patch] update for urio driver o [2003/05/10] kern/52026 usb [usb] feature request: umass driver suppo f [2003/05/19] bin/52432 usb [sysinstall] drivers.flp won't load with o [2003/06/08] kern/53025 usb [PATCH] ugen does not allow O_NONBLOCK fo f [2003/09/19] kern/56999 usb FreeCom USB CD/RW problem on FreeBSD 5.1 o [2003/11/10] i386/59147 usb [usb] USB active extension cable not reco o [2003/11/11] kern/59169 usb [patch] ulpt is missing read operation o [2003/12/15] kern/60248 usb [patch] Problem with USB printer HP Laser o [2004/01/12] bin/61234 usb [usb] [patch] usbhidaction doesn't suppor o [2004/01/14] kern/61365 usb FreeBSD resets when I turn off monitor w/ o [2004/02/13] kern/62788 usb need quirks for Super Talent Flash USB 2. o [2004/03/04] kern/63779 usb [usb] USB-mass storage (USB to IDE Conver o [2004/03/06] kern/63837 usb [patch] USB: hid_is_collection() only loo o [2004/04/11] kern/65436 usb QUIRK: [patch] to add support for PNY Att o [2004/04/19] kern/65769 usb [usb] Call to tcflush(x, TCIFLUSH) stops o [2004/05/11] kern/66547 usb [usb] Palm Tungsten T USB does not initia o [2004/06/27] kern/68412 usb [usb] [patch] QUIRK: Philips KEY013 USB M o [2004/07/06] i386/68719 usb [usb] USB 2.0 mobil rack+ fat32 performan o [2004/08/16] kern/70523 usb [usb] [patch] umct sending/receiving wron o [2004/08/25] kern/70942 usb [usb] Genius Wireless USB mouse: moused d o [2004/09/06] kern/71416 usb [usb] Cryptoflex e-gate USB token (ugen0) o [2004/09/06] kern/71417 usb [usb] Cryptoflex e-gate USB token (ugen0) o [2004/09/07] kern/71455 usb [usb] Slow USB umass performance of 5.3 o [2004/09/11] kern/71605 usb [usb] [patch] umass doesn't recognize mul o [2004/10/05] kern/72344 usb [usb] [patch] QUIRK: Dane-Elec zMate 512 f [2004/10/06] i386/72380 usb [usb] USB does not work [dual Celeron Abi o [2004/10/23] i386/73056 usb [usb] Sun Microsystems Type 6 USB mouse n o [2004/11/02] i386/73421 usb [usb] USB not recgnized/working on Toshib o [2004/11/16] kern/73999 usb [usb] USB Freezes when a device is plugge o [2005/01/07] usb/75928 usb Cytronix SmartMedia card (SMC) reader has 45 problems total. From owner-freebsd-usb@FreeBSD.ORG Mon Jan 17 17:40:03 2005 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B50F616A4CE for ; Mon, 17 Jan 2005 17:40:03 +0000 (GMT) Received: from odin.ac.hmc.edu (Odin.AC.HMC.Edu [134.173.32.75]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6DB7843D3F for ; Mon, 17 Jan 2005 17:40:03 +0000 (GMT) (envelope-from brdavis@odin.ac.hmc.edu) Received: from odin.ac.hmc.edu (localhost.localdomain [127.0.0.1]) by odin.ac.hmc.edu (8.13.0/8.13.0) with ESMTP id j0HHhvbr012168; Mon, 17 Jan 2005 09:43:57 -0800 Received: (from brdavis@localhost) by odin.ac.hmc.edu (8.13.0/8.13.0/Submit) id j0HHhvR6012167; Mon, 17 Jan 2005 09:43:57 -0800 Date: Mon, 17 Jan 2005 09:43:57 -0800 From: Brooks Davis To: Joseph Rothstein Message-ID: <20050117174357.GA7538@odin.ac.hmc.edu> References: <2DEE1D04-67E7-11D9-BF02-000D93C8CD9C@mac.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="wac7ysb48OaltWcw" Content-Disposition: inline In-Reply-To: <2DEE1D04-67E7-11D9-BF02-000D93C8CD9C@mac.com> User-Agent: Mutt/1.4.1i X-Virus-Scanned: by amavisd-new X-Spam-Status: No, hits=0.0 required=8.0 tests=none autolearn=no version=2.63 X-Spam-Checker-Version: SpamAssassin 2.63 (2004-01-11) on odin.ac.hmc.edu cc: freebsd-usb@freebsd.org Subject: Re: APPLE USB extended keyboard not working X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Jan 2005 17:40:03 -0000 --wac7ysb48OaltWcw Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Jan 16, 2005 at 06:50:58PM +0100, Joseph Rothstein wrote: > Hi there, >=20 > I've come across a strange problem while trying to install FreeBSD 5.3. >=20 > I am attempting to install 5.3 on a PC suing the only keyboard I have =20 > available, which is an Apple USB extended one. I can get tot he =20 > sysinstall screen, but the keyboard at this point does not respond. It = =20 > will respond earlier in the install process. The space bar works, and I = =20 > can stop the countdown to the boot mode. Verbose booting shows that the = =20 > keyboard is detected. >=20 > I found this link, but am not sure how (or if I should) adjust the =20 > loader.conf to use the USB keyboard only. You need to set hint.atkbd.0.flags=3D"0x1" at the loader prompt. -- Brooks --=20 Any statement of the form "X is the one, true Y" is FALSE. PGP fingerprint 655D 519C 26A7 82E7 2529 9BF0 5D8E 8BE9 F238 1AD4 --wac7ysb48OaltWcw Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (GNU/Linux) iD8DBQFB6/lcXY6L6fI4GtQRAh7pAJ4rS97feqHDEti3Jnzpp0ItdGMqhQCfc+CD jGKeIQSclrJuBY9Rd7YJiXM= =VcHK -----END PGP SIGNATURE----- --wac7ysb48OaltWcw-- From owner-freebsd-usb@FreeBSD.ORG Tue Jan 18 02:17:52 2005 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7894D16A4CE for ; Tue, 18 Jan 2005 02:17:52 +0000 (GMT) Received: from salmon.maths.tcd.ie (salmon.maths.tcd.ie [134.226.81.11]) by mx1.FreeBSD.org (Postfix) with SMTP id 9D46043D31 for ; Tue, 18 Jan 2005 02:17:51 +0000 (GMT) (envelope-from iedowse@maths.tcd.ie) Received: from walton.maths.tcd.ie by salmon.maths.tcd.ie with SMTP id ; 18 Jan 2005 02:17:50 +0000 (GMT) To: irchat@free.fr In-Reply-To: Your message of "Sun, 16 Jan 2005 12:24:07 +0100." <1105874647.41ea4ed7f035f@imp6-q.free.fr> Date: Tue, 18 Jan 2005 02:17:50 +0000 From: Ian Dowse Message-ID: <200501180217.aa70939@salmon.maths.tcd.ie> cc: freebsd-usb@freebsd.org Subject: Re: Prism54 USB Wireless Adapters X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Jan 2005 02:17:52 -0000 In message <1105874647.41ea4ed7f035f@imp6-q.free.fr>, irchat@free.fr writes: >On Sunday 16 January 2005 02:46, Ian Dowse wrote: >> Try removing the USBD_NO_COPY flag from all the transfer setups. I >> happen to have a USB Prism54 device here, and removing that flag >> appears to cause the p54u_int_rx_cb function to get called. > >It worked. But I had to disable EHCI support in my kernel, is that a bug in >FreeBSD ? I'm running the 5.3 version, which seems to have support for >interrupt pipes on EHCI controllers. I see the same thing here - I had been using a UHCI controller originally, but when I use an EHCI controller I don't see p54u_int_rx_cb() getting called. Without a protocol analyser it may be hard to get much more information... The only thing unusual I could see about the Prism54 driver is that it does a lot of opening and closing of pipes, so maybe something like that is tickling EHCI bugs. >Testing my driver with or without USBD_NO_COPY and the EHCI makes the interrupt >callback never called. With UHCI and without USBD_NO_COPY, my code fails when >the xfers using the buffers that don't support DMA are submitted. Are you saying that something doesn't work with UHCI too? If you avoid the USBD_NO_COPY flag you shouldn't have to worry about DMA buffers, since the USB code will handle them itself. Or do you mean something different? Ian From owner-freebsd-usb@FreeBSD.ORG Tue Jan 18 06:20:28 2005 Return-Path: Delivered-To: freebsd-usb@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 976C216A4D1 for ; Tue, 18 Jan 2005 06:20:28 +0000 (GMT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5815C43D46 for ; Tue, 18 Jan 2005 06:20:28 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.1/8.13.1) with ESMTP id j0I6KSmC063064 for ; Tue, 18 Jan 2005 06:20:28 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.1/8.13.1/Submit) id j0I6KS9Z063063; Tue, 18 Jan 2005 06:20:28 GMT (envelope-from gnats) Resent-Date: Tue, 18 Jan 2005 06:20:28 GMT Resent-Message-Id: <200501180620.j0I6KS9Z063063@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-usb@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, "Timothy J. lee" Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4367616A4CE for ; Tue, 18 Jan 2005 06:17:09 +0000 (GMT) Received: from www.freebsd.org (www.freebsd.org [216.136.204.117]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0572243D39 for ; Tue, 18 Jan 2005 06:17:09 +0000 (GMT) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (localhost [127.0.0.1]) by www.freebsd.org (8.13.1/8.13.1) with ESMTP id j0I6H8wY072909 for ; Tue, 18 Jan 2005 06:17:08 GMT (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.13.1/8.13.1/Submit) id j0I6H8We072908; Tue, 18 Jan 2005 06:17:08 GMT (envelope-from nobody) Message-Id: <200501180617.j0I6H8We072908@www.freebsd.org> Date: Tue, 18 Jan 2005 06:17:08 GMT From: "Timothy J. lee" To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-2.3 Subject: usb/76395: USB printer does not work, usbdevs says "addr 0 should never happen!" X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Jan 2005 06:20:29 -0000 >Number: 76395 >Category: usb >Synopsis: USB printer does not work, usbdevs says "addr 0 should never happen!" >Confidential: no >Severity: serious >Priority: medium >Responsible: freebsd-usb >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Tue Jan 18 06:20:27 GMT 2005 >Closed-Date: >Last-Modified: >Originator: Timothy J. lee >Release: 5.3-RELEASE-p4 >Organization: >Environment: FreeBSD eozostrodon 5.3-RELEASE-p4 FreeBSD 5.3-RELEASE-p4 #2: Mon Jan 10 07:09:35 PST 2005 root@eozostrodon:/usr/src/sys/i386/compile/EOZOSTRODON i386 >Description: I have a PC (Asus A7M266 motherboard, AMD / VIA chipset) with FreeBSD 5.3-RELEASE-p4 (kernel is like GENERIC, but has eisa and a bunch of storage stuff removed, and sound and COMPAT_LINUX added -- no changes to USB stuff from GENERIC) with a USB printer (Brother HL-5050). USB printing to the same printer worked when the same computer had FreeBSD 4.8 on it. The computer's USB stuff in dmesg is (after booting up with the printer on): uhci0: port 0xb400-0xb41f irq 9 at device 4.2 on pci0 uhci0: [GIANT-LOCKED] usb0: on uhci0 usb0: USB revision 1.0 uhub0: VIA UHCI root hub, class 9/0, rev 1.00/1.00, addr 1 uhub0: 2 ports with 2 removable, self powered ulpt0: Brother HL-5050, rev 2.00/1.00, addr 2, iclass 7/1 ulpt0: using bi-directional mode uhci1: port 0xb000-0xb01f irq 9 at device 4.3 on pci0 uhci1: [GIANT-LOCKED] usb1: on uhci1 usb1: USB revision 1.0 uhub1: VIA UHCI root hub, class 9/0, rev 1.00/1.00, addr 1 uhub1: 2 ports with 2 removable, self powered Now, when I boot up the computer with the printer on, or turn on the printer for the first time after booting up, usbdevs shows: addr 1: UHCI root hub, VIA addr 2: HL-5050, Brother addr 1: UHCI root hub, VIA Then when I cat a text file to /dev/unlpt0, the printer's green light turns yellow, but nothing gets printed out. When I cat a text file to /dev/ulpt0, the shell gets stuck (and the printer's light turns green). Afterward, usbdevs shows: addr 1: UHCI root hub, VIA addr 2: product 0x0017, Brother Industries addr 1: UHCI root hub, VIA (pausing a long time between the first and second lines). If the printer is turned off and turned back on, usbdevs then shows: addr 1: UHCI root hub, VIA addr 0 should never happen! addr 1: UHCI root hub, VIA and dmesg shows: uhub0: device problem, disabling port 1 Neither lpd nor CUPS works either. >How-To-Repeat: Power on computer with printer turned on. Try to print using cat, or set up lpr or CUPS and try to print. >Fix: >Release-Note: >Audit-Trail: >Unformatted: From owner-freebsd-usb@FreeBSD.ORG Tue Jan 18 13:00:55 2005 Return-Path: Delivered-To: freebsd-usb@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B885616A4CF for ; Tue, 18 Jan 2005 13:00:55 +0000 (GMT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 73B1443D3F for ; Tue, 18 Jan 2005 13:00:55 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.1/8.13.1) with ESMTP id j0ID0ta4001473 for ; Tue, 18 Jan 2005 13:00:55 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.1/8.13.1/Submit) id j0ID0tu1001472; Tue, 18 Jan 2005 13:00:55 GMT (envelope-from gnats) Date: Tue, 18 Jan 2005 13:00:55 GMT Message-Id: <200501181300.j0ID0tu1001472@freefall.freebsd.org> To: freebsd-usb@FreeBSD.org From: Peter Pentchev Subject: Re: usb/76240: USB camera panics kernel X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Peter Pentchev List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Jan 2005 13:00:55 -0000 The following reply was made to PR usb/76240; it has been noted by GNATS. From: Peter Pentchev To: bug-followup@FreeBSD.org Cc: Subject: Re: usb/76240: USB camera panics kernel Date: Tue, 18 Jan 2005 14:54:55 +0200 On Fri, Jan 14, 2005 at 08:56:15AM +0000, Mark Ovens wrote: > >Synopsis: USB camera panics kernel [snip] > ugen1: Canon Inc. Canon Digital Camera, rev 1.10/0.01, addr 2 [snip] > I've done that, but now instead of "Can't connect to camera" the > computer crashes with a kernel panic [snip] > WARNING: Driver mistake: destroy_dev on 0/0 > panic: don't do that Just to add this to the audit trail: Claude Buisson submitted a patch in the <41E7DA39.6000204@nerim.net> message to the freebsd-usb list. His patch merges most of the -CURRENT version of ugen.c to the RELENG_5 branch. Here's a slightly modified version, which takes care of the 6.0-CURRENT-specific d_purge_t reference by conditional compilation based on __FreeBSD_version. G'luck, Peter Index: src/sys/dev/usb/ugen.c =================================================================== RCS file: /home/ncvs/src/sys/dev/usb/ugen.c,v retrieving revision 1.88.2.2 diff -u -r1.88.2.2 ugen.c --- src/sys/dev/usb/ugen.c 31 Dec 2004 08:01:48 -0000 1.88.2.2 +++ src/sys/dev/usb/ugen.c 18 Jan 2005 12:51:10 -0000 @@ -70,9 +70,10 @@ #else #include #endif -#include #include #include +#include +#include #include #include @@ -136,7 +137,30 @@ #define OUT 0 #define IN 1 +#if defined(__FreeBSD__) && __FreeBSD_version > 600003 +#define UGEN_DEV_REF(dev, sc) \ + if ((sc)->sc_dying || dev_refthread(dev) == NULL) \ + return (ENXIO) +#define UGEN_DEV_RELE(dev, sc) \ + dev_relthread(dev) +#define UGEN_DEV_OPEN(dev, sc) \ + /* handled by dev layer */ +#define UGEN_DEV_CLOSE(dev, sc) \ + /* handled by dev layer */ +#else int sc_refcnt; +#define UGEN_DEV_REF(dev, sc) \ + if ((sc)->sc_dying) \ + return (ENXIO); \ + (sc)->sc_refcnt++ +#define UGEN_DEV_RELE(dev, sc) \ + if (--(sc)->sc_refcnt < 0) \ + usb_detach_wakeup(USBDEV((sc)->sc_dev)) +#define UGEN_DEV_OPEN(dev, sc) \ + (sc)->sc_refcnt++ +#define UGEN_DEV_CLOSE(dev, sc) \ + UGEN_DEV_RELE(dev, sc) +#endif u_char sc_dying; }; @@ -149,7 +173,24 @@ d_write_t ugenwrite; d_ioctl_t ugenioctl; d_poll_t ugenpoll; +#if defined(__FreeBSD__) && __FreeBSD_version > 600003 +d_purge_t ugenpurge; +#endif +Static struct cdevsw ugenctl_cdevsw = { + .d_version = D_VERSION, + .d_flags = D_NEEDGIANT, + .d_open = ugenopen, + .d_close = ugenclose, + .d_ioctl = ugenioctl, +#if defined(__FreeBSD__) && __FreeBSD_version > 600003 + .d_purge = ugenpurge, +#endif + .d_name = "ugenctl", +#if __FreeBSD_version < 500014 + .d_bmaj -1 +#endif +}; Static struct cdevsw ugen_cdevsw = { .d_version = D_VERSION, @@ -160,6 +201,9 @@ .d_write = ugenwrite, .d_ioctl = ugenioctl, .d_poll = ugenpoll, +#if defined(__FreeBSD__) && __FreeBSD_version > 600003 + .d_purge = ugenpurge, +#endif .d_name = "ugen", #if __FreeBSD_version < 500014 .d_bmaj -1 @@ -241,8 +285,10 @@ #if defined(__FreeBSD__) /* the main device, ctrl endpoint */ - sc->dev = make_dev(&ugen_cdevsw, UGENMINOR(USBDEVUNIT(sc->sc_dev), 0), - UID_ROOT, GID_OPERATOR, 0644, "%s", USBDEVNAME(sc->sc_dev)); + sc->dev = make_dev(&ugenctl_cdevsw, + UGENMINOR(USBDEVUNIT(sc->sc_dev), 0), UID_ROOT, GID_OPERATOR, 0644, + "%s", USBDEVNAME(sc->sc_dev)); + ugen_make_devnodes(sc); #endif USB_ATTACH_SUCCESS_RETURN; @@ -271,6 +317,7 @@ UID_ROOT, GID_OPERATOR, 0644, "%s.%d", USBDEVNAME(sc->sc_dev), endptno); + dev_depends(sc->dev, dev); if (sc->sc_endpoints[endptno][IN].sc != NULL) sc->sc_endpoints[endptno][IN].dev = dev; if (sc->sc_endpoints[endptno][OUT].sc != NULL) @@ -322,10 +369,6 @@ DPRINTFN(1,("ugen_set_config: %s to configno %d, sc=%p\n", USBDEVNAME(sc->sc_dev), configno, sc)); -#if defined(__FreeBSD__) - ugen_destroy_devnodes(sc); -#endif - /* We start at 1, not 0, because we don't care whether the * control endpoint is open or not. It is always present. */ @@ -437,10 +480,6 @@ } } -#if defined(__FreeBSD__) - ugen_make_devnodes(sc); -#endif - return (USBD_NORMAL_COMPLETION); } @@ -471,7 +510,7 @@ if (endpt == USB_CONTROL_ENDPOINT) { sc->sc_is_open[USB_CONTROL_ENDPOINT] = 1; - sc->sc_refcnt++; + UGEN_DEV_OPEN(dev, sc); return (0); } @@ -479,7 +518,7 @@ for (dir = OUT; dir <= IN; dir++) { if (flag & (dir == OUT ? FWRITE : FREAD)) { sce = &sc->sc_endpoints[endpt][dir]; - if (sce == 0 || sce->edesc == 0) + if (sce->edesc == 0) return (ENXIO); } } @@ -582,7 +621,7 @@ } } sc->sc_is_open[endpt] = 1; - sc->sc_refcnt++; + UGEN_DEV_OPEN(dev, sc); return (0); } @@ -610,8 +649,7 @@ if (endpt == USB_CONTROL_ENDPOINT) { DPRINTFN(5, ("ugenclose: close control\n")); sc->sc_is_open[endpt] = 0; - if (--sc->sc_refcnt == 0) - usb_detach_wakeup(USBDEV(sc->sc_dev)); + UGEN_DEV_CLOSE(dev, sc); return (0); } @@ -619,7 +657,7 @@ if (!(flag & (dir == OUT ? FWRITE : FREAD))) continue; sce = &sc->sc_endpoints[endpt][dir]; - if (sce == NULL || sce->pipeh == NULL) + if (sce->pipeh == NULL) continue; DPRINTFN(5, ("ugenclose: endpt=%d dir=%d sce=%p\n", endpt, dir, sce)); @@ -648,8 +686,7 @@ } } sc->sc_is_open[endpt] = 0; - if (--sc->sc_refcnt == 0) - usb_detach_wakeup(USBDEV(sc->sc_dev)); + UGEN_DEV_CLOSE(dev, sc); return (0); } @@ -674,9 +711,6 @@ if (endpt == USB_CONTROL_ENDPOINT) return (ENODEV); - if (sce == NULL) - return (EINVAL); - #ifdef DIAGNOSTIC if (sce->edesc == NULL) { printf("ugenread: no edesc\n"); @@ -693,7 +727,7 @@ /* Block until activity occurred. */ s = splusb(); while (sce->q.c_cc == 0) { - if (flag & IO_NDELAY) { + if (flag & O_NONBLOCK) { splx(s); return (EWOULDBLOCK); } @@ -734,10 +768,10 @@ DPRINTFN(1, ("ugenread: start transfer %d bytes\n",n)); tn = n; err = usbd_bulk_transfer( - xfer, sce->pipeh, - sce->state & UGEN_SHORT_OK ? - USBD_SHORT_XFER_OK : 0, - sce->timeout, buf, &tn, "ugenrb"); + xfer, sce->pipeh, + sce->state & UGEN_SHORT_OK ? + USBD_SHORT_XFER_OK : 0, + sce->timeout, buf, &tn, "ugenrb"); if (err) { if (err == USBD_INTERRUPTED) error = EINTR; @@ -757,7 +791,7 @@ case UE_ISOCHRONOUS: s = splusb(); while (sce->cur == sce->fill) { - if (flag & IO_NDELAY) { + if (flag & O_NONBLOCK) { splx(s); return (EWOULDBLOCK); } @@ -808,7 +842,9 @@ USB_GET_SC(ugen, UGENUNIT(dev), sc); + UGEN_DEV_REF(dev, sc); error = ugen_do_read(sc, endpt, uio, flag); + UGEN_DEV_RELE(dev, sc); return (error); } @@ -830,9 +866,6 @@ if (endpt == USB_CONTROL_ENDPOINT) return (ENODEV); - if (sce == NULL) - return (EINVAL); - #ifdef DIAGNOSTIC if (sce->edesc == NULL) { printf("ugenwrite: no edesc\n"); @@ -907,7 +940,9 @@ USB_GET_SC(ugen, UGENUNIT(dev), sc); + UGEN_DEV_REF(dev, sc); error = ugen_do_write(sc, endpt, uio, flag); + UGEN_DEV_RELE(dev, sc); return (error); } @@ -929,14 +964,33 @@ } #endif +#if defined(__FreeBSD__) && __FreeBSD_version > 600003 +void +ugenpurge(struct cdev *dev) +{ + int endpt = UGENENDPOINT(dev); + struct ugen_endpoint *sce; + struct ugen_softc *sc; + + if (endpt == USB_CONTROL_ENDPOINT) + return; + USB_GET_SC(ugen, UGENUNIT(dev), sc); + sce = &sc->sc_endpoints[endpt][IN]; + if (sce->pipeh) + usbd_abort_pipe(sce->pipeh); +} +#endif + USB_DETACH(ugen) { USB_DETACH_START(ugen, sc); struct ugen_endpoint *sce; int i, dir; +/* Not sure if this declaration must be moved inside the + defined(__NetBSD__) || defined(__OpenBSD__) below, or not */ int s; #if defined(__NetBSD__) || defined(__OpenBSD__) - int maj, mn; + int maj, mn, c; #endif #if defined(__NetBSD__) || defined(__OpenBSD__) @@ -950,11 +1004,13 @@ for (i = 0; i < USB_MAX_ENDPOINTS; i++) { for (dir = OUT; dir <= IN; dir++) { sce = &sc->sc_endpoints[i][dir]; - if (sce && sce->pipeh) + if (sce->pipeh) usbd_abort_pipe(sce->pipeh); } } +/* Not sure if this instruction group must be moved inside the + defined(__NetBSD__) || defined(__OpenBSD__) below, or not */ s = splusb(); if (sc->sc_refcnt > 0) { /* Wake everyone */ @@ -967,6 +1023,17 @@ splx(s); #if defined(__NetBSD__) || defined(__OpenBSD__) + /* Wait for opens to go away. */ + do { + c = 0; + for (i = 0; i < USB_MAX_ENDPOINTS; i++) { + if (sc->sc_is_open[i]) + c++; + } + if (c != 0) + tsleep(&sc->sc_dying, PZERO, "ugendr", hz); + } while (c != 0); + /* locate the major number */ for (maj = 0; maj < nchrdev; maj++) if (cdevsw[maj].d_open == ugenopen) @@ -978,7 +1045,6 @@ #elif defined(__FreeBSD__) /* destroy the device for the control endpoint */ destroy_dev(sc->dev); - ugen_destroy_devnodes(sc); #endif return (0); @@ -1230,6 +1296,7 @@ switch (cmd) { case FIONBIO: + case FIOASYNC: /* All handled in the upper FS layer. */ return (0); case USB_SET_SHORT_XFER: @@ -1237,8 +1304,6 @@ return (EINVAL); /* This flag only affects read */ sce = &sc->sc_endpoints[endpt][IN]; - if (sce == NULL) - return (EINVAL); if (sce->pipeh == NULL) { printf("ugenioctl: USB_SET_SHORT_XFER, no pipe\n"); @@ -1252,8 +1317,6 @@ return (0); case USB_SET_TIMEOUT: sce = &sc->sc_endpoints[endpt][IN]; - if (sce == NULL) - return (EINVAL); sce->timeout = *(int *)addr; return (0); default: @@ -1281,6 +1344,9 @@ err = ugen_set_config(sc, *(int *)addr); switch (err) { case USBD_NORMAL_COMPLETION: +#if defined(__FreeBSD__) + ugen_make_devnodes(sc); +#endif break; case USBD_IN_USE: return (EBUSY); @@ -1488,7 +1554,9 @@ USB_GET_SC(ugen, UGENUNIT(dev), sc); + UGEN_DEV_REF(dev, sc); error = ugen_do_ioctl(sc, endpt, cmd, addr, flag, p); + UGEN_DEV_RELE(dev, sc); return (error); } @@ -1507,9 +1575,6 @@ /* XXX always IN */ sce = &sc->sc_endpoints[UGENENDPOINT(dev)][IN]; - if (sce == NULL) - return (EINVAL); - #ifdef DIAGNOSTIC if (!sce->edesc) { printf("ugenpoll: no edesc\n"); -- Peter Pentchev roam@ringlet.net roam@cnsys.bg roam@FreeBSD.org PGP key: http://people.FreeBSD.org/~roam/roam.key.asc Key fingerprint FDBA FD79 C26F 3C51 C95E DF9E ED18 B68D 1619 4553 I had to translate this sentence into English because I could not read the original Sanskrit. From owner-freebsd-usb@FreeBSD.ORG Wed Jan 19 12:20:28 2005 Return-Path: Delivered-To: freebsd-usb@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7767816A531 for ; Wed, 19 Jan 2005 12:20:28 +0000 (GMT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3B7E143D48 for ; Wed, 19 Jan 2005 12:20:28 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.1/8.13.1) with ESMTP id j0JCKSX1006391 for ; Wed, 19 Jan 2005 12:20:28 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.1/8.13.1/Submit) id j0JCKSwG006389; Wed, 19 Jan 2005 12:20:28 GMT (envelope-from gnats) Resent-Date: Wed, 19 Jan 2005 12:20:28 GMT Resent-Message-Id: <200501191220.j0JCKSwG006389@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-usb@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Arne Wörner Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1625616A4CE for ; Wed, 19 Jan 2005 12:18:29 +0000 (GMT) Received: from www.freebsd.org (www.freebsd.org [216.136.204.117]) by mx1.FreeBSD.org (Postfix) with ESMTP id F3DBC43D48 for ; Wed, 19 Jan 2005 12:18:28 +0000 (GMT) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (localhost [127.0.0.1]) by www.freebsd.org (8.13.1/8.13.1) with ESMTP id j0JCISab045205 for ; Wed, 19 Jan 2005 12:18:28 GMT (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.13.1/8.13.1/Submit) id j0JCISXp045204; Wed, 19 Jan 2005 12:18:28 GMT (envelope-from nobody) Message-Id: <200501191218.j0JCISXp045204@www.freebsd.org> Date: Wed, 19 Jan 2005 12:18:28 GMT From: Arne Wörner To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-2.3 Subject: usb/76461: disklabel of umass(4)-CAM(4)-da(4) not used by devfs automatically X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 Jan 2005 12:20:28 -0000 >Number: 76461 >Category: usb >Synopsis: disklabel of umass(4)-CAM(4)-da(4) not used by devfs automatically >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-usb >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Wed Jan 19 12:20:27 GMT 2005 >Closed-Date: >Last-Modified: >Originator: Arne Wörner >Release: R5.3 >Organization: >Environment: FreeBSD neo.riddick.homeunix.org. 5.3-RELEASE FreeBSD 5.3-RELEASE #22: Tue Jan 11 13:42:46 UTC 2005 aw@neo.riddick.homeunix.org.:/opt/src/sys/i386/compile/RIDDICK i386 >Description: This problem might be related to usb/75928 (same device/setting). The disklabel on my SmartMedia card is not used apropriately. Although "disklabel da0" show the correct disklabel the devices /dev/da0c and /dev/da0a do not show up. Another "disklabel -w da0" is necessary. camcontrol rescan and reset do not help. >How-To-Repeat: 1. disklabel -w da0 2. reboot 3. disklabel da0 shows disklabel 4. ls /dev/da0* show just /dev/da0 5. disklabel -w da0 6. ls /dev/da0* shows /dev/da0, /dev/da0a, /dev/da0c >Fix: >Release-Note: >Audit-Trail: >Unformatted: From owner-freebsd-usb@FreeBSD.ORG Wed Jan 19 12:34:43 2005 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 76E5A16A4CE for ; Wed, 19 Jan 2005 12:34:43 +0000 (GMT) Received: from dastardly.newsbastards.org.72.27.172.IN-addr.ARPA.NOSPAM.dyndns.dk (84-72-27-104.dclient.hispeed.ch [84.72.27.104]) by mx1.FreeBSD.org (Postfix) with ESMTP id D1A6143D46 for ; Wed, 19 Jan 2005 12:34:41 +0000 (GMT) (envelope-from bounce@NOSPAM.dyndns.dk) Received: from Mail.NOSPAM.DynDNS.dK (ipv6.NOSPAM.dyndns.dk [IPv6:2002:5448:1b68:0:206:28ff:fed8:8dcf]) (8.13.2/8.11.6-SPAMMERS-DeLiGHt) with ESMTP id j0JCYbIe000675NO) for ; Wed, 19 Jan 2005 13:34:39 +0100 (CET) (envelope-from bounce@NOSPAM.dyndns.dk) Received: (from beer@localhost) by Mail.NOSPAM.DynDNS.dK (8.13.2/FNORD) id j0JCYasq000674; Wed, 19 Jan 2005 13:34:36 +0100 (CET) (envelope-from bounce@NOSPAM.dyndns.dk) Date: Wed, 19 Jan 2005 13:34:36 +0100 (CET) Message-Id: <200501191234.j0JCYasq000674@Mail.NOSPAM.DynDNS.dK> X-Authentication-Warning: localhost.newsbastards.org.72.27.172.IN-addr.A: beer set sender to bounce@NOSPAM.dyndns.dk using -f X-Authentication-Warning: localhost.newsbastards.org.72.27.172.IN-addr.A: Processed from queue /tmp X-Authentication-Warning: localhost.newsbastards.org.72.27.172.IN-addr.A: Processed by beer with -C /etc/mail/sendmail.cf-LOCAL From: Barry Bouwsma References: <200501101103.j0AB3ENh095604@freefall.freebsd.org> <41E32B44.90807@elischer.org> <200501111205.j0BC53T2015903@Mail.NOSPAM.DynDNS.dK> <41E42D08.90407@elischer.org> To: freebsd-usb@freebsd.org Mail-Followup-To: freebsd-usb@freebsd.org Subject: Re: Current problem reports assigned to you X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Barry Bouwsma List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 Jan 2005 12:34:43 -0000 On Tue, 11 Jan 2005 11:46:16 -0800, Julian Elischer wrote: > >Could this be the same thing? I have two WD disks, and they work, though > >there is a difference in reported size from USB and Firewire... (add that > >to my list of USB problems) > the question is: Which returns the wrong number, USB or SBP? Apparently, USB, in both cases. It seems to be a quirk of the chip that translates ATA to USB. And if I read the Linux quirks right, the same problem affects the iPod, among other devices. A search shows another FreeBSD user with the same drive in a different housing getting the correct number of sectors. Aug 7 12:14:25 Crappy /kernel: umass0: Cypress Semiconductor USB2.0 Storage Device, rev 2.00/0.01, addr 2 Aug 7 12:14:25 Crappy /kernel: umass0: Get Max Lun not supported (STALLED) Aug 7 12:14:32 Crappy /kernel: da0 at umass-sim0 bus 0 target 0 lun 0 Aug 7 12:14:32 Crappy /kernel: da0: Fixed Direct Access SCSI-0 device Aug 7 12:14:32 Crappy /kernel: da0: 650KB/s transfers Aug 7 12:14:32 Crappy /kernel: da0: 190782MB (390721968 512 byte sectors: 64H 32S/T 59710C) Someone else has a different housing and OpenBSD: umass0: LaCie USB 2.0 LaCie d2 HD, rev 2.00/9a.bc, addr 2 umass0: using SCSI over Bulk-Only scsibus1 at umass0: 2 targets sd0 at scsibus1 targ 1 lun 0: SCSI4 0/direct fixed sd0: 190782MB, 190782 cyl, 64 head, 32 sec, 512 bytes/sec, 390721968 sec Another data point comes from Linux: Vendor: USB 2.0 Model: Storage Device Rev: 0100 Type: Direct-Access ANSI SCSI revision: 02 SCSI device sdb: 390721968 512-byte hdwr sectors (200050 MB) Nice vendor and model there, eh. Not that I have any better: umass0: Generic USB 2.0 Storage Device, rev 2.00/0.01, addr 3 pass1: Fixed Direct Access SCSI-0 device da1: 190782MB (390721969 512 byte sectors: 255H 63S/T 24321C) Thus it appears a quirk can be added for my USB vendor and product, which I've tried in umass.c, but I don't think this quite does the trick. I think I need to fix the volume size (sectors) in cam/scsi/da.c instead. But do those quirk entries operate on the WDC string one sees above in the `pass1' line, and have nothing to do with the USB chip vendor/product IDs? Here's the USB info for the second drive I have with this problem: port 4 addr 5: full speed, power 2 mA, config 1, product 0x3507(0x3507), ASSMA NN Electronic GmbH(0x067b), rev 0.01 and the original: port 2 addr 3: full speed, power 2 mA, config 1, USB 2.0 Storage Device(0x0082 ), Generic(0x0840), rev 0.01 It's not just a single vendor/product with this problem. To repeat my question, can cam/scsi correct for a problem that is identified in the usb layer -- or is it possible for a usb quirk to reach over to cam/scsi? thanks barry bouwsma From owner-freebsd-usb@FreeBSD.ORG Wed Jan 19 13:01:17 2005 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 337CE16A4CE for ; Wed, 19 Jan 2005 13:01:17 +0000 (GMT) Received: from dastardly.newsbastards.org.72.27.172.IN-addr.ARPA.NOSPAM.dyndns.dk (84-72-27-104.dclient.hispeed.ch [84.72.27.104]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7EE1443D46 for ; Wed, 19 Jan 2005 13:01:13 +0000 (GMT) (envelope-from bounce@NOSPAM.dyndns.dk) Received: from Mail.NOSPAM.DynDNS.dK (ipv6.NOSPAM.dyndns.dk [IPv6:2002:5448:1b68:0:206:28ff:fed8:8dcf]) (8.13.2/8.11.6-SPAMMERS-DeLiGHt) with ESMTP id j0JD1BQZ000722NO) for ; Wed, 19 Jan 2005 14:01:12 +0100 (CET) (envelope-from bounce@NOSPAM.dyndns.dk) Received: (from beer@localhost) by Mail.NOSPAM.DynDNS.dK (8.13.2/FNORD) id j0JD1A10000721; Wed, 19 Jan 2005 14:01:11 +0100 (CET) (envelope-from bounce@NOSPAM.dyndns.dk) Date: Wed, 19 Jan 2005 14:01:11 +0100 (CET) Message-Id: <200501191301.j0JD1A10000721@Mail.NOSPAM.DynDNS.dK> X-Authentication-Warning: localhost.newsbastards.org.72.27.172.IN-addr.A: beer set sender to bounce@NOSPAM.dyndns.dk using -f X-Authentication-Warning: localhost.newsbastards.org.72.27.172.IN-addr.A: Processed from queue /tmp X-Authentication-Warning: localhost.newsbastards.org.72.27.172.IN-addr.A: Processed by beer with -C /etc/mail/sendmail.cf-LOCAL From: Barry Bouwsma To: freebsd-usb@freebsd.org Mail-Followup-To: freebsd-usb@freebsd.org Subject: usb stack merges from wherever... X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Barry Bouwsma List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 Jan 2005 13:01:17 -0000 Hi Julian or whoever; Is there work-in-progress to merge USB goodies into 4.x, and/or from NetBSD into -current? Since I'm running RELENG_4, I'd be happy to submit patches needed to merge -current usb source into 4.x that I use. Especially if 4.x is lacking. In particular, I'm using current-ified versions of umass.c, and now also ums.c, both of which appear to offer benefits over the 4.x sources. The ums.c code would be easier to plug in as-is. There needs to be one change made to a different file, and then my hacked ums.c should work in both -current and 4.x. I've built new virginal core usb.ko as a module, to make sure I don't have any hidden hacks that make MFC'ed code work -- apart from usbdevs additions that I'm not trying to keep track of -- and I appear to see a slight improvement with -current ums.c over that in 4.x -- the latter would often result in random mouse movements on my screen, which I'm not noticing with -current source. Nothing is obviously broken for me. The files can be found at https://NOSPAM.dyndns.dk/hacks/usb/ums/ (if you can't reach it when you read this, try over the weekend) You'll need to apply the patch for usbhid.h . If there haven't been any changes to -current's ums.c over the past week or two (my CVS repository isn't up-to-date, and it's always good to verify), then the ums.c file at the above URL can be diff'ed against both -current and 4.x to see what I've done. I don't know what would be a candidate for -current for diff reduction, and what would be only applicable for 4.x, so I'll leave that to someone with experience in MFCing or MT4ing. As usual, once my hacks have been reviewed and cleaned up (everything I've done should be found by searching `XXX' and/or `HACK'), you should test and make sure I haven't overlooked anything (like usbdevs), before committing to RELENG_4. My machine is too slow for me to do this in a timely manner. I also would like to submit my MFC/MT4 for umass.c, but this is a bit more intrusive, and also probably requires a few commits to HEAD for new functionality first. It fixes significantly more issues for me. Another thing I've just noticed by using a virginal base usb.ko module instead of what I had been using, is that now I'm having uaudio isoc TD alloc problems again, that had disappeared with my hacked code. I don't know how much of my hacked code is taken from Ian Dowse's megapatches, or if my Works-For-Me hacks are candidates for 4.x if they aren't applicable to -current. I'll see what I can do, if there's interest to fix problems in 4.x. thanks barry bouwsma From owner-freebsd-usb@FreeBSD.ORG Wed Jan 19 20:32:18 2005 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2393E16A4CE for ; Wed, 19 Jan 2005 20:32:18 +0000 (GMT) Received: from mail.vicor-nb.com (bigwoop.vicor-nb.com [208.206.78.2]) by mx1.FreeBSD.org (Postfix) with ESMTP id CB58543D1F for ; Wed, 19 Jan 2005 20:32:17 +0000 (GMT) (envelope-from julian@elischer.org) Received: from elischer.org (julian.vicor-nb.com [208.206.78.97]) by mail.vicor-nb.com (Postfix) with ESMTP id 5555A7A452; Wed, 19 Jan 2005 12:32:17 -0800 (PST) Message-ID: <41EEC3D1.8050405@elischer.org> Date: Wed, 19 Jan 2005 12:32:17 -0800 From: Julian Elischer User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.3.1) Gecko/20030516 X-Accept-Language: en, hu MIME-Version: 1.0 To: Barry Bouwsma References: <200501101103.j0AB3ENh095604@freefall.freebsd.org> <41E32B44.90807@elischer.org> <200501111205.j0BC53T2015903@Mail.NOSPAM.DynDNS.dK> <41E42D08.90407@elischer.org> <200501191234.j0JCYasq000674@Mail.NOSPAM.DynDNS.dK> In-Reply-To: <200501191234.j0JCYasq000674@Mail.NOSPAM.DynDNS.dK> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit cc: freebsd-usb@freebsd.org Subject: Re: Current problem reports assigned to you X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 Jan 2005 20:32:18 -0000 Barry Bouwsma wrote: >On Tue, 11 Jan 2005 11:46:16 -0800, Julian Elischer wrote: > > > >>>Could this be the same thing? I have two WD disks, and they work, though >>>there is a difference in reported size from USB and Firewire... (add that >>>to my list of USB problems) >>> >>> > > > >>the question is: Which returns the wrong number, USB or SBP? >> >> yep the right number is 390721968 I have one here.. WDC WD2000BB-00DAA0 WD-WMACK1337522 186.31 GB (390721968 blocks) (I have JBs as well as BBs buth they have the same number of blocks.) >Apparently, USB, in both cases. It seems to be a quirk of the chip >that translates ATA to USB. And if I read the Linux quirks right, >the same problem affects the iPod, among other devices. > >A search shows another FreeBSD user with the same drive in a >different housing getting the correct number of sectors. >Aug 7 12:14:25 Crappy /kernel: umass0: Cypress Semiconductor USB2.0 Storage >Device, rev 2.00/0.01, addr 2 >Aug 7 12:14:25 Crappy /kernel: umass0: Get Max Lun not supported (STALLED) >Aug 7 12:14:32 Crappy /kernel: da0 at umass-sim0 bus 0 target 0 lun 0 >Aug 7 12:14:32 Crappy /kernel: da0: Fixed >Direct Access SCSI-0 device >Aug 7 12:14:32 Crappy /kernel: da0: 650KB/s transfers >Aug 7 12:14:32 Crappy /kernel: da0: 190782MB (390721968 512 byte sectors: >64H 32S/T 59710C) > >Someone else has a different housing and OpenBSD: > umass0: LaCie USB 2.0 LaCie d2 HD, rev 2.00/9a.bc, addr 2 > umass0: using SCSI over Bulk-Only > scsibus1 at umass0: 2 targets > sd0 at scsibus1 targ 1 lun 0: SCSI4 > 0/direct fixed > sd0: 190782MB, 190782 cyl, 64 head, 32 sec, 512 bytes/sec, 390721968 > sec > >Another data point comes from Linux: > Vendor: USB 2.0 Model: Storage Device Rev: 0100 > Type: Direct-Access ANSI SCSI revision: 02 > SCSI device sdb: 390721968 512-byte hdwr sectors (200050 MB) > >Nice vendor and model there, eh. Not that I have any better: >umass0: Generic USB 2.0 Storage Device, rev 2.00/0.01, addr 3 >pass1: Fixed Direct Access SCSI-0 device >da1: 190782MB (390721969 512 byte sectors: 255H 63S/T 24321C) > >Thus it appears a quirk can be added for my USB vendor and product, >which I've tried in umass.c, but I don't think this quite does the >trick. > >I think I need to fix the volume size (sectors) in cam/scsi/da.c >instead. But do those quirk entries operate on the WDC string one >sees above in the `pass1' line, and have nothing to do with the USB >chip vendor/product IDs? > > >Here's the USB info for the second drive I have with this problem: > port 4 addr 5: full speed, power 2 mA, config 1, product 0x3507(0x3507), ASSMA >NN Electronic GmbH(0x067b), rev 0.01 >and the original: > port 2 addr 3: full speed, power 2 mA, config 1, USB 2.0 Storage Device(0x0082 >), Generic(0x0840), rev 0.01 >It's not just a single vendor/product with this problem. > > >To repeat my question, can cam/scsi correct for a problem that is >identified in the usb layer -- or is it possible for a usb quirk to >reach over to cam/scsi? > I guess it is a problem in an OEM chip made by some 3rd party manufacturer. (ATA<->USB) You certainly can not get CAM to fix it depending on the WD string as that would be triggered by firewire too. or atapicam. The USB umass layer intercepts a lot of commands.. maybe you should intercept this one too? > > >thanks >barry bouwsma > >_______________________________________________ >freebsd-usb@freebsd.org mailing list >http://lists.freebsd.org/mailman/listinfo/freebsd-usb >To unsubscribe, send any mail to "freebsd-usb-unsubscribe@freebsd.org" > > From owner-freebsd-usb@FreeBSD.ORG Fri Jan 21 01:59:16 2005 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E1E8016A4CE for ; Fri, 21 Jan 2005 01:59:16 +0000 (GMT) Received: from dastardly.newsbastards.org.72.27.172.IN-addr.ARPA.NOSPAM.dyndns.dk (84-72-18-130.dclient.hispeed.ch [84.72.18.130]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2007343D49 for ; Fri, 21 Jan 2005 01:59:15 +0000 (GMT) (envelope-from bounce@NOSPAM.dyndns.dk) Received: from Mail.NOSPAM.DynDNS.dK (ipv6.NOSPAM.dyndns.dk [IPv6:2002:5448:1282:0:206:28ff:fed8:8dcf]) (8.13.2/8.11.6-SPAMMERS-DeLiGHt) with ESMTP id j0L1x9p7002018NO) for ; Fri, 21 Jan 2005 02:59:12 +0100 (CET) (envelope-from bounce@NOSPAM.dyndns.dk) Received: (from beer@localhost) by Mail.NOSPAM.DynDNS.dK (8.13.2/FNORD) id j0L1x8Ze002017; Fri, 21 Jan 2005 02:59:08 +0100 (CET) (envelope-from bounce@NOSPAM.dyndns.dk) Date: Fri, 21 Jan 2005 02:59:08 +0100 (CET) Message-Id: <200501210159.j0L1x8Ze002017@Mail.NOSPAM.DynDNS.dK> X-Authentication-Warning: localhost.newsbastards.org.72.27.172.IN-addr.A: beer set sender to bounce@NOSPAM.dyndns.dk using -f X-Authentication-Warning: localhost.newsbastards.org.72.27.172.IN-addr.A: Processed from queue /tmp X-Authentication-Warning: localhost.newsbastards.org.72.27.172.IN-addr.A: Processed by beer with -C /etc/mail/sendmail.cf-LOCAL From: Barry Bouwsma References: <200501101103.j0AB3ENh095604@freefall.freebsd.org> <41E32B44.90807@elischer.org> <200501111205.j0BC53T2015903@Mail.NOSPAM.DynDNS.dK> <41E42D08.90407@elischer.org> To: freebsd-usb@freebsd.org Mail-Followup-To: freebsd-usb@freebsd.org Subject: Re: Current problem reports assigned to you X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Barry Bouwsma List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Jan 2005 01:59:17 -0000 On Tue, 11 Jan 2005 11:46:16 -0800, Julian Elischer wrote: > >| a [2003/03/02] kern/48849 usb Maxtor XT5000 causes panic in boot > >I have such a device, and the only problem I've had (4.x) is minor, > >for which I added the NO_GETMAXLUN quirk. I use it all the time. > got a patch? Yes, but it doesn't address the problem -- if it exists -- that prompted the PR. -- cut'n'paste part of diff - tab damage -- danger -- --- /stand/FreeBSD4-src/source-hacks/sys/dev/usb/umass.c-NEWER-current Mon Dec 27 19:28:28 2004 +++ /stand/FreeBSD4-src/source-hacks/sys/dev/usb/umass.c Tue Dec 28 21:07 :39 2004 @@ -369,6 +384,12 @@ UMASS_PROTO_SCSI | UMASS_PROTO_BBB, NO_QUIRKS }, +/* XXX HACK */ + { USB_VENDOR_MAXTOR, USB_PRODUCT_MAXTOR_5000, RID_WILDCARD, + UMASS_PROTO_SCSI | UMASS_PROTO_BBB, + NO_GETMAXLUN + }, +/* XXX HACK */ { USB_VENDOR_MELCO, USB_PRODUCT_MELCO_DUBPXXG, RID_WILDCARD, UMASS_PROTO_SCSI | UMASS_PROTO_BBB, FORCE_SHORT_INQUIRY | NO_START_STOP | IGNORE_RESIDUE @@ -1084,7 +1106,8 @@ /* Get the maximum LUN supported by the device. */ - if ((sc->proto & UMASS_PROTO_WIRE) == UMASS_PROTO_BBB) + if ((sc->proto & UMASS_PROTO_WIRE) == UMASS_PROTO_BBB && /* XXX HACK */ + !(sc->quirks & NO_GETMAXLUN)) sc->maxlun = umass_bbb_get_max_lun(sc); else sc->maxlun = 0; > I'll add it and close the PR. You'll also need to add a couple vendor IDs to usbdevs, or the build will fail again. That's part of the giant diff I have, and as imp@ has been active on that front, I'm not sure how that is progressing. My line to add the vendor ID is surrounded by some 50 lines worth of diff, and the section of diff which adds the product is next to another vendor/product new entry that could potentially break the build. Also, the above cut-n-paste diff is part of a larger diff that makes current's umass.c a plug-in replacement for 4.x If a grep for `MAXTOR' in usbdevs returns the above added definitions, you're in luck; else it's probably easiest to apply them by hand to usbdevs from my latest diffs. All this does is (for me) to speed up boot by a good deal of time. Whether the Original Poster would still see the Original Problem, I cannot say -- perhaps it's also an interaction with the particular chipset in use. You'll need to get a followup from the OP before safely closing the PR. (There have been enough changes since that time that whatever it was could have been solved elsewhere, anyway) Also, if you're wanting to update quirk entries in umass.c, I needed to do the following to get one USB-IDE device to cooperate (in 4.x, based on -current code, not tested on other than 4.x; not sure if the original quirk entry was adequate for all devices, or if this particular adapter is more broken than normal, or if -current doesn't have this problem to start with)... (tab damage) @ -312,6 +321,9 @@ # define NO_INQUIRY 0x0400 /* Device cannot handle INQUIRY EVPD, return CHECK CONDITION */ # define NO_INQUIRY_EVPD 0x0800 +/* XXX */ + /* The device uses a weird CSW TAG. */ +# define WRONG_CSWTAG 0x1000 }; Static struct umass_devdescr_t umass_devdescrs[] = { @@ -419,7 +437,8 @@ }, { USB_VENDOR_SCANLOGIC, USB_PRODUCT_SCANLOGIC_SL11R, RID_WILDCARD, UMASS_PROTO_ATAPI | UMASS_PROTO_BBB, - NO_INQUIRY +/* XXX */ + NO_INQUIRY | WRONG_CSWTAG }, { USB_VENDOR_SHUTTLE, USB_PRODUCT_SHUTTLE_EUSB, RID_WILDCARD, UMASS_PROTO_ATAPI | UMASS_PROTO_CBI_I, @@ -1422,6 +1444,8 @@ { struct umass_softc *sc = (struct umass_softc *) priv; usbd_xfer_handle next_xfer; +/* XXX HACK */ + int Residue; KASSERT(sc->proto & UMASS_PROTO_BBB, ("%s: umass_bbb_state: wrong sc->proto 0x%02x\n", @@ -1595,7 +1619,12 @@ UGETDW(sc->csw.dCSWSignature) == CSWSIGNATURE_OLYMPUS_C1) USETDW(sc->csw.dCSWSignature, CSWSIGNATURE); - int Residue; +/* XXX HACK */ + /* Translate invalid command-status tags */ + if (sc->quirks & WRONG_CSWTAG) + USETDW(sc->csw.dCSWTag, UGETDW(sc->cbw.dCBWTag)); +/* XXX */ + Residue = UGETDW(sc->csw.dCSWDataResidue); if (Residue == 0 && sc->transfer_datalen - sc->transfer_actlen != 0) (relocation of Residue needed to quiet the 4.x compiler) Stupid adapter won't see more than 131GB-ish worth of disk, however; code for this quirk taken from NetBSD Again, no guarantee that I haven't failed to include all relevant parts of the diff needed to get a successful build. > >(I don't use EHCI due to eventual problems with it after some time; I need > >the stability, as of a few months ago) > ehci is improving.. transacions can now time out without crashing the > system.. My bad ehci/umass experience was also with NetBSD, after most of the commits from Charles Hannum that were supposed to fix the problem. I'll try again when I don't risk losing several days of work that I've been trying to complete uninterrupted for the last weeks without success. (Normal people would have thrown in the towel by now) thansk barry bouwsma From owner-freebsd-usb@FreeBSD.ORG Fri Jan 21 16:59:46 2005 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4B8B116A4CE for ; Fri, 21 Jan 2005 16:59:46 +0000 (GMT) Received: from rproxy.gmail.com (rproxy.gmail.com [64.233.170.204]) by mx1.FreeBSD.org (Postfix) with ESMTP id CB4A343D45 for ; Fri, 21 Jan 2005 16:59:45 +0000 (GMT) (envelope-from babak.ashrafi@gmail.com) Received: by rproxy.gmail.com with SMTP id c16so80376rne for ; Fri, 21 Jan 2005 08:59:45 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:references; b=Atj60L7/f37tNCnq2CCFXDJk4b9gjwXjs4Ry9d4HJCBbOhvu80Ofae2w9Bs8FteTivr3okKDr3/Osk1BHAwbU84QWMblhE/v32sTyOTtKzBNLDIE3UvlnPnIkwGBfnmsUGQJmIGK3B00z970u4EqgUSUWfLiWV2YLWtsIX1o0lc= Received: by 10.38.203.41 with SMTP id a41mr45575rng; Fri, 21 Jan 2005 08:59:45 -0800 (PST) Received: by 10.38.73.38 with HTTP; Fri, 21 Jan 2005 08:59:45 -0800 (PST) Message-ID: <75322a5805012108593204fc13@mail.gmail.com> Date: Fri, 21 Jan 2005 11:59:45 -0500 From: Babak Ashrafi To: freebsd-usb@freebsd.org In-Reply-To: <75322a58050116083243499650@mail.gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit References: <75322a58050116083243499650@mail.gmail.com> Subject: Re: long idle times X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Babak Ashrafi List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Jan 2005 16:59:46 -0000 What information could I send that would stimulate a response? Is this the right place to post my question? Perhaps I could simply ask for the brand and modelof an add-in USB controller that is known to work well with 5.3-RELEASE or STABLE. My current controller, with OPTi 82C861 chipset, does not work well. I am having trouble finding an add-in card with an Intel chipset. Any reply much appreciated. On Sun, 16 Jan 2005 11:32:36 -0500, Babak Ashrafi wrote: > I recently upgraded to 5.3-RELEASE without any problem other than > this: I have an external USB HD. It literary takes minutes to mount > the ufs volume on the drive. There is more than 100G of data on that > drive that was written about a year ago. That would have been FreeBSD > 4.6 or 4.7, I think. After more than 24 hours of copying it back using > tar, only 8G were copied and I gave up. > > Iozone gives perfectly respectable read and write numbers for the USB > disk, but there are long long long pauses between each read or write. > When I test my internal disks, there are no such pauses. I have > similar problems with an USB CDRW and a CF reader. In all cases it > eventually works, just unusably slow. > > Here is the relevant part of dmesg: > usb0: on ohci0 > usb0: USB revision 1.0 > uhub0: OPTi OHCI root hub, class 9/0, rev 1.00/1.00, addr 1 > uhub0: 2 ports with 2 removable, self powered > > Is there some configuration I am missing? Any advice much appreciated. > From owner-freebsd-usb@FreeBSD.ORG Fri Jan 21 23:20:30 2005 Return-Path: Delivered-To: freebsd-usb@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8B5DD16A4CF for ; Fri, 21 Jan 2005 23:20:30 +0000 (GMT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 379D643D55 for ; Fri, 21 Jan 2005 23:20:28 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.1/8.13.1) with ESMTP id j0LNKSen085437 for ; Fri, 21 Jan 2005 23:20:28 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.1/8.13.1/Submit) id j0LNKS7i085435; Fri, 21 Jan 2005 23:20:28 GMT (envelope-from gnats) Resent-Date: Fri, 21 Jan 2005 23:20:28 GMT Resent-Message-Id: <200501212320.j0LNKS7i085435@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-usb@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Steve Hodgson Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 94DB316A4CE for ; Fri, 21 Jan 2005 23:16:46 +0000 (GMT) Received: from www.freebsd.org (www.freebsd.org [216.136.204.117]) by mx1.FreeBSD.org (Postfix) with ESMTP id 566B043D39 for ; Fri, 21 Jan 2005 23:16:46 +0000 (GMT) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (localhost [127.0.0.1]) by www.freebsd.org (8.13.1/8.13.1) with ESMTP id j0LNGkLi054332 for ; Fri, 21 Jan 2005 23:16:46 GMT (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.13.1/8.13.1/Submit) id j0LNGktZ054331; Fri, 21 Jan 2005 23:16:46 GMT (envelope-from nobody) Message-Id: <200501212316.j0LNGktZ054331@www.freebsd.org> Date: Fri, 21 Jan 2005 23:16:46 GMT From: Steve Hodgson To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-2.3 Subject: usb/76554: Panram "yoyo" USB MP3 player causes panic when unplugged on ohci, no device nodes appear X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Jan 2005 23:20:30 -0000 >Number: 76554 >Category: usb >Synopsis: Panram "yoyo" USB MP3 player causes panic when unplugged on ohci, no device nodes appear >Confidential: no >Severity: serious >Priority: low >Responsible: freebsd-usb >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Fri Jan 21 23:20:28 GMT 2005 >Closed-Date: >Last-Modified: >Originator: Steve Hodgson >Release: 5.3-STABLE. cvsup circa 10 January >Organization: >Environment: FreeBSD congo.princess.local 5.3-STABLE FreeBSD 5.3-STABLE #0: Thu Jan 20 19:35:36 GMT 2005 root@congo.princess.local:/usr/obj/usr/src/sys/CONGO i386 >Description: When plugging in the MP3 player I got the following messages on the console. Sorry, I didn't enable hw.usb.debug, but I can repeat if required. ============= Jan 21 21:13:12 congo kernel: umass0: vendor 0x0ef8 PANRAM, rev 1.10/1.00, addr 2 Jan 21 21:13:12 congo kernel: umass0: 8070i (ATAPI) over Bulk-Only; quirks = 0x0000 Jan 21 21:13:12 congo kernel: umass0:2:0:-1: Attached to scbus2 ============= No devices appeared in /dev/. Left it for a bit, removed the drive and got this panic. Hand transposed from DDB ============= Fatal trap 12: page fault while in kernel mode fault virtual address = 0x4 fault code = supervisor read, page not present instruction pointer = 0x8:0xc04a2f5e stack pointer = 0x10:0xd338ebbc frame pointer = 0x10:0xd338ebf4 code segment = base 0x0, limit 0xfffff, type 0x1b = DPL 0, pres 1, def32 1, gran 1 processor eflags = interrupt enabled, resume, IOPL = 0 current process = 31 (irq21:ohci1) [thread pid 31 tid 100027 ] Stopped at ohci_device_bulk_start+0xe: movl 0x4(%esi),%eax db> trace Tracing pid 31 tid 100027 td 0xc1cf6af0 ohci_device_bulk_start(c24f1600,0,c2145300,c2145300,c2089500) at ohci_device_bullk_start+0xe usbd_start_next(c2145300,c24f1700,d,d338ec48,c052808f) at usbd_start_next+0x49 usb_transfer_complete(x2089500,c24f5f30,0,d338ec6c,c053c5da) at usb_transfer_coimplete+0x1fa ohci_softintr(c1ded000,2) at ohci_softintr+0x279 usb_schedsoftintr(c1ded000,11589f30,35c632ba,c06f0855,83a) at usb_schedsoftintr+0x39 ohci_intr1(c1ded000,d338ed14,c0fff5d0,c1ded000,0) at ohci_intr1+0x1d1 ohci_intr(c1ded000,0,0,0,0) at ohci_intr+0x36 --- trap 0x1, eip = 0, esp = 0xd338ed7c, ebp = 0 --- ============= >From the resulting core dump I got this backtrace from kgdb ============= #8 0xc06ecb32 in trap (frame= {tf_fs = 24, tf_es = 16, tf_ds = 16, tf_edi = 0, tf_esi = 0, tf_ebp = -751244300, tf_isp = -751244376, tf_ebx = -1035004416, tf_edx = 1, tf_ecx = 7377, tf_eax= -1035004416, tf_trapno = 12, tf_err = 0, tf_eip = -1068880034, tf_cs = 8, tf_eflags = 66194, tf_esp = -1035004160, tf_ss = -1038039168}) at /usr/src/sys/i386/i386/trap.c:417 #9 0xc06da77a in calltrap () at /usr/src/sys/i386/i386/exception.s:140 #10 0x00000018 in ?? () #11 0x00000010 in ?? () #12 0x00000010 in ?? () #13 0x00000000 in ?? () #14 0x00000000 in ?? () #15 0xd338ebf4 in ?? () #16 0xd338eba8 in ?? () #17 0xc24f1600 in ?? () #18 0x00000001 in ?? () #19 0x00001cd1 in ?? () #20 0xc24f1600 in ?? () #21 0x0000000c in ?? () #22 0x00000000 in ?? () #23 0xc04a2f5e in ohci_device_bulk_start (xfer=0xc24f1600) at /usr/src/sys/dev/usb/ohci.c:2925 #24 0xc04bbd69 in usbd_start_next (pipe=0xc2145300) at /usr/src/sys/dev/usb/usbdi.c:915 #25 0xc04bbc9a in usb_transfer_complete (xfer=0xc2089500) at /usr/src/sys/dev/usb/usbdi.c:856 #26 0xc04a0bd9 in ohci_softintr (v=0xc1ded000) at /usr/src/sys/dev/usb/ohci.c:1469 #27 0xc04b7a99 in usb_schedsoftintr (bus=0xc1ded000) at /usr/src/sys/dev/usb/usb.c:859 #28 0xc04a0671 in ohci_intr1 (sc=0xc1ded000) at /usr/src/sys/dev/usb/ohci.c:1236 #29 0xc04a0496 in ohci_intr (p=0xc1ded000) at /usr/src/sys/dev/usb/ohci.c:1165 #30 0xc04ff5d0 in ithread_loop (arg=0xc1cec300) at /usr/src/sys/kern/kern_intr.c:547 #31 0xc04fe3af in fork_exit (callout=0xc04ff430 , arg=0x0, frame=0x0) at /usr/src/sys/kern/kern_fork.c:807 #32 0xc06da7dc in fork_trampoline () at /usr/src/sys/i386/i386/exception.s:209 (kgdb) frame 23 #23 0xc04a2f5e in ohci_device_bulk_start (xfer=0xc24f1600) at /usr/src/sys/dev/usb/ohci.c:2925 2925 struct ohci_pipe *opipe = (struct ohci_pipe *)xfer->pipe; (kgdb) print opipe $1 = (struct ohci_pipe(kgdb) frame 24 #24 0xc04bbd69 in usbd_start_next (pipe=0xc2145300) at /usr/src/sys/dev/usb/usbdi.c:915 915 err = pipe->methods->start(xfer); (kgdb) print pipe $2 = 0xc2145300 (kgdb) print pipe->methods $3 = (struct usbd_pipe_methods *) 0xc075623c (kgdb) print xfer $4 = 0xc24f1600 ============== >How-To-Repeat: Plugin a panram "yoyo" usb mp3 player into an ohci controller. >Fix: >Release-Note: >Audit-Trail: >Unformatted: From owner-freebsd-usb@FreeBSD.ORG Fri Jan 21 23:30:28 2005 Return-Path: Delivered-To: freebsd-usb@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 576A616A4CE for ; Fri, 21 Jan 2005 23:30:28 +0000 (GMT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id EEE6543D3F for ; Fri, 21 Jan 2005 23:30:27 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.1/8.13.1) with ESMTP id j0LNURkn085694 for ; Fri, 21 Jan 2005 23:30:27 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.1/8.13.1/Submit) id j0LNURUE085693; Fri, 21 Jan 2005 23:30:27 GMT (envelope-from gnats) Resent-Date: Fri, 21 Jan 2005 23:30:27 GMT Resent-Message-Id: <200501212330.j0LNURUE085693@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-usb@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Steve Hodgson Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1CF1316A4CE for ; Fri, 21 Jan 2005 23:20:47 +0000 (GMT) Received: from www.freebsd.org (www.freebsd.org [216.136.204.117]) by mx1.FreeBSD.org (Postfix) with ESMTP id C026943D31 for ; Fri, 21 Jan 2005 23:20:46 +0000 (GMT) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (localhost [127.0.0.1]) by www.freebsd.org (8.13.1/8.13.1) with ESMTP id j0LNKkFj054865 for ; Fri, 21 Jan 2005 23:20:46 GMT (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.13.1/8.13.1/Submit) id j0LNKkuO054864; Fri, 21 Jan 2005 23:20:46 GMT (envelope-from nobody) Message-Id: <200501212320.j0LNKkuO054864@www.freebsd.org> Date: Fri, 21 Jan 2005 23:20:46 GMT From: Steve Hodgson To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-2.3 Subject: usb/76555: PNY USB DISK 2.0 USB thumbdrive causes won't work properly with ehci. X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Jan 2005 23:30:28 -0000 >Number: 76555 >Category: usb >Synopsis: PNY USB DISK 2.0 USB thumbdrive causes won't work properly with ehci. >Confidential: no >Severity: serious >Priority: low >Responsible: freebsd-usb >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Fri Jan 21 23:30:27 GMT 2005 >Closed-Date: >Last-Modified: >Originator: Steve Hodgson >Release: 5.3-STABLE. cvsup circa 10 January >Organization: >Environment: FreeBSD congo.princess.local 5.3-STABLE FreeBSD 5.3-STABLE #0: Thu Jan 20 19:35:36 GMT 2005 root@congo.princess.local:/usr/obj/usr/src/sys/CONGO i386 >Description: After enabling hw.usb.debug=3, I plugged in the USB drive and got the following in /var/log/messages ================================ Jan 21 22:26:23 congo kernel: usb_event_thread: woke up Jan 21 22:26:23 congo kernel: usb_discover Jan 21 22:26:23 congo kernel: usb_event_thread: woke up Jan 21 22:26:23 congo kernel: usb_discover Jan 21 22:26:23 congo kernel: usb_event_thread: woke up Jan 21 22:26:23 congo kernel: usb_discover Jan 21 22:27:22 congo kernel: usb_needs_explore Jan 21 22:27:22 congo kernel: usb_event_thread: woke up Jan 21 22:27:22 congo kernel: usb_discover Jan 21 22:27:22 congo kernel: usbd_reset_port: port 3 reset done, error=NORMAL_COMPLETION Jan 21 22:27:23 congo kernel: usbd_new_device bus=0xc1db5000 port=3 depth=1 speed=3 Jan 21 22:27:23 congo kernel: usbd_new_device: high speed port 2 Jan 21 22:27:23 congo kernel: usbd_setup_pipe: dev=0xc2284600 iface=0 ep=0xc2284624 pipe=0xc2284604 Jan 21 22:27:23 congo kernel: usb_allocmem: large alloc 4032 Jan 21 22:27:23 congo kernel: usbd_new_device: adding unit addr=2, rev=200, class=0, subclass=0, protocol=0, maxpacket=64, len=18, speed=3 Jan 21 22:27:23 congo kernel: usbd_new_device: new dev (addr 2), dev=0xc2284600, parent=0xc1df5900 Jan 21 22:27:22 congo kernel: usb_needs_explore Jan 21 22:27:22 congo kernel: usb_event_thread: woke up Jan 21 22:27:22 congo kernel: usb_discover Jan 21 22:27:22 congo kernel: usbd_reset_port: port 3 reset done, error=NORMAL_COMPLETION Jan 21 22:27:23 congo kernel: usbd_new_device bus=0xc1db5000 port=3 depth=1 speed=3 Jan 21 22:27:23 congo kernel: usbd_new_device: high speed port 2 Jan 21 22:27:23 congo kernel: usbd_setup_pipe: dev=0xc2284600 iface=0 ep=0xc2284624 pipe=0xc2284604 Jan 21 22:27:23 congo kernel: usb_allocmem: large alloc 4032 Jan 21 22:27:23 congo kernel: usbd_new_device: adding unit addr=2, rev=200, class=0, subclass=0, protocol=0, maxpacket=64, len=18, speed=3 Jan 21 22:27:23 congo kernel: usbd_new_device: new dev (addr 2), dev=0xc2284600, parent=0xc1df5900 Jan 21 22:27:23 congo kernel: usbd_probe_and_attach: trying device specific drivers Jan 21 22:27:23 congo kernel: usbd_probe_and_attach: no device specific driver found Jan 21 22:27:23 congo kernel: usbd_probe_and_attach: looping over 1 configurations Jan 21 22:27:23 congo kernel: usbd_probe_and_attach: trying config idx=0 Jan 21 22:27:23 congo kernel: usbd_set_config_index: (addr 1) cno=2 attr=0x80, selfpowered=0, power=500 Jan 21 22:27:23 congo kernel: usbd_set_config_index: set config 1 Jan 21 22:27:23 congo kernel: umass0: PNY USB DISK 2.0, rev 2.00/0.50, addr 2 Jan 21 22:27:23 congo kernel: umass0: SCSI over Bulk-Only; quirks = 0x0080 Jan 21 22:27:23 congo kernel: usbd_setup_pipe: dev=0xc2284600 iface=0xc21d0d40 ep=0xc2036878 pipe=0xd44c6360 Jan 21 22:27:23 congo kernel: usbd_setup_pipe: dev=0xc2284600 iface=0xc21d0d40 ep=0xc2036870 pipe=0xd44c6360 Jan 21 22:27:23 congo kernel: umass0:2:0:-1: Attached to scbus2 Jan 21 22:27:23 congo kernel: usb_allocmem: large alloc 255 Jan 21 22:27:23 congo kernel: usb_freemem: large free Jan 21 22:27:23 congo kernel: da0 at umass-sim0 bus 0 target 0 lun 0 Jan 21 22:27:23 congo kernel: da0: < USB DISK 2.0 1.15> Removable Direct Access SCSI-0 device Jan 21 22:27:23 congo kernel: da0: 1.000MB/s transfers Jan 21 22:27:23 congo kernel: da0: 248MB (507904 512 byte sectors: 64H 32S/T 248C) Jan 21 22:27:23 congo kernel: usb_allocmem: large alloc 512 Jan 21 22:27:23 congo kernel: usb_freemem: large free Jan 21 22:27:23 congo kernel: umass0: Phase Error, residue = 0 Jan 21 22:27:23 congo kernel: (da0:umass-sim0:0:0:0): Synchronize cache failed, status == 0x4, scsi status == 0x0 Jan 21 22:27:23 congo kernel: usb_allocmem: large alloc 512 Jan 21 22:27:23 congo kernel: usb_freemem: large free Jan 21 22:27:23 congo kernel: usb_allocmem: large alloc 512 Jan 21 22:27:23 congo kernel: usb_freemem: large free Jan 21 22:27:23 congo kernel: umass0: Phase Error, residue = 0 Jan 21 22:27:23 congo kernel: (da0:umass-sim0:0:0:0): Synchronize cache failed, status == 0x4, scsi status == 0x0 Jan 21 22:27:23 congo kernel: usb_allocmem: large alloc 1024 Jan 21 22:27:23 congo kernel: usb_freemem: large free Jan 21 22:27:23 congo kernel: umass0: Phase Error, residue = 0 Jan 21 22:27:23 congo kernel: (da0:umass-sim0:0:0:0): Synchronize cache failed, status == 0x4, scsi status == 0x0 Jan 21 22:27:23 congo kernel: umass0: Phase Error, residue = 0 Jan 21 22:27:23 congo kernel: (da0:umass-sim0:0:0:0): Synchronize cache failed, status == 0x4, scsi status == 0x0 Jan 21 22:27:23 congo kernel: umass0: Phase Error, residue = 0 Jan 21 22:27:23 congo kernel: (da0:umass-sim0:0:0:0): Synchronize cache failed, status == 0x4, scsi status == 0x0 Jan 21 22:27:23 congo kernel: umass0: Phase Error, residue = 0 Jan 21 22:27:23 congo kernel: (da0:umass-sim0:0:0:0): Synchronize cache failed, status == 0x4, scsi status == 0x0 Jan 21 22:27:23 congo kernel: umass0: Phase Error, residue = 0 Jan 21 22:27:23 congo kernel: (da0:umass-sim0:0:0:0): Synchronize cache failed, status == 0x4, scsi status == 0x0 Jan 21 22:27:23 congo kernel: usb_event_thread: woke up Jan 21 22:27:23 congo kernel: usb_discover Jan 21 22:27:23 congo kernel: usb_event_thread: woke up Jan 21 22:27:23 congo kernel: usb_discover ==================== At which point a device /dev/da0 and /dev/da0s1 appeared. Attempted a mount_msdosfs /dev/da0s1, and got the following messages ==================== Jan 21 22:27:46 congo kernel: usb_allocmem: large alloc 2048 Jan 21 22:27:46 congo kernel: usb_freemem: large free Jan 21 22:27:46 congo kernel: usb_allocmem: large alloc 4096 Jan 21 22:27:46 congo kernel: usb_freemem: large free Jan 21 22:27:46 congo kernel: usb_allocmem: large alloc 4096 Jan 21 22:27:46 congo kernel: usb_freemem: large free Jan 21 22:27:46 congo kernel: usb_allocmem: large alloc 4096 Jan 21 22:27:46 congo kernel: usb_freemem: large free Jan 21 22:27:46 congo kernel: usb_allocmem: large alloc 4096 Jan 21 22:27:46 congo kernel: usb_freemem: large free Jan 21 22:27:46 congo kernel: usb_allocmem: large alloc 4096 Jan 21 22:27:46 congo kernel: usb_freemem: large free Jan 21 22:27:46 congo kernel: usb_allocmem: large alloc 4096 Jan 21 22:27:46 congo kernel: usb_freemem: large free Jan 21 22:27:46 congo kernel: usb_allocmem: large alloc 4096 Jan 21 22:27:46 congo kernel: usb_freemem: large free Jan 21 22:27:46 congo kernel: usb_allocmem: large alloc 4096 Jan 21 22:27:46 congo kernel: usb_freemem: large free Jan 21 22:27:46 congo kernel: usb_allocmem: large alloc 4096 Jan 21 22:27:46 congo kernel: usb_freemem: large free Jan 21 22:27:46 congo kernel: usb_allocmem: large alloc 4096 Jan 21 22:27:46 congo kernel: usb_freemem: large free Jan 21 22:27:46 congo kernel: usb_allocmem: large alloc 4096 Jan 21 22:27:46 congo kernel: usb_freemem: large free Jan 21 22:27:46 congo kernel: usb_allocmem: large alloc 4096 Jan 21 22:27:46 congo kernel: usb_freemem: large free Jan 21 22:27:46 congo kernel: usb_allocmem: large alloc 4096 Jan 21 22:27:46 congo kernel: usb_freemem: large free Jan 21 22:27:46 congo kernel: usb_allocmem: large alloc 4096 Jan 21 22:27:46 congo kernel: usb_freemem: large free Jan 21 22:27:46 congo kernel: usb_allocmem: large alloc 4096 Jan 21 22:27:46 congo kernel: usb_freemem: large free Jan 21 22:27:46 congo kernel: usb_allocmem: large alloc 4096 Jan 21 22:27:46 congo kernel: usb_freemem: large free Jan 21 22:27:46 congo kernel: usb_allocmem: large alloc 4096 Jan 21 22:27:46 congo kernel: usb_freemem: large free Jan 21 22:27:46 congo kernel: usb_allocmem: large alloc 4096 Jan 21 22:27:46 congo kernel: usb_freemem: large free Jan 21 22:27:46 congo kernel: usb_allocmem: large alloc 4096 Jan 21 22:27:46 congo kernel: usb_freemem: large free Jan 21 22:27:46 congo kernel: usb_allocmem: large alloc 4096 Jan 21 22:27:46 congo kernel: usb_freemem: large free Jan 21 22:27:46 congo kernel: usb_allocmem: large alloc 4096 Jan 21 22:27:46 congo kernel: usb_freemem: large free Jan 21 22:27:46 congo kernel: usb_allocmem: large alloc 4096 Jan 21 22:27:46 congo kernel: usb_freemem: large free Jan 21 22:27:46 congo kernel: usb_allocmem: large alloc 4096 Jan 21 22:27:46 congo kernel: usb_freemem: large free Jan 21 22:27:46 congo kernel: usb_allocmem: large alloc 4096 Jan 21 22:27:46 congo kernel: usb_freemem: large free Jan 21 22:27:46 congo kernel: usb_allocmem: large alloc 4096 Jan 21 22:27:46 congo kernel: usb_freemem: large free Jan 21 22:27:46 congo kernel: usb_allocmem: large alloc 4096 Jan 21 22:27:46 congo kernel: usb_freemem: large free Jan 21 22:27:46 congo kernel: usb_allocmem: large alloc 4096 Jan 21 22:27:46 congo kernel: usb_freemem: large free Jan 21 22:27:46 congo kernel: usb_allocmem: large alloc 4096 Jan 21 22:27:46 congo kernel: usb_freemem: large free Jan 21 22:27:46 congo kernel: usb_allocmem: large alloc 4096 Jan 21 22:27:46 congo kernel: usb_freemem: large free Jan 21 22:27:46 congo kernel: usb_allocmem: large alloc 4096 Jan 21 22:27:46 congo kernel: usb_freemem: large free Jan 21 22:27:46 congo kernel: usb_allocmem: large alloc 4096 Jan 21 22:27:46 congo kernel: usb_freemem: large free Jan 21 22:27:46 congo kernel: usb_allocmem: large alloc 4096 Jan 21 22:27:46 congo kernel: usb_freemem: large free ================== At this point nothing happens, and mount appears frozen. Waiting, I get... ================== Jan 21 22:28:24 congo kernel: usb_event_thread: woke up Jan 21 22:28:24 congo kernel: usb_discover Jan 21 22:28:24 congo kernel: usb_event_thread: woke up Jan 21 22:28:24 congo kernel: usb_discover Jan 21 22:28:24 congo kernel: usb_event_thread: woke up Jan 21 22:28:24 congo kernel: usb_discover ================== At which point I change terminal and kill -9 mount. And then over the next minute I get.... =================== Jan 21 22:28:52 congo kernel: usb_add_task: task=0xc24e756c Jan 21 22:28:52 congo kernel: usb_task_thread: woke up task=0xc24e756c Jan 21 22:28:52 congo kernel: umass0: BBB reset failed, TIMEOUT Jan 21 22:28:52 congo kernel: usb_allocmem: large alloc 4096 Jan 21 22:29:24 congo kernel: usb_event_thread: woke up Jan 21 22:29:24 congo kernel: usb_discover Jan 21 22:29:24 congo kernel: usb_event_thread: woke up Jan 21 22:29:24 congo kernel: usb_discover Jan 21 22:29:24 congo kernel: usb_event_thread: woke up Jan 21 22:29:24 congo kernel: usb_discover ==================== Until I then pull out the usb drive, at which point I get the following from DDB ===================== umass0: at uhub2 port 3 (addr 2) disconnected (da0:umass-sim0:0:0:0): Sybchronize cache failed, status=0x39, scsi status == 0x0 (da0:umass-sim0:0:0:0): removing device entry panic: umass0: Unknown state 1 kdb_backtrace(c072fe45,c078c360,c07256c9,d338bb44,d338bb4c) at kdb_backtrace+0x2e panic()... umass_bbb_state(c24c9c00,c22f9800,d,d338bbd7,6e) at umass_bbb_state+0x8b4 usb_transfer_complete(c24c9c00,80,c071ad9c,48,c0720326) at usb_transfer_complete+0x1aa ehci_idone(c24c9c00,c24c9c6c,c052c5da) at ehci_idone+0xe2e ehci_check_intr(c1db50000,c24c9c00,4b9626a,c1db5000,2) at ehci_check_intr+0xff ehci_softintr(c1db5000,0) at ehci_softintr+0x5a usb_schedsoftintr(c1db5000,0,4bf,4d563b4e,82e6e0b4) at usb_scedsoftintr+0x39 ehci_intr1(c1db5000,c1dfb140,4,d338bd14,c04ff5d0) at ehci_intr1+0x174 ehci_intr(c1db5000,0,0,0,0) at ehci_intr+0x8f ithread_loop(c1cec380,d338bd48,0,0,0) at ithread_loop+0x1a0 .. --- trap 0x1, eip = 0, esp = 0xd338bd7c, ebp = 0 --- ======================= I ran the dumped core file through kgdb and got the following... ======================= #6 0xc06eccaa in trap (frame= {tf_fs = 24, tf_es = 16, tf_ds = 16, tf_edi = 1, tf_esi = -1066248503, tf_ebp = -751256824, tf_isp = -751256852, tf_ebx = -751256764, tf_edx = 1, tf_ecx = -1052684288, tf_eax = 18, tf_trapno = 3, tf_err = 0, tf_eip = -1068281968, tf_cs = 8, tf_eflags = 642, tf_esp = -1066200286, tf_ss = -1066206077}) at /usr/src/sys/i386/i386/trap.c:576 #7 0xc06da77a in calltrap () at /usr/src/sys/i386/i386/exception.s:140 #8 0x00000018 in ?? () #9 0x00000010 in ?? () #10 0x00000010 in ?? () #11 0x00000001 in ?? () #12 0xc07256c9 in ?? () #13 0xd338bb08 in ?? () #14 0xd338baec in ?? () #15 0xd338bb44 in ?? () #16 0x00000001 in ?? () #17 0xc1415000 in ?? () #18 0x00000012 in ?? () #19 0x00000003 in ?? () #20 0x00000000 in ?? () #21 0xc0534f90 in kdb_enter (msg=0x0) at cpufunc.h:56 #22 0xc0518acc in panic (fmt=0xc07256c9 "%s: Unknown state %d") at /usr/src/sys/kern/kern_shutdown.c:550 #23 0xc04b30e4 in umass_bbb_state (xfer=0xc24c9c00, priv=0xc22f9800, err=USBD_IOERROR) at /usr/src/sys/dev/usb/umass.c:1694 #24 0xc04bbc4a in usb_transfer_complete (xfer=0xc24c9c00) at /usr/src/sys/dev/usb/usbdi.c:837 #25 0xc0499ea2 in ehci_idone (ex=0xc24c9c00) at /usr/src/sys/dev/usb/ehci.c:874 #26 0xc0499baf in ehci_check_intr (sc=0xc1db5000, ex=0xc24c9c00) at /usr/src/sys/dev/usb/ehci.c:759 #27 0xc0499a9a in ehci_softintr (v=0xc1db5000) at /usr/src/sys/dev/usb/ehci.c:699 #28 0xc04b7a99 in usb_schedsoftintr (bus=0xc1db5000) at /usr/src/sys/dev/usb/usb.c:859 #29 0xc04997c4 in ehci_intr1 (sc=0xc1db5000) at /usr/src/sys/dev/usb/ehci.c:599 #30 0xc049963f in ehci_intr (v=0xc1db5000) at /usr/src/sys/dev/usb/ehci.c:558 #31 0xc04ff5d0 in ithread_loop (arg=0xc1cec380) at /usr/src/sys/kern/kern_intr.c:547 #32 0xc04fe3af in fork_exit (callout=0xc04ff430 , arg=0x0, frame=0x0) at /usr/src/sys/kern/kern_fork.c:807 #33 0xc06da7dc in fork_trampoline () at /usr/src/sys/i386/i386/exception.s:209 (kgdb) frame 24 #24 0xc04bbc4a in usb_transfer_complete (xfer=0xc24c9c00) at /usr/src/sys/dev/usb/usbdi.c:837 837 xfer->callback(xfer, xfer->priv, xfer->status); (kgdb) print xfer $2 = 0xc24c9c00 (kgdb) print *xfer $3 = {pipe = 0xc20e9880, priv = 0xc22f9800, buffer = 0x0, length = 0, actlen = 0, flags = 0, timeout = 305000, status = USBD_IOERROR, callback = 0xc04b2830 , done = 1 '\001', request = {bmRequestType = 2 '\002', bRequest = 1 '\001', wValue = "\000", wIndex = "\201", wLength = "\000"}, frlengths = 0x0, nframes = 0, device = 0xc2284600, dmabuf = {block = 0x0, offs = 0, len = 0}, rqflags = 1, next = {stqe_next = 0xc22f9b00}, hcpriv = 0x0, timeout_handle = {c_links = {sle = {sle_next = 0x0}, tqe = {tqe_next = 0x0, tqe_prev = 0xcb5fe000}}, c_time = 1518604, c_arg = 0xc24c9c00, c_func = 0, c_flags = 0}} (kgdb) frame 26 #26 0xc0499baf in ehci_check_intr (sc=0xc1db5000, ex=0xc24c9c00) at /usr/src/sys/dev/usb/ehci.c:759 759 ehci_idone(ex); (kgdb) print sc $5 = (ehci_softc_t *) 0xc1db5000 (kgdb) print *sc $6 = {sc_bus = {bdev = 0xc1df6080, methods = 0xc0755eec, pipe_size = 80, root_hub = 0xc1df5a00, devices = {0x0, 0xc1df5a00, 0xc2284600, 0x0 }, needs_explore = 0 '\0', use_polling = 0 '\0', usbctl = 0xc1de7b00, stats = {uds_requests = {109, 0, 225, 2}}, intr_context = 2, no_intrs = 284, usbrev = 4, dmatag = 0x0}, sc_flags = 1, iot = 1, ioh = 3561963520, sc_size = 0, ih = 0xc1dfb140, io_res = 0xc1ddce80, irq_res = 0xc1dfb180, sc_offs = 32, sc_vendor = "nVidia\000\000\000\000\000\000\000\000\000", sc_id_vendor = 0, sc_cmd = 0, sc_ncomp = 2, sc_npcomp = 4, sc_comps = {0xc1de3dc0, 0xc1de34c0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}, sc_fldma = {block = 0xc1dfb100, offs = 0, len = 4096}, sc_flist = 0xc1de9000, sc_flsize = 1024, sc_islots = {{sqh = 0xc1de8f60}, { sqh = 0xc1de8f00}, {sqh = 0xc1de8ea0}, {sqh = 0xc1de8e40}, {sqh = 0xc1de8de0}, {sqh = 0xc1de8d80}, {sqh = 0xc1de8d20}, {sqh = 0xc1de8cc0}, { sqh = 0xc1de8c60}, {sqh = 0xc1de8c00}, {sqh = 0xc1de8ba0}, {sqh = 0xc1de8b40}, {sqh = 0xc1de8ae0}, {sqh = 0xc1de8a80}, {sqh = 0xc1de8a20}, { sqh = 0xc1de89c0}, {sqh = 0xc1de8960}, {sqh = 0xc1de8900}, {sqh = 0xc1de88a0}, {sqh = 0xc1de8840}, {sqh = 0xc1de87e0}, {sqh = 0xc1de8780}, { sqh = 0xc1de8720}, {sqh = 0xc1de86c0}, {sqh = 0xc1de8660}, {sqh = 0xc1de8600}, {sqh = 0xc1de85a0}, {sqh = 0xc1de8540}, {sqh = 0xc1de84e0}, { sqh = 0xc1de8480}, {sqh = 0xc1de8420}, {sqh = 0xc1de83c0}, {sqh = 0xc1de8360}, {sqh = 0xc1de8300}, {sqh = 0xc1de82a0}, {sqh = 0xc1de8240}, { sqh = 0xc1de81e0}, {sqh = 0xc1de8180}, {sqh = 0xc1de8120}, {sqh = 0xc1de80c0}, {sqh = 0xc1de8060}, {sqh = 0xc1de8000}, {sqh = 0xc1e07f60}, { sqh = 0xc1e07f00}, {sqh = 0xc1e07ea0}, {sqh = 0xc1e07e40}, {sqh = 0xc1e07de0}, {sqh = 0xc1e07d80}, {sqh = 0xc1e07d20}, {sqh = 0xc1e07cc0}, { sqh = 0xc1e07c60}, {sqh = 0xc1e07c00}, {sqh = 0xc1e07ba0}, {sqh = 0xc1e07b40}, {sqh = 0xc1e07ae0}, {sqh = 0xc1e07a80}, {sqh = 0xc1e07a20}, { sqh = 0xc1e079c0}, {sqh = 0xc1e07960}, {sqh = 0xc1e07900}, {sqh = 0xc1e078a0}, {sqh = 0xc1e07840}, {sqh = 0xc1e077e0}, {sqh = 0xc1e07780}, { sqh = 0xc1e07720}, {sqh = 0xc1e076c0}, {sqh = 0xc1e07660}, {sqh = 0xc1e07600}, {sqh = 0xc1e075a0}, {sqh = 0xc1e07540}, {sqh = 0xc1e074e0}, { sqh = 0xc1e07480}, {sqh = 0xc1e07420}, {sqh = 0xc1e073c0}, {sqh = 0xc1e07360}, {sqh = 0xc1e07300}, {sqh = 0xc1e072a0}, {sqh = 0xc1e07240}, { sqh = 0xc1e071e0}, {sqh = 0xc1e07180}, {sqh = 0xc1e07120}, {sqh = 0xc1e070c0}, {sqh = 0xc1e07060}, {sqh = 0xc1e07000}, {sqh = 0xc1e06f60}, { sqh = 0xc1e06f00}, {sqh = 0xc1e06ea0}, {sqh = 0xc1e06e40}, {sqh = 0xc1e06de0}, {sqh = 0xc1e06d80}, {sqh = 0xc1e06d20}, {sqh = 0xc1e06cc0}, { sqh = 0xc1e06c60}, {sqh = 0xc1e06c00}, {sqh = 0xc1e06ba0}, {sqh = 0xc1e06b40}, {sqh = 0xc1e06ae0}, {sqh = 0xc1e06a80}, {sqh = 0xc1e06a20}, { sqh = 0xc1e069c0}, {sqh = 0xc1e06960}, {sqh = 0xc1e06900}, {sqh = 0xc1e068a0}, {sqh = 0xc1e06840}, {sqh = 0xc1e067e0}, {sqh = 0xc1e06780}, { sqh = 0xc1e06720}, {sqh = 0xc1e066c0}, {sqh = 0xc1e06660}, {sqh = 0xc1e06600}, {sqh = 0xc1e065a0}, {sqh = 0xc1e06540}, {sqh = 0xc1e064e0}, { sqh = 0xc1e06480}, {sqh = 0xc1e06420}, {sqh = 0xc1e063c0}, {sqh = 0xc1e06360}, {sqh = 0xc1e06300}, {sqh = 0xc1e062a0}, {sqh = 0xc1e06240}, { sqh = 0xc1e061e0}, {sqh = 0xc1e06180}, {sqh = 0xc1e06120}, {sqh = 0xc1e060c0}, {sqh = 0xc1e06060}, {sqh = 0xc1e06000}, {sqh = 0xc1e05f60}, { sqh = 0xc1e05f00}, {sqh = 0xc1e05ea0}, {sqh = 0xc1e05e40}, {sqh = 0xc1e05de0}, {sqh = 0xc1e05d80}, {sqh = 0xc1e05d20}, {sqh = 0xc1e05cc0}, { sqh = 0xc1e05c60}, {sqh = 0xc1e05c00}, {sqh = 0xc1e05ba0}, {sqh = 0xc1e05b40}, {sqh = 0xc1e05ae0}, {sqh = 0xc1e05a80}, {sqh = 0xc1e05a20}, { sqh = 0xc1e059c0}, {sqh = 0xc1e05960}, {sqh = 0xc1e05900}, {sqh = 0xc1e058a0}, {sqh = 0xc1e05840}, {sqh = 0xc1e057e0}, {sqh = 0xc1e05780}, { sqh = 0xc1e05720}, {sqh = 0xc1e056c0}, {sqh = 0xc1e05660}, {sqh = 0xc1e05600}, {sqh = 0xc1e055a0}, {sqh = 0xc1e05540}, {sqh = 0xc1e054e0}, { sqh = 0xc1e05480}, {sqh = 0xc1e05420}, {sqh = 0xc1e053c0}, {sqh = 0xc1e05360}, {sqh = 0xc1e05300}, {sqh = 0xc1e052a0}, {sqh = 0xc1e05240}, { sqh = 0xc1e051e0}, {sqh = 0xc1e05180}, {sqh = 0xc1e05120}, {sqh = 0xc1e050c0}, {sqh = 0xc1e05060}, {sqh = 0xc1e05000}, {sqh = 0xc1e04f60}, { sqh = 0xc1e04f00}, {sqh = 0xc1e04ea0}, {sqh = 0xc1e04e40}, {sqh = 0xc1e04de0}, {sqh = 0xc1e04d80}, {sqh = 0xc1e04d20}, {sqh = 0xc1e04cc0}, { sqh = 0xc1e04c60}, {sqh = 0xc1e04c00}, {sqh = 0xc1e04ba0}, {sqh = 0xc1e04b40}, {sqh = 0xc1e04ae0}, {sqh = 0xc1e04a80}, {sqh = 0xc1e04a20}, { sqh = 0xc1e049c0}, {sqh = 0xc1e04960}, {sqh = 0xc1e04900}, {sqh = 0xc1e048a0}, {sqh = 0xc1e04840}, {sqh = 0xc1e047e0}, {sqh = 0xc1e04780}, { sqh = 0xc1e04720}, {sqh = 0xc1e046c0}, {sqh = 0xc1e04660}, {sqh = 0xc1e04600}, {sqh = 0xc1e045a0}, {sqh = 0xc1e04540}, {sqh = 0xc1e044e0}, { sqh = 0xc1e04480}, {sqh = 0xc1e04420}, {sqh = 0xc1e043c0}...}, sc_intrhead = {lh_first = 0xc24c9c00}, sc_freeqhs = 0xc1e02d80, sc_freeqtds = 0xc2516f60, sc_noport = 6, sc_addr = 1 '\001', sc_conf = 1 '\001', sc_intrxfer = 0xc1dd4e00, sc_isreset = 0 '\0', sc_eintrs = 51, sc_async_head = 0xc1e02e40, sc_free_xfers = {stqh_first = 0xc22f9500, stqh_last = 0xc24c9e4c}, sc_doorbell_lock = {lk_interlock = 0xc078b950, lk_flags = 1024, lk_sharecount = 0, lk_waitcount = 0, lk_exclusivecount = 1, lk_prio = 84, lk_wmesg = 0xc07200b4 "ehcidb", lk_timo = 0, lk_lockholder = 0xfffffffe, lk_newlock = 0x0}, sc_tmo_pcd = {c_links = {sle = {sle_next = 0xc1d65f24}, tqe = {tqe_next = 0xc1d65f24, tqe_prev = 0xcb5ec3f8}}, c_time = 1214603, c_arg = 0xc1db5000, c_func = 0xc0499930 , c_flags = 6}, sc_child = 0x0, sc_dying = 0 '\0'} ======================== >How-To-Repeat: Plugin a PNY USB DISK 2.0 usb thumbdrive into a 5.3-STABLE machine with ehci compiled in, attempt to mount the drive then kill mount, then unplug the drive >Fix: >Release-Note: >Audit-Trail: >Unformatted: From owner-freebsd-usb@FreeBSD.ORG Sat Jan 22 09:30:31 2005 Return-Path: Delivered-To: freebsd-usb@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id BB46016A4CE for ; Sat, 22 Jan 2005 09:30:31 +0000 (GMT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id A711043D1D for ; Sat, 22 Jan 2005 09:30:31 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.1/8.13.1) with ESMTP id j0M9UVbg096228 for ; Sat, 22 Jan 2005 09:30:31 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.1/8.13.1/Submit) id j0M9UV8p096227; Sat, 22 Jan 2005 09:30:31 GMT (envelope-from gnats) Date: Sat, 22 Jan 2005 09:30:31 GMT Message-Id: <200501220930.j0M9UV8p096227@freefall.freebsd.org> To: freebsd-usb@FreeBSD.org From: Carsten Menke Subject: Re: kern/60131: [usb] Page fault on disconnect of USB device X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Carsten Menke List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 22 Jan 2005 09:30:31 -0000 The following reply was made to PR kern/60131; it has been noted by GNATS. From: Carsten Menke To: freebsd-gnats-submit@FreeBSD.org, gordonb@airmail.net Cc: Subject: Re: kern/60131: [usb] Page fault on disconnect of USB device Date: Sat, 22 Jan 2005 09:22:59 +0100 I may have a similar problem using 5.3-STABLE (System was updated yesterday), 5.3-RELEASE showed this problem as well as the 5.3-STABLE from yesterday. In my case it is an USB Camera (Canon Powershot A70) using ugen0 which freezes completley the system while trying to configure Camera using DIGKAM or the KDE Kontrolcenter. I have as well these messages similar to hims in the log ugen0: at uhub0 port 1 (addr 2) disconnected ugen0: detached Related ? Carsten -- "There are two major products that come out of Berkeley: LSD and UNIX. We don't believe this to be a coincidence." --Jeremy S. Anderson From owner-freebsd-usb@FreeBSD.ORG Sat Jan 22 09:50:10 2005 Return-Path: Delivered-To: freebsd-usb@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7B22416A4CE for ; Sat, 22 Jan 2005 09:50:10 +0000 (GMT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 434BB43D2F for ; Sat, 22 Jan 2005 09:50:10 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.1/8.13.1) with ESMTP id j0M9o9Xr098234 for ; Sat, 22 Jan 2005 09:50:09 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.1/8.13.1/Submit) id j0M9o94f098233; Sat, 22 Jan 2005 09:50:09 GMT (envelope-from gnats) Date: Sat, 22 Jan 2005 09:50:09 GMT Message-Id: <200501220950.j0M9o94f098233@freefall.freebsd.org> To: freebsd-usb@FreeBSD.org From: Carsten Menke Subject: Re: usb/76240: USB camera panics kernel X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Carsten Menke List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 22 Jan 2005 09:50:10 -0000 The following reply was made to PR usb/76240; it has been noted by GNATS. From: Carsten Menke To: freebsd-gnats-submit@FreeBSD.org, marko@FreeBSD.org Cc: Subject: Re: usb/76240: USB camera panics kernel Date: Sat, 22 Jan 2005 09:44:59 +0100 Exactly the same here, before I was running 5.3-RELEASE then at least as root it was possible to use the camera with digikam (I have exactly the same model) and I also have OHCI. After updating yesterday to 5.3-STABLE it now is 100% reproducible as I'm now completley unable to use the camera as every attempt completley freezes the system (no panic though). the only thing I found in the logs is: Jan 18 08:41:57 chantal kernel: ugen0: detached Jan 18 09:34:21 chantal kernel: ugen0: Canon Inc. Canon Digital Camera, rev 1.10/0.01, addr 2 Jan 18 09:34:58 chantal su: chantal to root on /dev/ttyp4 Jan 18 09:34:58 chantal su: chantal to root on /dev/ttyp4 Jan 18 09:41:35 chantal kernel: ugen0: at uhub0 port 1 (addr 2) disconnected Jan 18 09:42:35 chantal kernel: usb_detach_wait: ugen0 didn't detach Jan 18 09:43:35 chantal kernel: usb_detach_wait: ugen0 didn't detach I will try the patch, too. Hope it helps at least a bit. Here is my dmesg: //Carsten Copyright (c) 1992-2005 The FreeBSD Project. Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994 The Regents of the University of California. All rights reserved. FreeBSD 5.3-STABLE #6: Thu Jan 20 06:54:05 CET 2005 root@chantal.bootsy.home:/usr/src/sys/i386/compile/BOOTSY52 Timecounter "i8254" frequency 1193182 Hz quality 0 CPU: AMD Athlon(tm) Processor (1394.08-MHz 686-class CPU) Origin = "AuthenticAMD" Id = 0x644 Stepping = 4 Features=0x183f9ff AMD Features=0xc0440000 real memory = 536805376 (511 MB) avail memory = 515616768 (491 MB) acpi0: on motherboard acpi0: Power Button (fixed) Timecounter "ACPI-fast" frequency 3579545 Hz quality 1000 acpi_timer0: <24-bit timer at 3.579545MHz> port 0x808-0x80b on acpi0 cpu0: on acpi0 pcib0: port 0xcf8-0xcff on acpi0 pci0: on pcib0 agp0: mem 0xd0000000-0xd3ffffff at device 0.0 on pci0 pcib1: at device 1.0 on pci0 pci1: on pcib1 pci1: at device 0.0 (no driver attached) isab0: at device 2.0 on pci0 isa0: on isab0 ohci0: mem 0xcfffe000-0xcfffefff irq 11 at device 2.2 on pci0 ohci0: [GIANT-LOCKED] usb0: OHCI version 1.0, legacy support usb0: on ohci0 usb0: USB revision 1.0 uhub0: SiS OHCI root hub, class 9/0, rev 1.00/1.00, addr 1 uhub0: 3 ports with 3 removable, self powered ohci1: mem 0xcffff000-0xcfffffff irq 5 at device 2.3 on pci0 ohci1: [GIANT-LOCKED] usb1: OHCI version 1.0, legacy support usb1: on ohci1 usb1: USB revision 1.0 uhub1: SiS OHCI root hub, class 9/0, rev 1.00/1.00, addr 1 uhub1: 3 ports with 3 removable, self powered atapci0: port 0xff00-0xff0f,0x376,0x170-0x177,0x3f6,0x1f0-0x1f7 at device 2.5 on pci0 ata0: channel #0 on atapci0 ata1: channel #1 on atapci0 pcm0: port 0xd800-0xd83f,0xdc00-0xdcff irq 11 at device 2.7 on pci0 pcm0: [GIANT-LOCKED] pcm0: xl0: <3Com 3c905B-TX Fast Etherlink XL> port 0xd400-0xd47f mem 0xcfffdf80-0xcfffdfff irq 5 at device 11.0 on pci0 miibus0: on xl0 bmtphy0: <3c905B 10/100 internal PHY> on miibus0 bmtphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto xl0: Ethernet address: 00:50:04:50:fb:41 acpi_button0: on acpi0 atkbdc0: port 0x64,0x60 irq 1 on acpi0 atkbd0: irq 1 on atkbdc0 kbd0 at atkbd0 atkbd0: [GIANT-LOCKED] psm0: irq 12 on atkbdc0 psm0: [GIANT-LOCKED] psm0: model IntelliMouse, device ID 3 fdc0: port 0x3f7,0x3f4-0x3f5,0x3f2-0x3f3 irq 6 drq 2 on acpi0 fdc0: [FAST] fd0: <1440-KB 3.5" drive> on fdc0 drive 0 sio0: <16550A-compatible COM port> port 0x3f8-0x3ff irq 4 flags 0x10 on acpi0 sio0: type 16550A sio1: <16550A-compatible COM port> port 0x2f8-0x2ff irq 3 on acpi0 sio1: type 16550A ppc0: port 0x778-0x77b,0x378-0x37f irq 7 drq 3 on acpi0 ppc0: Generic chipset (ECP/PS2/NIBBLE) in COMPATIBLE mode ppc0: FIFO with 16/16/16 bytes threshold ppbus0: on ppc0 plip0: on ppbus0 lpt0: on ppbus0 lpt0: Interrupt-driven port ppi0: on ppbus0 npx0: [FAST] npx0: on motherboard npx0: INT 16 interface orm0: at iomem 0xc0000-0xc7fff on isa0 pmtimer0 on isa0 sc0: at flags 0x100 on isa0 sc0: VGA <16 virtual consoles, flags=0x300> vga0: at port 0x3c0-0x3df iomem 0xa0000-0xbffff on isa0 Timecounter "TSC" frequency 1394075963 Hz quality 800 Timecounters tick every 10.000 msec ad0: 58644MB [119150/16/63] at ata0-master UDMA100 acd0: CDRW at ata1-master PIO4 acd1: CDROM at ata1-slave UDMA33 cd1 at ata1 bus 0 target 1 lun 0 cd1: < ATAPI CDROM.48X 130Y> Removable CD-ROM SCSI-0 device cd1: 33.000MB/s transfers cd1: Attempt to query device size failed: NOT READY, Medium not present cd0 at ata1 bus 0 target 0 lun 0 cd0: Removable CD-ROM SCSI-0 device cd0: 16.000MB/s transfers cd0: Attempt to query device size failed: NOT READY, Medium not present Mounting root from ufs:/dev/ad0s1a WARNING: / was not properly dismounted WARNING: /home was not properly dismounted /home: mount pending error: blocks 60 files 9 /home: superblock summary recomputed WARNING: /tmp was not properly dismounted WARNING: /usr was not properly dismounted /usr: mount pending error: blocks 468 files 4 /usr: superblock summary recomputed WARNING: /var was not properly dismounted /var: mount pending error: blocks 2560 files 2 /var: superblock summary recomputed drm0: port 0xb800-0xb8ff mem 0xcfefc000-0xcfefffff,0xc8000000-0xcbffffff irq 5 at device 0.0 on pci1 info: [drm] AGP at 0xd0000000 64MB info: [drm] Initialized r128 2.5.0 20030725 on minor 0 -- "There are two major products that come out of Berkeley: LSD and UNIX. We don't believe this to be a coincidence." --Jeremy S. Anderson From owner-freebsd-usb@FreeBSD.ORG Sat Jan 22 10:50:27 2005 Return-Path: Delivered-To: freebsd-usb@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 010AA16A4CE for ; Sat, 22 Jan 2005 10:50:27 +0000 (GMT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id E2A4543D3F for ; Sat, 22 Jan 2005 10:50:26 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.1/8.13.1) with ESMTP id j0MAoQAc006008 for ; Sat, 22 Jan 2005 10:50:26 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.1/8.13.1/Submit) id j0MAoQDn006006; Sat, 22 Jan 2005 10:50:26 GMT (envelope-from gnats) Date: Sat, 22 Jan 2005 10:50:26 GMT Message-Id: <200501221050.j0MAoQDn006006@freefall.freebsd.org> To: freebsd-usb@FreeBSD.org From: Carsten Menke Subject: Re: usb/76240: USB camera panics kernel X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Carsten Menke List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 22 Jan 2005 10:50:27 -0000 The following reply was made to PR usb/76240; it has been noted by GNATS. From: Carsten Menke To: freebsd-gnats-submit@FreeBSD.org, marko@FreeBSD.org Cc: Subject: Re: usb/76240: USB camera panics kernel Date: Sat, 22 Jan 2005 10:49:04 +0100 Thanx a lot this patch solved all my problems (ok, so far) it was even possible to get digikam working as a normal user accessing the camera using this /sbin/devfs ruleset 10 /sbin/devfs rule applyset /sbin/devfs rule add path usb mode 666 /sbin/devfs rule add path usb0 mode 666 /sbin/devfs rule add path usb1 mode 666 /sbin/devfs rule add path ugen0 mode 666 /sbin/devfs rule add path ugen0.1 mode 666 /sbin/devfs rule add path ugen0.2 mode 666 /sbin/devfs rule add path ugen0.3 mode 666 /sbin/devfs rule show I don't know if the usb section is necessary, but sometimes the camera works sometimes not, so I'm not sure if it was the /dev/usb permissions or if was just a coincidence //Carsten -- "There are two major products that come out of Berkeley: LSD and UNIX. We don't believe this to be a coincidence." --Jeremy S. Anderson From owner-freebsd-usb@FreeBSD.ORG Sat Jan 22 12:11:56 2005 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9887216A4CE for ; Sat, 22 Jan 2005 12:11:56 +0000 (GMT) Received: from ptb-relay03.plus.net (ptb-relay03.plus.net [212.159.14.214]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2A8A243D3F for ; Sat, 22 Jan 2005 12:11:56 +0000 (GMT) (envelope-from marko@freebsd.org) Received: from movens.plus.com ([80.229.231.20] helo=[127.0.0.1]) by ptb-relay03.plus.net with esmtp (Exim) id 1CsKP0-0004Fu-P1 for freebsd-usb@freebsd.org; Sat, 22 Jan 2005 12:30:06 +0000 Message-ID: <41F242C4.6010304@freebsd.org> Date: Sat, 22 Jan 2005 12:10:44 +0000 From: Mark Ovens User-Agent: Mozilla Thunderbird 7.0 (Windows/20050113) X-Accept-Language: en-gb, en-us MIME-Version: 1.0 To: freebsd-usb@freebsd.org References: <41F2128B.5000805@gmx.net> In-Reply-To: <41F2128B.5000805@gmx.net> Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit X-Antivirus: avast! (VPS 0503-2, 21/01/2005), Outbound message X-Antivirus-Status: Clean Subject: Re: usb/76240: USB camera panics kernel X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 22 Jan 2005 12:11:56 -0000 On 22/01/2005 08:44 Carsten Menke wrote: > Exactly the same here, before I was running 5.3-RELEASE then at least as > root it was possible to use the camera with digikam (I have exactly the same That's interesting; even with the kernel patch I can't access the camera when running digikam as root. If I go to Add Camera on the Camera menu the dialogue appears and it will auto-detect my camera or I can select it from the list, but the OK button is permanently diasabled so I can't save the settings, which means that the camera never appears on the Camera menu so I can't access it :-/ Do you have any idea why that is? It works fine as a non-root user. Also, it only works if I select 'Canon Powershot A70 (PTP)'. If I select the non-PTP entry (which is what it auto-detects as) when I try to connect I get a message "Unable to connect to camera, check it is plugged in....". I'm 99% sure it worked in non-PTP mode in earlier versions. > model) and I also have OHCI. After updating yesterday to 5.3-STABLE it now is > 100% reproducible as I'm now completley unable to use the camera as every > attempt completley freezes the system (no panic though). > I bet it is panicing. Immediately (you have to be quick) after selecting the camera from the Camera menu in digikam hit Ctrl-Alt-F1 to switch to the console and you should see the panic message. > the only thing I found in the logs is: > > Jan 18 08:41:57 chantal kernel: ugen0: detached > Jan 18 09:34:21 chantal kernel: ugen0: Canon Inc. Canon Digital Camera, rev > 1.10/0.01, addr 2 > Jan 18 09:34:58 chantal su: chantal to root on /dev/ttyp4 > Jan 18 09:34:58 chantal su: chantal to root on /dev/ttyp4 > Jan 18 09:41:35 chantal kernel: ugen0: at uhub0 port 1 (addr 2) disconnected > Jan 18 09:42:35 chantal kernel: usb_detach_wait: ugen0 didn't detach > Jan 18 09:43:35 chantal kernel: usb_detach_wait: ugen0 didn't detach > > > I will try the patch, too. Hope it helps at least a bit. > If you also add the ruleset to /etc/rc.local, to allow non-root users to access the camera, that I posted in the PR you should change the line /sbin/devfs rule add path ugen1* mode 666 to read ugen0* not ugen1* as your camera is on ugen0 as is mine - I just pasted the lines from the URL I mentioned. I guess ugen* would work to in case your camera does not always appear as ugen0. Regards, Mark --- avast! Antivirus: Outbound message clean. Virus Database (VPS): 0503-2, 21/01/2005 Tested on: 22/01/2005 12:10:45 avast! - copyright (c) 2000-2004 ALWIL Software. http://www.avast.com