Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp5988859ybc; Wed, 27 Nov 2019 13:00:09 -0800 (PST) X-Google-Smtp-Source: APXvYqwMQ02gJcgxc+QrZLrGadPv/Qh9z8q4kpvwryNhIo52cBOBLhjVmCuidjlKGlxq+8qC/YKq X-Received: by 2002:a17:906:f109:: with SMTP id gv9mr51571058ejb.196.1574888409000; Wed, 27 Nov 2019 13:00:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574888408; cv=none; d=google.com; s=arc-20160816; b=ulQhtBTWLw1IZb9Dc9ISPKukO3OT2AjiZVd0oHtQtEGx86p9tfCfKzg0sb2vtCWh0j uzjoDDYsMSJRXxzEOYRCU1K2vdhUobm/Q3MKw1pTrwyCnYztA4atuyjczXRqw/P4HJPc vkOyQvxwx0/mYYLD83DTLhHKnbuowoUdTXSFHwK43Hi/7AvHKyhMgEX7VqATjFE/DH8F YzC+27WhVQ6WX2SQhQU5WqX1evj2Rc9E84V9vlge7nEYE+wI9sCU0hdkYlKU9CPbFtey zL58a6KDIoYob1uvPAw/+6wBgY3EttNYJenLROZzdUIt6A4E8Yj43EthDD8CxYeq0icc ykzg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=Nvj4ygp94yMtIqM6UD5LmJvLB+KfKurZJZv3u/2ZZI8=; b=LRmlHdpEEWtMGlXgx/rK4P/xNgB3NDeYBcIspjaIo8GGZBAhPLsZrc6JdFQjFRB1pn C0rdt8UIo2emDuPBzcKtAvX7stw4GAhZcdwugddIa5epz3O7Up911CFzeAJ/H6TRtK+Y GJGodSJ8OcJUieqs80BuVLImL3+9VhMBb6SPy81GxlCW7gF9qwt8oEdBNUyczVJ3adkO ceQZNeRHOKJggOTn7+ecCcxbevM0+KdfZT448Y9Znd1cDAz2UClXX5yyJUNiTt7Orvfl XD111fx3r83kDYN0M5nEUjMTwuMkJm0tNvDxY+h3ZC+b3qTzhkCq7YF4oh2eyc8rJjWr PTHg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=ysvrSqtF; 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 g8si4571852eds.278.2019.11.27.12.59.45; Wed, 27 Nov 2019 13:00:08 -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; dkim=pass header.i=@kernel.org header.s=default header.b=ysvrSqtF; 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 S1731357AbfK0U6w (ORCPT + 99 others); Wed, 27 Nov 2019 15:58:52 -0500 Received: from mail.kernel.org ([198.145.29.99]:50160 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731345AbfK0U6r (ORCPT ); Wed, 27 Nov 2019 15:58:47 -0500 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 3221C2084B; Wed, 27 Nov 2019 20:58:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1574888326; bh=6eykspN3cd2v1dC2FZs8AixH9I5Z7C5N1now7YBSKs8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ysvrSqtFHcfsvk9xX0lA+/bPkpwu5ZbpCEz/xNfqZzD9Y/Dg+2gx4TLtgk0785wxB gsAtRL7nEsGsKER3IWF/W3RQLvQvTSSRVQghPj7TyKE+TgkMn65acDkkX5vcaBc3Xn 4njkECRTLew7Ryj2LUOIgDXG/KFG3mtXwKWmo9MI= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Luo Jiaxing , John Garry , "Martin K. Petersen" , Sasha Levin Subject: [PATCH 4.19 054/306] scsi: hisi_sas: Feed back linkrate(max/min) when re-attached Date: Wed, 27 Nov 2019 21:28:24 +0100 Message-Id: <20191127203118.734981846@linuxfoundation.org> X-Mailer: git-send-email 2.24.0 In-Reply-To: <20191127203114.766709977@linuxfoundation.org> References: <20191127203114.766709977@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Luo Jiaxing [ Upstream commit 5a54691f874ab29ec82f08bc6936866a3ccdaa91 ] At directly attached situation, if the user modifies the sysfs interface of maximum_linkrate and minimum_linkrate to renegotiate the linkrate between SAS controller and target, the value of both files mentioned above should have change to user setting after renegotiate is over, but it remains unchanged. To fix this bug, maximum_linkrate and minimum_linkrate will be directly fed back to relevant sas_phy structure. Signed-off-by: Luo Jiaxing Signed-off-by: John Garry Signed-off-by: Martin K. Petersen Signed-off-by: Sasha Levin --- drivers/scsi/hisi_sas/hisi_sas_main.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/scsi/hisi_sas/hisi_sas_main.c b/drivers/scsi/hisi_sas/hisi_sas_main.c index fd9d82c9033de..e9747379384b2 100644 --- a/drivers/scsi/hisi_sas/hisi_sas_main.c +++ b/drivers/scsi/hisi_sas/hisi_sas_main.c @@ -906,6 +906,9 @@ static void hisi_sas_phy_set_linkrate(struct hisi_hba *hisi_hba, int phy_no, _r.maximum_linkrate = max; _r.minimum_linkrate = min; + sas_phy->phy->maximum_linkrate = max; + sas_phy->phy->minimum_linkrate = min; + hisi_hba->hw->phy_disable(hisi_hba, phy_no); msleep(100); hisi_hba->hw->phy_set_linkrate(hisi_hba, phy_no, &_r); -- 2.20.1