[stgt] [PATCH] set periph.qualifier to 7Fh (LUN mismatch) before INQUIRY buffer copy to data-in
nezhinsky at gmail.com
nezhinsky at gmail.com
Sun Dec 23 09:59:49 CET 2012
From: Alexander Nezhinsky <nezhinsky at gmail.com>
Signed-off-by: Alexander Nezhinsky <nezhinsky at gmail.com>
---
usr/spc.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/usr/spc.c b/usr/spc.c
index 25153d9..ef3501b 100644
--- a/usr/spc.c
+++ b/usr/spc.c
@@ -281,12 +281,12 @@ int spc_inquiry(int host_no, struct scsi_cmd *cmd)
if (ret != SAM_STAT_GOOD)
goto sense;
- scsi_set_in_resid_by_actual(cmd, len);
- memcpy(scsi_get_in_buffer(cmd), data, scb[4]);
-
if (cmd->dev->lun != cmd->dev_id)
data[0] = TYPE_NO_LUN;
+ scsi_set_in_resid_by_actual(cmd, len);
+ memcpy(scsi_get_in_buffer(cmd), data, scb[4]);
+
return SAM_STAT_GOOD;
sense:
scsi_set_in_resid_by_actual(cmd, 0);
--
1.7.9.6
--
To unsubscribe from this list: send the line "unsubscribe stgt" in
the body of a message to majordomo at vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
More information about the stgt
mailing list