Re: Linux USB file storage gadget with new UDC

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

>> Here is a full log from the beginning which shows another problem.
>> When the SCSI_READ_10 command below is received, there is a disconnect
>> or port reset which causes the (-32) broken pipe problem.
>
> You really need to fix the old problems before worrying about new
> problems.  The set_halt still isn't working, and the UDC continues to
> continues to call bulk_out_complete multiple times without receiving
> any packets.

I change that in UDC driver queue function, adding in a length check:

                        if (len > 0)
                        {
                                ka_req->req.complete(&ka_ep->ep, &ka_req->req);
                                list_del_init(&ka_req->queue);
                        }

However, i still observe the SCSI command being received by UDC and
gadget driver, but not processed by gadget driver.

For the UDC and gadget driver log, it looks like the flow cannot get
past get_next_command() of fsg_main_thread(). The log is attached.

[start_transfer] 43425355 9
ept1 out queue len 0x200, buffer 0xc1338000
g_file_storage gadget: bulk-out, length 31:
00000000: 55 53 42 43 09 00 00 00 00 00 00 00 00 00 06 00
00000010: 00 00 00 00 00 00 00 00 00 00 00 00 f8 7e 34
g_file_storage gadget: get_next_command

The same SCSI command as seen on usbmon log:

f2f4fe40 3842078083 S Bo:2:050:1 -115 31 = 55534243 09000000 00000000
00000600 00000000 00000000 00000000 000000
f2f4fe40 3842078159 C Bo:2:050:1 0 31 >
f2f4fe40 3842078182 S Bi:2:050:1 -115 13 <
f2f4fe40 3872633965 C Bi:2:050:1 -104 0


> It would be easier to maintain a stable link if the UDC connected at
> high speed in the first place.  The usbmon log shows that the
> connection was at full speed (12 Mb/s), not high speed (480 Mb/s) --
> which means that this line:
>
>> g_file_storage gadget: high-speed config #1
>
> in the gadget log indicates another bug in the UDC driver.  It told the
> gadget driver that the connection was high speed, but the connection
> really was full speed.

How to read from usbmon log that the connection was at full speed?

