What is the correct response to an INQUIRY with EVPD sent to an invalid LUN?

Gerry Houlder gerry.houlder at seagate.com
Wed Jan 7 13:39:46 PST 2015

Formatted message: <a href="http://www.t10.org/cgi-bin/ac.pl?t=r&f=r1501077_f.htm">HTML-formatted message</a>

Referring to SAM-5, clause 5.11 (incorrect logical unit for commands), the
response for INQUIRY command is defined in SPC-4. The SAM-5 response
"Illegal Request, Logical Unit Not Supported" doesn't necessarily apply.
Paul's response for EVPD=0 is the correct response defined in SPC-4 inquiry
command description. Since the command with EVPD=1 is being sent to an
unsupported logical unit, i would expect the command to be terminated with
"Illegal Request, Invalid field in CDB", with the invalid field being the
EVPD bit. Unsupported logical units do not have VPD pages.
It's not clear that either my suggestion or Paul's would make sg_inq happy,
but at least you would be responding according to the SPC-4 standard.
On Wed, Jan 7, 2015 at 3:24 PM, Paul Hughes <phughes at solidfire.com> wrote:
> I've always taken the approach that an Inquiry command with EVPD=0 should
> complete normally (return Standard Inquiry data) when issued to an invalid
> LUN, but if EVPD=1 the Inquiry command should return Check Condition status
> and sense data of "Illegal Request, Logical Unit Not Supported".
> On Wed, Jan 7, 2015 at 1:26 PM, Chris Moore <Chris.Moore at emulex.com>
> wrote:
>> * From the T10 Reflector (t10 at t10.org), posted by:
>> * Chris Moore <Chris.Moore at Emulex.Com>
>> *
>> Looking at SPC-5, 6.5.1 says "An enable vital product data (EVPD) bit set
>> to one specifies that
>> the device server shall return the vital product data specified by the
>> PAGE CODE field."
>> It goes on to say that if the LUN is invalid then the PERIPHERAL
>> QUALIFIER should be set
>> according to Table 138.  In my case that's 011b for the Qualifier and 1fh
>> for the device type.
>> What should follow that?   The fact that the EVPD bit is set suggests
>> that the returned data
>> should be a VPD page, not a Standard INQUIRY.  7.7.2 says the page code
>> must be set to
>> the page code that was requested.
>> In the case of page 83h, says if I return page 83h I shall
>> include at least one
>> designation descriptor.
>> So in this case, do I return a VPD page with code 83h and zero page
>> length?  Do I return
>> a Standard Inquiry?
>> sg_inq seems unhappy if it doesn't get back a VPD page with a page code
>> of 83h.  It
>> also seems unhappy with a page length of zero.  My JDSU analyzer assumes
>> that since
>> the INQUIRY had EVPD set then the response must be a VPD page.
>> Any guidance on the correct way to respond to this would be helpful.
>> Chris Moore
>> Principal Engineer
>> Emulex
>> *
>> * For T10 Reflector information, send a message with
>> * 'info t10' (no quotes) in the message body to majordomo at t10.org
> --
> *Paul HughesSenior Software Engineer, SolidFire, Inc.*
> e: phughes at solidfire.com
> *Advancing the way the world uses the cloud
> <http://solidfire.com/solution/overview/?video=play&gt;**â„¢*

More information about the T10 mailing list