USB hub on a custom cape is not allowing mass storage devices to work or allow hot plugging

I have a custom cape that has a SMSC hub chip and I’m having some serious problems. I followed the reference design from the link below, and not getting good results. If I plug in a USB device that is NOT mass storage, it works as long as I have it plugged in at boot up. If I unplug it and plug it back in (hot plug) it no longer works. If I plug in a mass storage device it sees it when I do a “lsusb”, but I never see a device in the “/dev/sd*”. Any ideas? The BeagleBone White actually worked better in that I could at least hot plug a storage device. Is there a driver I need, or a module I need to load?

http://www.google.com/url?sa=t&rct=j&q=&esrc=s&frm=1&source=web&cd=1&cad=rja&ved=0CCsQFjAA&url=http%3A%2F%2Fwww.smsc.com%2FDownloads%2FSMSC%2FDownloads_Public%2Fusb%2Fevb2512q36bas.pdf&ei=XKANUtWqH4fc2QX2kIHABg&usg=AFQjCNEqnyzrZbjRxqSNM0zc1Ng-wkUx8Q&sig2=ZX5XykZWSp-GM-KY8RmfHQ&bvm=bv.50768961,d.b2I

So exactly how are you using it? The schematic has several options. Which ones are you using?

Gerald

I am not using any of the options that have the dotted line. 5V comes from a regulator that I have powering the BBB, and 3.3V comes from the BBB.

Are you running it as self powered or line powered?

Gerald

Line powered. 5V comes from the MIC2026-1BM regulator. This regulator gets it’s 5V supply from a 5V 2A buck regulator - MCP16322T-500E/NG.

I mean the mode of the USB hub. I am concerned about where the VBUS detect is connected to and the overall power arrangements, power sequncing. I have seem issues with self powered HUBs.

Gerald

VBUS detect is coming from pin 1 on the USB connector on the bone… so I guess this would be self powered. I’ll do a quick check to see what happens if I make this line powered.

Still no improvement, although now I get these messages

[ 10.183671] hub 1-1:1.0: port 1 disabled by hub (EMI?), re-enabling…
[ 25.223273] BUG: scheduling while atomic: lsusb/298/0x40000100

Here’s my output from dmesg:

