Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp3058397imm; Sun, 1 Jul 2018 11:15:49 -0700 (PDT) X-Google-Smtp-Source: AAOMgpdRouTPjId23jws6sp/rGfjQq5VlxUXTevg1BwJN9AAAPiE48BpVYMTAolFUMCjoHD9rqtQ X-Received: by 2002:a62:57dc:: with SMTP id i89-v6mr10454172pfj.65.1530468949418; Sun, 01 Jul 2018 11:15:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530468949; cv=none; d=google.com; s=arc-20160816; b=GJI/6DEXEPlKeueCEJSNTqDJEh9lxH1Z/3fUCE5Q+JS3zXMIKPpv0D2Okq5jIxH2pZ Yt7LfDazLm9cfoEgtesVe/e7qODgVKcMDlgqpbRJfn4mWDYZopL4vD4vz/j9ZLH0lX30 g6DfUipuiwnlrVnCA5S5sJAvp9zc0+Jx4HgZ0hulxhbFqtAqsBf4bYtmhYqANlF9o1go 3zxBYSpgShJwaZlQTj3mZarTjsd1nCNkRwggel1BpJCb6juTzAU/xRJrJQcuXtgFMMJA 5Pos1MUQMluLmVdyUezoCY9slmeZMz9nUZvag9BmJb88vGPcba5SguK2h0I3GZJNhGIt mzHA== 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=utVO5hbbolseke/hfTbS+KgDPnDmQJ2nKknMc+CctHI=; b=kewHlMBerhsHJrEYhOLjgv1yUykgGJswaQih/Bb2tn82/Qtzmmvc0Ida2bpk6zZukU zhJMa8p+JQ1pKQ9Har/K4QWhkk27SoWNFsGoBVbZnvRUre0YrXOMWQkFz5/GMd0EZmYP jUEeZvY8P+fgBi81yTGfg1mkYXri6UY9O9JyenPVxAeWqYarj2maSNL8Kz2pamFvxdON Ooqta+iZ/Ca/fxqSo2HMTJs2jPO5HX96UcpsdttY9VSyUkhoGsQPqDlnJb2B7EZevl60 2FLsgJqCQcIqwUsYJr7RL5+NHqDI7VzukLBopROjQyGt+phfNBwmn/3RPusXe9MUPLiG PtHw== 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 z3-v6si14399605plb.246.2018.07.01.11.15.35; Sun, 01 Jul 2018 11:15:49 -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 S965396AbeGAQ0z (ORCPT + 99 others); Sun, 1 Jul 2018 12:26:55 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:33942 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965349AbeGAQ0l (ORCPT ); Sun, 1 Jul 2018 12:26:41 -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 CE298AD8; Sun, 1 Jul 2018 16:26:40 +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.9 056/101] scsi: qla2xxx: Fix setting lower transfer speed if GPSC fails Date: Sun, 1 Jul 2018 18:21:42 +0200 Message-Id: <20180701160759.390974887@linuxfoundation.org> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20180701160757.138608453@linuxfoundation.org> References: <20180701160757.138608453@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.9-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 @@ -3319,7 +3319,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,