Re: g_mass_storage & READ_CAPACITY(16)

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

 



On Fri, 26 Sep 2014, Felipe Balbi wrote:

> Hi Alan,
> 
> it seems like newer versions of USB20CV will fail us on the MSC tests
> unless we support READ_CAPACITY(16).

How is that possible?  The USB Mass-Storage Class spec doesn't require 
the device to support any particular set of SCSI commands.  READ 
CAPACITY(16) isn't even part of the SCSI-2 spec, which is what 
g-mass-storage supports.

> There is one detail though, looking at the sniffer, CBW comes as:
> 
> 55 53 42 43 43 59 45 4C 00 00 00 00 00 00 0A 2F 00 00
> 00 00 00 00 00 80 00 00 00 00 00 00 00
> 
> so SCSI cmd opcode is set to 0x2f. Looking at scsi.h that's defined to
> VERIFY:
> 
> 89 #define WRITE_VERIFY          0x2e
> 90 #define VERIFY                0x2f
> 91 #define SEARCH_HIGH           0x30

Yes, that's right.  g-mass-storage does implement VERIFY.

> I suppose this would be a Mass Storage quirk ? Any idea how to implement
> READ CAPACITY 16 ? (yeah, haven't read SCSI spec yet, doing it now).

According to scsi.h, READ CAPACITY(16) is service action 0x10 of
SERVICE ACTION IN, which is 0x9e.  The draft SBC-3 standard from
t10.org agrees.  I don't see how anyone could get 0x2f out of that.

> Any hints will be appreciated.

We could implement READ CAPACITY(16) if necessary.  But since we don't 
implement READ(16) or WRITE(16), it seems rather pointless.

Are you certain you are interpreting the USBCV output correctly?

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