From patchwork Fri Feb 15 22:37:15 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Himanshu Madhani X-Patchwork-Id: 10816057 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 2B7521390 for ; Fri, 15 Feb 2019 22:38:43 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1BE9F2E826 for ; Fri, 15 Feb 2019 22:38:43 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 10277300E9; Fri, 15 Feb 2019 22:38:43 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A80592E826 for ; Fri, 15 Feb 2019 22:38:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2392018AbfBOWim (ORCPT ); Fri, 15 Feb 2019 17:38:42 -0500 Received: from mail-eopbgr730083.outbound.protection.outlook.com ([40.107.73.83]:7264 "EHLO NAM05-DM3-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S2391999AbfBOWim (ORCPT ); Fri, 15 Feb 2019 17:38:42 -0500 Received: from BYAPR07CA0079.namprd07.prod.outlook.com (2603:10b6:a03:12b::20) by MWHPR07MB2912.namprd07.prod.outlook.com (2603:10b6:300:1f::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1601.22; Fri, 15 Feb 2019 22:38:40 +0000 Received: from BY2NAM05FT039.eop-nam05.prod.protection.outlook.com (2a01:111:f400:7e52::207) by BYAPR07CA0079.outlook.office365.com (2603:10b6:a03:12b::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.1622.16 via Frontend Transport; Fri, 15 Feb 2019 22:38:39 +0000 Authentication-Results: spf=fail (sender IP is 199.233.58.38) smtp.mailfrom=marvell.com; vger.kernel.org; dkim=none (message not signed) header.d=none;vger.kernel.org; dmarc=fail action=none header.from=marvell.com; Received-SPF: Fail (protection.outlook.com: domain of marvell.com does not designate 199.233.58.38 as permitted sender) receiver=protection.outlook.com; client-ip=199.233.58.38; helo=CAEXCH02.caveonetworks.com; Received: from CAEXCH02.caveonetworks.com (199.233.58.38) by BY2NAM05FT039.mail.protection.outlook.com (10.152.100.176) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA) id 15.20.1580.2 via Frontend Transport; Fri, 15 Feb 2019 22:38:39 +0000 Received: from dut1171.mv.qlogic.com (10.112.88.18) by CAEXCH02.caveonetworks.com (10.67.98.110) with Microsoft SMTP Server (TLS) id 14.2.347.0; Fri, 15 Feb 2019 14:37:37 -0800 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 x1FMbZlM025490; Fri, 15 Feb 2019 14:37:35 -0800 Received: (from root@localhost) by dut1171.mv.qlogic.com (8.14.7/8.14.7/Submit) id x1FMbZGO025489; Fri, 15 Feb 2019 14:37:35 -0800 From: Himanshu Madhani To: , CC: , Subject: [PATCH v3 04/11] qla2xxx: Check for FW started flag before aborting Date: Fri, 15 Feb 2019 14:37:15 -0800 Message-ID: <20190215223722.25439-5-hmadhani@marvell.com> X-Mailer: git-send-email 2.12.0 In-Reply-To: <20190215223722.25439-1-hmadhani@marvell.com> References: <20190215223722.25439-1-hmadhani@marvell.com> MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-Matching-Connectors: 131947439197165523;(abac79dc-c90b-41ba-8033-08d666125e47);(abac79dc-c90b-41ba-8033-08d666125e47) X-Forefront-Antispam-Report: CIP:199.233.58.38;IPV:CAL;CTRY:US;EFV:NLI;SFV:NSPM;SFS:(10009020)(39850400004)(396003)(136003)(346002)(376002)(2980300002)(1109001)(1110001)(339900001)(199004)(189003)(48376002)(50466002)(6666004)(486006)(2906002)(106466001)(36756003)(53936002)(1076003)(85426001)(36906005)(16586007)(476003)(316002)(2616005)(105606002)(42186006)(86362001)(126002)(110136005)(47776003)(446003)(11346002)(54906003)(69596002)(4744005)(81166006)(80596001)(76176011)(26005)(68736007)(8676002)(336012)(26826003)(50226002)(97736004)(498600001)(4326008)(51416003)(305945005)(356004)(81156014)(8936002)(87636003)(5660300002);DIR:OUT;SFP:1101;SCL:1;SRVR:MWHPR07MB2912;H:CAEXCH02.caveonetworks.com;FPR:;SPF:Fail;LANG:en;PTR:InfoDomainNonexistent;A:1;MX:1; X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 2da2442a-d45a-4087-e744-08d6939654ca X-Microsoft-Antispam: BCL:0;PCL:0;RULEID:(2390118)(7020095)(5600110)(711020)(4605077)(2017052603328);SRVR:MWHPR07MB2912; X-MS-TrafficTypeDiagnostic: MWHPR07MB2912: X-Microsoft-Antispam-PRVS: X-Forefront-PRVS: 09497C15EB X-Microsoft-Exchange-Diagnostics: 1;MWHPR07MB2912;23:B4mzFtnhIQn3MajdKT1p/IcZxxk8J3tXIxf20XxbQrmveu+wVikk0cVIqa+ayvu3frgs9sY5van2KAnGQoZnM3A0ebufmH6Vg09LnlHSvus2gEpZUcrLkgE70l0jtm48/OGZvxhNJvvWAN+A+4ZmzmAsz6yC6wE76m7SkpztJWxUgMKaYfQftTICU0neWrEfHFi5mE4STTMR6fPTbuJIRR2zk13IywjCtn08COk13is1vtek1skZ0BhK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r5lcT1Gfk7tVEekcq2spWcfmX1J4eW+jJ+P9uVOwQJHduKLo0iblZNe1L6nPxb3vsS8xn6KhB1ZuQBpz0EdBRFFQXbn8M7jOEadg5lz/KmkpouU91Yb+Qvgyu6VqK9cFyOtworakxZQaMZ8iqGfG3sLphxcN44GYkJ/iMU7PUbYzZRnFS31AQx66N1U8tdSrP8byBv9/WsUAoRJxrh1qa71/T6wircSZMzlKSaaSp1ZvqpPc1zJEOXGcLFpNVOLaakEGaBwyKaYmHqutZtV7RCnrT2bEpLWxknHonRLqmDpXF3njJa/Q4eooWkW1R8+3AJaUaK1Xcy8xtm23xP3X5gGcplH7TjFzeJ9lrkMU1OqghV5xWFGY9sRgt6V+ldVKSX9RQ= X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Feb 2019 22:38:39.3942 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 2da2442a-d45a-4087-e744-08d6939654ca X-MS-Exchange-CrossTenant-Id: 5afe0b00-7697-4969-b663-5eab37d5f47e X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=5afe0b00-7697-4969-b663-5eab37d5f47e;Ip=[199.233.58.38];Helo=[CAEXCH02.caveonetworks.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR07MB2912 Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP For FC-NVMe, if the fw_started flag is not set or fcport is deleted, then do not send Abort command Signed-off-by: Himanshu Madhani --- drivers/scsi/qla2xxx/qla_nvme.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/drivers/scsi/qla2xxx/qla_nvme.c b/drivers/scsi/qla2xxx/qla_nvme.c index 232b987e79dd..41c85da3ab32 100644 --- a/drivers/scsi/qla2xxx/qla_nvme.c +++ b/drivers/scsi/qla2xxx/qla_nvme.c @@ -185,6 +185,14 @@ static void qla_nvme_abort_work(struct work_struct *work) struct qla_hw_data *ha = fcport->vha->hw; int rval; + if (fcport) + ql_dbg(ql_dbg_io, fcport->vha, 0xffff, + "%s called for sp=%p, hndl=%x on fcport=%p deleted=%d\n", + __func__, sp, sp->handle, fcport, fcport->deleted); + + if (!ha->flags.fw_started && (fcport && fcport->deleted)) + return; + rval = ha->isp_ops->abort_command(sp); ql_dbg(ql_dbg_io, fcport->vha, 0x212b,