Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3320195imu; Sun, 11 Nov 2018 12:17:44 -0800 (PST) X-Google-Smtp-Source: AJdET5ehT2TTrwLTVPwRPXZPMp8KPvZeHGpIvSKpQGRNl/rLaM0FO9Q43SGTZdUuGHYZR9xyhnbD X-Received: by 2002:a63:101d:: with SMTP id f29mr15157781pgl.38.1541967464671; Sun, 11 Nov 2018 12:17:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541967464; cv=none; d=google.com; s=arc-20160816; b=uyjU4mqFjeCD2uWS3hbneMNmj6CJpR9RSe33AGt9sDEenpgKnppCIq7EJD9YO6/gq8 +6qi3TNriqMK7dQkKmnK6Ylku2PI/+OolqOyiRXMCIdi8Qw6J8nBRh9vO7c+a6EMPVdB 9qpawN9gcYS+xoBrCuHN5vazUvVYmdbcJQ1e4ZrLAKznfcaWh9+jUco3ONed5OAT01xS qDqhgsOgY2ShHPaef2oVfbtojgx1oHakTKnq1gWZQ1ux+daOID0mS2AwhDgnZOKsePBG paoG/0eFn6w/zHh0CKxANvMhh8rodmtZ4VC8kcas1rdr2C/Dk+Kds79vSwjrHYlvscra MCGg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:subject:message-id:date:cc:to :from:mime-version:content-transfer-encoding:content-disposition; bh=auMIJvcrjR/n3Iy33A8s9T0orgHNfaQ/vuBmmwZbSuo=; b=tT2VOKAF/73X2ZrC6ovCdKgpPlKtdgmNzQVoiMqMlmZ6FXqNh6DBW6LAtmP4Do/+8t 4vLvF5UmHQ2ggNKAAHPeY6gTC1dmT8WJVPtE6B7685akGGv49ldAiUo4i9foLcLR4Wsw ZCTgv1lpdz14R+GcTyPixNlPqVbCOPlkWocW9EMQ6J7KKklxgzsJhUOVJo1hCVWtFQ2/ 8ugRWbtMgT1Aw839AjCUIXwCQ+J76G5aC16SX//osiJArZNNADwuS8DSjhLnFcGNuJGF j+nMtdNrj+XdEEqt4JwaEO4v+xgcjSUPdaGX2/dPYy6cR0odGYYvwi3RI/b64zFcJbuh XScA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u21si13862123pgg.463.2018.11.11.12.17.29; Sun, 11 Nov 2018 12:17:44 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731712AbeKLGF1 (ORCPT + 99 others); Mon, 12 Nov 2018 01:05:27 -0500 Received: from shadbolt.e.decadent.org.uk ([88.96.1.126]:53090 "EHLO shadbolt.e.decadent.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731042AbeKLGF0 (ORCPT ); Mon, 12 Nov 2018 01:05:26 -0500 Received: from [192.168.4.242] (helo=deadeye) by shadbolt.decadent.org.uk with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1gLvt4-0000oF-2a; Sun, 11 Nov 2018 19:59:14 +0000 Received: from ben by deadeye with local (Exim 4.91) (envelope-from ) id 1gLvsR-0001WV-El; Sun, 11 Nov 2018 19:58:35 +0000 Content-Type: text/plain; charset="UTF-8" Content-Disposition: inline Content-Transfer-Encoding: 8bit MIME-Version: 1.0 From: Ben Hutchings To: linux-kernel@vger.kernel.org, stable@vger.kernel.org CC: akpm@linux-foundation.org, "Martin K. Petersen" , "Eda Zhou" , "Ewan D. Milne" , "Himanshu Madhani" Date: Sun, 11 Nov 2018 19:49:05 +0000 Message-ID: X-Mailer: LinuxStableQueue (scripts by bwh) Subject: [PATCH 3.16 120/366] scsi: qla2xxx: Fix setting lower transfer speed if GPSC fails In-Reply-To: X-SA-Exim-Connect-IP: 192.168.4.242 X-SA-Exim-Mail-From: ben@decadent.org.uk X-SA-Exim-Scanned: No (on shadbolt.decadent.org.uk); SAEximRunCond expanded to false Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 3.16.61-rc1 review patch. If anyone has any objections, please let me know. ------------------ From: Himanshu Madhani commit 413c2f33489b134e3cc65d9c3ff7861e8fdfe899 upstream. This patch prevents driver from setting lower default speed of 1 GB/sec, if the switch does not support Get Port Speed Capabilities (GPSC) command. Setting this default speed results into much lower write performance for large sequential WRITE. This patch modifies driver to check for gpsc_supported flags and prevents driver from issuing MBC_SET_PORT_PARAM (001Ah) to set default speed of 1 GB/sec. If driver does not send this mailbox command, firmware assumes maximum supported link speed and will operate at the max speed. Signed-off-by: Himanshu Madhani Reported-by: Eda Zhou Reviewed-by: Ewan D. Milne Tested-by: Ewan D. Milne Signed-off-by: Martin K. Petersen Signed-off-by: Ben Hutchings --- drivers/scsi/qla2xxx/qla_init.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) --- a/drivers/scsi/qla2xxx/qla_init.c +++ b/drivers/scsi/qla2xxx/qla_init.c @@ -3205,7 +3205,8 @@ qla2x00_iidma_fcport(scsi_qla_host_t *vh return; if (fcport->fp_speed == PORT_SPEED_UNKNOWN || - fcport->fp_speed > ha->link_data_rate) + fcport->fp_speed > ha->link_data_rate || + !ha->flags.gpsc_supported) return; rval = qla2x00_set_idma_speed(vha, fcport->loop_id, fcport->fp_speed,