Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp3003251imm; Sun, 1 Jul 2018 10:05:37 -0700 (PDT) X-Google-Smtp-Source: AAOMgpfjwC+p6V5V5uMydPWARwbh24hEpJX/juO4GhmDWtwYD7WrHomLM9AqxA1ZF8xLTYPVq/n9 X-Received: by 2002:a62:3f99:: with SMTP id z25-v6mr14747834pfj.250.1530464737609; Sun, 01 Jul 2018 10:05:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530464737; cv=none; d=google.com; s=arc-20160816; b=wDFDNTNtkGDI7hBVjZp7jTZoFq4o7mhSuWYnHYHKvoyqXKY/egGUsdN2fCk54Qfa++ GXliNsjpVB/u4zMtQCdL/LXF2HpHGRvi9GrKwoxMqJw05Xgvu6AoVDJt/r1t/d4t7/2x uII2/TRApS3qknl5IV3s0C4VtmnVGQcjYS4Mdb/CeJCQlgrYUmyWL96IglK7DDrG2Lhr 74Az7f4XCmtasX20VLpew/Nc9gJ6sjPEvFXkJ0d3xRG/dV6F+QVxk6J2GupbIwB24XK2 dpm+Royr+U/4qKx/pZaGxqsYWE1NsgTGoJzSNZl7rDnXA2nUocIPih1vR+Ss1fth56R7 rJdA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=Tg7RoJVyR4SwhbyegQuZ5y18eZSy3lMGcT7fLx0ce9o=; b=CDY2cM5Q5NBIZ9KRzQCe/Bw0DN8MiV53GdZC+p/PNJ30jvvh+TIQjRWXkTZ1E4uyCr XefY9wPyKBQkI7JoT1vI9JcdmN3JA1IzWdKzbeEmTphgcSW8jeoYykDrDb86wBcAAZBz Ya+3FYVhqndEqTR6u4k8U9Q9CgWlaBkBlYxtiq8r8YBKfaQtl01yGWF+AjGdZYKTe9/s RwmPwQUuy2zQ8ytUIUDibAN5mVQRpb8bjjcw0Gp7c9MQxCgmB6XzaHwqTkNpTNUt5LY5 oqFnGWqRQn3w+qL3p1xogtZiVbrkSwsVFs7LwA+HZU3k71pXfhqPZZql+2rtw6lf4vk7 BiTA== 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 h4-v6si12108749pgp.490.2018.07.01.10.05.23; Sun, 01 Jul 2018 10:05:37 -0700 (PDT) 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 S1032255AbeGAQmz (ORCPT + 99 others); Sun, 1 Jul 2018 12:42:55 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:37692 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1032060AbeGAQmq (ORCPT ); Sun, 1 Jul 2018 12:42:46 -0400 Received: from localhost (LFbn-1-12247-202.w90-92.abo.wanadoo.fr [90.92.61.202]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 43524AA6; Sun, 1 Jul 2018 16:42:45 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Himanshu Madhani , Eda Zhou , "Ewan D. Milne" , "Martin K. Petersen" Subject: [PATCH 4.17 135/220] scsi: qla2xxx: Fix setting lower transfer speed if GPSC fails Date: Sun, 1 Jul 2018 18:22:39 +0200 Message-Id: <20180701160913.952897399@linuxfoundation.org> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20180701160908.272447118@linuxfoundation.org> References: <20180701160908.272447118@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.17-stable 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. Cc: stable@vger.kernel.org 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: Greg Kroah-Hartman --- 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 @@ -5037,7 +5037,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,