From patchwork Thu Aug 5 10:20:00 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nilesh Javali X-Patchwork-Id: 492571 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 585FDC4338F for ; Thu, 5 Aug 2021 10:24:11 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 2B52C61108 for ; Thu, 5 Aug 2021 10:24:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240203AbhHEKYY (ORCPT ); Thu, 5 Aug 2021 06:24:24 -0400 Received: from mx0b-0016f401.pphosted.com ([67.231.156.173]:13864 "EHLO mx0b-0016f401.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240138AbhHEKYY (ORCPT ); Thu, 5 Aug 2021 06:24:24 -0400 Received: from pps.filterd (m0045851.ppops.net [127.0.0.1]) by mx0b-0016f401.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id 175AEUBj017497 for ; Thu, 5 Aug 2021 03:24:09 -0700 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=pfpt0220; bh=1oIyNIzOd1Q8QcszZYgWvd4zVfutXAOlT/2vWCJCAag=; b=A+J3Pz5pQR96q3i0gRtLeNUlvQkJSuNOJEOEkU+sZnEs5CxSLg1ayvsrpf3gU4TMmAVd MGtSanqAL0JOh8i2EQxk4uPh7DPYCjrCvFeY4ZdfcmUm1lk3reZzFyzpjbehqtsBWhd5 v6A1kxsR70IMVRfnnPi7wemOxGz+V8t0s17cs4sa2R5Q8oSIbCXHsGQVe6RKFPlYGKVM UNA0Xn6FVSHwUAsjbsr9AAjZVz4sMETM0NApqTXJ+LsyH8vjtp/+JqPB0ONfqQ3CCR8p pfnMFbUemzGrBuLTsyqL3fsgIVI8mRibE/XHfNNOEmJ3+Mf0gfl6FGZmoQxK68oIH0kn aA== Received: from dc5-exch01.marvell.com ([199.233.59.181]) by mx0b-0016f401.pphosted.com with ESMTP id 3a8ata0j6r-2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT) for ; Thu, 05 Aug 2021 03:24:09 -0700 Received: from DC5-EXCH02.marvell.com (10.69.176.39) by DC5-EXCH01.marvell.com (10.69.176.38) with Microsoft SMTP Server (TLS) id 15.0.1497.18; Thu, 5 Aug 2021 03:24:07 -0700 Received: from maili.marvell.com (10.69.176.80) by DC5-EXCH02.marvell.com (10.69.176.39) with Microsoft SMTP Server id 15.0.1497.18 via Frontend Transport; Thu, 5 Aug 2021 03:24:07 -0700 Received: from dut1171.mv.qlogic.com (unknown [10.112.88.18]) by maili.marvell.com (Postfix) with ESMTP id 620EB3F705F; Thu, 5 Aug 2021 03:24:07 -0700 (PDT) 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 175AO7FS020286; Thu, 5 Aug 2021 03:24:07 -0700 Received: (from root@localhost) by dut1171.mv.qlogic.com (8.14.7/8.14.7/Submit) id 175AO7rS020285; Thu, 5 Aug 2021 03:24:07 -0700 From: Nilesh Javali To: CC: , Subject: [PATCH 09/14] qla2xxx: fix npiv create erroneous error Date: Thu, 5 Aug 2021 03:20:00 -0700 Message-ID: <20210805102005.20183-10-njavali@marvell.com> X-Mailer: git-send-email 2.12.0 In-Reply-To: <20210805102005.20183-1-njavali@marvell.com> References: <20210805102005.20183-1-njavali@marvell.com> MIME-Version: 1.0 X-Proofpoint-ORIG-GUID: 7OTxZblHsZriQPeTXT_aIe7TnpdM8FQG X-Proofpoint-GUID: 7OTxZblHsZriQPeTXT_aIe7TnpdM8FQG X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.391, 18.0.790 definitions=2021-08-05_03:2021-08-05,2021-08-05 signatures=0 Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org From: Quinn Tran When user create multiple NPIVs, the switch capabilities field is checked before a vport is allowed to create. This field is being toggled if a switch scan is in progress. This creates erroneous reject of vport create. Signed-off-by: Quinn Tran Signed-off-by: Nilesh Javali Reviewed-by: Himanshu Madhani --- drivers/scsi/qla2xxx/qla_init.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/scsi/qla2xxx/qla_init.c b/drivers/scsi/qla2xxx/qla_init.c index c427ef7e7c72..266e9e06a6f2 100644 --- a/drivers/scsi/qla2xxx/qla_init.c +++ b/drivers/scsi/qla2xxx/qla_init.c @@ -4623,11 +4623,11 @@ qla2x00_configure_hba(scsi_qla_host_t *vha) /* initialize */ ha->min_external_loopid = SNS_FIRST_LOOP_ID; ha->operating_mode = LOOP; - ha->switch_cap = 0; switch (topo) { case 0: ql_dbg(ql_dbg_disc, vha, 0x200b, "HBA in NL topology.\n"); + ha->switch_cap = 0; ha->current_topology = ISP_CFG_NL; strcpy(connect_type, "(Loop)"); break; @@ -4641,6 +4641,7 @@ qla2x00_configure_hba(scsi_qla_host_t *vha) case 2: ql_dbg(ql_dbg_disc, vha, 0x200d, "HBA in N P2P topology.\n"); + ha->switch_cap = 0; ha->operating_mode = P2P; ha->current_topology = ISP_CFG_N; strcpy(connect_type, "(N_Port-to-N_Port)"); @@ -4657,6 +4658,7 @@ qla2x00_configure_hba(scsi_qla_host_t *vha) default: ql_dbg(ql_dbg_disc, vha, 0x200f, "HBA in unknown topology %x, using NL.\n", topo); + ha->switch_cap = 0; ha->current_topology = ISP_CFG_NL; strcpy(connect_type, "(Loop)"); break;