From patchwork Wed Dec 4 17:55:08 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg Kroah-Hartman X-Patchwork-Id: 180834 Delivered-To: patch@linaro.org Received: by 2002:a92:3001:0:0:0:0:0 with SMTP id x1csp942574ile; Wed, 4 Dec 2019 10:11:00 -0800 (PST) X-Google-Smtp-Source: APXvYqycP1sHS1bCCYEUg91vnVbaG0QldZNFJYK7FLkFnzd7deu58IdPxtyTThLPBmzEF6ryNsUB X-Received: by 2002:a05:6830:1e81:: with SMTP id n1mr3471605otr.53.1575483056910; Wed, 04 Dec 2019 10:10:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1575483056; cv=none; d=google.com; s=arc-20160816; b=e7aGqZwRDvQXmlWUCbUJ1LXyl3ULT62G8eJXV5hjQJfscEGEryi9KTJthbM7hGoasv IDkaT3cCxs1TQT+2tLdEiZdcI5LTAthTAqRsS1LQJ1PSMP4a4prGDmzrkKqJLrC5YlqC 9q4xRhphsYra1GSvgN2co2zSPKlRTlZqFvXAJlgwBpTId4qrtcJw+QmA30K3NCxNvAxt I33o2QBUP5eCkqG21DpdMjkqSfVOlPPjo6XPdgb+oqB44qlgXc5YlGT7iS+72/en6S3A DHYUMI1g7X8KKVPkCI2E2STpWQBoJ/NOliGpZWUR8Gkld9ROkEbe4MddLjQE6qhJKj9J M6JA== 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=9aia7+Z/YS1mY7iCpGJde4gg0MntPnfmVy3R/BOFR7c=; b=vWblJgwlZFjw1uw3p4JCS8/6mTT5jLUctfX4YIGBYblLNJS6q5tDCYU2QcUN8ZyB75 snUNCNfcVmdhVZt8auqRHc9eE1FSCZNTVJeTeMVjK7EE5cSXpWzSy8brgeAZqALfQMFs uv9XBf8HpZyAMEBI0L/+bwxSx8//ffewxUm2w9wZBcu7qGL8qGHKF3ZDIvxEOYPH4Hyg 7L3OKHueBv6V7h6Nx4jsh9p7bz+kQsmYXgEly+wrIjEc3kRLYCx31Bku1/n1kGRYHDkx xj7pUY4ZrzvlCKBdhUPTKhtRevSdB4fNmjZT7T7zUEOB0EDomwGbg8shHgb4Up0MzbCs phQA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=SeqAPmI+; 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 p12si3525953otk.86.2019.12.04.10.10.55; Wed, 04 Dec 2019 10:10:56 -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=SeqAPmI+; 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 S1730993AbfLDSKx (ORCPT + 27 others); Wed, 4 Dec 2019 13:10:53 -0500 Received: from mail.kernel.org ([198.145.29.99]:38522 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731325AbfLDSKs (ORCPT ); Wed, 4 Dec 2019 13:10:48 -0500 Received: from localhost (unknown [217.68.49.72]) (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 54C9120833; Wed, 4 Dec 2019 18:10:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1575483047; bh=GNrThHvp51OQUW6thM0FBK86TAxOtmVirBWYAuPFsDE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=SeqAPmI+A8yJmeFpIU4VjpsLHdg2W86VahPFY1bn+ZcPIKLg8B4BDhUkShCUSmkGz YCwfzVn3SkAKdnODVyFuLzEF8cLlZb7fKoSGTPBqU5TwtSK5bTFBmizS3i75c5JbqU uZrwPADCkh3cppkdHXFJ2eawNgrJL1tloxUMAC9g= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, "Reported-by: Marian Mihailescu" , Marek Szyprowski , Sylwester Nawrocki , Sasha Levin Subject: [PATCH 4.9 003/125] clk: samsung: exynos5420: Preserve PLL configuration during suspend/resume Date: Wed, 4 Dec 2019 18:55:08 +0100 Message-Id: <20191204175310.136962421@linuxfoundation.org> X-Mailer: git-send-email 2.24.0 In-Reply-To: <20191204175308.377746305@linuxfoundation.org> References: <20191204175308.377746305@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Marek Szyprowski [ Upstream commit e9323b664ce29547d996195e8a6129a351c39108 ] Properly save and restore all top PLL related configuration registers during suspend/resume cycle. So far driver only handled EPLL and RPLL clocks, all other were reset to default values after suspend/resume cycle. This caused for example lower G3D (MALI Panfrost) performance after system resume, even if performance governor has been selected. Reported-by: Reported-by: Marian Mihailescu Fixes: 773424326b51 ("clk: samsung: exynos5420: add more registers to restore list") Signed-off-by: Marek Szyprowski Signed-off-by: Sylwester Nawrocki Signed-off-by: Sasha Levin --- drivers/clk/samsung/clk-exynos5420.c | 6 ++++++ 1 file changed, 6 insertions(+) -- 2.20.1 diff --git a/drivers/clk/samsung/clk-exynos5420.c b/drivers/clk/samsung/clk-exynos5420.c index 13c09a740840b..2bb88d1251136 100644 --- a/drivers/clk/samsung/clk-exynos5420.c +++ b/drivers/clk/samsung/clk-exynos5420.c @@ -170,12 +170,18 @@ static const unsigned long exynos5x_clk_regs[] __initconst = { GATE_BUS_CPU, GATE_SCLK_CPU, CLKOUT_CMU_CPU, + CPLL_CON0, + DPLL_CON0, EPLL_CON0, EPLL_CON1, EPLL_CON2, RPLL_CON0, RPLL_CON1, RPLL_CON2, + IPLL_CON0, + SPLL_CON0, + VPLL_CON0, + MPLL_CON0, SRC_TOP0, SRC_TOP1, SRC_TOP2, From patchwork Wed Dec 4 17:55:27 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg Kroah-Hartman X-Patchwork-Id: 180840 Delivered-To: patch@linaro.org Received: by 2002:a92:3001:0:0:0:0:0 with SMTP id x1csp950336ile; Wed, 4 Dec 2019 10:17:08 -0800 (PST) X-Google-Smtp-Source: APXvYqzncZGTm7gbEPNMVABAoN77rhWXBrO5ej8g2ACPr3TvA3PRqXeduVuS9NA5ytJkjfOHd0i4 X-Received: by 2002:aca:cd92:: with SMTP id d140mr3604239oig.68.1575483033694; Wed, 04 Dec 2019 10:10:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1575483033; cv=none; d=google.com; s=arc-20160816; b=g7CmaeI12dvzDSPrzLrvhbLrAYzdDBF2gPDcowUYX2SonrhXdLzAA+SJslJ0QknAu9 spIwx+LtBYbAm8g1TP0dnhVxolqb/8M7xNxLtyQswQmeOqEVEbeYWjvTGIvu8JMGpq9Y ZFZMoRYvHSO1thPN16DUFM89isuIqn1i3m7HCwY/AFrUBRcdxP7Xos7ee+b3AsI+yYV9 XjIhX6R3ye7EfG3phqtRpSBBN0q7gUiw1FIGQdKOY7UUbEaKAPsC55FkblaBAdF+LpM+ BX7JLzJmrmh6J3ZYKUeuUx3NcamyL68PLTM7jkIuX6Qq/LBYIQGBDRTZZBxNd92yK2Ru arvA== 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=xyVPCHftke5kiY05JTiPiDMFPM23+/maJR7GZzivlfs=; b=A9fjV5r0xtdPiX+5gUoCLYqNo+hKepPR+Dyy4WztDuZvh6slKbJgJkANcW/7CGCZlL Wdk9Cze76yz15JHb//gdiV3UjVn7xqT0ovc/S81cJr6ZjypxGZytJLPc/MWXDZ7Yt5jz rPKEwTpT3tyt8Ri9xdOPCqF5IA7jQ8tlvVWJb89tujlg8RCHbgx9R19xgFaLifdX1byk R2AgVjkoVMENRuch3tyfX1eNih3x623nrs8/7szw7zWN4FxBKH3Z/ENgPM3JyTXwybSI T83bbLgKBpKYZx7zfKQAgxbTtrCp/HHui8gQmgMYhRdMEoXI1F/UiqL/KFVSA+qYwK/T n1JA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="Lj1X/L5/"; 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 g2si3790633otn.117.2019.12.04.10.10.33; Wed, 04 Dec 2019 10:10:33 -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="Lj1X/L5/"; 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 S1731281AbfLDSKc (ORCPT + 27 others); Wed, 4 Dec 2019 13:10:32 -0500 Received: from mail.kernel.org ([198.145.29.99]:37770 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731260AbfLDSK3 (ORCPT ); Wed, 4 Dec 2019 13:10:29 -0500 Received: from localhost (unknown [217.68.49.72]) (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 121EA20675; Wed, 4 Dec 2019 18:10:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1575483028; bh=OzYtwF3JQAAv1AmFBZhtaXfAlBLGifIQv0NrdVQPlHM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Lj1X/L5/Tkhzei8MB+vzWmjgonyJ0uCw6Ydr1zEXg3D5fY6KjJbcpiHN8MTfaHQmh LPTqwLpYfBhKT0NDq0G465C4slJJvJ5HpXaN41Tyq6MuHBW5K4JtPXyh/rJfnmHngy 8jssZQlQobFVMk8g4Ip8TLM+pmobnuk9lzNbKwBg= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Arnd Bergmann , Olof Johansson , Sasha Levin Subject: [PATCH 4.9 022/125] ARM: ks8695: fix section mismatch warning Date: Wed, 4 Dec 2019 18:55:27 +0100 Message-Id: <20191204175318.999667463@linuxfoundation.org> X-Mailer: git-send-email 2.24.0 In-Reply-To: <20191204175308.377746305@linuxfoundation.org> References: <20191204175308.377746305@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Arnd Bergmann [ Upstream commit 4aa64677330beeeed721b4b122884dabad845d66 ] WARNING: vmlinux.o(.text+0x13250): Section mismatch in reference from the function acs5k_i2c_init() to the (unknown reference) .init.data:(unknown) The function acs5k_i2c_init() references the (unknown reference) __initdata (unknown). This is often because acs5k_i2c_init lacks a __initdata annotation or the annotation of (unknown) is wrong. Signed-off-by: Arnd Bergmann Signed-off-by: Olof Johansson Signed-off-by: Sasha Levin --- arch/arm/mach-ks8695/board-acs5k.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.20.1 diff --git a/arch/arm/mach-ks8695/board-acs5k.c b/arch/arm/mach-ks8695/board-acs5k.c index e4d709c8ed32f..76d3083f1f634 100644 --- a/arch/arm/mach-ks8695/board-acs5k.c +++ b/arch/arm/mach-ks8695/board-acs5k.c @@ -92,7 +92,7 @@ static struct i2c_board_info acs5k_i2c_devs[] __initdata = { }, }; -static void acs5k_i2c_init(void) +static void __init acs5k_i2c_init(void) { /* The gpio interface */ platform_device_register(&acs5k_i2c_device); From patchwork Wed Dec 4 17:55:36 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg Kroah-Hartman X-Patchwork-Id: 180835 Delivered-To: patch@linaro.org Received: by 2002:a92:3001:0:0:0:0:0 with SMTP id x1csp942748ile; Wed, 4 Dec 2019 10:11:08 -0800 (PST) X-Google-Smtp-Source: APXvYqzhZxQqRX7uARhKXTxF54wZJCTR0vuqeYV7mw+kZ62fNr5chbGW8ek+UIo+YYj2YtPOvhu1 X-Received: by 2002:a05:6830:1f4b:: with SMTP id u11mr3519461oth.60.1575483068016; Wed, 04 Dec 2019 10:11:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1575483068; cv=none; d=google.com; s=arc-20160816; b=M/QnE+hwIBjQJ0q5f4SKTcxsNOnjJAcyEEFEbh08PO4ToFBIqMoWSq6JqMHX6aNZe6 qUxu5HPzrO6HVa6IbjqAQMQFr2rexHVigH1PoLKD615hU9tFEq6kZ1alZF038trMSesc rQjXYdKtyPOhTuzr9RiQfzr2a2rFNaV1+T31/pKrAXgbtOWgZkvSyYPz4bCrEiivM73W q2n98h6utESgvlFlJb/Uki32nbMmI4fl5CMwrRs3Hto449e2kLNgG/kZkwsyakio9ua7 67wb7TleffY3VcrWY4t29EIGdRlWTsPwwjHgotPTn7lsWNKnpiKAclHtXqqNOwLC88lH 6PNA== 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=aJu6ZyW86PWD0uwklrQqIvyNi53pfS3MBNokozcVlDE=; b=IRIHKTy5KeJafn38zUhkA/I6G4Gg1TbdsvshqY+jeMSADkk6369KEQMtlG/rCJ396o OnBaGNCCyENuaWkrJtaVCE24m4hG7rMTd6jnXoBulrFU0wiF9zY96USefui522ktbXxB +UMaq8BOSR2ZfvmNiXUsJcWu9xNYJZkbQ+ji8W0tG4dHVOeEHtLJ2qR2kR1REekwjOz/ WfO2UkRvxlZQ0OfxgNOVnofAIFmoqT5hbyzAAEOLAEm+SGDjHoMn7cKTfUg1DS+Xrixz dHiXkhMRuJVxBrhjTYnwu+rbf1kzuXzHfLbyQcYRc8KaKrw11mfMORPBxFI/sQD75NRK BR0g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="s+d1Bi/y"; 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 y191si3555044oia.160.2019.12.04.10.10.58; Wed, 04 Dec 2019 10:11: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="s+d1Bi/y"; 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 S1731345AbfLDSK4 (ORCPT + 27 others); Wed, 4 Dec 2019 13:10:56 -0500 Received: from mail.kernel.org ([198.145.29.99]:38660 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731337AbfLDSKx (ORCPT ); Wed, 4 Dec 2019 13:10:53 -0500 Received: from localhost (unknown [217.68.49.72]) (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 3B8E52084B; Wed, 4 Dec 2019 18:10:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1575483052; bh=ZCOYm7uvTGNlci+Nc06dmUObDmY7JSDWXNomo+BzJS4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=s+d1Bi/yn4L81yP3bVx1HQFoGYdlfe2qQ9ACp2dYcGzToE/A/w35OJXDD5aTonwg7 XGUMAgfNP4oBiiYLcCaf7+nG6IRla4X4sv5uTFDvXku4iivweKvqq+65vDR7I9tmLU fhHK9E+ych7gGmldImMihpLEcj0kQWVc+3Y/xYiE= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Masahiro Yamada , Michal Simek , Sasha Levin Subject: [PATCH 4.9 031/125] microblaze: adjust the help to the real behavior Date: Wed, 4 Dec 2019 18:55:36 +0100 Message-Id: <20191204175320.887612811@linuxfoundation.org> X-Mailer: git-send-email 2.24.0 In-Reply-To: <20191204175308.377746305@linuxfoundation.org> References: <20191204175308.377746305@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Masahiro Yamada [ Upstream commit bafcc61d998c1ca18f556d92a0e95335ac68c7da ] "make ARCH=microblaze help" mentions simpleImage.
.unstrip, but it is not a real Make target. It does not work because Makefile assumes "system.unstrip" is the name of DT. $ make ARCH=microblaze CROSS_COMPILE=microblaze-linux- simpleImage.system.unstrip [ snip ] make[1]: *** No rule to make target 'arch/microblaze/boot/dts/system.unstrip.dtb', needed by 'arch/microblaze/boot/dts/system.dtb'. Stop. make: *** [Makefile;1060: arch/microblaze/boot/dts] Error 2 make: *** Waiting for unfinished jobs.... simpleImage.
works like a phony target that generates multiple images. Reflect the real behavior. I removed the DT directory path information because it is already explained a few lines below. While I am here, I deleted the redundant *_defconfig explanation. The top-level Makefile caters to list available defconfig files: mmu_defconfig - Build for mmu nommu_defconfig - Build for nommu Signed-off-by: Masahiro Yamada Signed-off-by: Michal Simek Signed-off-by: Sasha Levin --- arch/microblaze/Makefile | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) -- 2.20.1 diff --git a/arch/microblaze/Makefile b/arch/microblaze/Makefile index 740f2b82a182a..5e1e18540a571 100644 --- a/arch/microblaze/Makefile +++ b/arch/microblaze/Makefile @@ -83,11 +83,11 @@ define archhelp echo '* linux.bin - Create raw binary' echo ' linux.bin.gz - Create compressed raw binary' echo ' linux.bin.ub - Create U-Boot wrapped raw binary' - echo ' simpleImage.
- ELF image with $(arch)/boot/dts/
.dts linked in' - echo ' - stripped elf with fdt blob' - echo ' simpleImage.
.unstrip - full ELF image with fdt blob' - echo ' *_defconfig - Select default config from arch/microblaze/configs' - echo '' + echo ' simpleImage.
- Create the following images with
.dtb linked in' + echo ' simpleImage.
: raw image' + echo ' simpleImage.
.ub : raw image with U-Boot header' + echo ' simpleImage.
.unstrip: ELF (identical to vmlinux)' + echo ' simpleImage.
.strip : stripped ELF' echo ' Targets with
embed a device tree blob inside the image' echo ' These targets support board with firmware that does not' echo ' support passing a device tree directly. Replace
with the' From patchwork Wed Dec 4 17:56:45 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg Kroah-Hartman X-Patchwork-Id: 180838 Delivered-To: patch@linaro.org Received: by 2002:a92:3001:0:0:0:0:0 with SMTP id x1csp949192ile; Wed, 4 Dec 2019 10:16:12 -0800 (PST) X-Google-Smtp-Source: APXvYqzEJjEgNbBjPnKE6Z69Rhtk8jGufds4P3zEQrvIqC2cJRPSsZCJ5zhdA549z8qYF/f7GX/M X-Received: by 2002:a05:6830:591:: with SMTP id c17mr3307931oth.226.1575483372169; Wed, 04 Dec 2019 10:16:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1575483372; cv=none; d=google.com; s=arc-20160816; b=eXDYGePDDAdLYdE1C4LCGjwiQw50Wm/hVkuz9ls1K0dsWBMO+Sb19rux77tPU1n/Lj T/sT/TQRbgQ1q7GzjSKaRbhkLv6oal3S25InPzlUugO3SGb+e0mSKGnXmCpQ6JsBdq9V lRYoQXtYzkKpkIxnnKFGWVlHkxesLvcI8BqZVoqwHFLxdPZIOsxyRs77yzFuJ12o1ecv sUVbFSCDFDJseH0a3zIKrRxnSRNgQZAjQASNvuJoOorYScXu7Gj5qYZP2h4TMnCpMpgx m1zem2hEv1DmayM32XQ6cGMx5fF8904FGbSJD5G+GA7RRwq9vX3o8PJm/Em9n2ep9Ktx e+4Q== 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=pXhJFdyC9Q3iFGXUDnxWfDp1jyJaJavq5YFFXEsv+nA=; b=FfL38d1xZAeQyilv6jf3Nw1esyq8sX3wYoM47drJoJj616BEY4zpfRq2/mMbF1D4Wu XoIdDRxcLGaSh49omwRDivZxWypIRpAbLf7ozy42qHqxd4Z0yErNB+SuzfxjTovHt/nA kqwVG1jb1Ln2Cpw4ruXorB05rroYrG0sUwtcn9oZIBE0HD4w7U+I9jn9++rNABb8cLG7 Rvr7FOT7g5ve3jJVbHZuRLH50oNImgFsw+5Dkp0S8jovyhOFOCWolaChyQOypnEQpsWZ JASVUx4dKPuvWVbs9AtKKz+dc/muzesjb7J/Tfao7LSBH6EzRexEDDor/+5vJD5H8gq7 JZVA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=D+p+UrNC; 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 c12si3785527otn.7.2019.12.04.10.16.10; Wed, 04 Dec 2019 10:16:12 -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=D+p+UrNC; 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 S1731703AbfLDSQG (ORCPT + 27 others); Wed, 4 Dec 2019 13:16:06 -0500 Received: from mail.kernel.org ([198.145.29.99]:42752 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731753AbfLDSNf (ORCPT ); Wed, 4 Dec 2019 13:13:35 -0500 Received: from localhost (unknown [217.68.49.72]) (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 4509320674; Wed, 4 Dec 2019 18:13:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1575483214; bh=Oq84LTVSVC75WPxhcTGPrRuAJow9CRZ9cyQfe033SG0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=D+p+UrNCTgWJ2QcBtvTFluOkX0Tq1Of/q6/VJ5pQJ6otrZ5MDfhTGAMlUUSMJAUlQ 4ZHloam7fyfffNvqJux8bTLQRoUwSyGsi7kZmoE5iGlVxz3l42VFXuvv0ydWdlKJ4a 9rb99W/QXpm6/pyuLetfF4bNQfHh1jLbglKt6vjA= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Jian Luo , John Garry , "Martin K. Petersen" , Sasha Levin Subject: [PATCH 4.9 100/125] scsi: libsas: Support SATA PHY connection rate unmatch fixing during discovery Date: Wed, 4 Dec 2019 18:56:45 +0100 Message-Id: <20191204175325.182554385@linuxfoundation.org> X-Mailer: git-send-email 2.24.0 In-Reply-To: <20191204175308.377746305@linuxfoundation.org> References: <20191204175308.377746305@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: John Garry [ Upstream commit cec9771d2e954650095aa37a6a97722c8194e7d2 ] +----------+ +----------+ | | | | | |--- 3.0 G ---| |--- 6.0 G --- SAS disk | | | | | |--- 3.0 G ---| |--- 6.0 G --- SAS disk |initiator | | | | device |--- 3.0 G ---| Expander |--- 6.0 G --- SAS disk | | | | | |--- 3.0 G ---| |--- 6.0 G --- SATA disk -->failed to connect | | | | | | | |--- 6.0 G --- SATA disk -->failed to connect | | | | +----------+ +----------+ According to Serial Attached SCSI - 1.1 (SAS-1.1): If an expander PHY attached to a SATA PHY is using a physical link rate greater than the maximum connection rate supported by the pathway from an STP initiator port, a management application client should use the SMP PHY CONTROL function (see 10.4.3.10) to set the PROGRAMMED MAXIMUM PHYSICAL LINK RATE field of the expander PHY to the maximum connection rate supported by the pathway from that STP initiator port. Currently libsas does not support checking if this condition occurs, nor rectifying when it does. Such a condition is not at all common, however it has been seen on some pre-silicon environments where the initiator PHY only supports a 1.5 Gbit maximum linkrate, mated with 12G expander PHYs and 3/6G SATA phy. This patch adds support for checking and rectifying this condition during initial device discovery only. We do support checking min pathway connection rate during revalidation phase, when new devices can be detected in the topology. However we do not support in the case of the the user reprogramming PHY linkrates, such that min pathway condition is not met/maintained. A note on root port PHY rates: The libsas root port PHY rates calculation is broken. Libsas sets the rates (min, max, and current linkrate) of a root port to the same linkrate of the first PHY member of that same port. In doing so, it assumes that all other PHYs which subsequently join the port to have the same negotiated linkrate, when they could actually be different. In practice this doesn't happen, as initiator and expander PHYs are normally initialised with consistent min/max linkrates. This has not caused an issue so far, so leave alone for now. Tested-by: Jian Luo Signed-off-by: John Garry Signed-off-by: Martin K. Petersen Signed-off-by: Sasha Levin --- drivers/scsi/libsas/sas_expander.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) -- 2.20.1 diff --git a/drivers/scsi/libsas/sas_expander.c b/drivers/scsi/libsas/sas_expander.c index d44f18f773c0f..b7e4493d3dc16 100644 --- a/drivers/scsi/libsas/sas_expander.c +++ b/drivers/scsi/libsas/sas_expander.c @@ -806,6 +806,26 @@ static struct domain_device *sas_ex_discover_end_dev( #ifdef CONFIG_SCSI_SAS_ATA if ((phy->attached_tproto & SAS_PROTOCOL_STP) || phy->attached_sata_dev) { + if (child->linkrate > parent->min_linkrate) { + struct sas_phy_linkrates rates = { + .maximum_linkrate = parent->min_linkrate, + .minimum_linkrate = parent->min_linkrate, + }; + int ret; + + pr_notice("ex %016llx phy%02d SATA device linkrate > min pathway connection rate, attempting to lower device linkrate\n", + SAS_ADDR(child->sas_addr), phy_id); + ret = sas_smp_phy_control(parent, phy_id, + PHY_FUNC_LINK_RESET, &rates); + if (ret) { + pr_err("ex %016llx phy%02d SATA device could not set linkrate (%d)\n", + SAS_ADDR(child->sas_addr), phy_id, ret); + goto out_free; + } + pr_notice("ex %016llx phy%02d SATA device set linkrate successfully\n", + SAS_ADDR(child->sas_addr), phy_id); + child->linkrate = child->min_linkrate; + } res = sas_get_ata_info(child, phy); if (res) goto out_free; From patchwork Wed Dec 4 17:56:47 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg Kroah-Hartman X-Patchwork-Id: 180836 Delivered-To: patch@linaro.org Received: by 2002:a92:3001:0:0:0:0:0 with SMTP id x1csp946006ile; Wed, 4 Dec 2019 10:13:47 -0800 (PST) X-Google-Smtp-Source: APXvYqwbltRT0j6C6fJsICn0J1qU9KKKbVcp0e4HGEpxrDchMTsS39EoJXVZwk/+xPAoSzHs0nkD X-Received: by 2002:a05:6808:aac:: with SMTP id r12mr3720036oij.59.1575483227169; Wed, 04 Dec 2019 10:13:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1575483227; cv=none; d=google.com; s=arc-20160816; b=PKNr7PvHS5i7+U91wPYJbCgZQp9hSPgPUPL/CsHfvAEWrGOf0Ovguy4pSHtCDtCst5 ftXWqVSSDJrotp+fpQ2X+5/qZm6tXQ8TU6oVQCs0lLmSwCIStO8fvyke9kzLGDKlqH1b ys0wdPCDWKxRKw3pfIlr3wEdwG7FR2gc6rLgZ9utQX4mgJBFuDLnU55eU2jbZ73RT8My MMitwAVd0gfYiILz5mp/alWahz5vnh1MKueBfx1vJ0ozSsqJQRld/F1rrLfBg5Fxpjwy w9tVg5OXOTtbnqf3eECNTDMe0YqU/Jk0XfkqR5tv+E6/iTa5Kwxy5Ol4qusRYAStqo7+ yaCg== 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=Bxfp2O+s/oo66mvXtDqgd2IZxFiiHqGaw9pUveLOYVs=; b=JdQjLPdhoDVd0xlaMeIOyZQaDukIbJzQHAUZ/dfgkjILmd3jICKvNLVSqNcHL9plWl GbjJphiT3pspFLrq7KOwf8l1OnR75ewthwR7CpKQTdnnLojT8ZLAsZYZOJgV3wMDMQx8 ZQEweejRu3t51JlvxUsp8tB+pIqRBwR8zHxNQas+RbsvR2SeiTZV5bx1sBrd1q8jWUAW ok8SIGCEIu2yip7WZZRVO4KZyJ4Npk/VZVru2XXys6euwhb+IrRZlI0ktwiPPTPXs4cC esP3j1QexP223yr3TN1fHouF+UEtxWrWnmwiEqXJ7VEONE0pLcuaMrIKyCscT0EKOv1N xV2w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=TcLcVngn; 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 w138si3601487oiw.46.2019.12.04.10.13.46; Wed, 04 Dec 2019 10:13:47 -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=TcLcVngn; 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 S1731813AbfLDSNp (ORCPT + 27 others); Wed, 4 Dec 2019 13:13:45 -0500 Received: from mail.kernel.org ([198.145.29.99]:42926 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731790AbfLDSNm (ORCPT ); Wed, 4 Dec 2019 13:13:42 -0500 Received: from localhost (unknown [217.68.49.72]) (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 9CB74206DF; Wed, 4 Dec 2019 18:13:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1575483222; bh=F8bm6cUbhQzAHQ+PL99yZE/aTt2ybXW/03/U7caOBbs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=TcLcVngnVgLJqaoWVwbfHyrj1p1RBwxl+oBKl5tMZbKyCnB0x1Da8t0Uonc0CDP3g 9/z/uce47M1Xhz1uXgXMWEg7NnP5Xe3JNbP6+6yXhiH4SLu21yU+vtn934LJuEmmYa SsAAZTtNghDzoHlUzAq9Fz93zmdLXiKaQWzjNJ7I= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Jian Luo , John Garry , "Martin K. Petersen" , Sasha Levin Subject: [PATCH 4.9 102/125] scsi: libsas: Check SMP PHY control function result Date: Wed, 4 Dec 2019 18:56:47 +0100 Message-Id: <20191204175325.315574058@linuxfoundation.org> X-Mailer: git-send-email 2.24.0 In-Reply-To: <20191204175308.377746305@linuxfoundation.org> References: <20191204175308.377746305@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: John Garry [ Upstream commit 01929a65dfa13e18d89264ab1378854a91857e59 ] Currently the SMP PHY control execution result is checked, however the function result for the command is not. As such, we may be missing all potential errors, like SMP FUNCTION FAILED, INVALID REQUEST FRAME LENGTH, etc., meaning the PHY control request has failed. In some scenarios we need to ensure the function result is accepted, so add a check for this. Tested-by: Jian Luo Signed-off-by: John Garry Signed-off-by: Martin K. Petersen Signed-off-by: Sasha Levin --- drivers/scsi/libsas/sas_expander.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) -- 2.20.1 diff --git a/drivers/scsi/libsas/sas_expander.c b/drivers/scsi/libsas/sas_expander.c index b7e4493d3dc16..7e8274938a3ee 100644 --- a/drivers/scsi/libsas/sas_expander.c +++ b/drivers/scsi/libsas/sas_expander.c @@ -603,7 +603,14 @@ int sas_smp_phy_control(struct domain_device *dev, int phy_id, } res = smp_execute_task(dev, pc_req, PC_REQ_SIZE, pc_resp,PC_RESP_SIZE); - + if (res) { + pr_err("ex %016llx phy%02d PHY control failed: %d\n", + SAS_ADDR(dev->sas_addr), phy_id, res); + } else if (pc_resp[2] != SMP_RESP_FUNC_ACC) { + pr_err("ex %016llx phy%02d PHY control failed: function result 0x%x\n", + SAS_ADDR(dev->sas_addr), phy_id, pc_resp[2]); + res = pc_resp[2]; + } kfree(pc_resp); kfree(pc_req); return res;