Merge remote-tracking branch 'aosp/android-3.0' into develop-3.0-jb
[firefly-linux-kernel-4.4.55.git] / drivers / target / target_core_cdb.c
index 7f19c8b7b84c704c0ab74ffdef7a19dca63737e2..05584010e70e2cf8a079d3e1d84d452b727a3bf7 100644 (file)
@@ -83,6 +83,18 @@ target_emulate_inquiry_std(struct se_cmd *cmd)
                buf[1] = 0x80;
        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
         */
@@ -94,7 +106,7 @@ target_emulate_inquiry_std(struct se_cmd *cmd)
                return 0;
        }
 
-       buf[7] = 0x32; /* Sync=1 and CmdQue=1 */
+       buf[7] = 0x2; /* CmdQue=1 */
 
        /*
         * Do not include vendor, product, reversion info in INQUIRY