From: Greg Kroah-Hartman Date: Thu, 23 Jan 2020 11:35:20 +0000 (+0100) Subject: 4.14-stable patches X-Git-Tag: v5.4.15~17 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=a6ec89817960e9ae3a7c0f09db8513c6d094d2a6;p=thirdparty%2Fkernel%2Fstable-queue.git 4.14-stable patches added patches: mfd-intel-lpss-add-default-i2c-device-properties-for-gemini-lake.patch mt7601u-fix-bbp-version-check-in-mt7601u_wait_bbp_ready.patch net-phy-broadcom-fix-rgmii-delays-configuration-for-bcm54210e.patch powerpc-archrandom-fix-arch_get_random_seed_int.patch tipc-fix-wrong-timeout-input-for-tipc_wait_for_cond.patch xfs-sanity-check-flags-of-q_xquotarm-call.patch --- diff --git a/queue-4.14/mfd-intel-lpss-add-default-i2c-device-properties-for-gemini-lake.patch b/queue-4.14/mfd-intel-lpss-add-default-i2c-device-properties-for-gemini-lake.patch new file mode 100644 index 00000000000..13160e46832 --- /dev/null +++ b/queue-4.14/mfd-intel-lpss-add-default-i2c-device-properties-for-gemini-lake.patch @@ -0,0 +1,71 @@ +From 3f31bc67e4dc6a555341dffefe328ddd58e8b431 Mon Sep 17 00:00:00 2001 +From: Jarkko Nikula +Date: Wed, 4 Sep 2019 08:56:25 +0300 +Subject: mfd: intel-lpss: Add default I2C device properties for Gemini Lake + +From: Jarkko Nikula + +commit 3f31bc67e4dc6a555341dffefe328ddd58e8b431 upstream. + +It turned out Intel Gemini Lake doesn't use the same I2C timing +parameters as Broxton. + +I got confirmation from the Windows team that Gemini Lake systems should +use updated timing parameters that differ from those used in Broxton +based systems. + +Fixes: f80e78aa11ad ("mfd: intel-lpss: Add Intel Gemini Lake PCI IDs") +Tested-by: Chris Chiu +Signed-off-by: Jarkko Nikula +Acked-by: Andy Shevchenko +Signed-off-by: Lee Jones +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/mfd/intel-lpss-pci.c | 28 ++++++++++++++++++++-------- + 1 file changed, 20 insertions(+), 8 deletions(-) + +--- a/drivers/mfd/intel-lpss-pci.c ++++ b/drivers/mfd/intel-lpss-pci.c +@@ -126,6 +126,18 @@ static const struct intel_lpss_platform_ + .properties = apl_i2c_properties, + }; + ++static struct property_entry glk_i2c_properties[] = { ++ PROPERTY_ENTRY_U32("i2c-sda-hold-time-ns", 313), ++ PROPERTY_ENTRY_U32("i2c-sda-falling-time-ns", 171), ++ PROPERTY_ENTRY_U32("i2c-scl-falling-time-ns", 290), ++ { }, ++}; ++ ++static const struct intel_lpss_platform_info glk_i2c_info = { ++ .clk_rate = 133000000, ++ .properties = glk_i2c_properties, ++}; ++ + static const struct intel_lpss_platform_info cnl_i2c_info = { + .clk_rate = 216000000, + .properties = spt_i2c_properties, +@@ -165,14 +177,14 @@ static const struct pci_device_id intel_ + { PCI_VDEVICE(INTEL, 0x1ac6), (kernel_ulong_t)&bxt_info }, + { PCI_VDEVICE(INTEL, 0x1aee), (kernel_ulong_t)&bxt_uart_info }, + /* GLK */ +- { PCI_VDEVICE(INTEL, 0x31ac), (kernel_ulong_t)&bxt_i2c_info }, +- { PCI_VDEVICE(INTEL, 0x31ae), (kernel_ulong_t)&bxt_i2c_info }, +- { PCI_VDEVICE(INTEL, 0x31b0), (kernel_ulong_t)&bxt_i2c_info }, +- { PCI_VDEVICE(INTEL, 0x31b2), (kernel_ulong_t)&bxt_i2c_info }, +- { PCI_VDEVICE(INTEL, 0x31b4), (kernel_ulong_t)&bxt_i2c_info }, +- { PCI_VDEVICE(INTEL, 0x31b6), (kernel_ulong_t)&bxt_i2c_info }, +- { PCI_VDEVICE(INTEL, 0x31b8), (kernel_ulong_t)&bxt_i2c_info }, +- { PCI_VDEVICE(INTEL, 0x31ba), (kernel_ulong_t)&bxt_i2c_info }, ++ { PCI_VDEVICE(INTEL, 0x31ac), (kernel_ulong_t)&glk_i2c_info }, ++ { PCI_VDEVICE(INTEL, 0x31ae), (kernel_ulong_t)&glk_i2c_info }, ++ { PCI_VDEVICE(INTEL, 0x31b0), (kernel_ulong_t)&glk_i2c_info }, ++ { PCI_VDEVICE(INTEL, 0x31b2), (kernel_ulong_t)&glk_i2c_info }, ++ { PCI_VDEVICE(INTEL, 0x31b4), (kernel_ulong_t)&glk_i2c_info }, ++ { PCI_VDEVICE(INTEL, 0x31b6), (kernel_ulong_t)&glk_i2c_info }, ++ { PCI_VDEVICE(INTEL, 0x31b8), (kernel_ulong_t)&glk_i2c_info }, ++ { PCI_VDEVICE(INTEL, 0x31ba), (kernel_ulong_t)&glk_i2c_info }, + { PCI_VDEVICE(INTEL, 0x31bc), (kernel_ulong_t)&bxt_uart_info }, + { PCI_VDEVICE(INTEL, 0x31be), (kernel_ulong_t)&bxt_uart_info }, + { PCI_VDEVICE(INTEL, 0x31c0), (kernel_ulong_t)&bxt_uart_info }, diff --git a/queue-4.14/mt7601u-fix-bbp-version-check-in-mt7601u_wait_bbp_ready.patch b/queue-4.14/mt7601u-fix-bbp-version-check-in-mt7601u_wait_bbp_ready.patch new file mode 100644 index 00000000000..b0dffb92a84 --- /dev/null +++ b/queue-4.14/mt7601u-fix-bbp-version-check-in-mt7601u_wait_bbp_ready.patch @@ -0,0 +1,38 @@ +From 15e14f76f85f4f0eab3b8146e1cd3c58ce272823 Mon Sep 17 00:00:00 2001 +From: Lorenzo Bianconi +Date: Sat, 21 Sep 2019 10:44:01 +0200 +Subject: mt7601u: fix bbp version check in mt7601u_wait_bbp_ready + +From: Lorenzo Bianconi + +commit 15e14f76f85f4f0eab3b8146e1cd3c58ce272823 upstream. + +Fix bbp ready check in mt7601u_wait_bbp_ready. The issue is reported by +coverity with the following error: + +Logical vs. bitwise operator +The expression's value does not depend on the operands; inadvertent use +of the wrong operator is a likely logic error. + +Addresses-Coverity-ID: 1309441 ("Logical vs. bitwise operator") +Fixes: c869f77d6abb ("add mt7601u driver") +Acked-by: Jakub Kicinski +Signed-off-by: Lorenzo Bianconi +Signed-off-by: Kalle Valo +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/net/wireless/mediatek/mt7601u/phy.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/drivers/net/wireless/mediatek/mt7601u/phy.c ++++ b/drivers/net/wireless/mediatek/mt7601u/phy.c +@@ -221,7 +221,7 @@ int mt7601u_wait_bbp_ready(struct mt7601 + + do { + val = mt7601u_bbp_rr(dev, MT_BBP_REG_VERSION); +- if (val && ~val) ++ if (val && val != 0xff) + break; + } while (--i); + diff --git a/queue-4.14/net-phy-broadcom-fix-rgmii-delays-configuration-for-bcm54210e.patch b/queue-4.14/net-phy-broadcom-fix-rgmii-delays-configuration-for-bcm54210e.patch new file mode 100644 index 00000000000..fbe30a6c402 --- /dev/null +++ b/queue-4.14/net-phy-broadcom-fix-rgmii-delays-configuration-for-bcm54210e.patch @@ -0,0 +1,51 @@ +From fea7fda7f50a6059220f83251e70709e45cc8040 Mon Sep 17 00:00:00 2001 +From: Florian Fainelli +Date: Thu, 3 Oct 2019 11:43:51 -0700 +Subject: net: phy: broadcom: Fix RGMII delays configuration for BCM54210E + +From: Florian Fainelli + +commit fea7fda7f50a6059220f83251e70709e45cc8040 upstream. + +Commit 0fc9ae107669 ("net: phy: broadcom: add support for +BCM54210E") added support for BCM54210E but also unconditionally cleared +the RXC to RXD skew and the TXD to TXC skew, thus only making +PHY_INTERFACE_MODE_RGMII a possible configuration. Use +bcm54xx_config_clock_delay() which correctly sets the registers +depending on the 4 possible PHY interface values that exist for RGMII. + +Fixes: 0fc9ae107669 ("net: phy: broadcom: add support for BCM54210E") +Reported-by: Manasa Mudireddy +Reported-by: Ray Jui +Signed-off-by: Florian Fainelli +Signed-off-by: David S. Miller +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/net/phy/broadcom.c | 11 +++-------- + 1 file changed, 3 insertions(+), 8 deletions(-) + +--- a/drivers/net/phy/broadcom.c ++++ b/drivers/net/phy/broadcom.c +@@ -30,18 +30,13 @@ MODULE_DESCRIPTION("Broadcom PHY driver" + MODULE_AUTHOR("Maciej W. Rozycki"); + MODULE_LICENSE("GPL"); + ++static int bcm54xx_config_clock_delay(struct phy_device *phydev); ++ + static int bcm54210e_config_init(struct phy_device *phydev) + { + int val; + +- val = bcm54xx_auxctl_read(phydev, MII_BCM54XX_AUXCTL_SHDWSEL_MISC); +- val &= ~MII_BCM54XX_AUXCTL_SHDWSEL_MISC_RGMII_SKEW_EN; +- val |= MII_BCM54XX_AUXCTL_MISC_WREN; +- bcm54xx_auxctl_write(phydev, MII_BCM54XX_AUXCTL_SHDWSEL_MISC, val); +- +- val = bcm_phy_read_shadow(phydev, BCM54810_SHD_CLK_CTL); +- val &= ~BCM54810_SHD_CLK_CTL_GTXCLK_EN; +- bcm_phy_write_shadow(phydev, BCM54810_SHD_CLK_CTL, val); ++ bcm54xx_config_clock_delay(phydev); + + return 0; + } diff --git a/queue-4.14/powerpc-archrandom-fix-arch_get_random_seed_int.patch b/queue-4.14/powerpc-archrandom-fix-arch_get_random_seed_int.patch new file mode 100644 index 00000000000..1f190a81aee --- /dev/null +++ b/queue-4.14/powerpc-archrandom-fix-arch_get_random_seed_int.patch @@ -0,0 +1,43 @@ +From b6afd1234cf93aa0d71b4be4788c47534905f0be Mon Sep 17 00:00:00 2001 +From: Ard Biesheuvel +Date: Wed, 4 Dec 2019 11:50:15 +0000 +Subject: powerpc/archrandom: fix arch_get_random_seed_int() + +From: Ard Biesheuvel + +commit b6afd1234cf93aa0d71b4be4788c47534905f0be upstream. + +Commit 01c9348c7620ec65 + + powerpc: Use hardware RNG for arch_get_random_seed_* not arch_get_random_* + +updated arch_get_random_[int|long]() to be NOPs, and moved the hardware +RNG backing to arch_get_random_seed_[int|long]() instead. However, it +failed to take into account that arch_get_random_int() was implemented +in terms of arch_get_random_long(), and so we ended up with a version +of the former that is essentially a NOP as well. + +Fix this by calling arch_get_random_seed_long() from +arch_get_random_seed_int() instead. + +Fixes: 01c9348c7620ec65 ("powerpc: Use hardware RNG for arch_get_random_seed_* not arch_get_random_*") +Signed-off-by: Ard Biesheuvel +Signed-off-by: Michael Ellerman +Link: https://lore.kernel.org/r/20191204115015.18015-1-ardb@kernel.org +Signed-off-by: Greg Kroah-Hartman + +--- + arch/powerpc/include/asm/archrandom.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/arch/powerpc/include/asm/archrandom.h ++++ b/arch/powerpc/include/asm/archrandom.h +@@ -28,7 +28,7 @@ static inline int arch_get_random_seed_i + unsigned long val; + int rc; + +- rc = arch_get_random_long(&val); ++ rc = arch_get_random_seed_long(&val); + if (rc) + *v = val; + diff --git a/queue-4.14/tipc-fix-wrong-timeout-input-for-tipc_wait_for_cond.patch b/queue-4.14/tipc-fix-wrong-timeout-input-for-tipc_wait_for_cond.patch new file mode 100644 index 00000000000..fb6d7cf6c63 --- /dev/null +++ b/queue-4.14/tipc-fix-wrong-timeout-input-for-tipc_wait_for_cond.patch @@ -0,0 +1,36 @@ +From 12db3c8083fcab4270866a88191933f2d9f24f89 Mon Sep 17 00:00:00 2001 +From: Tung Nguyen +Date: Thu, 28 Nov 2019 10:10:07 +0700 +Subject: tipc: fix wrong timeout input for tipc_wait_for_cond() + +From: Tung Nguyen + +commit 12db3c8083fcab4270866a88191933f2d9f24f89 upstream. + +In function __tipc_shutdown(), the timeout value passed to +tipc_wait_for_cond() is not jiffies. + +This commit fixes it by converting that value from milliseconds +to jiffies. + +Fixes: 365ad353c256 ("tipc: reduce risk of user starvation during link congestion") +Signed-off-by: Tung Nguyen +Acked-by: Jon Maloy +Signed-off-by: David S. Miller +Signed-off-by: Greg Kroah-Hartman + +--- + net/tipc/socket.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/net/tipc/socket.c ++++ b/net/tipc/socket.c +@@ -487,7 +487,7 @@ static void __tipc_shutdown(struct socke + struct sock *sk = sock->sk; + struct tipc_sock *tsk = tipc_sk(sk); + struct net *net = sock_net(sk); +- long timeout = CONN_TIMEOUT_DEFAULT; ++ long timeout = msecs_to_jiffies(CONN_TIMEOUT_DEFAULT); + u32 dnode = tsk_peer_node(tsk); + struct sk_buff *skb; + diff --git a/queue-4.14/xfs-sanity-check-flags-of-q_xquotarm-call.patch b/queue-4.14/xfs-sanity-check-flags-of-q_xquotarm-call.patch new file mode 100644 index 00000000000..68dcf18d959 --- /dev/null +++ b/queue-4.14/xfs-sanity-check-flags-of-q_xquotarm-call.patch @@ -0,0 +1,36 @@ +From 3dd4d40b420846dd35869ccc8f8627feef2cff32 Mon Sep 17 00:00:00 2001 +From: Jan Kara +Date: Wed, 23 Oct 2019 17:00:45 -0700 +Subject: xfs: Sanity check flags of Q_XQUOTARM call + +From: Jan Kara + +commit 3dd4d40b420846dd35869ccc8f8627feef2cff32 upstream. + +Flags passed to Q_XQUOTARM were not sanity checked for invalid values. +Fix that. + +Fixes: 9da93f9b7cdf ("xfs: fix Q_XQUOTARM ioctl") +Reported-by: Yang Xu +Signed-off-by: Jan Kara +Reviewed-by: Eric Sandeen +Reviewed-by: Darrick J. Wong +Signed-off-by: Darrick J. Wong +Signed-off-by: Greg Kroah-Hartman + +--- + fs/xfs/xfs_quotaops.c | 3 +++ + 1 file changed, 3 insertions(+) + +--- a/fs/xfs/xfs_quotaops.c ++++ b/fs/xfs/xfs_quotaops.c +@@ -214,6 +214,9 @@ xfs_fs_rm_xquota( + if (XFS_IS_QUOTA_ON(mp)) + return -EINVAL; + ++ if (uflags & ~(FS_USER_QUOTA | FS_GROUP_QUOTA | FS_PROJ_QUOTA)) ++ return -EINVAL; ++ + if (uflags & FS_USER_QUOTA) + flags |= XFS_DQ_USER; + if (uflags & FS_GROUP_QUOTA)