Bug 205232 - Stalled USB transfer
Summary: Stalled USB transfer
Status: Closed Unable to Reproduce
Alias: None
Product: Base System
Classification: Unclassified
Component: usb (show other bugs)
Version: CURRENT
Hardware: arm Any
: --- Affects Many People
Assignee: freebsd-usb (Nobody)
Depends on:
Reported: 2015-12-10 21:54 UTC by Juraj Lutter
Modified: 2019-11-26 12:13 UTC (History)
3 users (show)

See Also:

usb debug output (7.68 KB, text/plain)
2015-12-10 21:54 UTC, Juraj Lutter
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Juraj Lutter 2015-12-10 21:54:40 UTC
Created attachment 164091 [details]
usb debug output

While attaching Toshiba G450 I get this error:

usbd_req_re_enumerate: addr=4, set address failed! (USB_ERR_STALLED, ignored)
usbd_setup_device_desc: getting device descriptor at addr 4 failed, USB_ERR_STALLED


ugen0.4: <Toshiba Incorporated> at usbus0
umass0: <Toshiba Incorporated Toshiba USB Storage, class 0/0, rev 1.10/0.00, addr 4> on usbus0

this device negotiates only 100mA while it needs the ports to switch to 500mA.

Ian Lepore suggested to set hw.usb.uhub.debug=9, then it loads and works. Setting hw.usb.uhub.debug=0 after the device has been attached is OK.

See attachment for debug info.

uname -a:
FreeBSD rpi2 11.0-CURRENT FreeBSD 11.0-CURRENT #0 r290273: Tue Nov  3 05:23:56 UTC 2015     root@releng2.nyi.freebsd.org:/usr/obj/arm.armv6/usr/src/sys/RPI2  arm
Comment 1 Ian Lepore freebsd_committer 2015-12-10 21:59:20 UTC
This was showing signs of failing to attach because it was requesting more power than the port could supply (although the hub on an rpi is configured as self-powered and the ports should allow 500ma attachments).  I suggested turning on hub debug to see if it would provide clues about the power, and somehow that made it work.  Some kind of timing problem that was "cured" by the extra debug output, maybe?

I also tried on my rpi-b attaching a thumb drive that requires 200ma, and it is able to attach without any errors, so there's something more than just the power involved I guess.
Comment 2 Hans Petter Selasky freebsd_committer 2015-12-11 09:06:30 UTC

What does "usbconfig -d X.Y dump_device_desc" say about this device?

Did you try to add a quirk for your device? Some device's firmware reset once they receive the first SCSI command they don't support.

usbconfig -d X.Y add_quirk UQ_MSC_NO_SYNC_CACHE

Comment 3 Juraj Lutter 2015-12-11 16:22:49 UTC
In mass storage mode:

ugen0.4: <Toshiba USB Storage Toshiba Incorporated> at usbus0, cfg=0 md=HOST spd=FULL (12Mbps) pwr=ON (100mA)

  bLength = 0x0012 
  bDescriptorType = 0x0001 
  bcdUSB = 0x0110 
  bDeviceClass = 0x0000  <Probed by interface class>
  bDeviceSubClass = 0x0000 
  bDeviceProtocol = 0x0000 
  bMaxPacketSize0 = 0x0040 
  idVendor = 0x0930 
  idProduct = 0x0d46 
  bcdDevice = 0x0000 
  iManufacturer = 0x0001  <Toshiba Incorporated>
  iProduct = 0x0002  <Toshiba USB Storage>
  iSerialNumber = 0x0003  <015020684058>
  bNumConfigurations = 0x0001
Comment 4 Juraj Lutter 2015-12-15 23:35:36 UTC
After adding a quirk, it does not work, see previous comment.
Comment 5 Juraj Lutter 2015-12-16 00:46:56 UTC
In situation where the modem is plugged while the RPI2 boots, it works. After subsequent unplug/plug, it does not work again.
Comment 6 Hans Petter Selasky freebsd_committer 2015-12-16 08:31:10 UTC
Can you try connecting the device through a self powered external USB HUB?

Comment 7 Juraj Lutter 2015-12-16 09:45:50 UTC
If you mean USB hub with its own power supply, then yes, I will connect.
Comment 8 Hans Petter Selasky freebsd_committer 2015-12-16 15:57:41 UTC
Comment 9 Juraj Lutter 2016-01-07 22:28:21 UTC
Situation turned in the way that I'll not be able to reproduce the problem any soon. Toshiba G450 I possess, has gone into production with Linux on ARM :-(
Comment 10 Juraj Lutter 2019-11-26 12:13:30 UTC
Unable to reproduce as of now.