summaryrefslogtreecommitdiff
path: root/drivers/scsi
diff options
context:
space:
mode:
authorChad Dupuis <chad.dupuis@qlogic.com>2011-08-16 22:29:26 +0400
committerJames Bottomley <JBottomley@Parallels.com>2011-08-27 18:19:56 +0400
commitbc91ade9b7bc274d625c9b24c04d365a2daf481e (patch)
treed4f23db50e5afc7a3e669f09416f43ec8847778d /drivers/scsi
parent7594206493880007fd68a18d6e9f380a1afe20d4 (diff)
downloadlinux-bc91ade9b7bc274d625c9b24c04d365a2daf481e.tar.xz
[SCSI] qla2xxx: Double check for command completion if abort mailbox command fails.
Close a small window where we could falsely fail an abort request if the mailbox command fails but the command was returned during interrupt context. Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Diffstat (limited to 'drivers/scsi')
-rw-r--r--drivers/scsi/qla2xxx/qla_os.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/scsi/qla2xxx/qla_os.c b/drivers/scsi/qla2xxx/qla_os.c
index 2caab83c4c9f..4cace3f20c04 100644
--- a/drivers/scsi/qla2xxx/qla_os.c
+++ b/drivers/scsi/qla2xxx/qla_os.c
@@ -918,6 +918,10 @@ qla2xxx_eh_abort(struct scsi_cmnd *cmd)
qla2x00_sp_compl(ha, sp);
spin_unlock_irqrestore(&ha->hardware_lock, flags);
+ /* Did the command return during mailbox execution? */
+ if (ret == FAILED && !CMD_SP(cmd))
+ ret = SUCCESS;
+
/* Wait for the command to be returned. */
if (wait) {
if (qla2x00_eh_wait_on_command(cmd) != QLA_SUCCESS) {