root@beaglebone:~# dmesg | grep hub
[ 0.152954] usbcore: registered new interface driver hub
[ 0.264196] hub 1-0:1.0: usb_probe_interface
[ 0.264303] hub 1-0:1.0: usb_probe_interface - got id
[ 0.264371] hub 1-0:1.0: USB hub found
[ 0.264414] hub 1-0:1.0: 1 port detected
[ 0.264434] hub 1-0:1.0: standalone hub
[ 0.264452] hub 1-0:1.0: individual port power switching
[ 0.264471] hub 1-0:1.0: no over-current protection
[ 0.264488] hub 1-0:1.0: Single TT
[ 0.264510] hub 1-0:1.0: TT requires at most 8 FS bit times (666 ns)
[ 0.264530] hub 1-0:1.0: power on to power good time: 10ms
[ 0.264570] hub 1-0:1.0: local power source is good
[ 0.264673] hub 1-0:1.0: enabling power on all ports
[ 0.366019] hub 1-0:1.0: state 7 ports 1 chg 0000 evt 0000
[ 0.366096] hub 1-0:1.0: hub_suspend
[ 0.437750] hub 1-0:1.0: hub_resume
[ 0.437806] hub 1-0:1.0: port 1: status 0101 change 0001
[ 0.539671] hub 1-0:1.0: state 7 ports 1 chg 0002 evt 0000
[ 0.539717] hub 1-0:1.0: port 1, status 0101, change 0000, 12 Mb/s
[ 0.765188] hub 1-1:1.0: usb_probe_interface
[ 0.765203] hub 1-1:1.0: usb_probe_interface - got id
[ 0.765222] hub 1-1:1.0: USB hub found
[ 0.765369] hub 1-1:1.0: 2 ports detected
[ 0.765383] hub 1-1:1.0: standalone hub
[ 0.765393] hub 1-1:1.0: ganged power switching
[ 0.765403] hub 1-1:1.0: global over-current protection
[ 0.765414] hub 1-1:1.0: Single TT
[ 0.765427] hub 1-1:1.0: TT requires at most 8 FS bit times (666 ns)
[ 0.765438] hub 1-1:1.0: power on to power good time: 0ms
[ 0.765495] hub 1-1:1.0: hub controller current requirement: 0mA
[ 0.765509] hub 1-1:1.0: 100mA bus power budget for each child
[ 0.765559] hub 1-1:1.0: no over-current condition exists
[ 0.765670] hub 1-1:1.0: enabling power on all ports
[ 0.765998] hub 1-0:1.0: state 7 ports 1 chg 0000 evt 0002
[ 0.766028] hub 1-0:1.0: port 1 enable change, status 00000503
[ 0.865892] hub 1-1:1.0: port 1: status 0101 change 0001
[ 0.967444] hub 1-1:1.0: state 7 ports 2 chg 0002 evt 0000
[ 0.967529] hub 1-1:1.0: port 1, status 0101, change 0000, 12 Mb/s
[ 0.981105] hub 1-1:1.0: port 1 not reset yet, waiting 10ms
[ 1.061175] hub 1-1:1.0: port 1 not reset yet, waiting 10ms
[ 1.146433] hub 1-1:1.0: 400mA power budget left
[ 10.183536] hub 1-1:1.0: state 7 ports 2 chg 0000 evt 0002
[ 10.183614] hub 1-1:1.0: port 1 enable change, status 00000101
[ 10.183671] hub 1-1:1.0: port 1 disabled by hub (EMI?), re-enabling…
[ 10.190556] hub 1-1:1.0: port 1, status 0101, change 0002, 12 Mb/s
[ 10.303376] hub 1-1:1.0: debounce: port 1: total 100ms stable 100ms status 0x101
[ 10.317048] hub 1-1:1.0: port 1 not reset yet, waiting 10ms
[ 10.397121] hub 1-1:1.0: port 1 not reset yet, waiting 10ms
[ 10.485257] hub 1-1:1.0: 400mA power budget left
[ 10.485279] hub 1-1:1.0: state 7 ports 2 chg 0000 evt 0002
[ 91.847556] hub 1-1:1.0: state 7 ports 2 chg 0000 evt 0002
[ 91.847664] hub 1-1:1.0: port 1 enable change, status 00000101
[ 91.847724] hub 1-1:1.0: port 1 disabled by hub (EMI?), re-enabling…
[ 91.854625] hub 1-1:1.0: port 1, status 0101, change 0002, 12 Mb/s
[ 91.969420] hub 1-1:1.0: debounce: port 1: total 100ms stable 100ms status 0x101
[ 91.983123] hub 1-1:1.0: port 1 not reset yet, waiting 10ms
[ 92.063178] hub 1-1:1.0: port 1 not reset yet, waiting 10ms
[ 92.148551] hub 1-1:1.0: 400mA power budget left
[ 92.148571] hub 1-1:1.0: state 7 ports 2 chg 0000 evt 0002

Do you have a BeagleBone White? It uses the same hub you are using. You could plug that into the BBB and see what happens there.

Gerald

I plugged in a BBW to the BBB and it does boot, but getting some read errors:

root@beaglebone:~# lsusb
Bus 001 Device 002: ID 0424:2412 Standard Microsystems Corp.
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 003: ID 0403:6010 Future Technology Devices International, Ltd FT2232C Dual USB-UART/FIFO IC

