Some controllers seems to hang after receiving MODE SENSE(6) command. This patch...
authorvlnb <vlnb@d57e44dd-8a1f-0410-8b47-8ef2f437770f>
Wed, 22 Jul 2009 10:12:09 +0000 (10:12 +0000)
committervlnb <vlnb@d57e44dd-8a1f-0410-8b47-8ef2f437770f>
Wed, 22 Jul 2009 10:12:09 +0000 (10:12 +0000)
git-svn-id: https://scst.svn.sourceforge.net/svnroot/scst/trunk@970 d57e44dd-8a1f-0410-8b47-8ef2f437770f

scst/src/scst_lib.c

index 6f74473..23fa922 100644 (file)
@@ -3874,10 +3874,17 @@ int scst_obtain_device_parameters(struct scst_device *dev)
        for (i = 0; i < 5; i++) {
                /* Get control mode page */
                memset(cmd, 0, sizeof(cmd));
+#if 0
+               cmd[0] = MODE_SENSE_10;
+               cmd[1] = 0;
+               cmd[2] = 0x0A;
+               cmd[8] = sizeof(buffer); /* it's < 256 */
+#else
                cmd[0] = MODE_SENSE;
                cmd[1] = 8; /* DBD */
                cmd[2] = 0x0A;
                cmd[4] = sizeof(buffer);
+#endif
 
                memset(buffer, 0, sizeof(buffer));
                memset(sense_buffer, 0, sizeof(sense_buffer));