Skip to content

Commit

Permalink
target: Set response format in INQUIRY response
Browse files Browse the repository at this point in the history
Current SCSI specs say that the "response format" field in the standard
INQUIRY response should be set to 2, and all the real SCSI devices I
have do put 2 here.  So let's do that too.

Signed-off-by: Roland Dreier <roland@purestorage.com>
Cc: stable@kernel.org
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
  • Loading branch information
Roland Dreier authored and Nicholas Bellinger committed Dec 14, 2011
1 parent ced38c8 commit ce13617
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions drivers/target/target_core_cdb.c
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,18 @@ target_emulate_inquiry_std(struct se_cmd *cmd)
}
buf[2] = dev->transport->get_device_rev(dev);

/*
* NORMACA and HISUP = 0, RESPONSE DATA FORMAT = 2
*
* SPC4 says:
* A RESPONSE DATA FORMAT field set to 2h indicates that the
* standard INQUIRY data is in the format defined in this
* standard. Response data format values less than 2h are
* obsolete. Response data format values greater than 2h are
* reserved.
*/
buf[3] = 2;

/*
* Enable SCCS and TPGS fields for Emulated ALUA
*/
Expand Down

0 comments on commit ce13617

Please sign in to comment.