Skip to content

Commit

Permalink
[SCSI] stex: fix reset recovery for console device
Browse files Browse the repository at this point in the history
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@promise.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
  • Loading branch information
Ed Lin authored and James Bottomley committed May 16, 2007
1 parent 69f4a51 commit d116a7b
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions drivers/scsi/stex.c
Original file line number Diff line number Diff line change
Expand Up @@ -612,6 +612,13 @@ stex_queuecommand(struct scsi_cmnd *cmd, void (* done)(struct scsi_cmnd *))
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;
case INQUIRY:
if (id != host->max_id - 1)
break;
Expand Down

0 comments on commit d116a7b

Please sign in to comment.