forked from Minki/linux
scsi: ncr5380: Improve target selection robustness
Handle timeout or bus phase change errors that could occur when sending the IDENTIFY message. Signed-off-by: Finn Thain <fthain@telegraphics.com.au> Tested-by: Ondrej Zary <linux@rainbow-software.org> Tested-by: Michael Schmitz <schmitzmic@gmail.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
This commit is contained in:
parent
4ab2a7878f
commit
b15e791d0c
@ -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;
|
||||||
|
Loading…
Reference in New Issue
Block a user