From patchwork Wed Jun 7 21:43:22 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Madhani, Himanshu" X-Patchwork-Id: 9772905 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 AF73760350 for ; Wed, 7 Jun 2017 21:44:02 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BEF112847A for ; Wed, 7 Jun 2017 21:44:02 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B3E04284F4; Wed, 7 Jun 2017 21:44:02 +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.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=unavailable 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 3D3C82847A for ; Wed, 7 Jun 2017 21:44:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751696AbdFGVn7 (ORCPT ); Wed, 7 Jun 2017 17:43:59 -0400 Received: from mail-sn1nam01on0041.outbound.protection.outlook.com ([104.47.32.41]:49637 "EHLO NAM01-SN1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751559AbdFGVnx (ORCPT ); Wed, 7 Jun 2017 17:43:53 -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=C7fdHPLuRC9XyZ1GxFjtIzMMLHwyZh9w1BTv6YlBwKY=; b=g0rQroI22xe37yQZTE3YSSqTJN4O0VWgVz4UCs1JcIQLxeMFRo5b18itSusEsBIA/repBP8LP4r5oIyQCaA1EJOmkZRbDP+QRIKrRnPd9CCpSqgOkWdZEw98LWjw2fRhRb+Wso7TFy4Da9T7ZMUuvSqE76hH4GlRSxfj4mZ9o1I= Received: from BY2PR07CA0090.namprd07.prod.outlook.com (10.166.107.43) by CY1PR0701MB1584.namprd07.prod.outlook.com (10.163.20.146) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1143.10; Wed, 7 Jun 2017 21:43:50 +0000 Received: from BN1AFFO11FD028.protection.gbl (2a01:111:f400:7c10::137) by BY2PR07CA0090.outlook.office365.com (2a01:111:e400:7bff::43) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1157.12 via Frontend Transport; Wed, 7 Jun 2017 21:43:50 +0000 Authentication-Results: spf=none (sender IP is 50.232.66.26) smtp.mailfrom=cavium.com; vger.kernel.org; dkim=none (message not signed) header.d=none; vger.kernel.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 BN1AFFO11FD028.mail.protection.outlook.com (10.58.52.88) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA_P384) id 15.1.1101.12 via Frontend Transport; Wed, 7 Jun 2017 21:43:50 +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, 7 Jun 2017 14:43:40 -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 v57LheuU023161; Wed, 7 Jun 2017 14:43:40 -0700 Received: (from root@localhost) by dut1171.mv.qlogic.com (8.14.7/8.14.7/Submit) id v57LhedY023160; Wed, 7 Jun 2017 14:43:40 -0700 From: Himanshu Madhani To: , CC: , Subject: [PATCH 04/15] qla2xxx: Fix mailbox failure while deleting Queue pairs Date: Wed, 7 Jun 2017 14:43:22 -0700 Message-ID: <20170607214333.23110-5-himanshu.madhani@cavium.com> X-Mailer: git-send-email 2.12.0 In-Reply-To: <20170607214333.23110-1-himanshu.madhani@cavium.com> References: <20170607214333.23110-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)(39850400002)(39400400002)(39410400002)(39450400003)(39840400002)(2980300002)(428002)(189002)(199003)(9170700003)(81166006)(305945005)(54906002)(86362001)(478600001)(72206003)(87636003)(5003940100001)(2906002)(80596001)(50986999)(36756003)(101416001)(189998001)(76176999)(33646002)(107886003)(2950100002)(38730400002)(6666003)(1076002)(50466002)(4326008)(47776003)(15650500001)(5660300001)(48376002)(8936002)(356003)(8676002)(50226002)(42186005)(105586002)(106466001); DIR:OUT; SFP:1101; SCL:1; SRVR:CY1PR0701MB1584; H:CAEXCH02.caveonetworks.com; FPR:; SPF:None; MLV:sfv; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BN1AFFO11FD028; 1:lHLOnXi8PURLR1kDRuWy9jnAUkcWJBzm8HQlRlmN4h84NRuxCB57QxdABkmcugb0tDhHgI2PL4nzce3/otRTiZHnbogxPKOGZbDRfNjwGK6lJslRAnlu/CWoT6KU8yQ9+Qb3n3WGDc5wYK9zPkks6PXuAcuyaOEURmpkW8xahtxL17n3QzUp2NQpdRx2eqldnQ/mGnt1TBSaK6dLhyYutHMrokvYJ0ZjFr8ThBjGwLpp/O4jErv2QQmn1ygn5peZ4gLWdFElO87+2O9UeYIlL5INHtPNqH/URMw3c+GaQpzGYvqxOj8s3tK/q53ggvcVc+w6uV+RxYGY/IqrrChj6BmkcCYqWJEB+vbwFH3SMCZrELR+5Okw+tc3wKHHFj9qS81Z5ZL3FmCqiuTYn9Tw4aNLrkp51kf3KqDkxT9XP8mK7SHOH8LN7A5BhYMlMYX/2N1G9m8WSisHpyRNa7F4hW1zpSsbMJbIwlSP0Q7SfCngOMkqfvJfauufgL7xTBYU X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CY1PR0701MB1584: X-MS-Office365-Filtering-Correlation-Id: dab11a64-23f0-4433-3d03-08d4adee4903 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(2017030254075)(201703131423075)(201703031133081)(201702281549075); SRVR:CY1PR0701MB1584; X-Microsoft-Exchange-Diagnostics: 1; CY1PR0701MB1584; 3:l4zT1zL+gxd3rAFKjEy5fjkL69W2zed5aMrdFAZLcqDqqyWqfOnc5piBvGQXDJt1kHDyz7Zxo6UEhlxO7ISJ6Or+TNpD/NGTLbNKAh9Bm2FwB9pUw7kTbYsh05Iay2lqkEyig2ng8dUjatTpkXpugc+Q90o8EnVE4yvmnW93gtKxl7WF2GrHm4ayHi9w8BoHNd51pzfFYBsGd7LLcV5fCgNJARXKkukSfSJSH3jBhNJwW60NhTcTJ8BV/ArkBfO7ZuiIlRiMAD7LB3sJrBNq+d9Zrocj2F7Ec8Xl6oFuF0VGx81MOVp9o50bwXFd6XB5RtEQ5xmuK1EY0ySzVdqydD8kJ4EpRZNwqM/U+QhqqAaoXKUCaMw6idx5A9/nUnLusEkafqjDuri4kfPrKs9j7xjZp6BxOI96IEy31eHAQHYHgFtPpfXae9drZEp8fgP2lvbujBuzkFloTgCAccV1G9LyjxzLIE7LcWH2BSt0sKPDIGhrpla9Xy1R7VgYfskM X-Microsoft-Exchange-Diagnostics: 1; CY1PR0701MB1584; 25:hrrCnHCMOgck0ZgskcC38OcALuNCQNAurIJFperB+VEvNdZx429mfLhBk3fUCXLhK1RIk6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2d4BE8ZPQm8a3kLnt7PZ++WE+gcOyu3WNdu5C65RC+Hw3ZpaM1ZwpZe1Dt+AGP4iRQAUhZvAKaLtj77arDx5ZdMDZ2kDTRbiHizJ9T5h7cL6yymJju7HTGKUtO/jjFNzqIy29b8ZzOhDRLDyD9L5ogcz X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(601004)(2401047)(8121501046)(5005006)(13018025)(13016025)(100000703101)(100105400095)(10201501046)(3002001)(93006095)(93001095)(6041248)(20161123558100)(20161123564025)(20161123562025)(20161123555025)(20161123560025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(6072148)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:CY1PR0701MB1584; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:CY1PR0701MB1584; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; CY1PR0701MB1584; 4:+eh1S9qLVUXI7h1VRqfZBHMnvlGUHHCGyLIHCW9h?= =?us-ascii?Q?zHoRyiVQBjYdXwLn4/vvAmkVrYdN0KrIRB7xE+Ul08PmWm1/6j/XOdTKhkav?= =?us-ascii?Q?azkMXO2nzYZuUuKRRWBpzskKd+V0LkztiG50pGtjP/XOtiVN2mNVm1PpnkL4?= =?us-ascii?Q?VzPShyneuOexWOrEDYRDJW8QGaNlD5G9iuhGp2cM3I1y1sOOlHulzD3duP4J?= =?us-ascii?Q?4TX/nAXN15aVsVWUXGau4eKv751df+A+mqUqo3WcGmbll4smjVt39w2nNBJx?= =?us-ascii?Q?kiIqeVpCK6OVBdaBaDg+tWhbMPl2+eMdGPzhB8zOhqfXZ+A/K/ZgGWTSx6vZ?= =?us-ascii?Q?/8GazyH5pS4wYpNlPpBul0mMezPpGaNPj8HHGYjy+JQh1PnFGLnzywB1Y4JF?= =?us-ascii?Q?l5ftz59nxqHk4KAskKPfE3/SpJHYFNLXHdSm5zCudaA4J0q7vzT7th+6p0B2?= =?us-ascii?Q?1LxOSZ4utFDu/RZCFvqmM2Pw+NskCX/iBmLRWlznJ/9PK/xmI6c/gX5SPfRg?= =?us-ascii?Q?2/eQL7/4syvuURaIFqE861FZULJvF/AmukBgGerB2/VXJl2bI8tR56hY6pKD?= =?us-ascii?Q?/L5aYyqSfA8YfSvRJhWdvsY6Gf7D8rG0RN6iW0NfH5lJEZAQ/IKcJ8QwsF/m?= =?us-ascii?Q?lfUDRRljdqHqlV9oxA53ksoUoaw5OFMztERnlOiVhvRDitbvWf90GjgDrY3C?= =?us-ascii?Q?q7oCRIFUWMARUNlEwp3jGMaYmB+n53HeuMLF/xQ0XZEa+Vmm2zYp1RoVBA8I?= =?us-ascii?Q?d2xnPgv3uzFmouLYnAP/W/taBucvuGcLiLyE8FiNd3BxT/MQNr5oNlW75CQ1?= =?us-ascii?Q?hTFZYRk9xVvyqI/NtmecMhooT/GGcKZUDbaL3/aK5Sxwmq8LDdog4epFCqWO?= =?us-ascii?Q?GTzfAMa60bRjJsUN+iAAHMfausVUt5y30vUPHUrIJ6Tn9Xtww/294opSirTC?= =?us-ascii?Q?OEx0R5ixbZJlWh3eHTJeWG+kIN44KzOUEEGIlUS7xflHSG5pOEB598YItfj0?= =?us-ascii?Q?xCeQS8BerztMv3qFzGPC0Frq60aQwP9hM4TELBP+wl9rNrHD5w1YiGk99D1w?= =?us-ascii?Q?Ej2E0qB3t5Toien8nvY3Dem3Qe8C9mXpySYv6LAi2nT5yOTBA405/nPe5SVb?= =?us-ascii?Q?Tm61HAUQZkMp1VsA0t9d3nbDH1RX7i0eMTb+MS3vaDZeK2bnhuy4H0r/hs9s?= =?us-ascii?Q?nupR+h/v1yBjYOo=3D?= X-Forefront-PRVS: 03319F6FEF X-Microsoft-Exchange-Diagnostics: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d3H74oYM36b5+oAL+stO8alBoEgN+7QEan4ptBwpSEwgzqUTlifVLKA/z+DyEfmZSMCAmmoVjtKNe9dC2AJSve4s+RaG3vk9cg9miwYFetRtNUBDmtyQ+ytabEjW4fcOX86FguK2OSVzU0gsqpPoFgmvGi0K78fMavgYx0O6f6uO2qph6GD7QuTv4UiZAkQpcywnOA9LLQF3o5jrMDT+jZWghoKK94cJHQMrqZiI9vR73hyFg+/x2OfodRvFlhvo/v9Sg7y0gYDDVNqkk8bzVHrcaFrz1Y+kS2wVz7la5o8pKXZP7PcTLPYi9/8xhKw1+IA2vPij48OrNQ20Ir4RhJYEM0XY7M+Y5M6AzwB3D0Vtld+uS1XkE5vZVgm5iozn5/s4LJT12c8xhstGkWfiT+JdNafCbVW2wy078OqQHSJDzY; 24:Hwa9fo3VNWWs61fnfAUaFS96VU2LwxtMBM4uIJIsw3++DBfjMFpShfIRs5hL6nUkv8fOq42jwgSBcKnStS/VvT63DiZQgPodA025RfNNX+0= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; CY1PR0701MB1584; 7:0/b0Ap5i6KOVjbDH704CjwATyURgTpnKsXEsLGnRvQnoBC0lCX6zd/oWyqS8AHE4+R9Y+7TScKx9TsTanlCbYK2VN8RYxKpyPr96oX9JZ9BYJtvGiPcwXkUOQNrOvmn+qWdlInHeY/W4fZD5ssCPrfGwvIrNIkIOS7LEBGSkZvmy6rYarIX5uZOhW3YV82XMgXMI9k7xkXSQ8b1+nIGnMiYnm4HXP30B0evMJxDDjaeV4FaaoWB+egAEjKMJl1ZQnO5yDO343Dv5nisvmViqtQmVJ9pe0Q5/nwVLGSF/WeNjjP9hAr8oQTYYGPYFcwGsyV6IwkldpENf0tbsl8IQsA== X-OriginatorOrg: cavium.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Jun 2017 21:43:50.1577 (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: CY1PR0701MB1584 Sender: target-devel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: target-devel@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Sawan Chandak In target mode driver, queue pairs are created at the configuration time, instead of load time, after chip reset. If a user tries to load/unload driver after queue pairs are created, then there would be mailbox failure while trying to delete queue pairs. This patch adds a flag to check if queue pairs are created. Queue pairs will be deleted only If they were created during target configuration. Signed-off-by: Sawan Chandak Signed-off-by: Himanshu Madhani --- drivers/scsi/qla2xxx/qla_def.h | 2 ++ drivers/scsi/qla2xxx/qla_init.c | 10 ++++++++-- drivers/scsi/qla2xxx/qla_mid.c | 4 ++++ drivers/scsi/qla2xxx/qla_os.c | 1 + 4 files changed, 15 insertions(+), 2 deletions(-) diff --git a/drivers/scsi/qla2xxx/qla_def.h b/drivers/scsi/qla2xxx/qla_def.h index 005ca2de3795..8b52f431a812 100644 --- a/drivers/scsi/qla2xxx/qla_def.h +++ b/drivers/scsi/qla2xxx/qla_def.h @@ -3997,6 +3997,8 @@ typedef struct scsi_qla_host { uint32_t fw_tgt_reported:1; uint32_t bbcr_enable:1; uint32_t qpairs_available:1; + uint32_t qpairs_req_created:1; + uint32_t qpairs_rsp_created:1; } flags; atomic_t loop_state; diff --git a/drivers/scsi/qla2xxx/qla_init.c b/drivers/scsi/qla2xxx/qla_init.c index fa5e6ab8e4a7..dcc306121a3d 100644 --- a/drivers/scsi/qla2xxx/qla_init.c +++ b/drivers/scsi/qla2xxx/qla_init.c @@ -7719,9 +7719,12 @@ struct qla_qpair *qla2xxx_create_qpair(struct scsi_qla_host *vha, int qos, int qla2xxx_delete_qpair(struct scsi_qla_host *vha, struct qla_qpair *qpair) { - int ret; + int ret = QLA_FUNCTION_FAILED; struct qla_hw_data *ha = qpair->hw; + if (!vha->flags.qpairs_req_created && !vha->flags.qpairs_rsp_created) + goto fail; + qpair->delete_in_progress = 1; while (atomic_read(&qpair->ref_count)) msleep(500); @@ -7738,8 +7741,11 @@ int qla2xxx_delete_qpair(struct scsi_qla_host *vha, struct qla_qpair *qpair) clear_bit(qpair->id, ha->qpair_qid_map); ha->num_qpairs--; list_del(&qpair->qp_list_elem); - if (list_empty(&vha->qp_list)) + if (list_empty(&vha->qp_list)) { vha->flags.qpairs_available = 0; + vha->flags.qpairs_req_created = 0; + vha->flags.qpairs_rsp_created = 0; + } mempool_destroy(qpair->srb_mempool); kfree(qpair); mutex_unlock(&ha->mq_lock); diff --git a/drivers/scsi/qla2xxx/qla_mid.c b/drivers/scsi/qla2xxx/qla_mid.c index 4ad452a42dbe..f0605cd196fb 100644 --- a/drivers/scsi/qla2xxx/qla_mid.c +++ b/drivers/scsi/qla2xxx/qla_mid.c @@ -645,6 +645,7 @@ qla25xx_create_req_que(struct qla_hw_data *ha, uint16_t options, int ret = 0; struct req_que *req = NULL; struct scsi_qla_host *base_vha = pci_get_drvdata(ha->pdev); + struct scsi_qla_host *vha = pci_get_drvdata(ha->pdev); uint16_t que_id = 0; device_reg_t *reg; uint32_t cnt; @@ -741,6 +742,7 @@ qla25xx_create_req_que(struct qla_hw_data *ha, uint16_t options, mutex_unlock(&ha->mq_lock); goto que_failed; } + vha->flags.qpairs_req_created = 1; } return req->id; @@ -772,6 +774,7 @@ qla25xx_create_rsp_que(struct qla_hw_data *ha, uint16_t options, int ret = 0; struct rsp_que *rsp = NULL; struct scsi_qla_host *base_vha = pci_get_drvdata(ha->pdev); + struct scsi_qla_host *vha = pci_get_drvdata(ha->pdev); uint16_t que_id = 0; device_reg_t *reg; @@ -855,6 +858,7 @@ qla25xx_create_rsp_que(struct qla_hw_data *ha, uint16_t options, mutex_unlock(&ha->mq_lock); goto que_failed; } + vha->flags.qpairs_rsp_created = 1; } rsp->req = NULL; diff --git a/drivers/scsi/qla2xxx/qla_os.c b/drivers/scsi/qla2xxx/qla_os.c index 3963602aef35..13e4d2428a9a 100644 --- a/drivers/scsi/qla2xxx/qla_os.c +++ b/drivers/scsi/qla2xxx/qla_os.c @@ -384,6 +384,7 @@ static int qla2x00_alloc_queues(struct qla_hw_data *ha, struct req_que *req, ha->base_qpair->rsp = rsp; ha->base_qpair->vha = vha; ha->base_qpair->qp_lock_ptr = &ha->hardware_lock; + /* init qpair to this cpu. Will adjust at run time. */ ha->base_qpair->msix = &ha->msix_entries[QLA_MSIX_RSP_Q]; INIT_LIST_HEAD(&ha->base_qpair->hints_list); qla_cpu_update(rsp->qpair, smp_processor_id());