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

ncr5380: Call complete_cmd() for disconnected commands on bus reset

I'm told that some targets are liable to disconnect a REQUEST SENSE
command. Theoretically this would cause a command undergoing autosense to
be moved onto the disconnected list. The bus reset handler must call
complete_cmd() for these commands, otherwise the hostdata->sensing pointer
will not get cleared. That would cause autosense processing to stall and
a timeout or an incorrect scsi_eh_restore_cmnd() would eventually follow.
Signed-off-by: NFinn Thain <fthain@telegraphics.com.au>
Reported-by: NMichael Schmitz <schmitzmic@gmail.com>
Tested-by: NOndrej Zary <linux@rainbow-software.org>
Reviewed-by: NHannes Reinecke <hare@suse.com>
Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
上级 3a0f64bf
......@@ -2437,7 +2437,7 @@ static int NCR5380_bus_reset(struct scsi_cmnd *cmd)
struct scsi_cmnd *cmd = NCR5380_to_scmd(ncmd);
set_host_byte(cmd, DID_RESET);
cmd->scsi_done(cmd);
complete_cmd(instance, cmd);
}
INIT_LIST_HEAD(&hostdata->disconnected);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册