From: Chad Dupuis Date: Tue, 16 Aug 2011 18:29:26 +0000 (-0700) Subject: [SCSI] qla2xxx: Double check for command completion if abort mailbox command fails. X-Git-Tag: upstream/snapshot3+hdmi~8885^2~208 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=bc91ade9b7bc274d625c9b24c04d365a2daf481e;p=platform%2Fadaptation%2Frenesas_rcar%2Frenesas_kernel.git [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 Signed-off-by: James Bottomley --- diff --git a/drivers/scsi/qla2xxx/qla_os.c b/drivers/scsi/qla2xxx/qla_os.c index 2caab83..4cace3f 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) {