Re: [PATCH 3/4] stex: fix reset recovery for console device

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Ed Lin wrote:
After reset completed, the scsi error handler sends out TEST_UNIT_READY
to the device. For 'normal' devices the command will be handled by firmware.
However, because the RAID console only interfaces to scsi mid layer, the
firmware will not process the command for it. This will make the console to
be offlined right after reset. Add the handling in driver to fix this problem.

Signed-off-by: Ed Lin <ed.lin@xxxxxxxxxxx>
---
diff --git a/drivers/scsi/stex.c b/drivers/scsi/stex.c
index 81dd3b7..47c2ef9 100644
--- a/drivers/scsi/stex.c
+++ b/drivers/scsi/stex.c
@@ -612,6 +612,13 @@ stex_queuecommand(struct scsi_cmnd *cmd,
 			return 0;
 		}
 		break;
+	case TEST_UNIT_READY:
+		if (id == host->max_id - 1) {
+			cmd->result = DID_OK << 16 | COMMAND_COMPLETE << 8;
+			done(cmd);
+			return 0;
+		}
+		break;

Long term, it seems like a more obvious separation between the RAID console and the firmware-handled devices would be useful, rather than repeating the "if (id == host->max_id - 1)" for each command in question.


-
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux