From: Roland Dreier Date: Tue, 6 Dec 2011 18:02:09 +0000 (-0800) Subject: target: Set response format in INQUIRY response X-Git-Tag: v3.2.2~24 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=9ce1ae0acda051d7378c5726d5e63a45dc88beb6;p=karo-tx-linux.git target: Set response format in INQUIRY response commit ce136176fea522fc8f4c16dcae7e8ed1d890ca39 upstream. 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 Signed-off-by: Nicholas Bellinger Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/target/target_core_cdb.c b/drivers/target/target_core_cdb.c index 831468b3163d..2e8c1bec8916 100644 --- a/drivers/target/target_core_cdb.c +++ b/drivers/target/target_core_cdb.c @@ -93,6 +93,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 */