From owner-freebsd-usb@FreeBSD.ORG Sun Sep 2 08:19:01 2012 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 6FAA1106566B; Sun, 2 Sep 2012 08:19:01 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe08.c2i.net [212.247.154.226]) by mx1.freebsd.org (Postfix) with ESMTP id 8EADD8FC12; Sun, 2 Sep 2012 08:19:00 +0000 (UTC) X-T2-Spam-Status: No, hits=-0.2 required=5.0 tests=ALL_TRUSTED, BAYES_50 Received: from [176.74.212.201] (account mc467741@c2i.net HELO laptop015.hselasky.homeunix.org) by mailfe08.swip.net (CommuniGate Pro SMTP 5.4.4) with ESMTPA id 315671613; Sun, 02 Sep 2012 10:13:51 +0200 From: Hans Petter Selasky To: freebsd-usb@freebsd.org Date: Sun, 2 Sep 2012 10:14:51 +0200 User-Agent: KMail/1.13.7 (FreeBSD/9.1-PRERELEASE; KDE/4.8.4; amd64; ; ) References: <201208310822.q7V8MMqC051998@red.freebsd.org> In-Reply-To: <201208310822.q7V8MMqC051998@red.freebsd.org> X-Face: 'mmZ:T{)),Oru^0c+/}w'`gU1$ubmG?lp!=R4Wy\ELYo2)@'UZ24N@d2+AyewRX}mAm; Yp |U[@, _z/([?1bCfM{_"B<.J>mICJCHAzzGHI{y7{%JVz%R~yJHIji`y>Y}k1C4TfysrsUI -%GU9V5]iUZF&nRn9mJ'?&>O MIME-Version: 1.0 Content-Type: Multipart/Mixed; boundary="Boundary-00=_7VxQQeQoI4cp+Di" Message-Id: <201209021014.51903.hselasky@c2i.net> Cc: freebsd-gnats-submit@freebsd.org, Bartek Krawczyk Subject: Re: usb/171197: ADATA Classic CH11 USB HDD doesn't work in FreeBSD 9.1-RC1 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: Sun, 02 Sep 2012 08:19:01 -0000 --Boundary-00=_7VxQQeQoI4cp+Di Content-Type: Text/Plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit On Friday 31 August 2012 10:22:22 Bartek Krawczyk wrote: > >Number: 171197 > >Category: usb > >Synopsis: ADATA Classic CH11 USB HDD doesn't work in FreeBSD 9.1-RC1 > >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: Fri Aug 31 08:30:08 UTC 2012 > >Closed-Date: > >Last-Modified: > >Originator: Bartek Krawczyk > >Release: 9.1-RC1 > >Organization: > > >Environment: > FreeBSD xbmc 9.1-RC1 FreeBSD 9.1-RC1 #0: Tue Aug 14 04:25:06 UTC 2012 > root@farrell.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC amd64 > > >Description: > Hi, I recently bought a 1TB ADATA Classic CH11 USB HDD and it doesn't seem > to be recognized by FreeBSD 9.1-RC1 (it works in Windows and Linux > though). I can provide more debugging information if you tell me how to do > it. This is what I get in messages: > > Aug 31 10:04:12 xbmc kernel: usb_alloc_device: set address 2 failed > (USB_ERR_STALLED, ignored) Aug 31 10:04:12 xbmc kernel: > usbd_setup_device_desc: getting device descriptor at addr 2 failed, > USB_ERR_STALLED Aug 31 10:04:12 xbmc kernel: usbd_req_re_enumerate: > addr=2, set address failed! (USB_ERR_STALLED, ignored) Aug 31 10:04:12 > xbmc kernel: usbd_setup_device_desc: getting device descriptor at addr 2 > failed, USB_ERR_STALLED Aug 31 10:04:13 xbmc kernel: > usbd_req_re_enumerate: addr=2, set address failed! (USB_ERR_STALLED, > ignored) Aug 31 10:04:13 xbmc kernel: usbd_setup_device_desc: getting > device descriptor at addr 2 failed, USB_ERR_STALLED Aug 31 10:04:13 xbmc > kernel: ugen1.2: at usbus1 (disconnected) Aug 31 10:04:13 xbmc > kernel: uhub_reattach_port: could not allocate new device > > And this is from usbconfig: > ugen4.2: at usbus4, cfg=0 md=HOST spd=HIGH > (480Mbps) pwr=ON > Hi, Could you send the device to me for debugging? Have you tried using an external HUB in between? Is the device properly powered? Can you try the attached patch? --HPS --Boundary-00=_7VxQQeQoI4cp+Di Content-Type: text/x-patch; charset="iso-8859-15"; name="add_set_address_delay.diff" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="add_set_address_delay.diff" === usb_request.c ================================================================== --- usb_request.c (revision 239913) +++ usb_request.c (local) @@ -1547,6 +1547,10 @@ DPRINTFN(6, "setting device address=%d\n", addr); + /* allow device time to set new address */ + usb_pause_mtx(mtx, + USB_MS_TO_TICKS(USB_SET_ADDRESS_SETTLE)); + req.bmRequestType = UT_WRITE_DEVICE; req.bRequest = UR_SET_ADDRESS; USETW(req.wValue, addr); --Boundary-00=_7VxQQeQoI4cp+Di--