From patchwork Wed Jun 14 03:47:19 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Madhani, Himanshu" X-Patchwork-Id: 9785221 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 B65E76038E for ; Wed, 14 Jun 2017 03:48:09 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C2A2C2858E for ; Wed, 14 Jun 2017 03:48:09 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B78EF28589; Wed, 14 Jun 2017 03:48:09 +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=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 3F8F327FA3 for ; Wed, 14 Jun 2017 03:48:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754169AbdFNDsG (ORCPT ); Tue, 13 Jun 2017 23:48:06 -0400 Received: from mail-sn1nam02on0079.outbound.protection.outlook.com ([104.47.36.79]:35328 "EHLO NAM02-SN1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1754044AbdFNDsC (ORCPT ); Tue, 13 Jun 2017 23:48:02 -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=wIyjiTgqdLuybhGKzNJHUSDo8zc9A36tB6nHYiC7YUk=; b=JWakPkmoItGGc9KVb6lzSjrdSeBEO7+/L/QFGIoe89IFalNbMOb5FM+3OdPyTcs9RbW4NNrhzyCsDStlAfWz5gHgjliG6qcSxj/kEy1vzxATb68ky+cMaWHrfujTZuRnkSxUe+UDIlIeil2wCcrPXfmJ/EvLuBroBETDFAHsmjQ= Received: from CO2PR07CA0071.namprd07.prod.outlook.com (10.174.192.39) by CY1PR0701MB1583.namprd07.prod.outlook.com (10.163.20.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1157.12; Wed, 14 Jun 2017 03:48:00 +0000 Received: from BY2FFO11FD018.protection.gbl (2a01:111:f400:7c0c::195) by CO2PR07CA0071.outlook.office365.com (2603:10b6:100::39) 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, 14 Jun 2017 03:48:00 +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 BY2FFO11FD018.mail.protection.outlook.com (10.1.14.106) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA_P384) id 15.1.1143.11 via Frontend Transport; Wed, 14 Jun 2017 03:47:59 +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; Tue, 13 Jun 2017 20:47:50 -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 v5E3lnVN015479; Tue, 13 Jun 2017 20:47:49 -0700 Received: (from root@localhost) by dut1171.mv.qlogic.com (8.14.7/8.14.7/Submit) id v5E3lnar015478; Tue, 13 Jun 2017 20:47:49 -0700 From: Himanshu Madhani To: , CC: , , Subject: [PATCH v2 04/15] qla2xxx: Fix mailbox failure while deleting Queue pairs Date: Tue, 13 Jun 2017 20:47:19 -0700 Message-ID: <20170614034730.15428-5-himanshu.madhani@cavium.com> X-Mailer: git-send-email 2.12.0 In-Reply-To: <20170614034730.15428-1-himanshu.madhani@cavium.com> References: <20170614034730.15428-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)(39450400003)(39400400002)(39410400002)(39840400002)(2980300002)(428002)(199003)(189002)(9170700003)(36756003)(4326008)(2950100002)(6666003)(50466002)(81166006)(101416001)(8936002)(72206003)(48376002)(356003)(50226002)(80596001)(8676002)(478600001)(54906002)(38730400002)(15650500001)(105586002)(189998001)(87636003)(106466001)(1076002)(5660300001)(42186005)(2906002)(47776003)(305945005)(5003940100001)(76176999)(33646002)(86362001)(50986999); DIR:OUT; SFP:1101; SCL:1; SRVR:CY1PR0701MB1583; H:CAEXCH02.caveonetworks.com; FPR:; SPF:None; MLV:sfv; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BY2FFO11FD018; 1:Df1ToC5kx+7PkJ1vFn4/SEmdEUyk6COyJT2Low6obRQ+5fUxftaK+WKTOVkdfQlLzG/rXT++3xH3flg9upycWRxC9VqGrCSC46xXVLF/2/ET2yjyoUzYYSFufW9RMjPVdohaLNwtqmukLFdto5Rd1Bu8YW/ViSFQQntTA5DOup7x4ull41WwNEWBtpCw9Qi8E6A4p0BB+IfHIFyvLD+KJwmfzYfqnu5Pv3CbnYomPYonbrc/Wk1aG03lLsRemeOZpUxUUlacBN8kObJ9kqBZiX1F4myqoca2iChbVNcJnFj0RWq2Tq7aEiFgwOXc94WKaHyEbAXxRcvbfeETRU+yBw5KLlt/6tGzGfWnfscVMF3cGtTCCV+odl8ke6/QMfx/sqsJxCJ9CIPW2Pn9here7XH9xxnsdpG+8JAXX/NI8TbuoVhrniCp4dZo1b+DKkZE7KJ0yquhyPgG7lPqkM48XKtV+kiFnawQPNDRhbEqIsKfAkm4s2/gNMXmhLGoLEOi1o6DWQdw4rdHopz/TcsWYA== X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CY1PR0701MB1583: X-MS-Office365-Filtering-Correlation-Id: f1d38e10-f3f5-44c8-cea9-08d4b2d826d7 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(2017030254075)(201703131423075)(201703031133081); SRVR:CY1PR0701MB1583; X-Microsoft-Exchange-Diagnostics: 1; CY1PR0701MB1583; 3:URtLuWZPiD0hcClnzisFr1YCV0oX5/bt4WxqTHg51nP89qaj5hPOb9pUYIklbPusbm+Pdq4FiyVjwfH5Ii/81g/E/ikv801Ld1+lyInOHLzQfNrEI8NmhmU4boE16qOfrQgj7bk47W9sHBtQK+/lIxu9GLWvKCBFUOX7k/mz9Au/uoU75Z8tB5eFUSo8imNvqYpjYNSQER1jndDS1T9JCJGgflyc23VH+/Q3KNlKYUjT++pXEXbpWtsivuE2N3rb5eXXf/22+be6C8TCpRSISnClRLTmzyQFyry/NljzCSteginlUKNFVT1KF2ls+RYTV0k2qg8mjaJV6wBcEIicxuLUWB7eif2idnSBv2uwl0igen8uh/8Ghz/oCS7UEryuT6RYwa+NKc6ccGeZbODfFPuEl0BTfZTuGmEwXgwM8YeA9ZsMm19fjClc5n2ymFIjqEDiQdQYXxpauXCoxkMqdQ== X-Microsoft-Exchange-Diagnostics: 1; CY1PR0701MB1583; 25:ydcyAoKJjZcJMUfDjHRATnfD719Z3Qfp4gMJdXyk2MSVx5MtswdKFeR1BOJpXJ01wXU34q7a7iPVHe+1nGIL7TrKM8Ov0vbdYMc96LNy3cdLQdFxWK9D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wsl8AEXFk61W31+0GxcBKWN4lppbZw/4usBCDc/T0FTpjeQRP/W63d2qMBRPmyPDZkaq+/VZ/EJQ98O2wGOfXysL7HkHjl6KTmai+u/t 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)(5005006)(13016025)(8121501046)(13018025)(3002001)(10201501046)(100000703101)(100105400095)(93006095)(93001095)(6041248)(20161123564025)(20161123555025)(20161123558100)(20161123560025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123562025)(6072148)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:CY1PR0701MB1583; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:CY1PR0701MB1583; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; CY1PR0701MB1583; 4:i77sOCBgKZe1KoB9xRqoZGKYCwAQ+adYXwF7OP6f?= =?us-ascii?Q?UP0tPGis/C1qnsdK2pa5WTCUlgQS7a5n3X9boGjR8p+Q33Tw4RnXy/YNj0NF?= =?us-ascii?Q?XbHf6MkpS4G7/CzjcTk7yCdVMikXQ1Pia375nirziZarGIqe+YSAtDItNM3k?= =?us-ascii?Q?4vsypCgCuMJRScszsA203fWjJCt3Hp9psWs/QKuhpaAcprc0VCXms4duLI+L?= =?us-ascii?Q?zd3obnRxjyLfC0/hb7wBgSFxq9S1UEgplYVZ3ng6CMS4ycxWBsoQrHkXRDNQ?= =?us-ascii?Q?fVgRYDKXt9Pk/oeW15nwevi9pWTFyOyRShIH4NfxN40MZtmc6239nnijuswV?= =?us-ascii?Q?2DdMhSArmj03terlEMWJaUlPRbjfLrs1ajicNSx95GP/jiCWeAUNU0pfk/q0?= =?us-ascii?Q?mQKML17MLMDrzdJ7dpNRrz3/h73Sn8iDIQeOuwTf2pCy3HmCFzGBFaYmvkAE?= =?us-ascii?Q?nY/gDKUH3uQPT+0Pos6W35BAt3D+WOBL8LK23SgxS2SRehyIPoNxApF9kMwu?= =?us-ascii?Q?hFw9lmrFqviAP1mR2/TluAfEcMIxUiGm2hnfzIiNyBJJAtlFpRaPzS/H8udT?= =?us-ascii?Q?Fkmax3MSbozahOGtraSljwmyd3C5RUAkWwagjsJxDECSs0N3CnFjpzCm6Xd3?= =?us-ascii?Q?KT9L+0h1qboYM62fqNRdhnauQjsQHuU9tCnqvjbx+xyCALQtpSKu40UShy4e?= =?us-ascii?Q?RmMRE0nnWJoXQ+o6psE8QYYOek1o7OE0Tfz7lDqO78Uz09bP/AlSDTVgWNc+?= =?us-ascii?Q?Zkxap9z1xiQO8gw8517JNS9N/uzLK8oV+GNyA3VALVR1O6zjPO6t4Wrtff9T?= =?us-ascii?Q?b3b6iNycskI5YD8BL2xRq82Jk/s6sjv2woNsJ34DBT5uD4VJ4qdFCI2WrBMc?= =?us-ascii?Q?g5jPygFm8lJ6JtpxgibrbCSEz/rQDfV1glwXe/6dvrPt/7g89OQfoobNjUa7?= =?us-ascii?Q?fsFi7OVpR7tSri1rUssGyi10gNXu1+0b7Hnw8k0WB4yVZD6370WkAQchf21h?= =?us-ascii?Q?9WnkgasTsnoIs9anJttWrsJonUnsVwSEE+SE3oCn2Np4yZ4I3gDhpiFO/M41?= =?us-ascii?Q?wRvADDHsC4D6E0cRJXezBihgA37WVPkWj3NRIrsIxaDNyZvqM9k6eF6dlTCd?= =?us-ascii?Q?c2TnLDYmUQ3FmRKb2FQwhLaH6dc76/UMGA98ON6tAGTK1QrT6xNPZAug4Ied?= =?us-ascii?Q?aJiYjuxKe8M0i0Q=3D?= X-Forefront-PRVS: 033857D0BD X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; CY1PR0701MB1583; 23:O//0qH2eoDdHkz7X8sOGK8GojouOfW21evUUbtp?= =?us-ascii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18D1AWeGyOYwVyiDXNb8ejxGyoi8UboUGE4i3KIpQd0fZyvlZTlKtvqa9AP/fQVDFwXNTqJnRGNgCaWWyWolICQUJ7wFdf/lr+k56SaIJLnZexkrTPBH4HE3c8nYlEw5MWBcVjzpT0O4nyIYAddsHpCHfi3v0KGfC8/TU326nSkSHB5+iw2ZtcAKOJRvJtmddcy8qPZVulHb3aTg6dDL7QaQnBqJOMtUAGA4hc+Iw2cloy192RBIbZ5HI4gDSXDR9IM0SYeQhVs7JcvM8JVvpG/6U7Ai9qiId8IdVbE/S42Ylir09RjpKTV4+LqMRKWIVlA068UX6GWlSKKfFp5fd4aX0; 24:QrQ0ECzlY+q39vL5grpgrJ5kiVYHDavqcQ0dh5DC1dzVaW15KA6P9CdNBgkhf8g15Z/PKDHyCvzokdzsM9vdKTA3Q0LFmdEeBKSadkulToY= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; CY1PR0701MB1583; 7:VAakpTzsKWdhA8jtlPe9k0t5Z/iG9JJVyP8muwFOM09Ucrdm7abDrW5Hv/5qyCikFAiqDNfw8kDvyK4WhgorESbLAC48U3kILuFbWILssusbNHUyIoMnjrrmm9Su/PGIP+9EbK15qf8LbLlkEkLWlGcDR08KH272m/hm6jCVMTz9lA6D3o+PEFI1HHy7wkh9C9qXJDbg55x0rU/SljHd92irGiIhSBVnGx0kLosHLdvRlmlSdvj/kBKiTESh7i/qcdT81OK9X1/YMsxZNCzmhlA091Vp5lIIvKNvK/ME/FVvk4SaXaJrzGFSdsGg04wxUrnyGoFq8LjqwXyUbw7b/Q== X-OriginatorOrg: cavium.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Jun 2017 03:47:59.8411 (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: CY1PR0701MB1583 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: Sawan Chandak In target mode driver, queue pairs are not created during driver load time, instead they are created at the configuration time after chip reset. If a user tries to load/unload driver after queue pairs are created, then there would be mailbox failure, while deleting queue pairs. Flag is added to check if queue pairs are created or not. 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());