提交 b15e791d 编写于 作者: F Finn Thain 提交者: Martin K. Petersen

scsi: ncr5380: Improve target selection robustness

Handle timeout or bus phase change errors that could occur when sending
the IDENTIFY message.
Signed-off-by: NFinn Thain <fthain@telegraphics.com.au>
Tested-by: NOndrej Zary <linux@rainbow-software.org>
Tested-by: NMichael Schmitz <schmitzmic@gmail.com>
Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
上级 4ab2a787
...@@ -1165,8 +1165,16 @@ static struct scsi_cmnd *NCR5380_select(struct Scsi_Host *instance, ...@@ -1165,8 +1165,16 @@ static struct scsi_cmnd *NCR5380_select(struct Scsi_Host *instance,
data = tmp; data = tmp;
phase = PHASE_MSGOUT; phase = PHASE_MSGOUT;
NCR5380_transfer_pio(instance, &phase, &len, &data); NCR5380_transfer_pio(instance, &phase, &len, &data);
if (len) {
NCR5380_write(INITIATOR_COMMAND_REG, ICR_BASE);
cmd->result = DID_ERROR << 16;
complete_cmd(instance, cmd);
dsprintk(NDEBUG_SELECTION, instance, "IDENTIFY message transfer failed\n");
cmd = NULL;
goto out;
}
dsprintk(NDEBUG_SELECTION, instance, "nexus established.\n"); dsprintk(NDEBUG_SELECTION, instance, "nexus established.\n");
/* XXX need to handle errors here */
hostdata->connected = cmd; hostdata->connected = cmd;
hostdata->busy[cmd->device->id] |= 1 << cmd->device->lun; hostdata->busy[cmd->device->id] |= 1 << cmd->device->lun;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册