From owner-freebsd-usb@FreeBSD.ORG Tue Nov 2 09:35:32 2010 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F17A7106566C; Tue, 2 Nov 2010 09:35:32 +0000 (UTC) (envelope-from hselasky@freebsd.org) Received: from swip.net (mailfe05.swip.net [212.247.154.129]) by mx1.freebsd.org (Postfix) with ESMTP id 472F88FC18; Tue, 2 Nov 2010 09:35:31 +0000 (UTC) X-Cloudmark-Score: 0.000000 [] X-Cloudmark-Analysis: v=1.1 cv=5OBHFxb9I47YZ7HELXzI6cL6pwPTRnd5uxbD1DPQ4WY= c=1 sm=1 a=9Utm1XU4gQEA:10 a=IkcTkHD0fZMA:10 a=CL8lFSKtTFcA:10 a=i9M/sDlu2rpZ9XS819oYzg==:17 a=r3OI_ZcuDD6Hs32bSUgA:9 a=mHAyTAbXdDP7xdlc1W3ElQd-i3MA:4 a=QEXdDO2ut3YA:10 a=i9M/sDlu2rpZ9XS819oYzg==:117 Received: from [188.126.198.129] (account mc467741@c2i.net HELO laptop002.hselasky.homeunix.org) by mailfe05.swip.net (CommuniGate Pro SMTP 5.2.19) with ESMTPA id 42949311; Tue, 02 Nov 2010 10:35:30 +0100 Received-SPF: softfail receiver=mailfe05.swip.net; client-ip=188.126.198.129; envelope-from=hselasky@freebsd.org From: Hans Petter Selasky To: freebsd-usb@freebsd.org, Alexander Motin Date: Tue, 2 Nov 2010 10:36:41 +0100 User-Agent: KMail/1.13.5 (FreeBSD/8.1-STABLE; KDE/4.4.5; amd64; ; ) References: <20101102103208.45064dxs60sp833w@webmail.leidinger.net> In-Reply-To: <20101102103208.45064dxs60sp833w@webmail.leidinger.net> X-Face: +~\`s("[*|O,="7?X@L.elg*F"OA\I/3%^p8g?ab%RN'(; _IjlA: hGE..Ew, XAQ*o#\/M~SC=S1-f9{EzRfT'|Hhll5Q]ha5Bt-s|oTlKMusi:1e[wJl}kd}GR Z0adGx-x_0zGbZj'e(Y[(UNle~)8CQWXW@:DX+9)_YlB[tIccCPN$7/L' MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <201011021036.41617.hselasky@freebsd.org> Cc: Subject: Re: usbconfig reset ugen4.2 hanging since an hour X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Nov 2010 09:35:33 -0000 On Tuesday 02 November 2010 10:32:08 Alexander Leidinger wrote: > Hi, > > I have a memory stick which made problems (the stick is used as a ZFS > cache and it moaned about 8xxM write problems) in 9-current r214509. I > removed the device from the config, made a camcontrol reset all, > camcontrol rescan all (-> device disappeared), and then tried an > usbconfig reset ugen4.2 (relevant devlist part from before the call is > below). The usbconfig reset does not return to the shell. > > I do not know if the problem with the USB memory stick is related to > software or hardware. The stick survived just a weekend, I replaced it > because the old one showed similar problems after surviving about 9 > months... I updated -current just before the problems appeared (and > then again after a week or two), but I do not remember from which > revision of -current I was updating from. I will try to stress-test > the memory sticks on a 8.1 system so see if it is some software problem. > > The big question I have for now is: shouldn't there be some kind of > safety mechanism kicking in (timeout) with the usbconfig command (in > this case the reset)? > > devlist: > ---snip--- > ugen4.1: at usbus4, cfg=0 md=HOST spd=HIGH > (480Mbps) pwr=SAVE > ugen4.2: at usbus4, cfg=0 md=HOST spd=HIGH > (480Mbps) pwr=ON > ---snip--- > > dmesg | grep -i usb: > ---snip--- > uhci0: port 0xdc00-0xdc1f > irq 16 at device 29.0 on pci0 > usbus0: on uhci0 > uhci1: port 0xe000-0xe01f > irq 19 at device 29.1 on pci0 > usbus1: on uhci1 > uhci2: port 0xe400-0xe41f > irq 18 at device 29.2 on pci0 > usbus2: on uhci2 > uhci3: port 0xe800-0xe81f > irq 16 at device 29.3 on pci0 > usbus3: on uhci3 > ehci0: mem > 0xfe77fc00-0xfe77ffff irq 23 at device 29.7 on pci0 > usbus4: EHCI version 1.0 > usbus4: on ehci0 > usbus0: 12Mbps Full Speed USB v1.0 > usbus1: 12Mbps Full Speed USB v1.0 > usbus2: 12Mbps Full Speed USB v1.0 > usbus3: 12Mbps Full Speed USB v1.0 > usbus4: 480Mbps High Speed USB v2.0 > ugen0.1: at usbus0 > uhub0: on usbus0 > ugen1.1: at usbus1 > uhub1: on usbus1 > ugen2.1: at usbus2 > uhub2: on usbus2 > ugen3.1: at usbus3 > uhub3: on usbus3 > ugen4.1: at usbus4 > uhub4: on usbus4 > Root mount waiting for: usbus4 > Root mount waiting for: usbus4 > Root mount waiting for: usbus4 > Root mount waiting for: usbus4 > ugen4.2: at usbus4 > umass0: on usbus4 > Root mount waiting for: usbus4 > pass3: Removable Direct Access SCSI-2 device > da0: Removable Direct Access SCSI-2 device > Root mount waiting for: usbus4 > ugen1.2: at usbus1 > ugen1.3: at usbus1 > ulpt0: 3> on usbus1 > ugen2.2: at usbus2 > uhub5: addr 2> on usbus2 > ugen2.3: at usbus2 > ukbd0: addr 3> on usbus2 > ugen2.4: at usbus2 > ums0: addr 4> on usbus2 > ---snip--- Hi, If you dump all threads in this state I think you will see that USB is waiting somewhere in umass_detach(), which is preventing the usbconfig reset from grabbing the SX-lock associated with serialisation. Because umass_detach() is not returning we are stuck. --HPS