Thanks,
victor
# dmesg
[start_transfer] 43425355 9
ept1 out queue len 0x200, buffer 0xc1338000
g_file_storage gadget: bulk-out, length 31:
00000000: 55 53 42 43 09 00 00 00 00 00 00 00 00 00 06 00
00000010: 00 00 00 00 00 00 00 00 00 00 00 00 f8 7e 34
g_file_storage gadget: get_next_command
[start_transfer] 43425355 9
ept1 out queue len 0x200, buffer 0xc1338000
g_file_storage gadget: bulk-out, length 31:
00000000: 55 53 42 43 09 00 00 00 00 00 00 00 00 00 06 00
00000010: 00 00 00 00 00 00 00 00 00 00 00 00 f8 7e 34
g_file_storage gadget: get_next_command
[start_transfer] 43425355 9
ept1 out queue len 0x200, buffer 0xc1338000
g_file_storage gadget: bulk-out, length 31:
00000000: 55 53 42 43 09 00 00 00 00 00 00 00 00 00 06 00
00000010: 00 00 00 00 00 00 00 00 00 00 00 00 f8 7e 34
g_file_storage gadget: get_next_command
[start_transfer] 43425355 9
ept1 out queue len 0x200, buffer 0xc1338000
g_file_storage gadget: bulk-out, length 31:
00000000: 55 53 42 43 09 00 00 00 00 00 00 00 00 00 06 00
00000010: 00 00 00 00 00 00 00 00 00 00 00 00 f8 7e 34
g_file_storage gadget: get_next_command
[start_transfer] 43425355 9
ept1 out queue len 0x200, buffer 0xc1338000
g_file_storage gadget: bulk-out, length 31:
00000000: 55 53 42 43 09 00 00 00 00 00 00 00 00 00 06 00
00000010: 00 00 00 00 00 00 00 00 00 00 00 00 f8 7e 34
g_file_storage gadget: get_next_command
[start_transfer] 43425355 9
ept1 out queue len 0x200, buffer 0xc1338000
g_file_storage gadget: bulk-out, length 31:
00000000: 55 53 42 43 09 00 00 00 00 00 00 00 00 00 06 00
00000010: 00 00 00 00 00 00 00 00 00 00 00 00 f8 7e 34
g_file_storage gadget: get_next_command
[start_transfer] 43425355 9
ept1 out queue len 0x200, buffer 0xc1338000
g_file_storage gadget: bulk-out, length 31:
00000000: 55 53 42 43 09 00 00 00 00 00 00 00 00 00 06 00
00000010: 00 00 00 00 00 00 00 00 00 00 00 00 f8 7e 34
g_file_storage gadget: get_next_command
[start_transfer] 43425355 9
ept1 out queue len 0x200, buffer 0xc1338000
g_file_storage gadget: bulk-out, length 31:
00000000: 55 53 42 43 09 00 00 00 00 00 00 00 00 00 06 00
00000010: 00 00 00 00 00 00 00 00 00 00 00 00 f8 7e 34
g_file_storage gadget: get_next_command
[start_transfer] 43425355 9
ept1 out queue len 0x200, buffer 0xc1338000
g_file_storage gadget: bulk-out, length 31:
00000000: 55 53 42 43 09 00 00 00 00 00 00 00 00 00 06 00
00000010: 00 00 00 00 00 00 00 00 00 00 00 00 f8 7e 34
g_file_storage gadget: get_next_command
[start_transfer] 43425355 9
ept1 out queue len 0x200, buffer 0xc1338000
g_file_storage gadget: bulk-out, length 31:
00000000: 55 53 42 43 09 00 00 00 00 00 00 00 00 00 06 00
00000010: 00 00 00 00 00 00 00 00 00 00 00 00 f8 7e 34
g_file_storage gadget: get_next_command
[start_transfer] 43425355 9
ept1 out queue len 0x200, buffer 0xc1338000
g_file_storage gadget: bulk-out, length 31:
00000000: 55 53 42 43 09 00 00 00 00 00 00 00 00 00 06 00
00000010: 00 00 00 00 00 00 00 00 00 00 00 00 f8 7e 34
g_file_storage gadget: get_next_command
[start_transfer] 43425355 9
ept1 out queue len 0x200, buffer 0xc1338000
g_file_storage gadget: bulk-out, length 31:
00000000: 55 53 42 43 09 00 00 00 00 00 00 00 00 00 06 00
00000010: 00 00 00 00 00 00 00 00 00 00 00 00 f8 7e 34
g_file_storage gadget: get_next_command
[start_transfer] 43425355 9
ept1 out queue len 0x200, buffer 0xc1338000
g_file_storage gadget: bulk-out, length 31:
00000000: 55 53 42 43 09 00 00 00 00 00 00 00 00 00 06 00
00000010: 00 00 00 00 00 00 00 00 00 00 00 00 f8 7e 34
g_file_storage gadget: get_next_command
[start_transfer] 43425355 9
ept1 out queue len 0x200, buffer 0xc1338000
g_file_storage gadget: bulk-out, length 31:
00000000: 55 53 42 43 09 00 00 00 00 00 00 00 00 00 06 00
00000010: 00 00 00 00 00 00 00 00 00 00 00 00 f8 7e 34
g_file_storage gadget: get_next_command
[start_transfer] 43425355 9
ept1 out queue len 0x200, buffer 0xc1338000
g_file_storage gadget: bulk-out, length 31:
00000000: 55 53 42 43 09 00 00 00 00 00 00 00 00 00 06 00
00000010: 00 00 00 00 00 00 00 00 00 00 00 00 f8 7e 34
g_file_storage gadget: get_next_command

[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux