From: Xiaofan C. <xia...@gm...> - 2010-01-31 02:09:52
|
On Sun, Jan 31, 2010 at 4:51 AM, Pete Batard <pb...@gm...> wrote: > On 2010.01.30 16:09, Alan Stern wrote: >>> >>> Sending Inquiry: >>> libusb:debug [submit_bulk_transfer] need 1 urbs for new transfer with >>> length 32 >> >> This could be the problem right here. The length is supposed to be 31, >> not 32. > > I tried with 31 before committing the latest version of xusb, and found it > didn't help, so I reverted to using 32. > >> But if changing that doesn't help then it's not clear what the real >> problem is. It would help to see a pair of usbmon traces showing what >> happens: >> When you first plug the device into a Linux system, and >> When you run the xusb program. > > Yeah, I'll try to do that. Not high on my priority list at the moment, so it > might be a while. > Yes this is only a test program so you do not need to spend too much time on it. It is very strange, I changed the transfer length to 31 and at one time, the test program works. But then I tried again and again, it failed. The problem is that I do not remember I did other changes when it passed the test. The usbmon log when first plugin is too big. So I will send by private email only to Alan and Pete. The usbmon log for two sessions of the xusb program 1st try (not sure if this is a success test or not) f1182500 1662427764 S Bo:1:012:2 -115 31 = 55534243 a8000000 00000000 00000600 00000000 00000000 00000000 000000 f1182500 1662427826 C Bo:1:012:2 0 31 > f1182500 1662428044 S Bi:1:012:1 -115 13 < f1182500 1662428575 C Bi:1:012:1 0 13 = 55534253 a8000000 00000000 00 f1182500 1662591249 S Bo:1:012:2 -115 31 = 55534243 a9000000 00000000 00000600 00000000 00000000 00000000 000000 f1182500 1662591318 C Bo:1:012:2 0 31 > f1182500 1662591414 S Bi:1:012:1 -115 13 < f1182500 1662591567 C Bi:1:012:1 0 13 = 55534253 a9000000 00000000 00 f1182500 1662591628 S Bo:1:012:2 -115 31 = 55534243 aa000000 00000000 00000600 00000000 00000000 00000000 000000 f1182500 1662591692 C Bo:1:012:2 0 31 > f1182500 1662591721 S Bi:1:012:1 -115 13 < f1182500 1662591817 C Bi:1:012:1 0 13 = 55534253 aa000000 00000000 00 f1182500 1664427661 S Bo:1:012:2 -115 31 = 55534243 ab000000 00000000 00000600 00000000 00000000 00000000 000000 f1182500 1664427732 C Bo:1:012:2 0 31 > f1182500 1664427807 S Bi:1:012:1 -115 13 < f1182500 1664428478 C Bi:1:012:1 0 13 = 55534253 ab000000 00000000 00 f1182500 1664590131 S Bo:1:012:2 -115 31 = 55534243 ac000000 00000000 00000600 00000000 00000000 00000000 000000 f1182500 1664590221 C Bo:1:012:2 0 31 > f1182500 1664590310 S Bi:1:012:1 -115 13 < f1182500 1664590470 C Bi:1:012:1 0 13 = 55534253 ac000000 00000000 00 f1182500 1664590531 S Bo:1:012:2 -115 31 = 55534243 ad000000 00000000 00000600 00000000 00000000 00000000 000000 f1182500 1664590596 C Bo:1:012:2 0 31 > f1182500 1664590624 S Bi:1:012:1 -115 13 < f1182500 1664590720 C Bi:1:012:1 0 13 = 55534253 ad000000 00000000 00 f1791400 1666352672 S Ci:1:012:0 s 80 06 0300 0000 0080 128 < f1791400 1666352777 C Ci:1:012:0 0 4 = 04030904 f1791400 1666352845 S Ci:1:012:0 s 80 06 0300 0000 00ff 255 < f1791400 1666353011 C Ci:1:012:0 0 4 = 04030904 f1791400 1666353047 S Ci:1:012:0 s 80 06 0301 0409 00ff 255 < f1791400 1666353137 C Ci:1:012:0 0 16 = 10035300 61006e00 44006900 73006b00 f1791400 1666353175 S Ci:1:012:0 s 80 06 0300 0000 00ff 255 < f1791400 1666449487 C Ci:1:012:0 0 4 = 04030904 f17e3480 1666450052 S Ci:1:012:0 s 80 06 0302 0409 00ff 255 < f17e3480 1666450131 C Ci:1:012:0 0 26 = 1a034300 72007500 7a006500 72002000 4d006900 63007200 6f00 f17e3480 1666466278 S Ci:1:012:0 s 80 06 0300 0000 00ff 255 < f17e3480 1666467382 C Ci:1:012:0 0 4 = 04030904 effa8d80 1666467463 S Ci:1:012:0 s 80 06 0303 0409 00ff 255 < effa8d80 1666467629 C Ci:1:012:0 0 34 = 22033000 30003000 30004200 38003700 30003200 33003600 30003100 37003700 effa8d80 1666467687 S Ci:1:012:0 s a1 fe 0000 0000 0001 1 < effa8d80 1666467754 C Ci:1:012:0 0 1 = 00 effa8d80 1666467821 S Bo:1:012:2 -115 31 = 55534243 01000000 24000000 80000612 00000024 00000000 00000000 000000 effa8d80 1666468378 C Bo:1:012:2 0 31 > effa8d80 1666468442 S Bi:1:012:1 -115 36 < effa8d80 1666469379 C Bi:1:012:1 0 36 = 00800001 75000000 53616e44 69736b20 4372757a 6572204d 6963726f 20202020 effa8d80 1666469454 S Bi:1:012:1 -115 13 < effa8d80 1666469503 C Bi:1:012:1 0 13 = 55534253 01000000 00000000 00 effa8d80 1666469569 S Bo:1:012:2 -115 31 = 55534243 02000000 08000000 80000a25 00000000 00000000 00000000 000000 effa8d80 1666469628 C Bo:1:012:2 0 31 > effa8d80 1666469689 S Bi:1:012:1 -115 8 < effa8d80 1666469753 C Bi:1:012:1 0 8 = 001ee7fe 00000200 effa8d80 1666469839 S Bi:1:012:1 -115 13 < effa8d80 1666469878 C Bi:1:012:1 0 13 = 55534253 02000000 00000000 00 effa8d80 1666469983 S Bo:1:012:2 -115 31 = 55534243 03000000 00020000 80000a28 00000000 00000001 00000000 000000 effa8d80 1666470128 C Bo:1:012:2 0 31 > effa8d80 1666470190 S Bi:1:012:1 -115 512 < effa8d80 1666470253 C Bi:1:012:1 0 512 = eb58904d 53444f53 352e3000 02200800 02000200 00f8f800 3f00ff00 00000000 effa8d80 1666470316 S Bi:1:012:1 -115 13 < effa8d80 1666470378 C Bi:1:012:1 0 13 = 55534253 03000000 00000000 00 2nd try and subsequent (failed) eff82b80 3066019871 S Ci:1:012:0 s 80 06 0300 0000 0080 128 < eff82b80 3066020057 C Ci:1:012:0 0 4 = 04030904 eff82b80 3066020380 S Ci:1:012:0 s 80 06 0300 0000 00ff 255 < eff82b80 3066020541 C Ci:1:012:0 0 4 = 04030904 eff82b80 3066020602 S Ci:1:012:0 s 80 06 0301 0409 00ff 255 < eff82b80 3066020668 C Ci:1:012:0 0 16 = 10035300 61006e00 44006900 73006b00 eff82b80 3066020731 S Ci:1:012:0 s 80 06 0300 0000 00ff 255 < eff82b80 3066020792 C Ci:1:012:0 0 4 = 04030904 eff82b80 3066020848 S Ci:1:012:0 s 80 06 0302 0409 00ff 255 < eff82b80 3066020918 C Ci:1:012:0 0 26 = 1a034300 72007500 7a006500 72002000 4d006900 63007200 6f00 eff82b80 3066020980 S Ci:1:012:0 s 80 06 0300 0000 00ff 255 < eff82b80 3066021042 C Ci:1:012:0 0 4 = 04030904 eff82b80 3066021099 S Ci:1:012:0 s 80 06 0303 0409 00ff 255 < eff82b80 3066021167 C Ci:1:012:0 0 34 = 22033000 30003000 30004200 38003700 30003200 33003600 30003100 37003700 eff82b80 3066021234 S Ci:1:012:0 s a1 fe 0000 0000 0001 1 < eff82b80 3066021293 C Ci:1:012:0 0 1 = 00 eff82b80 3066021377 S Bo:1:012:2 -115 31 = 55534243 01000000 24000000 80000612 00000024 00000000 00000000 000000 eff82b80 3066021794 C Bo:1:012:2 -32 0 eff82b80 3066021872 S Co:1:012:0 s 02 01 0000 0002 0000 0 eff82b80 3066021918 C Co:1:012:0 0 0 eff82b80 3066021950 S Bo:1:012:2 -115 31 = 55534243 01000000 24000000 80000612 00000024 00000000 00000000 000000 eff82b80 3066022792 C Bo:1:012:2 -32 0 eff82b80 3066022854 S Co:1:012:0 s 02 01 0000 0002 0000 0 eff82b80 3066022916 C Co:1:012:0 0 0 eff82b80 3066022946 S Bo:1:012:2 -115 31 = 55534243 01000000 24000000 80000612 00000024 00000000 00000000 000000 eff82b80 3066023795 C Bo:1:012:2 -32 0 eff82b80 3066023865 S Co:1:012:0 s 02 01 0000 0002 0000 0 eff82b80 3066023917 C Co:1:012:0 0 0 eff82b80 3066023945 S Bo:1:012:2 -115 31 = 55534243 01000000 24000000 80000612 00000024 00000000 00000000 000000 eff82b80 3066024793 C Bo:1:012:2 -32 0 eff82b80 3066024868 S Co:1:012:0 s 02 01 0000 0002 0000 0 eff82b80 3066024918 C Co:1:012:0 0 0 eff82b80 3066024948 S Bo:1:012:2 -115 31 = 55534243 01000000 24000000 80000612 00000024 00000000 00000000 000000 eff82b80 3066025795 C Bo:1:012:2 -32 0 eff82b80 3066025858 S Co:1:012:0 s 02 01 0000 0002 0000 0 eff82b80 3066025918 C Co:1:012:0 0 0 eff82b80 3066025959 S Bi:1:012:1 -115 36 < eff82b80 3066026792 C Bi:1:012:1 -32 0 mcuee@ubuntu:~/Desktop/build/libusb1/libusb-pbatard/examples$ sudo ./xusb -k 0781:5151 ... Reading Max LUN: libusb:debug [libusb_submit_transfer] arm timerfd for timeout in 1000ms (first in line) libusb:debug [handle_events] poll() 3 fds with timeout in 60000ms libusb:debug [handle_events] poll() returned 1 libusb:debug [reap_for_handle] urb type=2 status=0 transferred=1 libusb:debug [handle_control_completion] handling completion status 0 libusb:debug [disarm_timerfd] libusb:debug [ctrl_transfer_cb] actual_length=1 Max LUN = 0 Sending Inquiry: libusb:debug [submit_bulk_transfer] need 1 urbs for new transfer with length 31 libusb:debug [libusb_submit_transfer] arm timerfd for timeout in 1000ms (first in line) libusb:debug [handle_events] poll() 3 fds with timeout in 60000ms libusb:debug [handle_events] poll() returned 1 libusb:debug [reap_for_handle] urb type=3 status=-32 transferred=0 libusb:debug [handle_bulk_completion] handling completion status -32 of bulk urb 1/1 libusb:debug [handle_bulk_completion] detected endpoint stall libusb:debug [disarm_timerfd] libusb:debug [bulk_transfer_cb] actual_length=0 libusb:debug [libusb_clear_halt] endpoint 2 libusb:debug [submit_bulk_transfer] need 1 urbs for new transfer with length 31 libusb:debug [libusb_submit_transfer] arm timerfd for timeout in 1000ms (first in line) libusb:debug [handle_events] poll() 3 fds with timeout in 60000ms libusb:debug [handle_events] poll() returned 1 libusb:debug [reap_for_handle] urb type=3 status=-32 transferred=0 libusb:debug [handle_bulk_completion] handling completion status -32 of bulk urb 1/1 libusb:debug [handle_bulk_completion] detected endpoint stall libusb:debug [disarm_timerfd] libusb:debug [bulk_transfer_cb] actual_length=0 libusb:debug [libusb_clear_halt] endpoint 2 libusb:debug [submit_bulk_transfer] need 1 urbs for new transfer with length 31 libusb:debug [libusb_submit_transfer] arm timerfd for timeout in 1000ms (first in line) libusb:debug [handle_events] poll() 3 fds with timeout in 60000ms libusb:debug [handle_events] poll() returned 1 libusb:debug [reap_for_handle] urb type=3 status=-32 transferred=0 libusb:debug [handle_bulk_completion] handling completion status -32 of bulk urb 1/1 libusb:debug [handle_bulk_completion] detected endpoint stall libusb:debug [disarm_timerfd] libusb:debug [bulk_transfer_cb] actual_length=0 libusb:debug [libusb_clear_halt] endpoint 2 libusb:debug [submit_bulk_transfer] need 1 urbs for new transfer with length 31 libusb:debug [libusb_submit_transfer] arm timerfd for timeout in 1000ms (first in line) libusb:debug [handle_events] poll() 3 fds with timeout in 60000ms libusb:debug [handle_events] poll() returned 1 libusb:debug [reap_for_handle] urb type=3 status=-32 transferred=0 libusb:debug [handle_bulk_completion] handling completion status -32 of bulk urb 1/1 libusb:debug [handle_bulk_completion] detected endpoint stall libusb:debug [disarm_timerfd] libusb:debug [bulk_transfer_cb] actual_length=0 libusb:debug [libusb_clear_halt] endpoint 2 libusb:debug [submit_bulk_transfer] need 1 urbs for new transfer with length 31 libusb:debug [libusb_submit_transfer] arm timerfd for timeout in 1000ms (first in line) libusb:debug [handle_events] poll() 3 fds with timeout in 60000ms libusb:debug [handle_events] poll() returned 1 libusb:debug [reap_for_handle] urb type=3 status=-32 transferred=0 libusb:debug [handle_bulk_completion] handling completion status -32 of bulk urb 1/1 libusb:debug [handle_bulk_completion] detected endpoint stall libusb:debug [disarm_timerfd] libusb:debug [bulk_transfer_cb] actual_length=0 libusb:debug [libusb_clear_halt] endpoint 2 send_mass_storage_command: Pipe error libusb:debug [submit_bulk_transfer] need 1 urbs for new transfer with length 36 libusb:debug [libusb_submit_transfer] arm timerfd for timeout in 1000ms (first in line) libusb:debug [handle_events] poll() 3 fds with timeout in 60000ms libusb:debug [handle_events] poll() returned 1 libusb:debug [reap_for_handle] urb type=3 status=-32 transferred=0 libusb:debug [handle_bulk_completion] handling completion status -32 of bulk urb 1/1 libusb:debug [handle_bulk_completion] detected endpoint stall libusb:debug [disarm_timerfd] libusb:debug [bulk_transfer_cb] actual_length=0 Pipe error Input/output error libusb:debug [libusb_exit] libusb:warning [libusb_exit] application left some devices open libusb:debug [usbi_remove_pollfd] remove fd 3 libusb:debug [usbi_remove_pollfd] remove fd 5 libusb:debug [libusb_exit] freeing default context -- Xiaofan http://mcuee.blogspot.com |