From patchwork Wed Feb 12 21:44:34 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Himanshu Madhani X-Patchwork-Id: 11379207 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 61ABF14E3 for ; Wed, 12 Feb 2020 21:47:51 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 403AA21734 for ; Wed, 12 Feb 2020 21:47:51 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=marvell.com header.i=@marvell.com header.b="G5qQdS0S" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729125AbgBLVrv (ORCPT ); Wed, 12 Feb 2020 16:47:51 -0500 Received: from mx0b-0016f401.pphosted.com ([67.231.156.173]:28402 "EHLO mx0b-0016f401.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728185AbgBLVru (ORCPT ); Wed, 12 Feb 2020 16:47:50 -0500 Received: from pps.filterd (m0045851.ppops.net [127.0.0.1]) by mx0b-0016f401.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 01CLeYHC001619; Wed, 12 Feb 2020 13:45:49 -0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-type; s=pfpt0818; bh=vwiUhvNUtySgsxStnUlF/0lvIc2uvwiVfrdntJs4B2o=; b=G5qQdS0SAGNT0/YDeYh77b3Axh+5q3d++D+G8OPGAe0n5Jzc1uWqu12wHWuheotalDW2 P+xlvo/YNcUiTUQslj0NelxsLQ/HNqnelGiLGLmzOq+Ea7tNeZRXxosLFOoHHPRmm6v/ +KBQ5WFhEWmG4gLIYcRb3/e9vV9OarRfyHYtb5Jy8DSoR1Qk0tZOYsPxzJhJD4BjRoUx Cze5P1f32wQWzXmjp+GW8Yrgss9LQbss37hMZm/nKHVhKruuP2l7A1b8mTG9ggNcpoww W/0BEY+QHjZ3c0IbTrvRpH7lwWCOVpJS0zAJptI2a72T+0rMWlln28jGFXUkcU89tyXY uQ== Received: from sc-exch02.marvell.com ([199.233.58.182]) by mx0b-0016f401.pphosted.com with ESMTP id 2y4j5jt525-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Wed, 12 Feb 2020 13:45:49 -0800 Received: from SC-EXCH01.marvell.com (10.93.176.81) by SC-EXCH02.marvell.com (10.93.176.82) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Wed, 12 Feb 2020 13:45:47 -0800 Received: from maili.marvell.com (10.93.176.43) by SC-EXCH01.marvell.com (10.93.176.81) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Wed, 12 Feb 2020 13:45:47 -0800 Received: from dut1171.mv.qlogic.com (unknown [10.112.88.18]) by maili.marvell.com (Postfix) with ESMTP id 6A3243F703F; Wed, 12 Feb 2020 13:45:47 -0800 (PST) Received: from dut1171.mv.qlogic.com (localhost [127.0.0.1]) by dut1171.mv.qlogic.com (8.14.7/8.14.7) with ESMTP id 01CLjl96025668; Wed, 12 Feb 2020 13:45:47 -0800 Received: (from root@localhost) by dut1171.mv.qlogic.com (8.14.7/8.14.7/Submit) id 01CLjlx1025667; Wed, 12 Feb 2020 13:45:47 -0800 From: Himanshu Madhani To: , CC: , Subject: [PATCH 23/25] qla2xxx: Add fixes for mailbox command Date: Wed, 12 Feb 2020 13:44:34 -0800 Message-ID: <20200212214436.25532-24-hmadhani@marvell.com> X-Mailer: git-send-email 2.12.0 In-Reply-To: <20200212214436.25532-1-hmadhani@marvell.com> References: <20200212214436.25532-1-hmadhani@marvell.com> MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.138,18.0.572 definitions=2020-02-12_10:2020-02-12,2020-02-12 signatures=0 Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org This patch aded following fix - qla2x00_issue_iocb_timeout will now return if chip is down - only check for sp->qpair in abort handling Signed-off-by: Himanshu Madhani --- drivers/scsi/qla2xxx/qla_mbx.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/scsi/qla2xxx/qla_mbx.c b/drivers/scsi/qla2xxx/qla_mbx.c index c81081c3d9b8..7e5c23a1c3b8 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;