From patchwork Thu Aug 2 20:16:56 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Madhani, Himanshu" X-Patchwork-Id: 10554175 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 42B50157D for ; Thu, 2 Aug 2018 20:17:23 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2FA382C444 for ; Thu, 2 Aug 2018 20:17:23 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 243612C461; Thu, 2 Aug 2018 20:17:23 +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 97A242C48F for ; Thu, 2 Aug 2018 20:17:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729639AbeHBWKD (ORCPT ); Thu, 2 Aug 2018 18:10:03 -0400 Received: from mail-eopbgr730071.outbound.protection.outlook.com ([40.107.73.71]:60886 "EHLO NAM05-DM3-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1729660AbeHBWKD (ORCPT ); Thu, 2 Aug 2018 18:10:03 -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=ZJySAM+d5s1agJzpRQyv4z1+zKUd3gvdQf4CGnE7GsU=; b=Hbv8X6myE37vdzh+Cxnywzd/v0eK7ITzUOJK/VIg7TJVtlUZwgLqLJkXNmEnzSxzMZFuOgUTszyiOUWheLGJFBX/Obwrw4cV8t0ReLDSoJR94RW4zG+9AAmeGvgavED3JRbr5quMAGdLRlpq2mM8VmeflosQX/xfpoeVgzZP4tc= Received: from DM5PR07CA0100.namprd07.prod.outlook.com (2603:10b6:4:ae::29) by DM2PR0701MB1392.namprd07.prod.outlook.com (2a01:111:e400:511c::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.995.21; Thu, 2 Aug 2018 20:17:15 +0000 Received: from BY2NAM05FT006.eop-nam05.prod.protection.outlook.com (2a01:111:f400:7e52::208) by DM5PR07CA0100.outlook.office365.com (2603:10b6:4:ae::29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.1017.15 via Frontend Transport; Thu, 2 Aug 2018 20:17:15 +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 BY2NAM05FT006.mail.protection.outlook.com (10.152.100.143) 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; Thu, 2 Aug 2018 20:17:14 +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; Thu, 2 Aug 2018 13:17:02 -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 w72KH19r007994; Thu, 2 Aug 2018 13:17:01 -0700 Received: (from root@localhost) by dut1171.mv.qlogic.com (8.14.7/8.14.7/Submit) id w72KH1J5007993; Thu, 2 Aug 2018 13:17:01 -0700 From: Himanshu Madhani To: , CC: , Subject: [PATCH v3 14/16] qla2xxx: Save frame payload size from ICB Date: Thu, 2 Aug 2018 13:16:56 -0700 Message-ID: <20180802201658.7903-15-himanshu.madhani@cavium.com> X-Mailer: git-send-email 2.12.0 In-Reply-To: <20180802201658.7903-1-himanshu.madhani@cavium.com> References: <20180802201658.7903-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)(376002)(346002)(396003)(136003)(39860400002)(2980300002)(438002)(199004)(189003)(336012)(51416003)(4326008)(478600001)(446003)(126002)(72206003)(86362001)(48376002)(476003)(87636003)(80596001)(1076002)(44832011)(69596002)(50466002)(2616005)(186003)(76176011)(8676002)(8936002)(486006)(11346002)(316002)(81166006)(81156014)(2906002)(16586007)(26005)(50226002)(5660300001)(47776003)(106466001)(6666003)(36756003)(110136005)(305945005)(42186006)(356003)(106002)(54906003);DIR:OUT;SFP:1101;SCL:1;SRVR:DM2PR0701MB1392;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;BY2NAM05FT006;1:m1pv8LxnmFX19TJv9EGGO5W2oyiSiYY3q/40Yhtqmqtd1cIgszgj/B6R108u3YC9PR/k+6Khk3U1AOrrgJiBVXDXku+jGV9eH6l7ikDaXmScu1xM+j+01Nl0aDkU1lIg X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: e3e76d9d-5c8e-4d7f-0dcd-08d5f8b4f048 X-Microsoft-Antispam: BCL:0;PCL:0;RULEID:(7020095)(4652040)(8989117)(4534165)(4627221)(201703031133081)(201702281549075)(8990107)(5600074)(711020)(4608076)(2017052603328)(7153060);SRVR:DM2PR0701MB1392; X-Microsoft-Exchange-Diagnostics: 1;DM2PR0701MB1392;3:wuDtc+n3m5vktTwMy15qGBsuZ+ozOrRHLW4oIAiNmgW/VSiqc9PzWtu4KDFUNCD9UoHCv2+Yz59dUUagN7E4A3yUtGDQtqqXdAzehVyjqikzu/bc6IyiqphBQyIvr6ONHkz8Wzzbn+oWXex+gjCmmnN0yjpq6UxKhDTp+e5VLoIgMx8ZXUw7w39sh3JFoPA8QSFiw7UNTtDQ4SD1+mgvla05JfDDfa3+d+bvgjxtut0rmh1sJzOmeDGddC2bDUJSgeueQMuiJOpM6K7seP7LdKXLZrkQx+j7sHrX5dpzAcunxjdIYGVtJ5R3Wab6CSnZMUOl4fExa+qSSSRlkYXtGk9noDzTuGeFGT4VUDAdi5Q=;25:v8bVvH256cnhEsPBEXouk9KYzRAIQADcWa02oWx4ofl/8tlCjJuyetxxv5zV9C+kSBgVXxR9T7p4S+rHU7Nz3EM6LWjVKlEEyh0Cf1qVJsce6GvMsB/6jo4raDib3K8L7onyteO+RtWEM2BlpvsgUw+cCX0IZSZLmfZ7UHHNa/Jra/bW7H9WBQF24EaiazSIs6MysZ6ZQoSDQ/3A+g40zDRs9IHWAzi0a8qSN/nNqxB4eWIoHuu9ZSly4+WxWj6iurxMS6cC8FRMa3Ebr+Y0qV6xvh9zIXY7f1qu2nlKoblDbTYTWeWbnkCHjKPKn8E9OMCz0iKq7n1POudMm3luVw== X-MS-TrafficTypeDiagnostic: DM2PR0701MB1392: X-Microsoft-Exchange-Diagnostics: 1;DM2PR0701MB1392;31:8kXZLOdn2HxpSDKvAd2Y2L+RbF5LyXS8okmdWaP5Bjqu2VA9ouwoYwoBqQXOffrNGd4DmUovxa2vvjJni/LujmODn60x/A25wXDZ/IqcOXZdt9iBg1SbeqcmC+0hppgOqq9jbk8GG6NZw3RL9Z7Bv0jWdLdE/XccW07Mz/l0AXqh7BM0sS3aut24ZB1SKN5sp5784uKUNmprg0idc7ycE/+P31NGVTcaurEsyTIEzfA=;20:h00tK6wscpskWbOpc/ha94hXDyXu9bSjmfJL663qHXxadxp1UcUNnkXm6BvkSsZKwFN+TMfORVxaEBwvHT1NNPp3UInNtk7dJnmUzcG4YWrhoKWgF+bODHIKYggfR9itIly8LT0Dkozz+gVGYUPRd+EGc6ebXK9rKnAKVRKaAJIvDjnsE/XupArldCyCmsRhpSTd8KaAmSkpCpj8jCwhTJQpiDOWeQsruDjPirzUkSbH+rNiAED6AAMhOWj7AqVLu/bOc5jpGxPSeYqco/8/qrEIsoSElTCQhbfkzUDgo0+zxiTOQ5jXCVXGLvbjOcNm6mEbjrWSsx/3f3ifa3rB3dLrdWcDoEqmuejiXcH34ERRm+His0/ZGvTxUxBxQ+q7ukuno54LMXsioN7dd7AOJ/Mj56Pg25ZdxADR6wh3zkPwQEeNax3C+dpflNhdQhokuh/jfqwU83Cy1cGGPud737O/2fOWrFNbAjcpOvMERY5ZuzBRLO7alIkNAxUIT9Xf 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)(93006095)(93004095)(3231311)(944501410)(52105095)(3002001)(10201501046)(149027)(150027)(6041310)(20161123558120)(20161123562045)(20161123564045)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(6072148)(201708071742011)(7699016);SRVR:DM2PR0701MB1392;BCL:0;PCL:0;RULEID:;SRVR:DM2PR0701MB1392; X-Microsoft-Exchange-Diagnostics: 1;DM2PR0701MB1392;4:wj6hCDt8t9Qjzw9WcTxVOYT7EsyNgHcYWdL43487LsHE/25j+0g6ntxR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NqbH0urKfN0s93QT93Lx4WoeCHS93nVmzi8mX/98pzTehGgByMfX0Ykha91uUF81bcY/kmfLof6hgtPes9SM5/5qd3PERAebxRqxZK2YyEReJ6lUViVEhF2R+n8XkEAD2s5ABoFjADx1pQ==;5:CzHlzity5Q6gNejbedfLYVG5sS6CWdo1T//512H0HasmbznostwPeNXUjoJshgdqyLSUA1FyLnMi5TXt7C7Ga5FxZpPED3yIYyIctQw2fqzlHJIwlK0yobHdwStK5mRehJq76id1Uxh4Q+8hKiObCNdDZKkfiUeUmpOTlryKQew=;7:KH6c8e7uYpRSn6oIJFI54c+eyHfEYGgXNpALM60aRepc5eBuV4OyWePRrQRsZ82zK40bXv/2EDU6Hi0JhlJZiG/jUzkqYJcZGQWBaDxYKCtRhZXfxf4kmHdvqxCKzrrPdUgXOCq2mVTsf7Dh8JSnE+sEZHguEWdyXzy1rBExRSwdUTPd6P80xtM/vNj8v6lbO7GFPn7sPVzNSsylCiPV67ADjmZTTkox8+hy/T9T/YoBJS4RFKlVvjzWSV4DguXs SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: cavium.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Aug 2018 20:17:14.9661 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: e3e76d9d-5c8e-4d7f-0dcd-08d5f8b4f048 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: DM2PR0701MB1392 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 c3c7aa1cb86e..471322c29db6 100644 --- a/drivers/scsi/qla2xxx/qla_init.c +++ b/drivers/scsi/qla2xxx/qla_init.c @@ -4418,7 +4418,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); @@ -6893,7 +6893,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. */ @@ -7949,7 +7949,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. */