Bug 215531 - USB hub sometimes fails to attach
Summary: USB hub sometimes fails to attach
Status: New
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: CURRENT
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-usb (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-12-24 02:58 UTC by Ed Maste
Modified: 2016-12-28 14:37 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ed Maste freebsd_committer freebsd_triage 2016-12-24 02:58:50 UTC
I have a 10 port USB 2.0 hub which is implemented internally as three four-port hubs. Two ports come directly from the first hub, and the other 8 ports are each behind two hubs.

When I plug it into my X220 laptop running -current at r309124 it sometimes works:

Dec 24 02:47:38 volta kernel: ugen0.5: <vendor 0x214b USB2.0 HUB> at usbus0
Dec 24 02:47:38 volta kernel: uhub4 on uhub3
Dec 24 02:47:38 volta kernel: uhub4: <vendor 0x214b USB2.0 HUB, class 9/0, rev 2.00/1.00, addr 5> on usbus0
Dec 24 02:47:39 volta kernel: uhub4: 4 ports with 4 removable, self powered
Dec 24 02:47:40 volta kernel: ugen0.6: <vendor 0x214b USB2.0 HUB> at usbus0
Dec 24 02:47:40 volta kernel: uhub5 on uhub4
Dec 24 02:47:40 volta kernel: uhub5: <vendor 0x214b USB2.0 HUB, class 9/0, rev 2.00/1.00, addr 6> on usbus0
Dec 24 02:47:40 volta kernel: uhub5: 4 ports with 4 removable, self powered
Dec 24 02:47:41 volta kernel: ugen0.7: <vendor 0x214b USB2.0 HUB> at usbus0
Dec 24 02:47:41 volta kernel: uhub6 on uhub4
Dec 24 02:47:41 volta kernel: uhub6: <vendor 0x214b USB2.0 HUB, class 9/0, rev 2.00/1.00, addr 7> on usbus0
Dec 24 02:47:42 volta kernel: uhub6: 4 ports with 4 removable, self powered

and sometimes one of the hubs fails to attach:

Dec 24 02:47:47 volta kernel: ugen0.5: <vendor 0x214b USB2.0 HUB> at usbus0
Dec 24 02:47:47 volta kernel: uhub4 on uhub3
Dec 24 02:47:47 volta kernel: uhub4: <vendor 0x214b USB2.0 HUB, class 9/0, rev 2.00/1.00, addr 5> on usbus0
Dec 24 02:47:47 volta kernel: uhub4: 4 ports with 4 removable, self powered
Dec 24 02:47:48 volta kernel: ugen0.6: <vendor 0x214b USB2.0 HUB> at usbus0
Dec 24 02:47:48 volta kernel: uhub5 on uhub4
Dec 24 02:47:48 volta kernel: uhub5: <vendor 0x214b USB2.0 HUB, class 9/0, rev 2.00/1.00, addr 6> on usbus0
Dec 24 02:47:49 volta kernel: uhub5: 4 ports with 4 removable, self powered
Dec 24 02:47:50 volta kernel: usb_alloc_device: set address 7 failed (USB_ERR_IOERROR, ignored)
Dec 24 02:47:52 volta kernel: usbd_setup_device_desc: getting device descriptor at addr 7 failed, USB_ERR_IOERROR
Dec 24 02:47:52 volta kernel: usbd_req_re_enumerate: addr=7, set address failed! (USB_ERR_IOERROR, ignored)
Dec 24 02:47:54 volta kernel: usbd_setup_device_desc: getting device descriptor at addr 7 failed, USB_ERR_IOERROR
Dec 24 02:47:55 volta kernel: usbd_req_re_enumerate: addr=7, set address failed! (USB_ERR_IOERROR, ignored)
Dec 24 02:47:57 volta kernel: usbd_setup_device_desc: getting device descriptor at addr 7 failed, USB_ERR_IOERROR
Dec 24 02:47:57 volta kernel: usbd_req_re_enumerate: addr=7, set address failed! (USB_ERR_IOERROR, ignored)
Dec 24 02:47:59 volta kernel: usbd_setup_device_desc: getting device descriptor at addr 7 failed, USB_ERR_IOERROR
Dec 24 02:48:00 volta kernel: usbd_req_re_enumerate: addr=7, set address failed! (USB_ERR_IOERROR, ignored)
Dec 24 02:48:01 volta kernel: usbd_setup_device_desc: getting device descriptor at addr 7 failed, USB_ERR_IOERROR
Dec 24 02:48:01 volta kernel: ugen0.7: <Unknown > at usbus0 (disconnected)
Dec 24 02:48:01 volta kernel: uhub_reattach_port: could not allocate new device

USB controller is:

ehci0@pci0:0:26:0:      class=0x0c0320 card=0x21da17aa chip=0x1c2d8086 rev=0x04 hdr=0x00
    vendor     = 'Intel Corporation'
    device     = '6 Series/C200 Series Chipset Family USB Enhanced Host Controller'
    class      = serial bus
    subclass   = USB

by contrast it consistently attaches successfully on my stable/10 r306697 desktop, with:

ehci0@pci0:0:26:0:      class=0x0c0320 card=0x50061458 chip=0x1e2d8086 rev=0x04 hdr=0x00
    vendor     = 'Intel Corporation'
    device     = '7 Series/C216 Chipset Family USB Enhanced Host Controller'
    class      = serial bus
    subclass   = USB
Comment 1 Hans Petter Selasky freebsd_committer freebsd_triage 2016-12-25 09:48:04 UTC
Hi,

Are you using the EARLY AP startup feature?

10-stable and 11/12-current using the same EHCI driver. It is possibly not related to the driver, but the order of system startup.

--HPS
Comment 2 Ed Maste freebsd_committer freebsd_triage 2016-12-28 14:37:42 UTC
(In reply to Hans Petter Selasky from comment #1)

Not using EARLY_AP_STARTUP here, and I tested by plugging into the running system so should not be related to system startup. Will continue to narrow it down further.