From patchwork Wed Aug 1 06:13:33 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Madhani, Himanshu" X-Patchwork-Id: 10551761 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 2895D1822 for ; Wed, 1 Aug 2018 06:14:00 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 176F22A5FC for ; Wed, 1 Aug 2018 06:14:00 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0BCDE2A64D; Wed, 1 Aug 2018 06:14:00 +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 8E6A12A5FC for ; Wed, 1 Aug 2018 06:13:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1733248AbeHAH54 (ORCPT ); Wed, 1 Aug 2018 03:57:56 -0400 Received: from mail-cys01nam02on0084.outbound.protection.outlook.com ([104.47.37.84]:2226 "EHLO NAM02-CY1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1733157AbeHAH54 (ORCPT ); Wed, 1 Aug 2018 03:57:56 -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=kRikcNMEnTZKAlHLeiAmDLWVPAP7Hi/0So3Ea8nTKSQ=; b=iWW75IagzGSBK60c3m4fWSCODra2wbORlPJOha/PB2IyVJQxpuXktSd379hz9rglcOHkwrb56kxZ38LJ66AP9CTw8T7ogg8L3BnY2I6FNs+wmuYRVjSYzkjuiHQcnC4od3uZ4mp4T6PwoUgai/RxYEAgxhRemeZ3Qbkk9E1sL3k= Received: from SN4PR0701CA0001.namprd07.prod.outlook.com (10.161.192.139) by BL0PR07MB4068.namprd07.prod.outlook.com (52.132.10.138) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.995.17; Wed, 1 Aug 2018 06:13:52 +0000 Received: from BY2NAM05FT053.eop-nam05.prod.protection.outlook.com (2a01:111:f400:7e52::203) by SN4PR0701CA0001.outlook.office365.com (2603:10b6:803:28::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.1017.14 via Frontend Transport; Wed, 1 Aug 2018 06:13:51 +0000 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 BY2NAM05FT053.mail.protection.outlook.com (10.152.100.190) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA_P384) id 15.20.1038.3 via Frontend Transport; Wed, 1 Aug 2018 06:13:51 +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, 31 Jul 2018 23:13:37 -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 w716DcAZ028801; Tue, 31 Jul 2018 23:13:38 -0700 Received: (from root@localhost) by dut1171.mv.qlogic.com (8.14.7/8.14.7/Submit) id w716DcwW028800; Tue, 31 Jul 2018 23:13:38 -0700 From: Himanshu Madhani To: , CC: , Subject: [PATCH v2 14/16] qla2xxx: Save frame payload size from ICB Date: Tue, 31 Jul 2018 23:13:33 -0700 Message-ID: <20180801061335.28709-15-himanshu.madhani@cavium.com> X-Mailer: git-send-email 2.12.0 In-Reply-To: <20180801061335.28709-1-himanshu.madhani@cavium.com> References: <20180801061335.28709-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)(396003)(136003)(346002)(376002)(39860400002)(2980300002)(438002)(189003)(199004)(80596001)(336012)(486006)(26005)(126002)(87636003)(72206003)(6666003)(478600001)(476003)(305945005)(2906002)(186003)(81166006)(44832011)(11346002)(8936002)(81156014)(1076002)(8676002)(69596002)(2616005)(356003)(575784001)(86362001)(48376002)(106466001)(47776003)(446003)(76176011)(316002)(106002)(51416003)(54906003)(16586007)(110136005)(36756003)(42186006)(50226002)(52396003)(6346003)(50466002)(4326008)(5660300001);DIR:OUT;SFP:1101;SCL:1;SRVR:BL0PR07MB4068;H:CAEXCH02.caveonetworks.com;FPR:;SPF:Pass;LANG:en;PTR:50-232-66-26-static.hfc.comcastbusiness.net;MX:1;A:1; X-Microsoft-Exchange-Diagnostics: 1;BY2NAM05FT053;1:3N+dIEggMaMW+eOavjaOcoVXUK7iOXB8ij4GJgeE3heLNdRa81EXq9LQbe9fQlt+7w7fZ3SnUl3C2uF5MWStK26Ob2IdQ5s31t65SV2DyzjsQ/Jpw31REGNfYRZRSHmH X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: cfdfe10a-8473-480e-b9db-08d5f775f3b4 X-Microsoft-Antispam: BCL:0;PCL:0;RULEID:(7020095)(4652040)(8989117)(4534165)(4627221)(201703031133081)(201702281549075)(8990107)(5600074)(711020)(4608076)(2017052603328)(7153060);SRVR:BL0PR07MB4068; X-Microsoft-Exchange-Diagnostics: 1;BL0PR07MB4068;3:m6NGXlj521lNI8YtrgXVppf5rJbzeHRQ4r0Tshmeif4q24vOxQ2B61VVeBn33Ea77QdT3F3TT+bxSaaCvxE5aXLXP9fF+hCE0h1P8uVmnSqFDbtQBH7Gl70bCSSqMA/xdDoI8XD8YYVjActWfBiLKN2Qqli2/vfQBvEDiZ55ANvYL/eAPtCPuJs6THu87eNlbrg2pxqXdEx29dmaSRvYiV0UsAoKluP7Onr8IcczB+sF2Lq9MYwPELDhwY/dQUxaxGucFZZbwkuQqi2NYClQvIEBT0OEq+eK3Y0kklKORZJKGAAf2T0WzSaokD9PKE7Q7Bd71lWqYaKaGiNw6EJmCNQ07ZcjWMiMXv/v3O4qoss=;25:vYHIT9d3fQakxJppCw6EJlPpuTZaJsfRoIeQhdr7t0GX1cbU2Bn9vQZeyB4uX2/aVleJaf5DmHRflIAPeHLpsZ87mkJYl/0vdacYvvjEgwpBbwjx3Z8xKIYszvDDbP5WDA/1UIjCbW6zkStQfH7b19CLBuG7UfEwF4RJJKtozq8WOpxvHmbnGwKK51prz8G+h4l3a2PEEucQ5Ug7IN46So88CfUBhWKYYZOQCEbSDKvd0ES9ZKVfdpUiGxidIhaU1iVdRqgyByMZta0CXbS179c0ZFUhp2NckLjsPAADme5tn/ls1PES00imZwzv4Onk1+igg7/EpV4w5I5LWi9p0w== X-MS-TrafficTypeDiagnostic: BL0PR07MB4068: X-Microsoft-Exchange-Diagnostics: 1;BL0PR07MB4068;31:bm63QBZImjdMeqlj3A2PRxLNWby4BYVy4kVnwxx3cX/r2GLpdQLa/xKGYCHfCS9rj2P92lrw8vDLnOphtE/kTKSLTe++KXxCkjCgNoG+OeIdsBXH+/18h2ODaqMFUtMFf34vwCkZgMsXuPHE80JU5h1TCHf8XfChApd8lPGuFaQFU30/3x6Mkq3AMxy4EUetNY6dRGhSdkGpoIK9VdgEHC/CqACIL6zWD5JVodglEVs=;20:L43wBd8o55KKWh0pCauz096MNqyT6N/qnxbBSUVYymmems3JBVbyI1byAJICfgXJpvof8DnsL8zI8Toh43ywfsGBgc6Eznsw81Nzf/byWoSSWkEH3i4otwG8KgXmU2E6/OCY2mNL+OpJdJb+wlndl1xq1TAjxS5Xl6nUlQxN9Xr2uC2ViuGL2e9PUvkDcZEmN25wG3oXS91+SujGRYTzRq02hNWLvPn+aA4hRcJPa4e02duDyiUnaAe81SrId3xtnqXyKMtu5GJ5pzGn7mKMGUh+2391F8TNMrWrfQPQSS6EHvOAisBrJgQp0Hc2+8nvGcWh/HQJoeQ6sMRC6AgF4NpLLVnq1st6/AJa4Dp/dA2xV7DzIfO1SvJ+F8hblA8hlRe0wAqGMQLTe/SE3G89mZjZsJwiYksXo0kJwvozWo/VT/q3pOJ0jUV8O3NphxlLQl8EZ9QS77Rd04NrAunbT2C4zJXrpyhAEQkMmXu/QrJi2s5YWeD/STxuLTb6H46C 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)(8121501046)(5005006)(3002001)(93006095)(93004095)(3231311)(944501410)(52105095)(10201501046)(149027)(150027)(6041310)(20161123558120)(20161123564045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(20161123562045)(6072148)(201708071742011)(7699016);SRVR:BL0PR07MB4068;BCL:0;PCL:0;RULEID:;SRVR:BL0PR07MB4068; X-Microsoft-Exchange-Diagnostics: 1;BL0PR07MB4068;4:RQqbo25WjhyMUv2R1Jh1c6qnnjwjNzYAGutx5joI1igL7zVryRSRCNXPfPT0Y2ITDHpmeE534YGyodaLNlXqweontB/jCFIt7/BFQ7dTMwG9jWVDAsPHyEvauZCcAetYiTuDm+vOPfbX0B7f4UDoySAM3+HFCfP0fxZpjNtQDA6XxBizHc6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qQyFOyNxT4b4LlSlF4zMOawXLDApPkAMoaLzJz9zK/siDe6tuOoiTKsot82CWSf4jxHneJCvr5Aj+N7cX//RRnAqGG2VfA4giaIrt2/ow==;5:z0R/W4ZXK4zuiS2DYTH1jZur9disW8sAQ2rmn9LJV8lmTtX56I0sXmcsJTV2ewuTDXIfU7Kunfi4LVMHFgYgdKVY8kPPW1pe1JA0Y5bYQ1LmzxG5KUkI1n/QXmI0hk43cgtqrAFJprq0OwzGZk9EkOLFXgCVOcy2Ln/6Hox6Das=;7:vXrLQ52kUbsJLxVvp7UaX7m/bnvMCYI3aZl2Dqr3Y+6RQNcUbdsEX3XhFUYYYt+TYweWvTXDirVZEEHZ0kjjn+wFfHuiqidKlop1f9nTkBalwiD78C7+WU2nzs4o9eVemMRYlYcH+3kuHZ6Belkv5Q2l7iM90T1UQbLW5uvxwgWXGJq2X/zQ0hSorNHJkgtUP+BylpWVB6zDlMDetFkQTVhZoCGEq/xJb3xJE6f1aJxen4zwNhcgI51iA+m2MzyJ SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: cavium.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Aug 2018 06:13:51.2703 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: cfdfe10a-8473-480e-b9db-08d5f775f3b4 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: BL0PR07MB4068 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 0fc563572fad..d1ff1b8f1ae5 100644 --- a/drivers/scsi/qla2xxx/qla_def.h +++ b/drivers/scsi/qla2xxx/qla_def.h @@ -3848,6 +3848,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 5139a3577bb3..af9a75df6700 100644 --- a/drivers/scsi/qla2xxx/qla_gs.c +++ b/drivers/scsi/qla2xxx/qla_gs.c @@ -2134,9 +2134,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 a0c730bed312..924fe4265590 100644 --- a/drivers/scsi/qla2xxx/qla_init.c +++ b/drivers/scsi/qla2xxx/qla_init.c @@ -4417,7 +4417,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); @@ -6892,7 +6892,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. */ @@ -7948,7 +7948,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. */