Alan Stern wrote:
g_file_storage gadget: bulk-out, length 31 (time: 251.511564 s):
0: 55 53 42 43 08 30 c3 81 fc 00 00 00 80 00 0a 23
10: 00 00 00 00 00 00 00 fc 00 00 00 00 00 00 00
g_file_storage gadget: SCSI command: READ FORMAT CAPACITIES; Dc=10, Di=252; Hc=10, Hi=252
g_file_storage gadget: bulk-in, length 0 (time: 251.511727 s):
g_file_storage gadget: bulk-in set halt
g_file_storage gadget: sending command-failure status
g_file_storage gadget: sense data: SK x06, ASC x29, ASCQ x00; info x0
g_file_storage gadget: bulk-in, length 13 (time: 251.512856 s):
0: 55 53 42 53 08 30 c3 81 fc 00 00 00 01
You skipped about 20 seconds here, from 251.51 to 271.50. Did anything happen during that time?
No, there was not any output in the kernel buffer untill the next reset had come. The system just slept all this time.
The next messages I got in console (not in kernel buffer):
------------------------------------
udc: USB reset
udc: USB reset
g_file_storage gadget: full speed config #1
------------------------------------
Then I immediately started '# dmesg -c -s 500000'.
****************************
# dmesg -c -s 500000
****************************
g_file_storage gadget: bulk-out, length 0 (time: 271.509632 s):
g_file_storage gadget: bulk_out_complete --> -108, 0/31
g_file_storage gadget: disconnect or port reset
This is not what I got when connecting to a Windows XP system. Here's the corresponding section from my log (it's almost a year old now!):
Jan 28 14:42:35 ida kernel: g_file_storage gadget: SCSI command: READ FORMAT CAPACITIES; Dc=10, Di=252; Hc=10, Hi=252
< ... >
As you can see, after getting the ASC = 0x29 response to READ FORMAT
CAPACITIES, Windows did a REQUEST SENSE and then successfully retried the
READ FORMAT CAPACITIES. I don't know why this didn't happen to you -- or maybe it did; it would be in the part of the log that you left out!
As I mentioned above, I didn't miss any logs. At least those which turned on by defines DEBUG, VERBOSE, and DUMP_MSGS in file_storage.c.
By the way, I've added some custom output logs into pxa2xx_udc.c and file_storage.c.
And I found that exactly at this place (sending response to READ FORMAT CAPACITIES) function read_fifo() from pxa2xx_udc.c is never called. Maybe that is the source of my problem?!
Here is the part of the new log:
---------------------------------------------------------------------------------------
g_file_storage gadget: set_bulk_out_req_length: length = 31 (time: 4259.10844 s):
g_file_storage gadget: set_bulk_out_req_length: length = 64 (time: 4259.10878 s):
g_file_storage gadget: get_next_command: set_bulk_out_req_length (time: 4259.10911 s):
g_file_storage gadget: bulk-out, length 64 (time: 4259.10945 s):
0: 00 00 02 02 1f 00 00 00 4c 69 6e 75 78 20 20 20
10: 46 69 6c 65 2d 53 74 6f 72 20 47 61 64 67 65 74
20: 30 33 30 33 00 70 78 61 32 78 78 5f 65 70 5f 64
30: 69 73 61 62 6c 65 2c 20 65 70 32 6f 75 74 2d 62
g_file_storage gadget: get_next_command: start_transfer (time: 4259.11147 s):
g_file_storage gadget: get_next_command: wait for next packet (time: 4259.11178 s):
g_file_storage gadget: get_next_command: wakeup (time: 4259.11212 s):
g_file_storage gadget: get_next_command: wait for next packet (time: 4259.11240 s):
udc: pxa2xx_udc: read_fifo: length = 0 (time: 4259.16009 s): <----- here read_fifo() was called
udc: read ep2out-bulk c3, 31 bytes/S req c03fc460 31/64
udc: pxa2xx_udc: read_fifo: before done (time: 4259.16072 s):
udc: pxa2xx_udc: done: length = 31 (time: 4259.16097 s):
udc: pxa2xx_udc: done: status = 0 (time: 4259.16122 s):
g_file_storage gadget: bulk_out_complete: (time: 4259.16147 s):
g_file_storage gadget: bulk-out, length 31 (time: 4259.16174 s):
0: 55 53 42 43 90 e2 63 81 fc 00 00 00 80 00 0a 23
10: 00 00 00 00 00 00 00 fc 00 00 00 00 00 00 00
g_file_storage gadget: get_next_command: wakeup (time: 4259.16295 s):
g_file_storage gadget: get_next_command: before received_cbw (time: 4259.16325 s):
g_file_storage gadget: get_next_command: received_cbw: rc = 0 (time: 4259.16358 s):
g_file_storage gadget: SCSI command: READ FORMAT CAPACITIES; Dc=10, Di=252; Hc=10, Hi=252
g_file_storage gadget: bulk-in, length 0 (time: 4259.16433 s):
udc: pxa2xx_udc: write_fifo: before done (time: 4259.16462 s):
udc: pxa2xx_udc: done: length = 0 (time: 4259.16488 s):
udc: pxa2xx_udc: done: status = 0 (time: 4259.16513 s):
g_file_storage gadget: bulk-in set halt
udc: ep1in-bulk halt
g_file_storage gadget: sending command-failure status
g_file_storage gadget: sense data: SK x06, ASC x29, ASCQ x00; info x0
g_file_storage gadget: bulk-in, length 13 (time: 4259.17629 s):
0: 55 53 42 53 90 e2 63 81 fc 00 00 00 01
udc: pxa2xx_udc: write_fifo: before done (time: 4259.17696 s):
udc: pxa2xx_udc: done: length = 13 (time: 4259.17722 s):
udc: pxa2xx_udc: done: status = 0 (time: 4259.17747 s):
g_file_storage gadget: set_bulk_out_req_length: length = 31 (time: 4259.17772 s):
g_file_storage gadget: set_bulk_out_req_length: length = 64 (time: 4259.17806 s):
g_file_storage gadget: get_next_command: set_bulk_out_req_length (time: 4259.17839 s):
g_file_storage gadget: bulk-out, length 64 (time: 4259.17873 s):
0: 55 53 42 43 90 e2 63 81 fc 00 00 00 80 00 0a 23
10: 00 00 00 00 00 00 00 fc 00 00 00 00 00 00 00 74
20: 30 33 30 33 00 70 78 61 32 78 78 5f 65 70 5f 64
30: 69 73 61 62 6c 65 2c 20 65 70 32 6f 75 74 2d 62
g_file_storage gadget: get_next_command: start_transfer (time: 4259.18072 s):
g_file_storage gadget: get_next_command: wait for next packet (time: 4259.18103 s):
g_file_storage gadget: get_next_command: wakeup (time: 4259.18136 s):
g_file_storage gadget: get_next_command: wait for next packet (time: 4259.18165 s):
<----- here read_fifo() was not called (the packet was not sent?!)
******************************** delay here (no log messages) ********************************
udc: pxa2xx_udc: pxa2xx_udc_irq: reset (time: 4278.307258 s):
udc: USB reset start
udc: pxa2xx_udc: nuke: before done (time: 4278.307337 s):
udc: pxa2xx_udc: done: length = 0 (time: 4278.307364 s):
udc: pxa2xx_udc: done: status = -108 (time: 4278.307392 s):
g_file_storage gadget: bulk_out_complete: (time: 4278.307421 s):
g_file_storage gadget: bulk-out, length 0 (time: 4278.307458 s):
g_file_storage gadget: bulk_out_complete --> -108, 0/31
g_file_storage gadget: disconnect or port reset
g_file_storage gadget: get_next_command: wakeup (time: 4278.307597 s):
g_file_storage gadget: get_next_command: before received_cbw (time: 4278.307629 s):
g_file_storage gadget: get_next_command: received_cbw: rc = -22 (time: 4278.307666 s):
g_file_storage gadget-lun0: fdatasync -> 0
g_file_storage gadget: reset config
g_file_storage gadget: reset interface
udc: pxa2xx_ep_disable, ep1in-bulk not enabled
udc: pxa2xx_ep_disable, ep2out-bulk not enabled
---------------------------------------------------------------------------------------
So now, it seems like response to READ FORMAT CAPACITIES is not sent.
Vlad Trukhin
------------------------------------------------------- The SF.Net email is sponsored by: Beat the post-holiday blues Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek. It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt _______________________________________________ linux-usb-devel@lists.sourceforge.net To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel