Hi all, I have a user space driver for a device and am using USBDEVFS_BULK ioctl() calls to transfer data. My code works fine on an armv5b machine with Linux 2.4.22-xfs ehci_hcd, however the same code hangs when attempting to transfer larger chunks of data on a mipsel machine with Linux 2.6.12-rc1 ehci_hcd
As you can see from the included application trace, sending and receiving data of up to a few hundred bytes is OK, but a few kB at a time hangs. usb_bulk_write:ioctl - send 18 bytes usbdevfs_bulktransfer: ep=0x01, len=18, timeout=1100, data=0x7fe79c80 usb_bulk_write:ioctl - sent 18 bytes usb_bulk_read:ioctl - request 4096 bytes usbdevfs_bulktransfer: ep=0x82, len=4096, timeout=1100, data=0x100104f0 usb_bulk_read:ioctl - received 8 bytes usb_bulk_write:ioctl - send 122 bytes usbdevfs_bulktransfer: ep=0x01, len=122, timeout=1100, data=0x100004f0 usb_bulk_write:ioctl - sent 122 bytes usb_bulk_read:ioctl - request 4096 bytes usbdevfs_bulktransfer: ep=0x82, len=4096, timeout=1100, data=0x100104f0 usb_bulk_read:ioctl - received 8 bytes usb_bulk_write:ioctl - send 4096 bytes usbdevfs_bulktransfer: ep=0x01, len=4096, timeout=1100, data=0x100004f0 === At this point the process is stuck in D state and can not be killed. ~ # cat /proc/209/status Name: puppy State: D (disk sleep) SleepAVG: 87% Tgid: 209 Pid: 209 PPid: 160 TracerPid: 0 Uid: 0 0 0 0 Gid: 0 0 0 0 FDSize: 32 Groups: VmSize: 1312 kB VmLck: 0 kB VmRSS: 504 kB VmData: 656 kB VmStk: 84 kB VmExe: 36 kB VmLib: 516 kB VmPTE: 16 kB Threads: 1 SigQ: 3/256 SigPnd: 00000000000000000000000000000100 ShdPnd: 00000000000000000000000000004102 SigBlk: 00000000000000000000000000000000 SigIgn: 00000000000000000000000000000000 SigCgt: 00000000000000000000000000000000 CapInh: 0000000000000000 CapPrm: 00000000fffffeff CapEff: 00000000fffffeff The timeout in the ioctl() request does not appear to have any effect - the call never returns. Power cycling the USB device does not seem to help anything. At best I get: usb 1-1: USB disconnect, address 3 but the process is still hung. I need to reboot the machine in order to be able to continue using usbfs. Any ideas as to where I should start looking for problems? Is there any extra debugging / logging I can turn on to help identify the source of the problem? I noticed that turning on the preemptible kernel option will cause the following messages: 00:06:55 (none) kern.err kernel: scheduling while atomic: puppy/0x10000001/204 Could this be related? Thanks in advance. Peter. ------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click _______________________________________________ linux-usb-devel@lists.sourceforge.net To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel