• Roland Dreier's avatar
    target: Add (obsolete) checking for PMI/LBA fields in READ CAPACITY(10) · 8dc8632a
    Roland Dreier authored
    The SBC-2 specification of READ CAPACITY(10) has PMI and LOGICAL BLOCK
    ADDRESS fields in the CDB; in SBC-3 these fields are simply listed as
    obsolete.  However, SBC-2 also has the language
    
        If the PMI bit is set to zero and the LOGICAL BLOCK ADDRESS field
        is not set to zero, the device server shall terminate the command
        with CHECK CONDITION status with the sense key set to ILLEGAL
        REQUEST and the additional sense code set to INVALID FIELD IN CDB.
    
    and in fact at least the Windows SCSI compliance test checks this
    behavior.  Since no one following SBC-3 is going to set these fields,
    we might as well include the check from SBC-2 and pass this test.
    Signed-off-by: default avatarRoland Dreier <roland@purestorage.com>
    Signed-off-by: default avatarNicholas Bellinger <nab@linux-iscsi.org>
    8dc8632a
target_core_sbc.c 18.5 KB