From patchwork Wed Jun 21 20:48:42 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Madhani, Himanshu" X-Patchwork-Id: 9802881 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id E7D47600C5 for ; Wed, 21 Jun 2017 20:49:01 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D680A280DE for ; Wed, 21 Jun 2017 20:49:01 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id CAAF528544; Wed, 21 Jun 2017 20:49:01 +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=-6.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,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 1140F2853F for ; Wed, 21 Jun 2017 20:49:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751842AbdFUUtA (ORCPT ); Wed, 21 Jun 2017 16:49:00 -0400 Received: from mail-bn3nam01on0067.outbound.protection.outlook.com ([104.47.33.67]:12068 "EHLO NAM01-BN3-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751789AbdFUUs6 (ORCPT ); Wed, 21 Jun 2017 16:48:58 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=CAVIUMNETWORKS.onmicrosoft.com; s=selector1-cavium-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=5WtYl+4vJAsfELyPxFf4OlsfLDqMzO8I0lpjwbsFnkU=; b=gyhi5MToRT09Nmo5+lxukvpn3e3AFBDseimrafzAL3SAVcV7GwpOuS2AWH8i4MfgmOB7uLsK2DC1lnRBrkk2esXkRzaCH4VPEE5Q+mUo+CbzEfYMv5SkJYy7VkoOBIoRNNU97qbCieU+ymTHXYtqnC7dYOW9YVPPMTfYq5FJV50= Received: from CY1PR07CA0033.namprd07.prod.outlook.com (10.166.202.43) by CO2PR0701MB1015.namprd07.prod.outlook.com (10.160.10.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1178.14; Wed, 21 Jun 2017 20:48:56 +0000 Received: from BN1BFFO11FD045.protection.gbl (2a01:111:f400:7c10::1:113) by CY1PR07CA0033.outlook.office365.com (2a01:111:e400:c60a::43) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1199.15 via Frontend Transport; Wed, 21 Jun 2017 20:48:55 +0000 Authentication-Results: spf=none (sender IP is 50.232.66.26) smtp.mailfrom=cavium.com; lists.infradead.org; dkim=none (message not signed) header.d=none;lists.infradead.org; dmarc=none action=none header.from=cavium.com; Received-SPF: None (protection.outlook.com: cavium.com does not designate permitted sender hosts) Received: from CAEXCH02.caveonetworks.com (50.232.66.26) by BN1BFFO11FD045.mail.protection.outlook.com (10.58.145.0) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA_P384) id 15.1.1178.14 via Frontend Transport; Wed, 21 Jun 2017 20:48:55 +0000 Received: from dut1171.mv.qlogic.com (172.29.51.171) by CAEXCH02.caveonetworks.com (10.17.4.29) with Microsoft SMTP Server id 14.2.347.0; Wed, 21 Jun 2017 13:48:47 -0700 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 v5LKmlRG021706; Wed, 21 Jun 2017 13:48:47 -0700 Received: (from root@localhost) by dut1171.mv.qlogic.com (8.14.7/8.14.7/Submit) id v5LKmlTk021705; Wed, 21 Jun 2017 13:48:47 -0700 From: "Madhani, Himanshu" To: CC: , , , , Subject: [PATCH v2 2/6] qla2xxx: Add FC-NVMe command handling Date: Wed, 21 Jun 2017 13:48:42 -0700 Message-ID: <20170621204846.21663-3-himanshu.madhani@cavium.com> X-Mailer: git-send-email 2.12.0 In-Reply-To: <20170621204846.21663-1-himanshu.madhani@cavium.com> References: <20170621204846.21663-1-himanshu.madhani@cavium.com> MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-Forefront-Antispam-Report: CIP:50.232.66.26; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(6009001)(39450400003)(39850400002)(39410400002)(39400400002)(2980300002)(428002)(189002)(199003)(9170700003)(76176999)(50986999)(1076002)(50226002)(81166006)(8936002)(356003)(8676002)(36756003)(47776003)(110136004)(2906002)(38730400002)(4326008)(2351001)(42186005)(2950100002)(6666003)(106466001)(5660300001)(6916009)(105586002)(50466002)(33646002)(72206003)(87636003)(54906002)(189998001)(5003940100001)(478600001)(101416001)(48376002)(305945005)(86362001); DIR:OUT; SFP:1101; SCL:1; SRVR:CO2PR0701MB1015; H:CAEXCH02.caveonetworks.com; FPR:; SPF:None; MLV:sfv; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BN1BFFO11FD045; 1:wV8VRNobFj/dJaNVjWbIc29GRPAUex59SdKvihqRo9JVNfYFmWFneoLyIFhDSHgfKL4BMQ9sq9n4xZxdNESP48yHf1yznEsBgOmHX2ZtApJWGUk9VmNapq9uzLhOQZ2vocT/9T67aYQBwnv7jltSZOLr2vgEveRbdZUoy+OzZhMiLcr0o+VSWJ5jDhnKhFRXQJiL3stz8UNGZ2MVc913nde/VUVs6wbWn7GACdHw1ov8FCzf4mNcaFlPJR7LGcEW8R9fUGZddl6sKSqQ7cm09+4xzTrAgFa/3x5UVGWBX0RNmGKQe+Lv1bXdui5UhBH6FSaClyQLfaOT7WtoPO4/GU2ahZXHytUi67OQJGFkpIpyGiDkf5vPRNDVdXmVPPRcRm4eIYwIqUQRWRuWBgJSLN2TqYc/nwikjAqCMQq4CzVcqm8ISydiULjX+MMy83dsB6wkl+PXLzMn8KogMEEP2MLM7e2khSOPw53a7Wob27wlJD3cu1b1GzwzC0MO5H6ax1iEcYqhwOTmrGaqHYBLMA== X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 58568176-27c8-4917-89ae-08d4b8e6eedf X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(300000500055)(300135000095)(300000501055)(300135300095)(300000502055)(300135100095)(22001)(2017030254075)(300000503055)(300135400095)(201703131423075)(201703031133081)(201702281549075)(300000504055)(300135200095)(300000505055)(300135600095); SRVR:CO2PR0701MB1015; X-Microsoft-Exchange-Diagnostics: 1; CO2PR0701MB1015; 3:9hyWNVVO/kGXxDFaqn6HwTWYFLfxY3ntB4+suCpEIKC7fl5VWb0PJQRg0UL5ebEhPqhbFPqKFnnY0pYvsb/5Xn6jGU6hAdN7xDdVaSMX71T5ayv/Kpk/ioIYukaykR3EZmaeLZOF9EdVeNee9wd2TjWe08eDGmy6bQi+XWyAO7PUroZTn+GRt+6YrVW1JcryxkltRet84+PTPu8M7YwHsWaEgMMYzr8XqFyKxoE9oAwQms88qdW1uioxfOtTIXjwg/KAluqo33TXV77DxUqs5Sud9unvcj3aRFlXj2eEOkIAzsOIc9Gr0xdpJhTkVJy1Jeux9fMXXuwCm47ZEDh1bMbSKUtzOr6VJLH5+R5Q6HpIAcnm/KBRe/A/anYQ07Ef2fA66DrfG1D66YxgitdnPdmT+sdFpRwwms/PFnGJouMkvPFl7AyeX7cZpcvlGFPyNbBxMW51RLRGDULuorgSsZaOjwFLufJcSxieUxur8m/RcdqhCmc6sEkAeD3X3QI6F5hcjnC3NCIBu89Dn7hB0BK7oVTFgp2ScP69M9SASmhXGS3IqDGLr5wKfO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kfgTkBZ/pSyZ+Sef5+KslNZVDDHtARFOYLGGOTXgxfGy8MCU72qfd4qSXgv15W8Yx9SyvhwmeGJP0YTjgIJN2xaryzkUrqzy4JfI5HNQu5LjKJFAN8OQCRIjRHiq02YJwjzYGqMhl5XCjlW74sUXYASGuK00nbpBsta9dT51YT3aYwVh0C4DJhpMau2nNAzwobtV6++I8Nj3Pl+ihcs2SHS1yCCm/TDLFAna91N/MOBIEES8KjrI4+PZ8ZmkfC7wSnxWe1xt9sr+9otmdS7rXPMPehrcbiSlXHNBZWr23SJUFMPGjbd6/v7kQuog+JQ83T9+FpSiQQq5rJVi9x3cbF0cpQf3FwRcsOMxgzAUKYWDMFt55t0iQTN06j9pT3MsHNkSeQjCt/t6DjiSugRQGQ/LhjvTCGN5R/hdeI9GhX29/0BsZjlT6vm2HHWR+wK5Umk7qkIMg5R X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(211171220733660); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(601004)(2401047)(13018025)(8121501046)(5005006)(13016025)(10201501046)(100000703101)(100105400095)(93006095)(93001095)(3002001)(6041248)(20161123562025)(20161123555025)(20161123564025)(20161123558100)(20161123560025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(6072148)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:CO2PR0701MB1015; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:CO2PR0701MB1015; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; CO2PR0701MB1015; 4:ZOsW4x22VWIn8AZip08jEfSOp/4pfv7FeNzznckn?= =?us-ascii?Q?g8hoJLEkNBQl5+TbkZ7AiTaTw60vWrQ9lRAI5SxMYNtIChuin3ME7L/FVXYu?= =?us-ascii?Q?ga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qX?= =?us-ascii?Q?qhoWTV2HAd5e4572QGT1ogLrkqy7SFX/iWG35YfJwFBQQhLl8HVdCbARcLyH?= =?us-ascii?Q?edOxnJ0JZiEeKGXfWxiTqsznW+ikdRY/bR6T6JK2bgvAp5cCFVS2iz7rF+RZ?= =?us-ascii?Q?QjilH02QsPQYMVqW8M4slLQEwN00aYPW/Tuw6ZiRy6Hpqdk/dh+nYFsqPvP3?= =?us-ascii?Q?rQmCLI6aSFt2bH+cI0AAi0bq7LVHcqHhGJ1bZEQNKBIYwYQXStU+gbYjjg?= =?us-ascii?Q?=3D=3D?= X-Forefront-PRVS: 0345CFD558 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; CO2PR0701MB1015; 23:BmzOKtwaPJi2ht3AeAQUtsvG6IYrA32qjmGnHkO?= =?us-ascii?Q?4CNrPuufhTZMygli0sgdzuQ02MCDn2sFvncvcK+Dc1eJ6Cz1lINlOgh4wo5L?= =?us-ascii?Q?NwfrS1k3qwXaqCWPyAGFuxxyLM+IFrRIYbBKDCbTlvFTr6SMa99o5/psa5iY?= =?us-ascii?Q?jsF+9MRErVK86wM04i0a42WJjYyAD1Ksb3JPB8YImkBdZ9UCboy5qVf9lIxg?= =?us-ascii?Q?/7cHnj66NHg7a17q1bxlh672IXqsJKvTSCeZXXifEOyVk7BLGD3OK8katTXZ?= =?us-ascii?Q?/OWr3fHpEzno0U0IjwG6CtbqNQeDEWPuify2noKvUw8V/Lls6X99C/E0FU3n?= =?us-ascii?Q?0uCcmP4LoCsgISDGF0j3CFlhTco/yOXqGNMlptdkPLFoQayiUU8KeopUmBYZ?= =?us-ascii?Q?UIVQWRzQjTcZBJgHdATt+VLjB3bZRZGrcajZg25Z5XLnv6dXy5KnLdRyW7Bs?= =?us-ascii?Q?I832b31r2/MURx4vfjg5zUJ4rWK7rOOcKrJBq4TYL6ETAx1ygkSole/t7yMG?= =?us-ascii?Q?wqzRGcql9JVxMlU8jdorMq//+OikYpyZoVZQDrgiW4CTK7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THlcGezZNeyEdVSXL8TxX9CEfyhu3yykF44jkPZkNlwQoniHfpEPljrxxLXPOy2VwYeLIJuA6mRTtHPS3Vuko5WEzABr6karVQTjY15+LIv1lVBmtD7ub4UrHy2onmvRZnpt56+3woL1nEHEXcgb5GyDF2pV0Kwtcvz7J67II36ImZJ2iXk2d8dUvuR4m1TAfoK73uaBftseMBuBP+7WX0cQ8UwUzOOqJH6x89KXIyXAqrzviRFFjx2Ag/g/oNVRzLEWMaxahzgCZg0rZvVPQaVTHgJLrm6v9qyiYbBwOoMvs1FFcerGAc7wc= X-OriginatorOrg: cavium.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Jun 2017 20:48:55.2266 (UTC) X-MS-Exchange-CrossTenant-Id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=711e4ccf-2e9b-4bcf-a551-4094005b6194; Ip=[50.232.66.26]; Helo=[CAEXCH02.caveonetworks.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CO2PR0701MB1015 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 From: Duane Grigsby This patch adds logic to handle the completion of FC-NVMe commands and creates a sub-command in the SRB command structure to manage NVMe commands. Signed-off-by: Darren Trapp Signed-off-by: Duane Grigsby Signed-off-by: Anil Gurumurthy Signed-off-by: Giridhar Malavali Signed-off-by: Himanshu Madhani Reviewed-by: Johannes Thumshirn --- drivers/scsi/qla2xxx/qla_def.h | 17 +++++++++ drivers/scsi/qla2xxx/qla_fw.h | 22 ++++++++++-- drivers/scsi/qla2xxx/qla_isr.c | 79 ++++++++++++++++++++++++++++++++++++++++++ drivers/scsi/qla2xxx/qla_os.c | 18 ++++++++-- 4 files changed, 131 insertions(+), 5 deletions(-) diff --git a/drivers/scsi/qla2xxx/qla_def.h b/drivers/scsi/qla2xxx/qla_def.h index 6f8df9cea8ff..4d889eb2993e 100644 --- a/drivers/scsi/qla2xxx/qla_def.h +++ b/drivers/scsi/qla2xxx/qla_def.h @@ -412,6 +412,20 @@ struct srb_iocb { struct { struct imm_ntfy_from_isp *ntfy; } nack; + struct { + __le16 comp_status; + uint16_t rsp_pyld_len; + uint8_t aen_op; + void *desc; + + /* These are only used with ls4 requests */ + int cmd_len; + int rsp_len; + dma_addr_t cmd_dma; + dma_addr_t rsp_dma; + uint32_t dl; + uint32_t timeout_sec; + } nvme; } u; struct timer_list timer; @@ -437,6 +451,7 @@ struct srb_iocb { #define SRB_NACK_PLOGI 16 #define SRB_NACK_PRLI 17 #define SRB_NACK_LOGO 18 +#define SRB_NVME_CMD 19 #define SRB_PRLI_CMD 21 enum { @@ -4110,6 +4125,8 @@ typedef struct scsi_qla_host { struct nvme_fc_local_port *nvme_local_port; atomic_t nvme_ref_count; struct list_head nvme_rport_list; + atomic_t nvme_active_aen_cnt; + uint16_t nvme_last_rptd_aen; uint16_t fcoe_vlan_id; uint16_t fcoe_fcf_idx; diff --git a/drivers/scsi/qla2xxx/qla_fw.h b/drivers/scsi/qla2xxx/qla_fw.h index dcae62d4cbeb..b9c9886e8b1d 100644 --- a/drivers/scsi/qla2xxx/qla_fw.h +++ b/drivers/scsi/qla2xxx/qla_fw.h @@ -7,6 +7,9 @@ #ifndef __QLA_FW_H #define __QLA_FW_H +#include +#include + #define MBS_CHECKSUM_ERROR 0x4010 #define MBS_INVALID_PRODUCT_KEY 0x4020 @@ -603,9 +606,14 @@ struct sts_entry_24xx { uint32_t residual_len; /* FW calc residual transfer length. */ - uint16_t reserved_1; + union { + uint16_t reserved_1; + uint16_t nvme_rsp_pyld_len; + }; + uint16_t state_flags; /* State flags. */ #define SF_TRANSFERRED_DATA BIT_11 +#define SF_NVME_ERSP BIT_6 #define SF_FCP_RSP_DMA BIT_0 uint16_t retry_delay; @@ -615,8 +623,16 @@ struct sts_entry_24xx { uint32_t rsp_residual_count; /* FCP RSP residual count. */ uint32_t sense_len; /* FCP SENSE length. */ - uint32_t rsp_data_len; /* FCP response data length. */ - uint8_t data[28]; /* FCP response/sense information. */ + + union { + struct { + uint32_t rsp_data_len; /* FCP response data length */ + uint8_t data[28]; /* FCP rsp/sense information */ + }; + struct nvme_fc_ersp_iu nvme_ersp; + uint8_t nvme_ersp_data[32]; + }; + /* * If DIF Error is set in comp_status, these additional fields are * defined: diff --git a/drivers/scsi/qla2xxx/qla_isr.c b/drivers/scsi/qla2xxx/qla_isr.c index 40385bc1d1fa..477aea7c9a88 100644 --- a/drivers/scsi/qla2xxx/qla_isr.c +++ b/drivers/scsi/qla2xxx/qla_isr.c @@ -1799,6 +1799,79 @@ qla24xx_tm_iocb_entry(scsi_qla_host_t *vha, struct req_que *req, void *tsk) sp->done(sp, 0); } +static void +qla24xx_nvme_iocb_entry(scsi_qla_host_t *vha, struct req_que *req, void *tsk) +{ + const char func[] = "NVME-IOCB"; + fc_port_t *fcport; + srb_t *sp; + struct srb_iocb *iocb; + struct sts_entry_24xx *sts = (struct sts_entry_24xx *)tsk; + uint16_t state_flags; + struct nvmefc_fcp_req *fd; + uint16_t ret = 0; + struct srb_iocb *nvme; + + sp = qla2x00_get_sp_from_handle(vha, func, req, tsk); + if (!sp) + return; + + iocb = &sp->u.iocb_cmd; + fcport = sp->fcport; + iocb->u.nvme.comp_status = le16_to_cpu(sts->comp_status); + state_flags = le16_to_cpu(sts->state_flags); + fd = iocb->u.nvme.desc; + nvme = &sp->u.iocb_cmd; + + if (unlikely(nvme->u.nvme.aen_op)) + atomic_dec(&sp->vha->nvme_active_aen_cnt); + + /* + * State flags: Bit 6 and 0. + * If 0 is set, we don't care about 6. + * both cases resp was dma'd to host buffer + * if both are 0, that is good path case. + * if six is set and 0 is clear, we need to + * copy resp data from status iocb to resp buffer. + */ + if (!(state_flags & (SF_FCP_RSP_DMA | SF_NVME_ERSP))) { + iocb->u.nvme.rsp_pyld_len = 0; + } else if ((state_flags & SF_FCP_RSP_DMA)) { + iocb->u.nvme.rsp_pyld_len = le16_to_cpu(sts->nvme_rsp_pyld_len); + } else if (state_flags & SF_NVME_ERSP) { + uint32_t *inbuf, *outbuf; + uint16_t iter; + + inbuf = (uint32_t *)&sts->nvme_ersp_data; + outbuf = (uint32_t *)fd->rspaddr; + iocb->u.nvme.rsp_pyld_len = le16_to_cpu(sts->nvme_rsp_pyld_len); + iter = iocb->u.nvme.rsp_pyld_len >> 2; + for (; iter; iter--) + *outbuf++ = swab32(*inbuf++); + } else { /* unhandled case */ + ql_log(ql_log_warn, fcport->vha, 0x503a, + "NVME-%s error. Unhandled state_flags of %x\n", + sp->name, state_flags); + } + + fd->transferred_length = fd->payload_length - + le32_to_cpu(sts->residual_len); + + if (sts->entry_status) { + ql_log(ql_log_warn, fcport->vha, 0x5038, + "NVME-%s error - hdl=%x entry-status(%x).\n", + sp->name, sp->handle, sts->entry_status); + ret = QLA_FUNCTION_FAILED; + } else if (sts->comp_status != cpu_to_le16(CS_COMPLETE)) { + ql_log(ql_log_warn, fcport->vha, 0x5039, + "NVME-%s error - hdl=%x completion status(%x) resid=%x ox_id=%x\n", + sp->name, sp->handle, sts->comp_status, + le32_to_cpu(sts->residual_len), sts->ox_id); + ret = QLA_FUNCTION_FAILED; + } + sp->done(sp, ret); +} + /** * qla2x00_process_response_queue() - Process response queue entries. * @ha: SCSI driver HA context @@ -2289,6 +2362,12 @@ qla2x00_status_entry(scsi_qla_host_t *vha, struct rsp_que *rsp, void *pkt) return; } + /* NVME completion. */ + if (sp->type == SRB_NVME_CMD) { + qla24xx_nvme_iocb_entry(vha, req, pkt); + return; + } + if (unlikely((state_flags & BIT_1) && (sp->type == SRB_BIDI_CMD))) { qla25xx_process_bidir_status_iocb(vha, pkt, req, handle); return; diff --git a/drivers/scsi/qla2xxx/qla_os.c b/drivers/scsi/qla2xxx/qla_os.c index b2474952f858..ef5211fd2154 100644 --- a/drivers/scsi/qla2xxx/qla_os.c +++ b/drivers/scsi/qla2xxx/qla_os.c @@ -695,8 +695,10 @@ qla2x00_sp_free_dma(void *ptr) } end: - CMD_SP(cmd) = NULL; - qla2x00_rel_sp(sp); + if (sp->type != SRB_NVME_CMD) { + CMD_SP(cmd) = NULL; + qla2x00_rel_sp(sp); + } } void @@ -5996,6 +5998,18 @@ qla2x00_timer(scsi_qla_host_t *vha) if (!list_empty(&vha->work_list)) start_dpc++; + /* + * FC-NVME + * see if the active AEN count has changed from what was last reported. + */ + if (atomic_read(&vha->nvme_active_aen_cnt) != vha->nvme_last_rptd_aen) { + vha->nvme_last_rptd_aen = + atomic_read(&vha->nvme_active_aen_cnt); + ql_log(ql_log_info, vha, 0x3002, + "reporting new aen count of %d to the fw\n", + vha->nvme_last_rptd_aen); + } + /* Schedule the DPC routine if needed */ if ((test_bit(ISP_ABORT_NEEDED, &vha->dpc_flags) || test_bit(LOOP_RESYNC_NEEDED, &vha->dpc_flags) ||