• Nicholas Bellinger's avatar
    target: Fix zero-length INQUIRY additional sense code regression · 49df9fc9
    Nicholas Bellinger authored
    This patch fixes a minor regression introduced in v3.8-rc1 code
    where a zero-length INQUIRY was no longer returning the correct
    INVALID FIELD IN CDB additional sense code.
    
    This regression was introduced with the following commit:
    
      commit de103c93
      Author: Christoph Hellwig <hch@lst.de>
      Date:   Tue Nov 6 12:24:09 2012 -0800
    
          target: pass sense_reason as a return value
    
    and this patch has been tested with the following zero-length CDB:
    
      sg_raw /dev/sdd 12 00 83 00 00 00
      SCSI Status: Check Condition
    
      Sense Information:
       Fixed format, current;  Sense key: Illegal Request
       Additional sense: Invalid field in cdb
    
    Cc: Christoph Hellwig <hch@lst.de>
    Cc: Paolo Bonzini <pbonzini@redhat.com>
    Cc: Roland Dreier <roland@purestorage.com>
    Signed-off-by: default avatarNicholas Bellinger <nab@linux-iscsi.org>
    49df9fc9
target_core_spc.c 34.3 KB