> -----Original Message-----
> From: [email protected] [mailto:linux-scsi-
> [email protected]] On Behalf Of Winkler, Tomas
> Sent: Wednesday, February 25, 2015 1:54 AM
> To: [email protected]; James E.J. Bottomley"
> Cc: [email protected]
> Subject: RE: [PATCH] scsi_debug: rework resp_report_luns
> 
> > On 15-02-24 04:37 PM, Tomas Winkler wrote:
> > > 1. Fix the error check: the alloc length should be > 16
> > > and not > 4
> >
> > You are proposing to make a marginally incorrect test
> > completely incorrect!
> 
> Quoting from the spec:
> The ALLOCATION LENGTH field is defined in 2.2.6. The allocation length
> should be at least 16.
> Note. Device servers compliant with SPC return CHECK CONDITION status,
> with the sense key set to ILLEGAL REQUEST, and the additional sense code
> set to INVALID FIELD IN CDB when the allocation length is less than 16 bytes.
> This is how it is implemented also in other drivers in the scsi drivers.

That was just a warning to software that very old devices (compliant with SPC-1)
returned CHECK CONDITION in that case, explaining why the "should" advice
is included.  New devices (SPC-2 and later) are not supposed to return
CHECK CONDITION.  "SPC" means SPC-1 only, not all versions.  This
warning note was in SPC-2 and SPC-3 and dropped in SPC-4.


--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to