On Nov 11 Stefan Richter wrote:
> On Nov 09 Elliott, Robert (Server Storage) wrote:
> > I recommend broadening this patch.  T10 is discussing making READ (10), 
> > WRITE (10), etc. obsolete in SBC-4 in favor of their 16-byte CDB 
> > counterparts.  
> > 
> > The algorithm should be:
> > 1. During discovery, determine if 16-byte CDBs are supported.  There are 
> > several ways to determine this:
> > a) REPORT SUPPORTED OPERATION CODES command succeeds and reports that READ 
> > (16) et al are supported.
> > b) READ (16) command specifying a Transfer Length of zero succeeds.
> > c) READ CAPACITY (16) command succeeds and reports that the capacity is > 2 
> > TiB.
> > d) (future) INQUIRY command succeeds fetching the Block Device 
> > Characteristics VPD page and notices a new field added by the SBC-4 
> > simplified SCSI feature set proposal.
> > 
> > Since REPORT SUPPORTED OPERATION CODES is optional, it won't always work. 
> > READ CAPACITY (16) used to be optional for < 2 TiB drives, so it won't 
> > always work either. READ (16) will always work, but requires the drive to 
> > be spun up beforehand (e.g., with START STOP UNIT).
> 
> This won't work.  It will crash badly written device firmwares.
> 
> Instead, try the (10) commands on the SBC-4 device and let it respond that
> it does not implement these commands.  Or have other means to be certain of
> SBC-4 compliance without issuing commands that were optional in or not
> defined by earlier revisions of the spec.  I wonder whether testing for
> INQUIRY_data.VERSION >= something is a sufficiently safe test.

Let me revise this:  Try READ CAPACITY (10) first (unless SPC-3's
INQUIRY_data.PROTECT is set, in which case I don't know what is safer;
READ CAPACITY (16) first or READ CAPACITY (10) first).

If this showed a capacity > 2 TB, then Jason's suggestion to always only
issue READ (16) to all USB attached devices makes a lot of sense to me if
it is true that Windows 7 never issues READ (10) to them.

That would be what the proposed patch does.  What about WRITE and the
various other (10)/(16) pairs of commands though?

I don't know what's best in case of transports other than USB (after
capacity > 2 TB was established).
-- 
Stefan Richter
-=====-===-- =-== -==--
http://arcgraph.de/sr/
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to