root@beaglebone:~# dmesg | grep usb
[ 0.147748] usbcore: registered new interface driver usbfs
[ 0.147856] usbcore: registered new interface driver hub
[ 0.148135] usbcore: registered new device driver usb
[ 0.397224] usbcore: registered new interface driver asix
[ 0.397343] usbcore: registered new interface driver cdc_ether
[ 0.397473] usbcore: registered new interface driver smsc95xx
[ 0.399645] usbcore: registered new interface driver net1080
[ 0.399760] usbcore: registered new interface driver cdc_subset
[ 0.399846] usbcore: registered new interface driver zaurus
[ 0.400007] usbcore: registered new interface driver cdc_ncm
[ 0.400816] usbcore: registered new interface driver cdc_acm
[ 0.400976] usbcore: registered new interface driver usb-storage
[ 0.401160] musb-hdrc: version 6.0, ?dma?, otg (peripheral+host)
[ 0.401645] musb-hdrc musb-hdrc.0.auto: pdev->id = 0
[ 0.401672] musb-hdrc musb-hdrc.0.auto: drivers/usb/musb/musb_dsps.c:468 dsps_musb_init: OK
[ 0.401711] musb-hdrc: ConfigData=0xde (UTMI-8, dyn FIFOs, bulk combine, bulk split, HB-ISO Rx, HB-ISO Tx, SoftConn)
[ 0.401730] musb-hdrc: MHDRC RTL version 2.0
[ 0.401745] musb-hdrc: setup fifo_mode 4
[ 0.401771] musb-hdrc: 28/31 max ep, 16384/16384 memory
[ 0.401909] musb-hdrc musb-hdrc.0.auto: *** mode=3
[ 0.401929] musb-hdrc musb-hdrc.0.auto: *** power=250
[ 0.405607] musb-hdrc musb-hdrc.1.auto: pdev->id = 1
[ 0.405635] musb-hdrc musb-hdrc.1.auto: drivers/usb/musb/musb_dsps.c:468 dsps_musb_init: OK
[ 0.405672] musb-hdrc: ConfigData=0xde (UTMI-8, dyn FIFOs, bulk combine, bulk split, HB-ISO Rx, HB-ISO Tx, SoftConn)
[ 0.405691] musb-hdrc: MHDRC RTL version 2.0
[ 0.405704] musb-hdrc: setup fifo_mode 4
[ 0.405727] musb-hdrc: 28/31 max ep, 16384/16384 memory
[ 0.405857] musb-hdrc musb-hdrc.1.auto: *** mode=1
[ 0.405877] musb-hdrc musb-hdrc.1.auto: *** power=250
[ 0.405898] musb-hdrc musb-hdrc.1.auto: MUSB HDRC host driver
[ 0.406303] musb-hdrc musb-hdrc.1.auto: new USB bus registered, assigned bus number 1
[ 0.406363] musb-hdrc musb-hdrc.1.auto: supports USB remote wakeup
[ 0.406478] usb usb1: default language 0x0409
[ 0.406537] usb usb1: udev 1, busnum 1, minor = 0
[ 0.406560] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
[ 0.406581] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[ 0.406600] usb usb1: Product: MUSB HDRC host driver
[ 0.406619] usb usb1: Manufacturer: Linux 3.8.13-00605-gc8a0632-dirty musb-hcd
[ 0.406637] usb usb1: SerialNumber: musb-hdrc.1.auto
[ 0.407687] usb usb1: usb_probe_device
[ 0.407715] usb usb1: configuration #1 chosen from 1 choice
[ 0.407785] usb usb1: adding 1-0:1.0 (config #1, interface 0)
[ 0.408003] hub 1-0:1.0: usb_probe_interface
[ 0.408024] hub 1-0:1.0: usb_probe_interface - got id
[ 0.509123] usb usb1: bus auto-suspend, wakeup 1
[ 0.513754] usbcore: registered new interface driver usbhid
[ 0.513772] usbhid: USB HID core driver
[ 0.700554] usb usb1: usb wakeup-resume
[ 0.700608] usb usb1: usb auto-resume
[ 0.909295] usb 1-1: new high-speed USB device number 2 using musb-hdrc
[ 1.028588] usb 1-1: udev 2, busnum 1, minor = 1
[ 1.028605] usb 1-1: New USB device found, idVendor=0424, idProduct=2412
[ 1.028618] usb 1-1: New USB device strings: Mfr=0, Product=0, SerialNumber=0
[ 1.029016] usb 1-1: usb_probe_device
[ 1.029032] usb 1-1: configuration #1 chosen from 1 choice
[ 1.029143] usb 1-1: adding 1-1:1.0 (config #1, interface 0)
[ 1.029265] hub 1-1:1.0: usb_probe_interface
[ 1.029278] hub 1-1:1.0: usb_probe_interface - got id
[ 1.311646] usb 1-1.1: new high-speed USB device number 3 using musb-hdrc
[ 1.405622] usb 1-1.1: default language 0x0409
[ 1.405743] usb 1-1.1: udev 3, busnum 1, minor = 2
[ 1.405757] usb 1-1.1: New USB device found, idVendor=0403, idProduct=6010
[ 1.405769] usb 1-1.1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[ 1.405780] usb 1-1.1: Product: Dual RS232-HS
[ 1.405791] usb 1-1.1: Manufacturer: FTDI
[ 1.406137] usb 1-1.1: usb_probe_device
[ 1.406153] usb 1-1.1: configuration #1 chosen from 1 choice
[ 1.406226] usb 1-1.1: adding 1-1.1:1.0 (config #1, interface 0)
[ 1.406636] usb 1-1.1: adding 1-1.1:1.1 (config #1, interface 1)
[ 4.749307] usb 1-1.2: new high-speed USB device number 4 using musb-hdrc
[ 4.989582] usbcore: registered new interface driver usbserial
[ 4.989683] usbcore: registered new interface driver usbserial_generic
[ 4.989750] usbserial: USB Serial support registered for generic
[ 5.010545] usbcore: registered new interface driver ftdi_sio
[ 5.010629] usbserial: USB Serial support registered for FTDI USB Serial Device
[ 5.010775] ftdi_sio 1-1.1:1.0: usb_probe_interface
[ 5.010794] ftdi_sio 1-1.1:1.0: usb_probe_interface - got id
[ 5.074398] usb 1-1.1: Detected FT2232H
[ 5.074411] usb 1-1.1: Number of endpoints 2
[ 5.074423] usb 1-1.1: Endpoint 1 MaxPacketSize 512
[ 5.074435] usb 1-1.1: Endpoint 2 MaxPacketSize 512
[ 5.074445] usb 1-1.1: Setting MaxPacketSize 512
[ 9.749207] usb 1-1.2: khubd timed out on ep0in len=0/64
[ 14.749197] usb 1-1.2: khubd timed out on ep0in len=0/64
[ 14.749597] usb 1-1.1: FTDI USB Serial Device converter now attached to ttyUSB0
[ 14.749685] ftdi_sio 1-1.1:1.1: usb_probe_interface
[ 14.749702] ftdi_sio 1-1.1:1.1: usb_probe_interface - got id
[ 14.749868] usb 1-1.1: Detected FT2232H
[ 14.749881] usb 1-1.1: Number of endpoints 2
[ 14.749894] usb 1-1.1: Endpoint 1 MaxPacketSize 512
[ 14.749905] usb 1-1.1: Endpoint 2 MaxPacketSize 512
[ 14.749915] usb 1-1.1: Setting MaxPacketSize 512
[ 19.749204] usb 1-1.2: khubd timed out on ep0in len=0/64
[ 19.749667] usb 1-1.1: FTDI USB Serial Device converter now attached to ttyUSB1
[ 19.829301] usb 1-1.2: device descriptor read/64, error -110
[ 24.938616] usb 1-1.2: khubd timed out on ep0in len=0/64
[ 29.938609] usb 1-1.2: khubd timed out on ep0in len=0/64
[ 34.938609] usb 1-1.2: khubd timed out on ep0in len=0/64
[ 35.018995] usb 1-1.2: device descriptor read/64, error -110
[ 35.208183] usb 1-1.2: new high-speed USB device number 5 using musb-hdrc
[ 40.208146] usb 1-1.2: khubd timed out on ep0in len=0/64
[ 45.208152] usb 1-1.2: khubd timed out on ep0in len=0/64
[ 50.208142] usb 1-1.2: khubd timed out on ep0in len=0/64
[ 50.288228] usb 1-1.2: device descriptor read/64, error -110
[ 55.397590] usb 1-1.2: khubd timed out on ep0in len=0/64
[ 60.397599] usb 1-1.2: khubd timed out on ep0in len=0/64
[ 65.397591] usb 1-1.2: khubd timed out on ep0in len=0/64
[ 65.477678] usb 1-1.2: device descriptor read/64, error -110
[ 65.667160] usb 1-1.2: new high-speed USB device number 6 using musb-hdrc
[ 70.667124] usb 1-1.2: khubd timed out on ep0out len=0/0
[ 75.870246] usb 1-1.2: khubd timed out on ep0out len=0/0
[ 76.073368] usb 1-1.2: device not accepting address 6, error -110
[ 76.163224] usb 1-1.2: new high-speed USB device number 7 using musb-hdrc
[ 81.163218] usb 1-1.2: khubd timed out on ep0out len=0/0
[ 86.366335] usb 1-1.2: khubd timed out on ep0out len=0/0
[ 86.569449] usb 1-1.2: device not accepting address 7, error -110

[ 65.477678] usb 1-1.2: device descriptor read/64, error -110
[ 76.073368] usb 1-1.2: device not accepting address 6, error -110
[ 86.569449] usb 1-1.2: device not accepting address 7, error -110
[ 86.578822] hub 1-1:1.0: unable to enumerate USB device on port 2

Hey Brent,

Just curious, does the mass storage device show up with an fdisk -l ?

Just a thought though. I did notice when compiling my own kernel from source that there seem to be quite a few “USB drivers” listed in menuconfig that are not necessarily compiled in statically or even as modules.I am not sure if there are any mass storage drivers applicable to your given situation but it could be worth investigating. But maybe if the driver is in module form it would be a good idea to compile it into your kernel statically ? Sorry, I am kind of new to embedded Linux, so yeah I am stabbing at air here . . . and perhaps even you’ve thought of this yourself already ?

I am interested in seeing you resolve this though, and definitely would be interested in seeing how you resolve it once you do get it fixed.

Just curious, does the mass storage device show up with an fdisk -l ? <----- What i was getting at here is does Linux recognize an existing file system on the mass storage device. Assuming one does exist.

Brent,

Also just quickly searching “khubd timed out on ep0out len=0/0” seems that it is possibly related to a specific external mass storage device controller( or maybe a few ). I have not found specific device information yet, but perhaps changing to a different external controller will tell you something ? Assuming you do have a different controller available.

I have the evaluation kit for the USB2512 and when I plug it into the BBW everything works fine. Flash drives enumerate and create a device that I can mount. When I plug it into the BBB, on a cold boot it works. Hot plugging does not work. I have already applied the patch from Koen a few months ago that enables hot plugging for USB devices. Do the USB hubs listed here work with hot plugging? http://circuitco.com/support/index.php?title=BeagleBone_Black_Accessories#USB_HUBS

Nope, it does not show up with fdisk -l.

FYI, for some reason if I call this command:

echo 1 > /sys/bus/usb/devices/1-1.2/bConfigurationValue

I can get a USB flash drive to work as long as it’s plugged at a cold boot. Not every flash drive is working, but out of the 4 different kinds I have I was able to get one working. This issue seriously needs addressed, does anyone have any ideas what that command even does? I found it on the internet somewhere.