From patchwork Fri Mar 15 22:04:18 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Himanshu Madhani X-Patchwork-Id: 10855593 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 9C445139A for ; Fri, 15 Mar 2019 22:05:33 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 82DF62AC8B for ; Fri, 15 Mar 2019 22:05:33 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 772B42AC94; Fri, 15 Mar 2019 22:05:33 +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 11F352A936 for ; Fri, 15 Mar 2019 22:05:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726908AbfCOWFc (ORCPT ); Fri, 15 Mar 2019 18:05:32 -0400 Received: from mail-eopbgr790043.outbound.protection.outlook.com ([40.107.79.43]:25437 "EHLO NAM03-CO1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726774AbfCOWFc (ORCPT ); Fri, 15 Mar 2019 18:05:32 -0400 Received: from DM5PR07CA0085.namprd07.prod.outlook.com (2603:10b6:4:ae::14) by BYAPR07MB5368.namprd07.prod.outlook.com (2603:10b6:a03:64::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1709.14; Fri, 15 Mar 2019 22:05:28 +0000 Received: from BY2NAM05FT055.eop-nam05.prod.protection.outlook.com (104.47.50.51) by DM5PR07CA0085.outlook.office365.com (52.132.138.14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.1709.13 via Frontend Transport; Fri, 15 Mar 2019 22:05:27 +0000 Authentication-Results: spf=temperror (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=temperror action=none header.from=marvell.com; Received-SPF: TempError (protection.outlook.com: error in processing during lookup of marvell.com: DNS Timeout) Received: from CAEXCH02.caveonetworks.com (199.233.58.38) by BY2NAM05FT055.mail.protection.outlook.com (10.152.100.192) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA) id 15.20.1730.2 via Frontend Transport; Fri, 15 Mar 2019 22:05:25 +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 Mar 2019 15:04:22 -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 x2FM4N9u014050; Fri, 15 Mar 2019 15:04:23 -0700 Received: (from root@localhost) by dut1171.mv.qlogic.com (8.14.7/8.14.7/Submit) id x2FM4NqS014049; Fri, 15 Mar 2019 15:04:23 -0700 From: Himanshu Madhani To: , CC: , Subject: [PATCH 1/2] qla2xxx: Fix FC-AL connection target discovery Date: Fri, 15 Mar 2019 15:04:18 -0700 Message-ID: <20190315220419.14010-2-hmadhani@marvell.com> X-Mailer: git-send-email 2.12.0 In-Reply-To: <20190315220419.14010-1-hmadhani@marvell.com> References: <20190315220419.14010-1-hmadhani@marvell.com> MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-Matching-Connectors: 131971611262210877;(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)(396003)(39860400002)(376002)(346002)(136003)(2980300002)(189003)(199004)(81166006)(316002)(81156014)(16586007)(54906003)(53936002)(2906002)(110136005)(42186006)(106466001)(4326008)(8676002)(105606002)(36906005)(305945005)(498600001)(50466002)(87636003)(48376002)(97736004)(63370400001)(26826003)(336012)(63350400001)(36756003)(69596002)(86362001)(486006)(126002)(2616005)(476003)(50226002)(8936002)(47776003)(446003)(76176011)(26005)(5660300002)(80596001)(1076003)(6666004)(356004)(68736007)(11346002)(51416003);DIR:OUT;SFP:1101;SCL:1;SRVR:BYAPR07MB5368;H:CAEXCH02.caveonetworks.com;FPR:;SPF:TempError;LANG:en;PTR:InfoDomainNonexistent;MX:1;A:1; X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: bcc73518-4345-4cb1-f36a-08d6a992542d X-Microsoft-Antispam: BCL:0;PCL:0;RULEID:(2390118)(7020095)(5600127)(711020)(4605104)(2017052603328);SRVR:BYAPR07MB5368; X-MS-TrafficTypeDiagnostic: BYAPR07MB5368: X-Microsoft-Antispam-PRVS: X-Forefront-PRVS: 09778E995A X-Microsoft-Antispam-Message-Info: kbeemnlrGeJSBEtiXi8Ict0h5OXi6puwIV/4DNIrSSg8uVzuhyYqxI6MCqADaqiodnQTGKJPv1Oi/j48oJ396DDoPjKCyE4IKaZHqtbm+T3kkWYtx/b28bORSQeAIEFgAvl2CnXQG5GhIuxDnBiF2ssLp6nt2czpoNlZiFS2OaKGX9uYmjCEa6fN143wrYL+FtqFjoFcJEed4ZdYN7vd0BA/O36gcC5vnuvovAOKX24LasxO86JvOyJYP022F3zFvCSGowtMiknXWI6JR7bZFG9xAED7+vFBVGqDCIepLrUsedONFzjYfgyPGzddpCpb97xYC7DT5r18XFOnsOb/Tm8GaIMadLxg85RgsFRZ9K9mmAkzEQmA80+yW5kxbz9y3AAkWYpo9I6dX8iFAnHFCepd3G2n5TkKm3xoQeqyodM= X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Mar 2019 22:05:25.9518 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: bcc73518-4345-4cb1-f36a-08d6a992542d 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: BYAPR07MB5368 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: Quinn Tran Commit 7f147f9bfd44 fixed N2N target discovery for local loop. However, same code is used for FC-AL discovery as well. Added check to make sure we are bypassing area and domain check only in N2N topology for target discovery. Fixes: 7f147f9bfd44 ("scsi: qla2xxx: Fix N2N target discovery with Local loop") Cc: stable@vger.kernel.org # 5.0+ Signed-off-by: Quinn Tran Signed-off-by: Himanshu Madhani Reviewed-by: Ewan D. Milne --- drivers/scsi/qla2xxx/qla_init.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/drivers/scsi/qla2xxx/qla_init.c b/drivers/scsi/qla2xxx/qla_init.c index 5b395af1aa22..e64d3d2d3c78 100644 --- a/drivers/scsi/qla2xxx/qla_init.c +++ b/drivers/scsi/qla2xxx/qla_init.c @@ -4990,6 +4990,13 @@ qla2x00_configure_local_loop(scsi_qla_host_t *vha) if ((domain & 0xf0) == 0xf0) continue; + /* Bypass if not same domain and area of adapter. */ + if (area && domain && ((area != vha->d_id.b.area) || + (domain != vha->d_id.b.domain)) && + (ha->current_topology == ISP_CFG_NL)) + continue; + + /* Bypass invalid local loop ID. */ if (loop_id > LAST_LOCAL_LOOP_ID) continue;