summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/qla2xxx/qla_mbx.c
diff options
context:
space:
mode:
authorHimanshu Madhani <hmadhani@marvell.com>2020-02-12 22:44:34 +0100
committerMartin K. Petersen <martin.petersen@oracle.com>2020-02-24 18:34:29 +0100
commit345f574dac85276d1471492c6e90c57e3f90a4f3 (patch)
tree43abc3ed37eea5b9bfa8ce318019dc865ca5e00e /drivers/scsi/qla2xxx/qla_mbx.c
parentscsi: qla2xxx: Fix control flags for login/logout IOCB (diff)
downloadlinux-345f574dac85276d1471492c6e90c57e3f90a4f3.tar.xz
linux-345f574dac85276d1471492c6e90c57e3f90a4f3.zip
scsi: qla2xxx: Add fixes for mailbox command
This patch fixes: - qla2x00_issue_iocb_timeout will now return if chip is down - only check for sp->qpair in abort handling Link: https://lore.kernel.org/r/20200212214436.25532-24-hmadhani@marvell.com Signed-off-by: Himanshu Madhani <hmadhani@marvell.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/qla2xxx/qla_mbx.c')
-rw-r--r--drivers/scsi/qla2xxx/qla_mbx.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/scsi/qla2xxx/qla_mbx.c b/drivers/scsi/qla2xxx/qla_mbx.c
index cd4f441f7c25..3bb6ab6f254a 100644
--- a/drivers/scsi/qla2xxx/qla_mbx.c
+++ b/drivers/scsi/qla2xxx/qla_mbx.c
@@ -1404,6 +1404,9 @@ qla2x00_issue_iocb_timeout(scsi_qla_host_t *vha, void *buffer,
mbx_cmd_t mc;
mbx_cmd_t *mcp = &mc;
+ if (qla2x00_chip_is_down(vha))
+ return QLA_INVALID_COMMAND;
+
ql_dbg(ql_dbg_mbx + ql_dbg_verbose, vha, 0x1038,
"Entered %s.\n", __func__);
@@ -1475,7 +1478,7 @@ qla2x00_abort_command(srb_t *sp)
ql_dbg(ql_dbg_mbx + ql_dbg_verbose, vha, 0x103b,
"Entered %s.\n", __func__);
- if (vha->flags.qpairs_available && sp->qpair)
+ if (sp->qpair)
req = sp->qpair->req;
else
req = vha->req;