From patchwork Wed Jul 25 17:01:18 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Madhani, Himanshu" X-Patchwork-Id: 10544469 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 644329093 for ; Wed, 25 Jul 2018 17:01:44 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4D27C2A1A0 for ; Wed, 25 Jul 2018 17:01:44 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 413B82A803; Wed, 25 Jul 2018 17:01:44 +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,DKIM_SIGNED, DKIM_VALID,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 B35852A807 for ; Wed, 25 Jul 2018 17:01:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729525AbeGYSOP (ORCPT ); Wed, 25 Jul 2018 14:14:15 -0400 Received: from mail-bn3nam01on0047.outbound.protection.outlook.com ([104.47.33.47]:33696 "EHLO NAM01-BN3-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1729470AbeGYSOP (ORCPT ); Wed, 25 Jul 2018 14:14:15 -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:X-MS-Exchange-SenderADCheck; bh=UgSny+7jAlxQ+L46Hqzt7bWIENi+UE++VYMbwA81GZs=; b=QxmklrMfZ3iHbPgFvA0w7K7kPwqtd1MHxHrwCHG5oQjLfLUaM343PY7DJYqNJmFUknMWjleB0dTkf+esdWd+TpqIQ8+ijznJm4GLusOW+8eEGgdoyl19jOol4r9SeaFsCYH/m5JB0EFJdQAwcTkkWEkpiNFNHzG45C67pG8dXMQ= Received: from DM5PR07CA0030.namprd07.prod.outlook.com (2603:10b6:3:16::16) by DM2PR0701MB1391.namprd07.prod.outlook.com (2a01:111:e400:5119::27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.973.21; Wed, 25 Jul 2018 17:01:39 +0000 Received: from DM3NAM05FT022.eop-nam05.prod.protection.outlook.com (2a01:111:f400:7e51::205) by DM5PR07CA0030.outlook.office365.com (2603:10b6:3:16::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.973.16 via Frontend Transport; Wed, 25 Jul 2018 17:01:39 +0000 Authentication-Results: spf=pass (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=bestguesspass action=none header.from=cavium.com; Received-SPF: Pass (protection.outlook.com: domain of cavium.com designates 50.232.66.26 as permitted sender) receiver=protection.outlook.com; client-ip=50.232.66.26; helo=CAEXCH02.caveonetworks.com; Received: from CAEXCH02.caveonetworks.com (50.232.66.26) by DM3NAM05FT022.mail.protection.outlook.com (10.152.98.132) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA_P256) id 15.20.1017.0 via Frontend Transport; Wed, 25 Jul 2018 17:01:38 +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, 25 Jul 2018 10:01:23 -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 w6PH1NIV010360; Wed, 25 Jul 2018 10:01:23 -0700 Received: (from root@localhost) by dut1171.mv.qlogic.com (8.14.7/8.14.7/Submit) id w6PH1N1g010359; Wed, 25 Jul 2018 10:01:23 -0700 From: Himanshu Madhani To: , CC: , Subject: [PATCH 14/16] qla2xxx: Save frame payload size from ICB Date: Wed, 25 Jul 2018 10:01:18 -0700 Message-ID: <20180725170120.10269-15-himanshu.madhani@cavium.com> X-Mailer: git-send-email 2.12.0 In-Reply-To: <20180725170120.10269-1-himanshu.madhani@cavium.com> References: <20180725170120.10269-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)(346002)(376002)(136003)(39860400002)(396003)(2980300002)(438002)(199004)(189003)(186003)(2616005)(106002)(87636003)(69596002)(86362001)(54906003)(476003)(110136005)(16586007)(478600001)(126002)(1076002)(5660300001)(4326008)(26005)(72206003)(106466001)(486006)(44832011)(42186006)(316002)(2906002)(51416003)(50466002)(50226002)(6666003)(36756003)(305945005)(48376002)(8676002)(81166006)(336012)(81156014)(80596001)(47776003)(356003)(8936002)(446003)(11346002)(76176011);DIR:OUT;SFP:1101;SCL:1;SRVR:DM2PR0701MB1391;H:CAEXCH02.caveonetworks.com;FPR:;SPF:Pass;LANG:en;PTR:50-232-66-26-static.hfc.comcastbusiness.net;A:1;MX:1; X-Microsoft-Exchange-Diagnostics: 1;DM3NAM05FT022;1:VE9X+8P54jA1tb4GHjecT3yewE7c2nD0wimkOfkhQXCDRicG+p+XOP60Ww4+6xtAIp5bQpk3QBnY0MAjSzh/dW9aAc3L8IlwfwUk9yh2JqqiMr8IMWHp6dl5DWKoRCet X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 31133460-2923-48f4-f5d9-08d5f25049a2 X-Microsoft-Antispam: BCL:0;PCL:0;RULEID:(7020095)(4652040)(8989117)(5600073)(711020)(4608076)(4534165)(4627221)(201703031133081)(201702281549075)(8990107)(2017052603328)(7153060);SRVR:DM2PR0701MB1391; X-Microsoft-Exchange-Diagnostics: 1;DM2PR0701MB1391;3:BthOYd0K4kRYf3z9Vkyv9AkIReI+WgvKIv95mjH/9DLSo1mFrQuv72HgEQcYl4/lmjS2yswvAlhiqq9oiAWM2PJceD+Jx568N5Mw+C8seVPQ1ppUvjzq0gkfUyuDZWxzMKvYuoh+aCj5DeKoipD73rGXFS0jgUI1nmYlz7VkwsNuSWHrcq5ruLMbnlUb/zMyEKIUzdjXY+x12n1fsd/GFu6t1PACABUWmNNBlhpqRJv3zMNcOxJ1WgC1bDGSD506b6mB6kyE4FChPaP1RjKJnDQcRwXWkSNl3Kt1mfLESflOUysA4ELGSMoihp0cAh1hZOU7lowL6RyUx3Iqz9iYCSlwTUqEv2PJs/4dUPcv1dM=;25:quGPZAMxfi+syXsWjztpId4R/IXV1ms1VVH1VPvLAOPS0B5xxn+c54iAW17dLl4yw4xCv40rwRj5TNAUUPsEE2vF633XyKUxA/GGcitmhKhfXHf+29ZGVV4dbR5jh2JrjmbySoIAJKLSrJ+XKaqvBJ8wUkg5rZ9iYxyHjYIXK8zeeDq8CDPQgxwle3S6FHcGAkdlLOlWSnS+4ivEQy14fvuNeTsx3VJ3HVJBlhgf8RhkXb72bWzGy3d1y0yXw4CGYcr+8yVhPnrkT4KhB2azKpYhAwTfEVJMkdLbvXwAZCymyhya3pSRvdWPIPmmhBy9WBFvZiKhKogDSzj9qv+IGg== X-MS-TrafficTypeDiagnostic: DM2PR0701MB1391: X-Microsoft-Exchange-Diagnostics: 1;DM2PR0701MB1391;31:5u840FNfYCRYye4KUVbTDiN4wgbXDOV0FzfR7Ei6yu5hsjT7XG/DJB+HfSVqOEoeLRDRFVDB813eH+4BuO/NTXp4ZpN0K9nfSZvphm1f7WdANU9biYtjR5XMbHOaykEkfh/5KCeqMkwn9zDXcYiBnsaaV7RFmYHuFJtZuQq0BdkQPaQ3Azl442AWCPdAVDYo2nPPLzQdfN0/KWIOFI35XWpDiWLevO0wDe4IhcQ55pk=;20:K7uVlX38YPqlESI5L75WwtQaIFVGsC5VOQRsC8cvsli9KFy5eYxvQdUqQYjgSMRMyKC8LljU/aCmyf/rNFgf2acoOb08i5QSkDYYGp7nswIk/HVq1JiS2KtyAZewJq9VJDYpis3VJvnpRrB35K7OKsSq6zKhWVnpePouOlbd0Y3VMAn6Mi/Z+Jg70dcV8SmTwj1iMI9C53fuNCn6pMnGMJ7EjTwSZsjwGNvU4V+m9PJIPSUccT8LEN51ta+NJ983q7bjTZFslPn1YdxW1hsdykjcDCzsfbUJiWWuUZphrbdbR//ClMdFDXy3YHYDEmOmkWvoha5TcPbGXl4YBXaacItKzb95NN0L4Fy9SpccjoRCIKtJW7VQTbpl1t3KWEalNkVWnGY70l79Ytc5f889efudXGScthF3CaHWwLoQsNb3sltQzLJ0IVBKJWIfofpMk/z+OaUOVOmoNYYg7mOLsCxMw7Jv8ohtfZiaegXOSVxNdg5mUwSqPT6GMUqLtyzk X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-MS-Exchange-SenderADCheck: 1 X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(8211001083)(6040522)(2401047)(5005006)(8121501046)(3002001)(10201501046)(93006095)(93004095)(3231311)(944501410)(52105095)(149027)(150027)(6041310)(20161123562045)(20161123560045)(20161123564045)(20161123558120)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(6072148)(201708071742011)(7699016);SRVR:DM2PR0701MB1391;BCL:0;PCL:0;RULEID:;SRVR:DM2PR0701MB1391; X-Microsoft-Exchange-Diagnostics: 1;DM2PR0701MB1391;4:ESPK9/aT2QuJ2DmbsFYQPNwqlL3+OGWqe3+5mx53qiScY84xV6is3QV4EKgvQHHYfWG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e0pxEv4pDF8fK2Yn+v0H2KxcWc8SilPWXLXa3d13UEcdZbw9Itq/8wKDEzSilUCIQeCNse02k+mWZNYhWxeTlQMbnmtkgOGc7EFPzfimqTWuiBFDR4BWKjHKFNCIwBatJj+j+ABn7m+w==;5:u2aL415Pw75WXwusi6xeYWo8Al81rvtrofGuRJwXnSwsAARkiE3zOI5HbtnKZ+tm5+X0OZ+6Ctr2OzLsPmCTvaYBm/VoecTHuVBeleDQGVDT94EUdbS0iLavAPmx7XO4PcsxFY6roz/Xr1cxVcwEAOGptz47RySdhTf2Aska088=;7:agl6SeirpaqeZ2CFtjc6cUuhytTAuc2uaLsYcQi78qbVPnE34peSXqAmMg8cX8XKl8uZYlwhc/PzrkqkqfWKEkor4w6XUminsq80qzn5henste52VyKZBLzmZtfa3kI2j6QBxuLsrqq2zvOZdIlMCtRKPZJkmFZ2iBT25b3lBGdrZfsnoYpLhLmGQJakZi8GOgRzgPl68Snl1nBtJzVd5O/BrpiHBwhwleNdNzOYpAtEnccd3J0WOSM/pzgNj+Ih SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: cavium.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Jul 2018 17:01:38.6546 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 31133460-2923-48f4-f5d9-08d5f25049a2 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: DM2PR0701MB1391 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 Save frame payload size from init control block. This field/data is used to register with switch data base. This allow the init control block temp buf to be reuse Signed-off-by: Quinn Tran Signed-off-by: Himanshu Madhani --- drivers/scsi/qla2xxx/qla_def.h | 1 + drivers/scsi/qla2xxx/qla_gs.c | 4 +--- drivers/scsi/qla2xxx/qla_init.c | 6 +++--- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/drivers/scsi/qla2xxx/qla_def.h b/drivers/scsi/qla2xxx/qla_def.h index c93e318e8d86..0db81e17c063 100644 --- a/drivers/scsi/qla2xxx/qla_def.h +++ b/drivers/scsi/qla2xxx/qla_def.h @@ -3850,6 +3850,7 @@ struct qla_hw_data { atomic_t num_pend_mbx_stage1; atomic_t num_pend_mbx_stage2; atomic_t num_pend_mbx_stage3; + uint16_t frame_payload_size; uint32_t login_retry_count; /* SNS command interfaces. */ diff --git a/drivers/scsi/qla2xxx/qla_gs.c b/drivers/scsi/qla2xxx/qla_gs.c index 74a7f372e3a7..9784cfaf14ab 100644 --- a/drivers/scsi/qla2xxx/qla_gs.c +++ b/drivers/scsi/qla2xxx/qla_gs.c @@ -2142,9 +2142,7 @@ qla2x00_fdmiv2_rhba(scsi_qla_host_t *vha) /* MAX CT Payload Length */ eiter = entries + size; eiter->type = cpu_to_be16(FDMI_HBA_MAXIMUM_CT_PAYLOAD_LENGTH); - eiter->a.max_ct_len = IS_FWI2_CAPABLE(ha) ? - le16_to_cpu(icb24->frame_payload_size) : - le16_to_cpu(ha->init_cb->frame_payload_size); + eiter->a.max_ct_len = cpu_to_be32(ha->frame_payload_size); eiter->a.max_ct_len = cpu_to_be32(eiter->a.max_ct_len); eiter->len = cpu_to_be16(4 + 4); size += 4 + 4; diff --git a/drivers/scsi/qla2xxx/qla_init.c b/drivers/scsi/qla2xxx/qla_init.c index 9b07610ae720..9c61d54dd9ad 100644 --- a/drivers/scsi/qla2xxx/qla_init.c +++ b/drivers/scsi/qla2xxx/qla_init.c @@ -4419,7 +4419,7 @@ qla2x00_nvram_config(scsi_qla_host_t *vha) cnt = (uint8_t *)icb->reserved_3 - (uint8_t *)icb->add_firmware_options; while (cnt--) *dptr1++ = *dptr2++; - + ha->frame_payload_size = le16_to_cpu(icb->frame_payload_size); /* Use alternate WWN? */ if (nv->host_p[1] & BIT_7) { memcpy(icb->node_name, nv->alternate_node_name, WWN_SIZE); @@ -6890,7 +6890,7 @@ qla24xx_nvram_config(scsi_qla_host_t *vha) (uint8_t *)&icb->interrupt_delay_timer; while (cnt--) *dptr1++ = *dptr2++; - + ha->frame_payload_size = le16_to_cpu(icb->frame_payload_size); /* * Setup driver NVRAM options. */ @@ -7946,7 +7946,7 @@ qla81xx_nvram_config(scsi_qla_host_t *vha) /* Use extended-initialization control block. */ memcpy(ha->ex_init_cb, &nv->ex_version, sizeof(*ha->ex_init_cb)); - + ha->frame_payload_size = le16_to_cpu(icb->frame_payload_size); /* * Setup driver NVRAM options. */