From patchwork Wed Dec 11 15:03:25 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 181235 Delivered-To: patch@linaro.org Received: by 2002:ac9:44c4:0:0:0:0:0 with SMTP id t4csp910071och; Wed, 11 Dec 2019 07:17:29 -0800 (PST) X-Google-Smtp-Source: APXvYqzPBkuFS9OaZTTWuMSBU7J3QPFUy7xOxJDTzZ+h9EzOvuJtThbouWwOjYxm0/njj0hmK8ZQ X-Received: by 2002:a05:6830:15a:: with SMTP id j26mr2543654otp.137.1576077449265; Wed, 11 Dec 2019 07:17:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1576077449; cv=none; d=google.com; s=arc-20160816; b=vs2956xIG38ryd8wVd/OD/puSj2Gnnwn2qKl0J6EDq+zi8xWqktKsMZi68jMqgT7bn ivqD/v/B2FFn5bxdJsv8oiwf5TXafWBc+HUtMD3paOVFWAwUBMlJ36OgahQ69m7yDqYJ okvX5CgMWrQvzn+0Bo91G6Kq7lRXSx/7A/I7iaJAmNbRdwLQ5AVAULxizOA4a0Tg2dzF DyTdJjdI9W7aQf4WNtsua+8Za8k3D64mivDnIZGvqnOCBCzcPOQIQHf9xqQQz4nBd7oO Yaj45yAAyDB3ZLFaUmSdKIj73PJwy8PZ1egaD1PlrDCU2dGlqJNuPs/bC5r0WiUjvlpR 26Dw== 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=U2JnKag5k89Bc6WZqGcPt17fupkeNy5mLtrkuWnq9/Y=; b=m2h3D2ogAI5bATAC5kHG9TBER2vctcRpBaUE7sEpmNCbWK/Ur8hzuvoVfwQyDWZ8vr 6bZuP4W8y5ucAT1ssnkAu7SC6aah+E75KUAHY/cl22cCKe8fU014AYNSvT7AzpErMRgp s22rLfI20xxJMhCLV5Yb6jIu6piG+eQZPXmCiSpvaoqSSsLn78MHzjRdE8n3iY5dFdf0 s9NJHE2frbXwPtbxEAtx2Hg7eNpQundmm1bQkv98c12InPVPfJnRNQPKVI5TTEw+1xIS FRc1Cgncce9ddco0riigxf/0yZ+5nfzSA+7MgdUQP/ZQDxw14SkvKdFp17tHRf7zCJ1e ji/w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=brGXA7qs; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-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 h4si1158238otk.172.2019.12.11.07.17.29; Wed, 11 Dec 2019 07:17:29 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of stable-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=brGXA7qs; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732013AbfLKPR1 (ORCPT + 14 others); Wed, 11 Dec 2019 10:17:27 -0500 Received: from mail.kernel.org ([198.145.29.99]:44882 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730633AbfLKPR0 (ORCPT ); Wed, 11 Dec 2019 10:17:26 -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 CCCA022527; Wed, 11 Dec 2019 15:17:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1576077446; bh=ukoFwnczgAyE2vRjc7IL7n7fPud8uYiaaSklVZ9SKis=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=brGXA7qsdzkCREmqATgfv9k6PmgMWY9gt1v4ZoOBmL28omvFC08snuAsmzRKQ8O7S JFQHxgD37YCJGOX73FKSs2bBFcfG+zWbK1JvZthzjtF/vQXJehGjZE0rG1g+v0PS6K JMfP4y5qHwIuZXPV4v4rhM3wJrWCfIQNoSpZI31M= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Marek Szyprowski , Alexandre Belloni , Sasha Levin Subject: [PATCH 4.19 043/243] rtc: s3c-rtc: Avoid using broken ALMYEAR register Date: Wed, 11 Dec 2019 16:03:25 +0100 Message-Id: <20191211150342.039887686@linuxfoundation.org> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20191211150339.185439726@linuxfoundation.org> References: <20191211150339.185439726@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Marek Szyprowski [ Upstream commit 50c8aec4212a966817e868056efc9bfbb73337c0 ] (RTC,ALM)YEAR registers of Exynos built-in RTC device contains 3 BCD characters. s3c-rtc driver uses only 2 lower of them and supports years from 2000..2099 range. The third BCD value is typically set to 0, but it looks that handling of it is broken in the hardware. It sometimes defaults to a random (even non-BCD) value. This is not an issue for handling RTCYEAR register, because bcd2bin() properly handles only 8bit values (2 BCD characters, the third one is skipped). The problem is however with ALMYEAR register and proper RTC alarm operation. When YEAREN bit is set for the configured alarm, RTC hardware triggers alarm only when ALMYEAR and RTCYEAR matches. This usually doesn't happen because of the random noise on the third BCD character. Fix this by simply skipping setting ALMYEAR register in alarm configuration. This workaround fixes broken alarm operation on Exynos built-in rtc device. My tests revealed that the issue happens on the following Exynos series: 3250, 4210, 4412, 5250 and 5410. Signed-off-by: Marek Szyprowski Signed-off-by: Alexandre Belloni Signed-off-by: Sasha Levin --- drivers/rtc/rtc-s3c.c | 6 ------ 1 file changed, 6 deletions(-) -- 2.20.1 diff --git a/drivers/rtc/rtc-s3c.c b/drivers/rtc/rtc-s3c.c index 75c8c5033e087..58e03ac3578b7 100644 --- a/drivers/rtc/rtc-s3c.c +++ b/drivers/rtc/rtc-s3c.c @@ -327,7 +327,6 @@ static int s3c_rtc_setalarm(struct device *dev, struct rtc_wkalrm *alrm) struct rtc_time *tm = &alrm->time; unsigned int alrm_en; int ret; - int year = tm->tm_year - 100; dev_dbg(dev, "s3c_rtc_setalarm: %d, %04d.%02d.%02d %02d:%02d:%02d\n", alrm->enabled, @@ -356,11 +355,6 @@ static int s3c_rtc_setalarm(struct device *dev, struct rtc_wkalrm *alrm) writeb(bin2bcd(tm->tm_hour), info->base + S3C2410_ALMHOUR); } - if (year < 100 && year >= 0) { - alrm_en |= S3C2410_RTCALM_YEAREN; - writeb(bin2bcd(year), info->base + S3C2410_ALMYEAR); - } - if (tm->tm_mon < 12 && tm->tm_mon >= 0) { alrm_en |= S3C2410_RTCALM_MONEN; writeb(bin2bcd(tm->tm_mon + 1), info->base + S3C2410_ALMMON); From patchwork Wed Dec 11 15:03:50 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 181236 Delivered-To: patch@linaro.org Received: by 2002:ac9:44c4:0:0:0:0:0 with SMTP id t4csp911988och; Wed, 11 Dec 2019 07:18:59 -0800 (PST) X-Google-Smtp-Source: APXvYqwyb2J3RdlXPYZ610ELKTqclP0nrBEBXXrFy9LbGYGFDnpH4oQyVRvilEDdup4cT4Z534ZL X-Received: by 2002:a05:6830:14c7:: with SMTP id t7mr2720224otq.72.1576077539094; Wed, 11 Dec 2019 07:18:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1576077539; cv=none; d=google.com; s=arc-20160816; b=fjPBL5BwXDOpCrStY6oBb0+EOT1Y1MAfZtQYOKBq7lOCxtbRgKycStoSRkTO6cJkuP sICC5sSHfmAifPIw2LZ8aXqZqOhhoA2KzXEsBhBR9IU6vfuJYYPGLhAlbDyeCIyFGuw0 bgTksNTpXOnV5s/FNXxeQpDoG9X2Ma1IzAC7sQhUWH1AOae8acxKFlohgvJYAo3FUYEJ tZpITRcqKRZGsaFA0LlCcI8MrtoPHd4cYjfdRF/x6Y/cJgCemQBfsGbwJcQFJ4EW91U+ 4S0SdnwsRGLYDDrwAnMyemV+7zTXPpS0aMBwXeiGH2dcq9FFIcol9HS3NFP0bj0Npxgh WJqQ== 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=+mfnqcl/BRaMBJ31XvXXSyKaJBXC8gQsTqFrN+w4PEc=; b=PZAMpY6qUTMWPP7zt6rSTBC0icyoJJ03wq8UlzoUndhdF6MdLB/QMt/L7FH/UI6AX9 V3Vp3O43Ki8zgVo23jCB5LLU9Dt7aeRRjux6C0ewchUUChHEgScHLPDBfCpHBSfOeVxB vTVVA2qTh+8K/XMnJ4VhMpoTgqBcP2BhvSs8X7YmoweD+h4wA5Dx29McwQEQNn9EWTll mdYXMbok7VhT8OS5t4nUBwRmeQsHYmKAWu5etrWUmIhCARx4GkHVftI7MM7AdXZxRI2u py1ZFeKZKvAPFeX1Uj3YfDFVGa84U6Hy3TgKykODOIlatnPpeJWJRy0gIKBqexYWTrSa M9CA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=b0KVAoL5; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-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 x26si1283085oie.58.2019.12.11.07.18.58; Wed, 11 Dec 2019 07:18:59 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of stable-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=b0KVAoL5; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730557AbfLKPS4 (ORCPT + 14 others); Wed, 11 Dec 2019 10:18:56 -0500 Received: from mail.kernel.org ([198.145.29.99]:47258 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732040AbfLKPSz (ORCPT ); Wed, 11 Dec 2019 10:18:55 -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 1062324654; Wed, 11 Dec 2019 15:18:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1576077534; bh=cZRXYZr3dnqdd2ZANv1oCOypDbcNrsP6ksZp+LUmUVU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=b0KVAoL5cYDPuofzMR6XCplmEoxGCPrS9VW+mxaaPGae4z0DZpoIEFYRAD5T/w5co qqi8OAnppLKS5IZq8jR+l4Du7OpGuHfv5W8McKWcNjWBecPGW4VVKYKHof91bYlfJP 8RNRcozqyWOQGE1lX1DZhKH5q324KHOAkGjnRYf0= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Cheng-Yi Chiang , Mark Brown , Douglas Anderson , Sasha Levin Subject: [PATCH 4.19 068/243] regulator: Fix return value of _set_load() stub Date: Wed, 11 Dec 2019 16:03:50 +0100 Message-Id: <20191211150343.689372303@linuxfoundation.org> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20191211150339.185439726@linuxfoundation.org> References: <20191211150339.185439726@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Mark Brown [ Upstream commit f1abf67217de91f5cd3c757ae857632ca565099a ] The stub implementation of _set_load() returns a mode value which is within the bounds of valid return codes for success (the documentation just says that failures are negative error codes) but not sensible or what the actual implementation does. Fix it to just return 0. Reported-by: Cheng-Yi Chiang Signed-off-by: Mark Brown Reviewed-by: Douglas Anderson Signed-off-by: Mark Brown Signed-off-by: Sasha Levin --- include/linux/regulator/consumer.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.20.1 diff --git a/include/linux/regulator/consumer.h b/include/linux/regulator/consumer.h index 25602afd48447..f3f76051e8b00 100644 --- a/include/linux/regulator/consumer.h +++ b/include/linux/regulator/consumer.h @@ -508,7 +508,7 @@ static inline int regulator_get_error_flags(struct regulator *regulator, static inline int regulator_set_load(struct regulator *regulator, int load_uA) { - return REGULATOR_MODE_NORMAL; + return 0; } static inline int regulator_allow_bypass(struct regulator *regulator, From patchwork Wed Dec 11 15:04:08 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 181280 Delivered-To: patch@linaro.org Received: by 2002:a92:3001:0:0:0:0:0 with SMTP id x1csp712504ile; Wed, 11 Dec 2019 07:53:20 -0800 (PST) X-Google-Smtp-Source: APXvYqzAM8U1JM/iJlYuYaWNa2mE2jzV2QTPRJITX9c78WuTIyc/P6YkOuO1Kgu63oJH/Pxn31Ol X-Received: by 2002:a05:6808:a9c:: with SMTP id q28mr3369088oij.176.1576079599898; Wed, 11 Dec 2019 07:53:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1576079599; cv=none; d=google.com; s=arc-20160816; b=sfFpiKzhY0v+kzZDr14rz5uA7yTOFmSg85//lVefPsfEetBPloeG8UD11SRqThMtbW jjCtzvnH+3Xpo/Fn2X+MUMtQiZdMUYAke2wr1LIsZzqB8yQt/9G7b3hd7WrjqchB5Mrz zDbbS3zddTYGZRIPHDXyb0fsvYkr6fg/tXTGu8OQMAG34UnmCyEsV1KRSOZJFAYVNr0z TbYKOUgoHA3dTUADzScpfZsTWUQ+Os4UUsdNSKDN9y4ReKdBy0xRiLE5qLk31oJD8JEn 1m1ZlwtYJBGD0DMTrj/eTGYCbZAPH3KoGiS17N4Lumseje3SvaFKqhe0ARQ6gzqi/dqx qTPg== 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=m2pC0If4B4NnO4GjpBi4ljpa96O+soxLEUxewgVov/I=; b=jQEX5/P/BeMhBOYaG94sqVZ9Rg+r6RwICJ0UzATtZignxoJCJ1S9YNp8jRbGBbp3Ue 8Y/Xzi667oxTo7JCxSO53OJjKsJdGdKFip5FJiFgTzaqqUMoxEI5yOd3mh6/BKll/p8s 6t7yEWTfgQ9/cdq6F7+FzakLn1IHK6J9IS4I6dis9OLmisSAwDPlb3Gefj1k4cgZXz3w Pf0qYQMUaV95O5bu8JElAR2BxW38fGcbRbDiqnShxCt1ky/pNDVfg8+v3JjJW9lnSQ5/ FLOQ4h1/C9n1ZhhqbaZsR24vxBgdslEsEfHO8gnKGeTHuBm4RoepPbuXqT0oIzHQoPDy Y+5g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=1nfvkvxe; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-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 t184si1341195oig.184.2019.12.11.07.53.19; Wed, 11 Dec 2019 07:53:19 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of stable-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=1nfvkvxe; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731121AbfLKPxS (ORCPT + 14 others); Wed, 11 Dec 2019 10:53:18 -0500 Received: from mail.kernel.org ([198.145.29.99]:48078 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732066AbfLKPTV (ORCPT ); Wed, 11 Dec 2019 10:19:21 -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 C95BF22527; Wed, 11 Dec 2019 15:19:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1576077561; bh=GX1VV5c3skhmIwY+N99FM1nMhLwWQonoi7vrcwG+g6A=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=1nfvkvxekqNTlT8aXD+FQsOrg8IEyqW1RH+Mcnt8jiZs2KNA7UL7gTFS2mtjKHG/M KqYGUrusYaKEVG/zuVYVL/1ofLN8On4TJc7Ui3OqOwnDszPjxHtlMsGWFnr+vIGF6w /O0VTCuV6uUqS9/opyQgHOhJaFMSi7M+1NQGQ5eM= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Marek Szyprowski , Krzysztof Kozlowski , Sasha Levin Subject: [PATCH 4.19 086/243] ARM: dts: exynos: Use Samsung SoC specific compatible for DWC2 module Date: Wed, 11 Dec 2019 16:04:08 +0100 Message-Id: <20191211150344.917765151@linuxfoundation.org> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20191211150339.185439726@linuxfoundation.org> References: <20191211150339.185439726@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Marek Szyprowski [ Upstream commit 6035cbcceb069f87296b3cd0bc4736ad5618bf47 ] DWC2 hardware module integrated in Samsung SoCs requires some quirks to operate properly, so use Samsung SoC specific compatible to notify driver to apply respective fixes. Signed-off-by: Marek Szyprowski Signed-off-by: Krzysztof Kozlowski Signed-off-by: Sasha Levin --- arch/arm/boot/dts/exynos3250.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.20.1 diff --git a/arch/arm/boot/dts/exynos3250.dtsi b/arch/arm/boot/dts/exynos3250.dtsi index 94efca78c42ff..5892a9f7622fa 100644 --- a/arch/arm/boot/dts/exynos3250.dtsi +++ b/arch/arm/boot/dts/exynos3250.dtsi @@ -360,7 +360,7 @@ }; hsotg: hsotg@12480000 { - compatible = "snps,dwc2"; + compatible = "samsung,s3c6400-hsotg", "snps,dwc2"; reg = <0x12480000 0x20000>; interrupts = ; clocks = <&cmu CLK_USBOTG>; From patchwork Wed Dec 11 15:04:34 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 181243 Delivered-To: patch@linaro.org Received: by 2002:ac9:44c4:0:0:0:0:0 with SMTP id t4csp917708och; Wed, 11 Dec 2019 07:23:37 -0800 (PST) X-Google-Smtp-Source: APXvYqydTMdytCsJ3YFdlC65wlHZYnRayvtjppPvOujQIIZesytjeNGuh2N6MDq13cspi2MmHwRV X-Received: by 2002:a9d:7483:: with SMTP id t3mr2697777otk.262.1576077738233; Wed, 11 Dec 2019 07:22:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1576077738; cv=none; d=google.com; s=arc-20160816; b=k4Yx1VRK0J9TNysDXGVBOqet07OYKrEimbZcIMmm/A+OLZ18awKobteu5oCODBgWCZ YqBEmR7AYt+3RBq90y41hONH9PoC8ia5vTF9XbqINHytIoPuZiaNfES+jL/AVIJIKsLa 2fhh5UOY42BlaL2c95srrsPFe2dGvwbc9JGHv3um8oxczr4Frv5dQ8+ppsx1Bz4YxM8U iqq2+2Q9J6gvrcH7oyDmhpx+NwVlc6yGM2l5YGXjTbJ6FJ5pfZcKBE41Wr1sfOJPjmTr AL+PUce8AQt7wbYelVW/iVhbdzAOf1XPmaQewuSl+X54JNSgGxYmMNDt4DMZuRg84nNH 41uA== 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=cj+9Dn3lH5PXDoM5CWqAIyxO/IFte8zE26zW/ol6oOc=; b=qtFaMaA1kjEDX03b3bCkIy22N+CqiD+SSDQppTcyoEX6qfR1gkBhiHy2/4ZEhYi53a nDeA7GRR0glUPyYiVcvs5/wEat+tm7+fCJAfpEZvlFlm0P8vRAXYM4jplVMkzT/wjxnI SvfGZKw4xOccNCHYLNYgNKCyfDLKfS4gzWh5Sixn8HEYjXK3WBcb6nLQAc8KAGaHLqAD 8mQasrocS8hX7GGgVeP6J6D2yWAAPMtaGX+ulfSUn4XaVRrz5/v4FodBqFmy7Ow5Mu6c XyZ80ZvF8xh15oT8i34BAwX6zRa8IGocs7jjNguIwEjhxf+YbSMnEP0Xnjhl3iCWpfna TORA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=bEnurgXQ; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-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 t142si1356124oih.242.2019.12.11.07.22.17; Wed, 11 Dec 2019 07:22:18 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of stable-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=bEnurgXQ; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732309AbfLKPWQ (ORCPT + 14 others); Wed, 11 Dec 2019 10:22:16 -0500 Received: from mail.kernel.org ([198.145.29.99]:52792 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732285AbfLKPWM (ORCPT ); Wed, 11 Dec 2019 10:22:12 -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 6EC012073D; Wed, 11 Dec 2019 15:22:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1576077731; bh=4YMkOe683UOMZtkpg1G3VQoM/kKp2ul1XEn7gRyO554=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=bEnurgXQsNGTRv8G7rnr2vFAAAvvti8r0ZFqCfhJwtcAbq9KwLCeDuwfV0p7rQoRH OFdyncR7iHgwIFvPz5KY8okbT0RoUA40SXqG716o5kj7AYDoRYs2q+N/X/pltuIjSI /CSYuz7WV6jfI0bFCR+gMuru8wREhrE4lXsfc7yw= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Srinivas Kandagatla , Sasha Levin Subject: [PATCH 4.19 112/243] slimbus: ngd: Fix build error on x86 Date: Wed, 11 Dec 2019 16:04:34 +0100 Message-Id: <20191211150346.691630639@linuxfoundation.org> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20191211150339.185439726@linuxfoundation.org> References: <20191211150339.185439726@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Srinivas Kandagatla [ Upstream commit 458a445deb9c9fb13cec46fe9b179a84d2ff514f ] on non DT platforms like x86 of_match_node is set to NULL, dereferencing directly would throw an error. Fix this by doing this in two steps, get the match then the data. Reported-by: Greg KH Signed-off-by: Srinivas Kandagatla Signed-off-by: Greg Kroah-Hartman Signed-off-by: Sasha Levin --- drivers/slimbus/qcom-ngd-ctrl.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) -- 2.20.1 diff --git a/drivers/slimbus/qcom-ngd-ctrl.c b/drivers/slimbus/qcom-ngd-ctrl.c index d72f8eed2e8b7..9221ba7b78637 100644 --- a/drivers/slimbus/qcom-ngd-ctrl.c +++ b/drivers/slimbus/qcom-ngd-ctrl.c @@ -1326,11 +1326,12 @@ static int of_qcom_slim_ngd_register(struct device *parent, { const struct ngd_reg_offset_data *data; struct qcom_slim_ngd *ngd; + const struct of_device_id *match; struct device_node *node; u32 id; - data = of_match_node(qcom_slim_ngd_dt_match, parent->of_node)->data; - + match = of_match_node(qcom_slim_ngd_dt_match, parent->of_node); + data = match->data; for_each_available_child_of_node(parent->of_node, node) { if (of_property_read_u32(node, "reg", &id)) continue; From patchwork Wed Dec 11 15:05:16 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 181245 Delivered-To: patch@linaro.org Received: by 2002:ac9:44c4:0:0:0:0:0 with SMTP id t4csp918229och; Wed, 11 Dec 2019 07:24:04 -0800 (PST) X-Google-Smtp-Source: APXvYqx/JitarzS4Vty4vu3obYJsgeuntfdtmFIB1zxXunxEk6dSGQcGN6uyR/nPEzRVWoWDXVEx X-Received: by 2002:aca:cdd5:: with SMTP id d204mr3172119oig.134.1576077844530; Wed, 11 Dec 2019 07:24:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1576077844; cv=none; d=google.com; s=arc-20160816; b=ocNYj9I9/I6ezEKGqA4qof4VWm1awKGV3wVlACmQwULKebYMxiI7SFKq+wV4H9EY9W skTSzfv2ELKvIYAvK/jxngmwi2UtT74EgBZ2/sdhf3GxqvFOv4+ErRF6DpD6meUOY7+W HatoTOVJtpRo7Emm4lOmIN5Dd18StdSbmbJHG58hNV0tp5kzNuGREdqhXJUpsXugack/ s0TU96hvNhCJfzcWdx1nsaX4ZTNxeZv0zHzPHqATYjkFJNRlMPe9PS5JW6RTnMMiDQh1 YIeBbZ0RqAd4eq3FfJz3/F9n/7PHBjQvwmfhYlkk7MKchEWiDfsvQS9VSnzwVC2V2Zx3 RJ/g== 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=xVxrRHHfIaJp88Y+vDnbY4A56bLQIhDjpSUP8M4sEHw=; b=PfhOZYIrSQqcyt/QhOLJdR1XGE+DpdPSm/9wFgMxxt8pyg46DYArrF/OLH1isx3Ae2 B+QbE2W5u24WR2WLgY4qOUiBsKsYJbL03g8UNIZQDVvlTUIYWypbW45zhD98bl22AZyv DOYGEMXNPjJ5YhkY/W+C6oSVWbFxgOODcTXQUg8ly+gcjlub9dYwEP8CoEfkVhJ2ZO0u QNZoE3cBwvaQ0g0RByoa66AScNG8dQJG4KPmgLAhZcWfnVY8SYRDGCYzkCJCVWbfnUhB zBgrwyk2Js1naK6HNDMX233gs5GQWbqtMsu5AeQoYaT2S8i97OSRbGACaAeNsweAFzJX MlOA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=1xA7Bgox; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-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 i20si1107154otk.270.2019.12.11.07.24.03; Wed, 11 Dec 2019 07:24:04 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of stable-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=1xA7Bgox; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732420AbfLKPYC (ORCPT + 14 others); Wed, 11 Dec 2019 10:24:02 -0500 Received: from mail.kernel.org ([198.145.29.99]:55234 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731052AbfLKPYC (ORCPT ); Wed, 11 Dec 2019 10:24:02 -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 E08F42077B; Wed, 11 Dec 2019 15:24:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1576077841; bh=PFVwbF3UVf3POamPzm8tB9yZN5Lk4YJ4DVrIeQQMQmM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=1xA7BgoxC8aZzI9oYVX0ODUiCuFh+EILLPn5tWIG90UufrpXaFuPtM7WXJo+R0/Op rx4nkPE3jSMF9OFdhZHij70vadKX8yxJvUt/SclX2SaozHRVgz5LgT5q/Tdi8U4ysU iGbobum0k/jjlbtGzdn0hCtWo8eNit5hI3Xy6Zy4= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Linus Walleij , Rob Herring , Olof Johansson , Sasha Levin Subject: [PATCH 4.19 154/243] ARM: dts: realview-pbx: Fix duplicate regulator nodes Date: Wed, 11 Dec 2019 16:05:16 +0100 Message-Id: <20191211150349.565781731@linuxfoundation.org> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20191211150339.185439726@linuxfoundation.org> References: <20191211150339.185439726@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Rob Herring [ Upstream commit 7f4b001b7f6e0480b5bdab9cd8ce1711e43e5cb5 ] There's a bug in dtc in checking for duplicate node names when there's another section (e.g. "/ { };"). In this case, skeleton.dtsi provides another section. Upon removal of skeleton.dtsi, the dtb fails to build due to a duplicate node 'fixedregulator@0'. As both nodes were pretty much the same 3.3V fixed regulator, it hasn't really mattered. Fix this by renaming the nodes to something unique. In the process, drop the unit-address which shouldn't be present wtihout reg property. Cc: Linus Walleij Signed-off-by: Rob Herring Signed-off-by: Olof Johansson Signed-off-by: Sasha Levin --- arch/arm/boot/dts/arm-realview-pbx.dtsi | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) -- 2.20.1 diff --git a/arch/arm/boot/dts/arm-realview-pbx.dtsi b/arch/arm/boot/dts/arm-realview-pbx.dtsi index a5676697ff3b7..916a97734f84c 100644 --- a/arch/arm/boot/dts/arm-realview-pbx.dtsi +++ b/arch/arm/boot/dts/arm-realview-pbx.dtsi @@ -44,7 +44,7 @@ }; /* The voltage to the MMC card is hardwired at 3.3V */ - vmmc: fixedregulator@0 { + vmmc: regulator-vmmc { compatible = "regulator-fixed"; regulator-name = "vmmc"; regulator-min-microvolt = <3300000>; @@ -52,7 +52,7 @@ regulator-boot-on; }; - veth: fixedregulator@0 { + veth: regulator-veth { compatible = "regulator-fixed"; regulator-name = "veth"; regulator-min-microvolt = <3300000>; @@ -567,4 +567,3 @@ }; }; }; - From patchwork Wed Dec 11 15:05:43 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 181244 Delivered-To: patch@linaro.org Received: by 2002:ac9:44c4:0:0:0:0:0 with SMTP id t4csp917780och; Wed, 11 Dec 2019 07:23:41 -0800 (PST) X-Google-Smtp-Source: APXvYqzausHdl3RkaWYq4nDJFJXpXZ1xsNxCfy4qqicPh28CGko8YND01qi7X+PYuHcrcpGJ/f4n X-Received: by 2002:a05:6830:4da:: with SMTP id s26mr2520688otd.141.1576077820533; Wed, 11 Dec 2019 07:23:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1576077820; cv=none; d=google.com; s=arc-20160816; b=QKDN3p3JpaZZo8zlSOWg6tsvYobw6ePZ8dbvOQSH6mwje6OtTVVnLS3484KJI8alTF 7OXeZE07vBM/QSGqqethF69ODuAdBxysf73Z/Va1NnPdt89NTmFmMSwCk7YEsqbnDISS TIHpNAPvtYbf+hDcq/+IWLHlA2l84mtJ9uPZaHB4bCZU5QGrAHsZJYoX/QLJHFm19cnK yM88gM/x+XSG1y/wisuwdgsWDfOwDzhnLmNRWeW0e+3zEUbY+LQXK5iaxpC1y2XZKSIj CmWSEoyXTq15MehJIQjLRsjMsZKELtGcvo8UxdvEfeKSNlTtPfzqt2PY3cZg6vQZYHIe LE5g== 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=WsSKAtcXj05vPP8pWTbtQ79L5GMJ8nSD+h04L7wyqhk=; b=GD5EXRtsfitNolg0AFt8m8QRSqL7z3SBZzgjSpjIgprCMRXblhpx++dMNfiGNwBpaE Qt3p+jD5Yo7P5ilmDunEBuQY05ctklFdJQ4ioYFANReCqn3Ozz+NylCL8GqGVKHTL/gS wovPPyr3i88G3EXtLZXS6cod8wuIxLAoT9pRlMg6NEXxeVm62cjngKsyHcim0zEBLuJ3 zgQI98JytgY3L6w77+ExTgBgnJaj0NAwV6HptmZveaoIvGSjOpW/enE74cJMmpWRR+re ueIEgUJNV/jJay0zuAe8KFvyigGVY6dfo/0mSICCsMQYM1zwo6hw1tEDO+a+iJYtAp5q QSWQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="eDzyr/Gy"; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-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 f11si1439278otc.164.2019.12.11.07.23.40; Wed, 11 Dec 2019 07:23:40 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of stable-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="eDzyr/Gy"; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732508AbfLKPXj (ORCPT + 14 others); Wed, 11 Dec 2019 10:23:39 -0500 Received: from mail.kernel.org ([198.145.29.99]:54714 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730107AbfLKPXi (ORCPT ); Wed, 11 Dec 2019 10:23:38 -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 BAF752073D; Wed, 11 Dec 2019 15:23:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1576077818; bh=KHVjQquwnf4qMCOdHbfWO0pkNtbfAIXbCMPdkUNfzCM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=eDzyr/GyQ+d3xwgU/ebR3gmLDqXVTFtSCi6pM/4w40cXC11yKLIt17svvasy3dK07 gL2BcY3gMNW4VrvSo9K5DeQSvXX2zunq//XKmT4H1g1KBzBBenmQ3hzSomURDVh+lU f7WPsf16y6mCVI4AWtIMggFdXe/5W71Di0efthSE= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Bjorn Andersson , Stephen Boyd , Sasha Levin Subject: [PATCH 4.19 181/243] clk: qcom: gcc-msm8998: Disable halt check of UFS clocks Date: Wed, 11 Dec 2019 16:05:43 +0100 Message-Id: <20191211150351.388861450@linuxfoundation.org> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20191211150339.185439726@linuxfoundation.org> References: <20191211150339.185439726@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Bjorn Andersson [ Upstream commit 2abf856202fd3e4883e4c518acaa9a023b0dbe54 ] Drop the halt check of the UFS symbol clocks, in accordance with other platforms. This makes clk_disable_unused() happy and makes it possible to turn the clocks on again without an error. Signed-off-by: Bjorn Andersson Signed-off-by: Stephen Boyd Signed-off-by: Sasha Levin --- drivers/clk/qcom/gcc-msm8998.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) -- 2.20.1 diff --git a/drivers/clk/qcom/gcc-msm8998.c b/drivers/clk/qcom/gcc-msm8998.c index 5fd6662a1beac..4e23973b6cd16 100644 --- a/drivers/clk/qcom/gcc-msm8998.c +++ b/drivers/clk/qcom/gcc-msm8998.c @@ -2402,7 +2402,7 @@ static struct clk_branch gcc_ufs_phy_aux_clk = { static struct clk_branch gcc_ufs_rx_symbol_0_clk = { .halt_reg = 0x75014, - .halt_check = BRANCH_HALT, + .halt_check = BRANCH_HALT_SKIP, .clkr = { .enable_reg = 0x75014, .enable_mask = BIT(0), @@ -2415,7 +2415,7 @@ static struct clk_branch gcc_ufs_rx_symbol_0_clk = { static struct clk_branch gcc_ufs_rx_symbol_1_clk = { .halt_reg = 0x7605c, - .halt_check = BRANCH_HALT, + .halt_check = BRANCH_HALT_SKIP, .clkr = { .enable_reg = 0x7605c, .enable_mask = BIT(0), @@ -2428,7 +2428,7 @@ static struct clk_branch gcc_ufs_rx_symbol_1_clk = { static struct clk_branch gcc_ufs_tx_symbol_0_clk = { .halt_reg = 0x75010, - .halt_check = BRANCH_HALT, + .halt_check = BRANCH_HALT_SKIP, .clkr = { .enable_reg = 0x75010, .enable_mask = BIT(0), From patchwork Wed Dec 11 15:06:34 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 181249 Delivered-To: patch@linaro.org Received: by 2002:ac9:44c4:0:0:0:0:0 with SMTP id t4csp921460och; Wed, 11 Dec 2019 07:26:48 -0800 (PST) X-Google-Smtp-Source: APXvYqwutf01UWayccLlHRQvCPrbfFyNy0Od1MiitxVTZwpvZLcNZFfzOw6up3ptFDDeQRsnTQHi X-Received: by 2002:a9d:66ca:: with SMTP id t10mr2653335otm.352.1576078008403; Wed, 11 Dec 2019 07:26:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1576078008; cv=none; d=google.com; s=arc-20160816; b=lVvZbdlkz1M5qVYGO7QaWMEOndx9EUF7c+V1AQnuk6/ZrbxnwqGRsG7m1kO85rbtjP aFimLLi27dJvik7Oim2K3qQR0UnISyQGTI9/mEQ5TPF1B1rRWmB7xI3fruK1yQcXn317 QS7zfgzkei6XRVVJettogTXena/9nBXPTv2Vh6dYyg7CZQVdtxa5Gh1bWetdur+ljJ9a oBFpW1/5WJUPW9EkhSSRl1edrHrmjAg7yom80j4XcMe/iof8wYbBsewWxThVElVupvCP TN7CKNG4w1fVPUUzLjdydllNCWjX/G4auha+Nm0UBwhxaHU1R48FgKDrjrmlVgh21DA7 efWw== 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=N7tefedwyLD5WIwOX/x1E1bTvS6Zyy68baolHEGR7Fs=; b=D1PPLFU8jQ/k+rjGOqEu2pjLTELAhu9UwkZu71cR+2p1D14xQ5Ca2LV0Psg3fkS3mn xA5Etq0/Qu6zwF5PwumnbTLHfBsv/iLOjWq9Qd9iGRlOO94ryKkm0e/UlaxWre0/NJR4 Ji/dgXhPJEqolyvMLKspcqI1OTKtr8NvIdzDgOB9dyg5R2eyVvxC+eFXNozOK6EXqbEM 6bK/Zf8i4QSEmCAv0O6RitgqsCh62UGGaQmL7nHepM+Sa8NPO1AVAgk0S524KbsADeIZ t6SzaeC5fPm8b5TXyiRuTNrFC3ZqZ1r/E7ZetDXSsNW14ixdKxGdKrfMIznt3BzE71BR Vljw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=m8oQlvtj; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-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 z25si1303201oto.211.2019.12.11.07.26.46; Wed, 11 Dec 2019 07:26:48 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of stable-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=m8oQlvtj; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732965AbfLKP0Z (ORCPT + 14 others); Wed, 11 Dec 2019 10:26:25 -0500 Received: from mail.kernel.org ([198.145.29.99]:59680 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732930AbfLKP0Y (ORCPT ); Wed, 11 Dec 2019 10:26:24 -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 5C4EE2468B; Wed, 11 Dec 2019 15:26:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1576077983; bh=eM2BvaAeVIR6VoD+IWHBkf4/DhnPi/pyyS9VshuaJ20=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=m8oQlvtjxvGahCJk8WQr8QyxWNzrkhiRbfN/dthi/r1/zh5MyGwMDrIBF5kxnazJ4 4nza8Pok8wobwE8q+v+6V53+i2hX3kYH6rpuUZiI8eqW0/BBucxKwaKHo4GNDCJKvj a4jCUBmwH8hwYqqDOR7/ofki66ME/b5CiB/gofRc= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Sahaj Sarup , Mark Salter , Gary R Hook , Herbert Xu Subject: [PATCH 4.19 232/243] crypto: ccp - fix uninitialized list head Date: Wed, 11 Dec 2019 16:06:34 +0100 Message-Id: <20191211150354.993549658@linuxfoundation.org> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20191211150339.185439726@linuxfoundation.org> References: <20191211150339.185439726@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Mark Salter commit 691505a803a7f223b2af621848d581259c61f77d upstream. A NULL-pointer dereference was reported in fedora bz#1762199 while reshaping a raid6 array after adding a fifth drive to an existing array. [ 47.343549] md/raid:md0: raid level 6 active with 3 out of 5 devices, algorithm 2 [ 47.804017] md0: detected capacity change from 0 to 7885289422848 [ 47.822083] Unable to handle kernel read from unreadable memory at virtual address 0000000000000000 ... [ 47.940477] CPU: 1 PID: 14210 Comm: md0_raid6 Tainted: G W 5.2.18-200.fc30.aarch64 #1 [ 47.949594] Hardware name: AMD Overdrive/Supercharger/To be filled by O.E.M., BIOS ROD1002C 04/08/2016 [ 47.958886] pstate: 00400085 (nzcv daIf +PAN -UAO) [ 47.963668] pc : __list_del_entry_valid+0x2c/0xa8 [ 47.968366] lr : ccp_tx_submit+0x84/0x168 [ccp] [ 47.972882] sp : ffff00001369b970 [ 47.976184] x29: ffff00001369b970 x28: ffff00001369bdb8 [ 47.981483] x27: 00000000ffffffff x26: ffff8003b758af70 [ 47.986782] x25: ffff8003b758b2d8 x24: ffff8003e6245818 [ 47.992080] x23: 0000000000000000 x22: ffff8003e62450c0 [ 47.997379] x21: ffff8003dfd6add8 x20: 0000000000000003 [ 48.002678] x19: ffff8003e6245100 x18: 0000000000000000 [ 48.007976] x17: 0000000000000000 x16: 0000000000000000 [ 48.013274] x15: 0000000000000000 x14: 0000000000000000 [ 48.018572] x13: ffff7e000ef83a00 x12: 0000000000000001 [ 48.023870] x11: ffff000010eff998 x10: 00000000000019a0 [ 48.029169] x9 : 0000000000000000 x8 : ffff8003e6245180 [ 48.034467] x7 : 0000000000000000 x6 : 000000000000003f [ 48.039766] x5 : 0000000000000040 x4 : ffff8003e0145080 [ 48.045064] x3 : dead000000000200 x2 : 0000000000000000 [ 48.050362] x1 : 0000000000000000 x0 : ffff8003e62450c0 [ 48.055660] Call trace: [ 48.058095] __list_del_entry_valid+0x2c/0xa8 [ 48.062442] ccp_tx_submit+0x84/0x168 [ccp] [ 48.066615] async_tx_submit+0x224/0x368 [async_tx] [ 48.071480] async_trigger_callback+0x68/0xfc [async_tx] [ 48.076784] ops_run_biofill+0x178/0x1e8 [raid456] [ 48.081566] raid_run_ops+0x248/0x818 [raid456] [ 48.086086] handle_stripe+0x864/0x1208 [raid456] [ 48.090781] handle_active_stripes.isra.0+0xb0/0x278 [raid456] [ 48.096604] raid5d+0x378/0x618 [raid456] [ 48.100602] md_thread+0xa0/0x150 [ 48.103905] kthread+0x104/0x130 [ 48.107122] ret_from_fork+0x10/0x18 [ 48.110686] Code: d2804003 f2fbd5a3 eb03003f 54000320 (f9400021) [ 48.116766] ---[ end trace 23f390a527f7ad77 ]--- ccp_tx_submit is passed a dma_async_tx_descriptor which is contained in a ccp_dma_desc and adds it to a ccp channel's pending list: list_del(&desc->entry); list_add_tail(&desc->entry, &chan->pending); The problem is that desc->entry may be uninitialized in the async_trigger_callback path where the descriptor was gotten from ccp_prep_dma_interrupt which got it from ccp_alloc_dma_desc which doesn't initialize the desc->entry list head. So, just initialize the list head to avoid the problem. Cc: Reported-by: Sahaj Sarup Signed-off-by: Mark Salter Acked-by: Gary R Hook Signed-off-by: Herbert Xu Signed-off-by: Greg Kroah-Hartman --- drivers/crypto/ccp/ccp-dmaengine.c | 1 + 1 file changed, 1 insertion(+) --- a/drivers/crypto/ccp/ccp-dmaengine.c +++ b/drivers/crypto/ccp/ccp-dmaengine.c @@ -340,6 +340,7 @@ static struct ccp_dma_desc *ccp_alloc_dm desc->tx_desc.flags = flags; desc->tx_desc.tx_submit = ccp_tx_submit; desc->ccp = chan->ccp; + INIT_LIST_HEAD(&desc->entry); INIT_LIST_HEAD(&desc->pending); INIT_LIST_HEAD(&desc->active); desc->status = DMA_IN_PROGRESS;