From patchwork Tue Nov 6 08:51:21 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Madhani, Himanshu" X-Patchwork-Id: 10669929 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 8FDED14BD for ; Tue, 6 Nov 2018 08:56:07 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7FB8B297C0 for ; Tue, 6 Nov 2018 08:56:07 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 73A432A241; Tue, 6 Nov 2018 08:56:07 +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 BEA00297C0 for ; Tue, 6 Nov 2018 08:56:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729821AbeKFSUQ (ORCPT ); Tue, 6 Nov 2018 13:20:16 -0500 Received: from mail-by2nam03on0083.outbound.protection.outlook.com ([104.47.42.83]:62936 "EHLO NAM03-BY2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1729416AbeKFSUQ (ORCPT ); Tue, 6 Nov 2018 13:20:16 -0500 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=b2b8mIdDUTrvHS1oDTwcEmYoPd1bxQY30Reb5U8xrZA=; b=jUQBpzSR6gvRn2UeGle3TUTX2fUjlr8fV6+ngCxAJycfn83ArTjlIKP8+ySXiPaCRrid2aCgFM70F/nXVXuasuPxD69DpDwvy6EFCRuZw+u8JbGZCxmfp5C+AqeGjK7Qht/itUDrF+4vLorbzKkpJ8C16kRHrAHd9oK613KRCCI= Received: from DM5PR07CA0026.namprd07.prod.outlook.com (2603:10b6:3:16::12) by CY1PR0701MB2092.namprd07.prod.outlook.com (2a01:111:e400:531e::26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1294.26; Tue, 6 Nov 2018 08:56:03 +0000 Received: from DM3NAM05FT043.eop-nam05.prod.protection.outlook.com (2a01:111:f400:7e51::206) by DM5PR07CA0026.outlook.office365.com (2603:10b6:3:16::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1294.25 via Frontend Transport; Tue, 6 Nov 2018 08:56:02 +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 DM3NAM05FT043.mail.protection.outlook.com (10.152.98.112) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA) id 15.20.1339.3 via Frontend Transport; Tue, 6 Nov 2018 08:56:02 +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, 6 Nov 2018 00:51:24 -0800 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 wA68pNMP013849; Tue, 6 Nov 2018 00:51:23 -0800 Received: (from root@localhost) by dut1171.mv.qlogic.com (8.14.7/8.14.7/Submit) id wA68pLxJ013848; Tue, 6 Nov 2018 00:51:21 -0800 From: Himanshu Madhani To: , CC: , Subject: [PATCH 1/1] qla2xxx: Initialize port speed to avoid setting lower speed Date: Tue, 6 Nov 2018 00:51:21 -0800 Message-ID: <20181106085121.13814-1-himanshu.madhani@cavium.com> X-Mailer: git-send-email 2.12.0 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)(39860400002)(136003)(396003)(376002)(2980300002)(438002)(199004)(189003)(47776003)(356004)(106002)(2616005)(476003)(16586007)(42186006)(478600001)(316002)(486006)(110136005)(54906003)(87636003)(72206003)(36756003)(44832011)(51416003)(48376002)(336012)(186003)(50466002)(106466001)(126002)(50226002)(1076002)(26005)(8936002)(4326008)(5660300001)(81156014)(8676002)(81166006)(69596002)(80596001)(86362001)(2906002)(305945005);DIR:OUT;SFP:1101;SCL:1;SRVR:CY1PR0701MB2092;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;DM3NAM05FT043;1:FTKQJGdluLmneh2aGCDzxuBIbeqEAnnbJij2lsn5NLO0TEhvQL63nPX2NZR/eCCIQhFZlbHkyDYn6oozGPL7zXAVfxUQGoZsOavvNsrKecofVPtQpKdJN+Mj7My7JcjH X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 63bce218-678b-405f-6db3-08d643c5ae08 X-Microsoft-Antispam: BCL:0;PCL:0;RULEID:(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600074)(711020)(4608076)(2017052603328)(7153060);SRVR:CY1PR0701MB2092; X-Microsoft-Exchange-Diagnostics: 1;CY1PR0701MB2092;3:HsQD9mczwQOQPVa1VLLR0v0rG9nHZY0Dta+D5+toxcNUup4vdXEccM9V+k6+W+7xODwlr/pWr85o0BFZ7n9WBcWXqOsRfKhgvfsdtbXy5XGGmSE37cvqhYfosKy773ecXo79JcJmzMvwwajVo9MU8wjJP8lMwUtgujMiEvDs0SA1OoVWfjo+5EsdOJYFcFSc8+/0lwsAG4ijfteBMZJvEmrcNyZrpAm5zH4zDNaEKf2TLiAw+OcUqfJzsBoPLXjDjSSC+IKKBCL2qx3ZwuaX6bg4sNVtwImSh6hDEK8en5b7sFbSGCxcwFlUmKTpGoA+sjMDAzxujhEtXebzz3pI9aq9OJ+taj3R0XnNsmgs8nM=;25:xyNTqo6xHkR/3FlhoiNdAMrP9ncWqffStEFndwEcJAUeRNMGcIDDA3EBucwL+dEHGoMiOzJVva+/vN/bGi4r+Wor7D1nPXC+1sYRsKm5+jWTHxIKVaBSbpG8lMM3aFRqyQMQ+YSVQ0ySsPQF7seb9YC8Y+qyWSI/2NaAaQM0xDABxrZIZdOcUH228ngJITzy7kWsG0gKhfo39dEcFj36VoAq8lCF2EktNSDtQiq6Sbk7JstexkmiEcIwPNMCDhpHyvn1Q4no+bKPpgkV7qrn/6rTc6fT8SgZUFLdC9vb2UnkjvmsqrkfPOZrt1ZvxMd85pHjKiDWSAtKk3lJFu+Guw== X-MS-TrafficTypeDiagnostic: CY1PR0701MB2092: X-Microsoft-Exchange-Diagnostics: 1;CY1PR0701MB2092;31:zW4kwlRhknKDGjIq7m81xK4hRAQMNZ27GfEKlX8dqOtN3AxgeDVpL9Fi/9G6rP59bjsgvHzCZCT/HKYhqrApS04ZeBgxjV7RjDFP18I+ArmKnS1Sg2kZJEBvCYQygqxBfzYKitanu/A6qJ0m/dOx+uxgnc6Ct/SmA61MeE2ESn2Yr0YXS9Dzm80F0BBNZMc7nh0o6lavai1kHzVnk/ONgWSnNTd+YMG2MIFkfYchLtQ=;20:FDCqg9Idgco0uj3intj7EWlfdHiVUNXmwbz3kc7OrSymaIbkzuCP8zKUY/LX7ijTeEW19yK7TM2tZdDmawMUKxDb+7qjSB48cNSnZrPTYopyujTnNkcYXxDmxqAn9nGbOpw9jpiQd43bdFsqaXPLZfOAvJdr7uo0c4mK1gmoDrw+y72q7+aK59awrGn4BhYfbHwgwrIHNH5WGXrwlKX91ovA++PaBAet4s8JerNO2v5Olw+jqD7se7QjbS16ZDR7oPH+tg9MqCOZgAHa08LKTtj7JPRZ+YFttO5Jsx9hx+kxr9LWGywMZra+Tlsrgk7WXC+FeBNon6LzOoHGKd6hJ5CiMJxlUADpfxAkys+hUe67QBNwsPekk9+JRpT6/HA6dwDUiQMx38QqbPgVfjEDEjMFOBVQnHIuf6PIUCA7I+Y3tpFGItK0oRVpTaznFdwgJAxt8PmrseVwOhgmbmoJeOW3wqXmhf899rxStCXzmFvij0K6baEtzjgrRxuKnVZG X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(9452136761055); X-MS-Exchange-SenderADCheck: 1 X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(10201501046)(3002001)(93006095)(93004095)(3231382)(944501410)(52105095)(148016)(149066)(150057)(6041310)(20161123562045)(20161123558120)(20161123560045)(20161123564045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(201708071742011)(7699051)(76991095);SRVR:CY1PR0701MB2092;BCL:0;PCL:0;RULEID:;SRVR:CY1PR0701MB2092; X-Microsoft-Exchange-Diagnostics: 1;CY1PR0701MB2092;4:sUDH7qlTLO17kh72Y7kiutfJB8ZHcNeabwkfW6CXespfenXVwmQbLNr7J+OWN/D6QWfhYkncekgLTs7uT6BSvQdLi2J0/TAnsG7jHh3hGJgAgU59ysC4oxk4yXgau9Jf+MLKieE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2+Gwpa8j/XkA==;5:KQ0DdQOkypR8yu/zEY/B0OwVgjShMkbdTJ2RjGRGZnWmlG9RMj4wq/m2LcN9xMUnzYo9bZGzMLGhuKDivFy1+Z5YqfYCUFOzMcYz/+or4TUuL3vRlFMUhCFrQQoEG2z43NydVy4bnm5cPBqSC5aI8DpRmeyiSbmtKCrtoe2X6bM=;7:ivZJpqWW0pHdhfeeC8gli91cjwrqZRQUrhR5xRLnHhnN5t8SwSZkM0Kqb0RStr1h8M1LC/9tpWIdrdnU/TXCH5R81yBJYueSYn0PR47QaUSXFTXEt5yokWZa/L2jVQ0uU318j42sseMPLVF62utBsg== SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: cavium.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Nov 2018 08:56:02.3941 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 63bce218-678b-405f-6db3-08d643c5ae08 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: CY1PR0701MB2092 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 This patch initializes port speed so that firmware does not set lower operating speed. Setting lower speed in firmware impacts WRITE perfomance. Fixes: 726b85487067 ("qla2xxx: Add framework for async fabric discovery") Cc: Singed-off-by: Quinn Tran Signed-off-by: Himanshu Madhani Tested-by: Laurence Oberman Reviewed-by: Ewan D. Milne --- Hi Martin, This patch fixes initialization issue for the driver which results into setting lower speed for WRITE transfer. In our latest experiments we have seen improvments of 47% for WRITE data Please apply this patch to 4.20/scsi-fixes for 4.20-rcX inclusion at your earliest convenience. Thanks, Himanshu --- drivers/scsi/qla2xxx/qla_init.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/scsi/qla2xxx/qla_init.c b/drivers/scsi/qla2xxx/qla_init.c index 36d67230c3b1..92d2c6866e35 100644 --- a/drivers/scsi/qla2xxx/qla_init.c +++ b/drivers/scsi/qla2xxx/qla_init.c @@ -4791,6 +4791,7 @@ qla2x00_alloc_fcport(scsi_qla_host_t *vha, gfp_t flags) fcport->loop_id = FC_NO_LOOP_ID; qla2x00_set_fcport_state(fcport, FCS_UNCONFIGURED); fcport->supported_classes = FC_COS_UNSPECIFIED; + fcport->fp_speed = PORT_SPEED_UNKNOWN; fcport->ct_desc.ct_sns = dma_alloc_coherent(&vha->hw->pdev->dev, sizeof(struct ct_sns_pkt), &fcport->ct_desc.ct_sns_dma,