I've got a machine here with a custom-designed 12-port USB 2.0 interface on
it. It has three NEC 720101 host controllers, with four sockets
(individually powerable) off of each controller. We're using kernel 2.4.26.
At one point we thought we had all of this working successfully. However,
we've found that after running for a number of hours, the machine tends to
lock up on us. We do not use usb-storage, because we need to be able to
claim interfaces via libusb, in order to run some operations. The sequence
of operations that we do in this current test loop is thus:
1. power up all sockets, one at a time, with 500 msec pause between each
socket power-up
2. poll /proc/bus/usb/devices until the last-modified date hasn't changed
for several seconds. The reason for this is to keep us from trying to start
claiming interfaces before the core drivers have detected all the devices.
3. claim_interface() on each installed device.
4. read some USB data from the device
5. release all devices
6. power down all sockets, one at a time, with 100 msec pause between each
7. sleep(4) (this was added as part of debug, but didn't impact the
problem)
8. repeat steps 1 through 7 until the machine crashes
What I'm finding is that the system will run these tests for anywhere from 3
to 20 hours, but then at some point it just hangs. The entire computer
hangs, not just a process. There are no indications ahead of time that
anything is going wrong. From examining /var/log/messages, I've found that
the hang always occurs during the USB core discovery processes, before any
of my polling code ever gets executed; any number of devices may have been
discovered when it hangs, from a minimum of one to a maximum of seven or
eight.
I turned on the USB DEBUG flags, and modified my syslogd parameters so more
messages get logged to the system log. I've posted below, both the
beginning of a normal, successful discover, and the messages leading up to
my most recent hang. You'll notice that the latter ends with the syslogd
restart message from rebooting!!
Does *anyone* have any idea what is hanging up here?? Or have any ideas on
what else I might look at?? I'm really at a loss in debugging this
further...
START OF POWER-UP DETECTION (successful)
09:51:01 hub.c: port 1, portstatus 100, change 0, 12 Mb/s
09:51:01 hub.c: port 2, portstatus 100, change 0, 12 Mb/s
09:51:01 hub.c: port 3, portstatus 100, change 0, 12 Mb/s
09:51:01 ehci_hcd 01:0a.2: GetStatus port 4 status 001803 POWER sig=j
CSC CONNECT
09:51:01 hub.c: port 4, portstatus 501, change 1, 480 Mb/s
09:51:01 hub.c: port 4 connection change
09:51:01 hub.c: port 4, portstatus 501, change 1, 480 Mb/s
09:51:01 hub.c: port 4, portstatus 501, change 0, 480 Mb/s
09:51:01 last message repeated 3 times
09:51:01 hub.c: port 4, portstatus 511, change 0, 480 Mb/s
09:51:01 hub.c: port 4 of hub 1 not reset yet, waiting 10ms
09:51:01 hub.c: port 4, portstatus 511, change 0, 480 Mb/s
09:51:01 hub.c: port 4 of hub 1 not reset yet, waiting 10ms
09:51:01 ehci_hcd 01:0a.2: port 4 high speed
09:51:01 ehci_hcd 01:0a.2: GetStatus port 4 status 001005 POWER sig=se0
PE CONNECT
09:51:01 hub.c: port 4, portstatus 503, change 10, 480 Mb/s
09:51:01 hub.c: new USB device 01:0a.2-4, assigned address 14
09:51:01 usb.c: kmalloc IF d185b440, numif 1
09:51:01 usb.c: new device strings: Mfr=1, Product=2, SerialNumber=3
09:51:01 usb.c: USB device number 14 default language ID 0x409
09:51:01 Manufacturer: LEXAR MEDIA
09:51:01 Product: JUMPDRIVE ELITE
09:51:01 SerialNumber: 0A4E9712161845240604
START OF POWER-UP CONNECTIONS (hung)
09:51:24 kernel: hub.c: port 1, portstatus 100, change 0, 12 Mb/s
09:51:24 kernel: hub.c: port 2, portstatus 100, change 0, 12 Mb/s
09:51:24 kernel: hub.c: port 3, portstatus 100, change 0, 12 Mb/s
09:51:24 kernel: ehci_hcd 01:0a.2: GetStatus port 4 status 001803 POWER
sig=j
CSC CONNECT
09:51:24 kernel: hub.c: port 4, portstatus 501, change 1, 480 Mb/s
09:51:24 kernel: hub.c: port 4 connection change
09:51:24 kernel: hub.c: port 4, portstatus 501, change 1, 480 Mb/s
09:51:24 kernel: hub.c: port 4, portstatus 501, change 0, 480 Mb/s
09:51:25 last message repeated 3 times
09:51:25 kernel: hub.c: port 4, portstatus 511, change 0, 480 Mb/s
09:51:25 kernel: hub.c: port 4 of hub 1 not reset yet, waiting 10ms
09:51:25 kernel: hub.c: port 4, portstatus 511, change 0, 480 Mb/s
09:51:25 kernel: hub.c: port 4 of hub 1 not reset yet, waiting 10ms
09:57:37 syslogd 1.4.1: restart.
-------------------------------------------------------
This SF.Net email sponsored by Black Hat Briefings & Training.
Attend Black Hat Briefings & Training, Las Vegas July 24-29 -
digital self defense, top technical experts, no vendor pitches,
unmatched networking opportunities. Visit www.blackhat.com
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-users