Re: Linux USB file storage gadget with new UDC

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

 



On Fri, 5 Apr 2013, victor yeo wrote:

> Now i insmod g_file_storage gadget with file=/mnt/sd/backing_file, the
> SCSI_READ_10 command is still not working properly.

What makes you think that?

> See the gadget log below. The g_file_storage gadget receives "SCSI
> command: Unknown xa1" from the Linux host near the end of the log.

0xA1 is not READ(10); 0x28 is.  Why do you think the READ(10) command
isn't working properly?

> Something is wrong.

...
> g_file_storage gadget: bulk-out, length 31:
> 00000000: 55 53 42 43 12 00 00 00 00 02 00 00 80 00 0c a1
> 00000010: 08 2e 00 01 00 00 00 00 ec 00 00 00 13 00 00
> g_file_storage gadget: SCSI command: Unknown xa1;  Dc=12, Du=0;  Hc=12, Hi=512
> g_file_storage gadget: bulk-in, length 0:
> g_file_storage gadget: bulk-in set halt
> g_file_storage gadget: sending command-failure status
> g_file_storage gadget:   sense data: SK x05, ASC x20, ASCQ x00;  info x0
> g_file_storage gadget: bulk-in, length 13:
> 00000000: 55 53 42 53 12 00 00 00 00 02 00 00 01

There's nothing wrong with this.  The host is allowed to send commands 
that the gadget doesn't understand.  That's what SK 5, ASC 0x20 means; 
it tells the host that the gadget didn't understand the previous 
command.

> g_file_storage gadget: ep0-setup, length 8:
> 00000000: 80 06 00 01 00 00 40 00
> g_file_storage gadget: get device descriptor

But something is definitely wrong here.  Before sending this
Get-Device-Descriptor request, the host should have done a USB port
reset.  Either the host isn't performing the reset correctly or else
your UDC driver didn't inform g_file_storage when the reset occurred.

Alan Stern

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




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

  Powered by Linux