From: Sasha Levin Date: Mon, 15 Jul 2019 14:53:04 +0000 (-0400) Subject: fixes for 4.9 X-Git-Tag: v5.2.2~18^2~1 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=4b2abd3660202270f0de716965e28647cb9152a5;p=thirdparty%2Fkernel%2Fstable-queue.git fixes for 4.9 Signed-off-by: Sasha Levin --- diff --git a/queue-4.9/arm-dts-imx6ul-fix-pwm-1-4-interrupts.patch b/queue-4.9/arm-dts-imx6ul-fix-pwm-1-4-interrupts.patch new file mode 100644 index 00000000000..c315ca3e9f3 --- /dev/null +++ b/queue-4.9/arm-dts-imx6ul-fix-pwm-1-4-interrupts.patch @@ -0,0 +1,66 @@ +From 50fd19798e1c1cd948a498f68efd698a974ce30a Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?S=C3=A9bastien=20Szymanski?= + +Date: Tue, 18 Jun 2019 17:58:34 +0200 +Subject: ARM: dts: imx6ul: fix PWM[1-4] interrupts +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +[ Upstream commit 3cf10132ac8d536565f2c02f60a3aeb315863a52 ] + +According to the i.MX6UL/L RM, table 3.1 "ARM Cortex A7 domain interrupt +summary", the interrupts for the PWM[1-4] go from 83 to 86. + +Fixes: b9901fe84f02 ("ARM: dts: imx6ul: add pwm[1-4] nodes") +Signed-off-by: Sébastien Szymanski +Reviewed-by: Fabio Estevam +Signed-off-by: Shawn Guo +Signed-off-by: Sasha Levin +--- + arch/arm/boot/dts/imx6ul.dtsi | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +diff --git a/arch/arm/boot/dts/imx6ul.dtsi b/arch/arm/boot/dts/imx6ul.dtsi +index 7839300fe46b..200d9082caa4 100644 +--- a/arch/arm/boot/dts/imx6ul.dtsi ++++ b/arch/arm/boot/dts/imx6ul.dtsi +@@ -332,7 +332,7 @@ + pwm1: pwm@02080000 { + compatible = "fsl,imx6ul-pwm", "fsl,imx27-pwm"; + reg = <0x02080000 0x4000>; +- interrupts = ; ++ interrupts = ; + clocks = <&clks IMX6UL_CLK_PWM1>, + <&clks IMX6UL_CLK_PWM1>; + clock-names = "ipg", "per"; +@@ -343,7 +343,7 @@ + pwm2: pwm@02084000 { + compatible = "fsl,imx6ul-pwm", "fsl,imx27-pwm"; + reg = <0x02084000 0x4000>; +- interrupts = ; ++ interrupts = ; + clocks = <&clks IMX6UL_CLK_PWM2>, + <&clks IMX6UL_CLK_PWM2>; + clock-names = "ipg", "per"; +@@ -354,7 +354,7 @@ + pwm3: pwm@02088000 { + compatible = "fsl,imx6ul-pwm", "fsl,imx27-pwm"; + reg = <0x02088000 0x4000>; +- interrupts = ; ++ interrupts = ; + clocks = <&clks IMX6UL_CLK_PWM3>, + <&clks IMX6UL_CLK_PWM3>; + clock-names = "ipg", "per"; +@@ -365,7 +365,7 @@ + pwm4: pwm@0208c000 { + compatible = "fsl,imx6ul-pwm", "fsl,imx27-pwm"; + reg = <0x0208c000 0x4000>; +- interrupts = ; ++ interrupts = ; + clocks = <&clks IMX6UL_CLK_PWM4>, + <&clks IMX6UL_CLK_PWM4>; + clock-names = "ipg", "per"; +-- +2.20.1 + diff --git a/queue-4.9/arm-omap2-remove-incorrect-__init-annotation.patch b/queue-4.9/arm-omap2-remove-incorrect-__init-annotation.patch new file mode 100644 index 00000000000..b13b9e64dd8 --- /dev/null +++ b/queue-4.9/arm-omap2-remove-incorrect-__init-annotation.patch @@ -0,0 +1,45 @@ +From c631ee24f1c2f84938e3ff8cf96c7831e56a8244 Mon Sep 17 00:00:00 2001 +From: Arnd Bergmann +Date: Wed, 19 Jun 2019 15:04:54 +0200 +Subject: ARM: omap2: remove incorrect __init annotation + +[ Upstream commit 27e23d8975270df6999f8b5b3156fc0c04927451 ] + +omap3xxx_prm_enable_io_wakeup() is marked __init, but its caller is not, so +we get a warning with clang-8: + +WARNING: vmlinux.o(.text+0x343c8): Section mismatch in reference from the function omap3xxx_prm_late_init() to the function .init.text:omap3xxx_prm_enable_io_wakeup() +The function omap3xxx_prm_late_init() references +the function __init omap3xxx_prm_enable_io_wakeup(). +This is often because omap3xxx_prm_late_init lacks a __init +annotation or the annotation of omap3xxx_prm_enable_io_wakeup is wrong. + +When building with gcc, omap3xxx_prm_enable_io_wakeup() is always +inlined, so we never noticed in the past. + +Signed-off-by: Arnd Bergmann +Reviewed-by: Nathan Chancellor +Acked-by: Tony Lindgren +Reviewed-by: Andrew Murray +Signed-off-by: Olof Johansson +Signed-off-by: Sasha Levin +--- + arch/arm/mach-omap2/prm3xxx.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/arch/arm/mach-omap2/prm3xxx.c b/arch/arm/mach-omap2/prm3xxx.c +index 718981bb80cd..0aec48c1736b 100644 +--- a/arch/arm/mach-omap2/prm3xxx.c ++++ b/arch/arm/mach-omap2/prm3xxx.c +@@ -433,7 +433,7 @@ static void omap3_prm_reconfigure_io_chain(void) + * registers, and omap3xxx_prm_reconfigure_io_chain() must be called. + * No return value. + */ +-static void __init omap3xxx_prm_enable_io_wakeup(void) ++static void omap3xxx_prm_enable_io_wakeup(void) + { + if (prm_features & PRM_HAS_IO_WAKEUP) + omap2_prm_set_mod_reg_bits(OMAP3430_EN_IO_MASK, WKUP_MOD, +-- +2.20.1 + diff --git a/queue-4.9/be2net-fix-link-failure-after-ethtool-offline-test.patch b/queue-4.9/be2net-fix-link-failure-after-ethtool-offline-test.patch new file mode 100644 index 00000000000..4ef51afcd43 --- /dev/null +++ b/queue-4.9/be2net-fix-link-failure-after-ethtool-offline-test.patch @@ -0,0 +1,81 @@ +From caf54a0e3101370adf7a90d839ad072a62376d0d Mon Sep 17 00:00:00 2001 +From: Petr Oros +Date: Wed, 19 Jun 2019 14:29:42 +0200 +Subject: be2net: fix link failure after ethtool offline test + +[ Upstream commit 2e5db6eb3c23e5dc8171eb8f6af7a97ef9fcf3a9 ] + +Certain cards in conjunction with certain switches need a little more +time for link setup that results in ethtool link test failure after +offline test. Patch adds a loop that waits for a link setup finish. + +Changes in v2: +- added fixes header + +Fixes: 4276e47e2d1c ("be2net: Add link test to list of ethtool self tests.") +Signed-off-by: Petr Oros +Reviewed-by: Ivan Vecera +Signed-off-by: David S. Miller +Signed-off-by: Sasha Levin +--- + .../net/ethernet/emulex/benet/be_ethtool.c | 28 +++++++++++++++---- + 1 file changed, 22 insertions(+), 6 deletions(-) + +diff --git a/drivers/net/ethernet/emulex/benet/be_ethtool.c b/drivers/net/ethernet/emulex/benet/be_ethtool.c +index 345818193de9..56db37d92937 100644 +--- a/drivers/net/ethernet/emulex/benet/be_ethtool.c ++++ b/drivers/net/ethernet/emulex/benet/be_ethtool.c +@@ -898,7 +898,7 @@ static void be_self_test(struct net_device *netdev, struct ethtool_test *test, + u64 *data) + { + struct be_adapter *adapter = netdev_priv(netdev); +- int status; ++ int status, cnt; + u8 link_status = 0; + + if (adapter->function_caps & BE_FUNCTION_CAPS_SUPER_NIC) { +@@ -909,6 +909,9 @@ static void be_self_test(struct net_device *netdev, struct ethtool_test *test, + + memset(data, 0, sizeof(u64) * ETHTOOL_TESTS_NUM); + ++ /* check link status before offline tests */ ++ link_status = netif_carrier_ok(netdev); ++ + if (test->flags & ETH_TEST_FL_OFFLINE) { + if (be_loopback_test(adapter, BE_MAC_LOOPBACK, &data[0]) != 0) + test->flags |= ETH_TEST_FL_FAILED; +@@ -929,13 +932,26 @@ static void be_self_test(struct net_device *netdev, struct ethtool_test *test, + test->flags |= ETH_TEST_FL_FAILED; + } + +- status = be_cmd_link_status_query(adapter, NULL, &link_status, 0); +- if (status) { +- test->flags |= ETH_TEST_FL_FAILED; +- data[4] = -1; +- } else if (!link_status) { ++ /* link status was down prior to test */ ++ if (!link_status) { + test->flags |= ETH_TEST_FL_FAILED; + data[4] = 1; ++ return; ++ } ++ ++ for (cnt = 10; cnt; cnt--) { ++ status = be_cmd_link_status_query(adapter, NULL, &link_status, ++ 0); ++ if (status) { ++ test->flags |= ETH_TEST_FL_FAILED; ++ data[4] = -1; ++ break; ++ } ++ ++ if (link_status) ++ break; ++ ++ msleep_interruptible(500); + } + } + +-- +2.20.1 + diff --git a/queue-4.9/dm-verity-use-message-limit-for-data-block-corruptio.patch b/queue-4.9/dm-verity-use-message-limit-for-data-block-corruptio.patch new file mode 100644 index 00000000000..6040398b809 --- /dev/null +++ b/queue-4.9/dm-verity-use-message-limit-for-data-block-corruptio.patch @@ -0,0 +1,35 @@ +From 794225de4e341b0919298f4c08637ebb8a2a5098 Mon Sep 17 00:00:00 2001 +From: Milan Broz +Date: Thu, 20 Jun 2019 13:00:19 +0200 +Subject: dm verity: use message limit for data block corruption message + +[ Upstream commit 2eba4e640b2c4161e31ae20090a53ee02a518657 ] + +DM verity should also use DMERR_LIMIT to limit repeat data block +corruption messages. + +Signed-off-by: Milan Broz +Signed-off-by: Mike Snitzer +Signed-off-by: Sasha Levin +--- + drivers/md/dm-verity-target.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/drivers/md/dm-verity-target.c b/drivers/md/dm-verity-target.c +index 0aba34a7b3b3..727f9e571955 100644 +--- a/drivers/md/dm-verity-target.c ++++ b/drivers/md/dm-verity-target.c +@@ -218,8 +218,8 @@ static int verity_handle_err(struct dm_verity *v, enum verity_block_type type, + BUG(); + } + +- DMERR("%s: %s block %llu is corrupted", v->data_dev->name, type_str, +- block); ++ DMERR_LIMIT("%s: %s block %llu is corrupted", v->data_dev->name, ++ type_str, block); + + if (v->corrupted_errs == DM_VERITY_MAX_CORRUPTED_ERRS) + DMERR("%s: reached maximum errors", v->data_dev->name); +-- +2.20.1 + diff --git a/queue-4.9/perf-core-fix-perf_sample_regs_user-mm-check.patch b/queue-4.9/perf-core-fix-perf_sample_regs_user-mm-check.patch new file mode 100644 index 00000000000..ab919c9da9c --- /dev/null +++ b/queue-4.9/perf-core-fix-perf_sample_regs_user-mm-check.patch @@ -0,0 +1,52 @@ +From 8d24ac6813f00e5e1300bdd6a489dac385198a2f Mon Sep 17 00:00:00 2001 +From: Peter Zijlstra +Date: Wed, 29 May 2019 14:37:24 +0200 +Subject: perf/core: Fix perf_sample_regs_user() mm check + +[ Upstream commit 085ebfe937d7a7a5df1729f35a12d6d655fea68c ] + +perf_sample_regs_user() uses 'current->mm' to test for the presence of +userspace, but this is insufficient, consider use_mm(). + +A better test is: '!(current->flags & PF_KTHREAD)', exec() clears +PF_KTHREAD after it sets the new ->mm but before it drops to userspace +for the first time. + +Possibly obsoletes: bf05fc25f268 ("powerpc/perf: Fix oops when kthread execs user process") + +Reported-by: Ravi Bangoria +Reported-by: Young Xiao <92siuyang@gmail.com> +Signed-off-by: Peter Zijlstra (Intel) +Acked-by: Will Deacon +Cc: Arnaldo Carvalho de Melo +Cc: Frederic Weisbecker +Cc: Jiri Olsa +Cc: Linus Torvalds +Cc: Michael Ellerman +Cc: Naveen N. Rao +Cc: Peter Zijlstra +Cc: Stephane Eranian +Cc: Thomas Gleixner +Fixes: 4018994f3d87 ("perf: Add ability to attach user level registers dump to sample") +Signed-off-by: Ingo Molnar +Signed-off-by: Sasha Levin +--- + kernel/events/core.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/kernel/events/core.c b/kernel/events/core.c +index 7929526e96e2..93d7333c64d8 100644 +--- a/kernel/events/core.c ++++ b/kernel/events/core.c +@@ -5492,7 +5492,7 @@ static void perf_sample_regs_user(struct perf_regs *regs_user, + if (user_mode(regs)) { + regs_user->abi = perf_reg_abi(current); + regs_user->regs = regs; +- } else if (current->mm) { ++ } else if (!(current->flags & PF_KTHREAD)) { + perf_get_regs_user(regs_user, regs, regs_user_copy); + } else { + regs_user->abi = PERF_SAMPLE_REGS_ABI_NONE; +-- +2.20.1 + diff --git a/queue-4.9/ppp-mppe-add-softdep-to-arc4.patch b/queue-4.9/ppp-mppe-add-softdep-to-arc4.patch new file mode 100644 index 00000000000..0e33ef7821c --- /dev/null +++ b/queue-4.9/ppp-mppe-add-softdep-to-arc4.patch @@ -0,0 +1,34 @@ +From 52db77d9c2cc663b4a0afb2dd7a7a4c7e5cb7ab1 Mon Sep 17 00:00:00 2001 +From: Takashi Iwai +Date: Wed, 19 Jun 2019 15:34:07 +0200 +Subject: ppp: mppe: Add softdep to arc4 + +[ Upstream commit aad1dcc4f011ea409850e040363dff1e59aa4175 ] + +The arc4 crypto is mandatory at ppp_mppe probe time, so let's put a +softdep line, so that the corresponding module gets prepared +gracefully. Without this, a simple inclusion to initrd via dracut +failed due to the missing dependency, for example. + +Signed-off-by: Takashi Iwai +Signed-off-by: David S. Miller +Signed-off-by: Sasha Levin +--- + drivers/net/ppp/ppp_mppe.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/drivers/net/ppp/ppp_mppe.c b/drivers/net/ppp/ppp_mppe.c +index f60f7660b451..92f52a73ec0e 100644 +--- a/drivers/net/ppp/ppp_mppe.c ++++ b/drivers/net/ppp/ppp_mppe.c +@@ -63,6 +63,7 @@ MODULE_AUTHOR("Frank Cusack "); + MODULE_DESCRIPTION("Point-to-Point Protocol Microsoft Point-to-Point Encryption support"); + MODULE_LICENSE("Dual BSD/GPL"); + MODULE_ALIAS("ppp-compress-" __stringify(CI_MPPE)); ++MODULE_SOFTDEP("pre: arc4"); + MODULE_VERSION("1.0.2"); + + static unsigned int +-- +2.20.1 + diff --git a/queue-4.9/series b/queue-4.9/series index eb30dc39f8b..1d4af95b0b0 100644 --- a/queue-4.9/series +++ b/queue-4.9/series @@ -40,3 +40,10 @@ mips-remove-superfluous-check-for-__linux__.patch revert-e1000e-fix-cyclic-resets-at-link-up-with-active-tx.patch e1000e-start-network-tx-queue-only-when-link-is-up.patch nilfs2-do-not-use-unexported-cpu_to_le32-le32_to_cpu-in-uapi-header.patch +perf-core-fix-perf_sample_regs_user-mm-check.patch +arm-omap2-remove-incorrect-__init-annotation.patch +be2net-fix-link-failure-after-ethtool-offline-test.patch +ppp-mppe-add-softdep-to-arc4.patch +sis900-fix-tx-completion.patch +arm-dts-imx6ul-fix-pwm-1-4-interrupts.patch +dm-verity-use-message-limit-for-data-block-corruptio.patch diff --git a/queue-4.9/sis900-fix-tx-completion.patch b/queue-4.9/sis900-fix-tx-completion.patch new file mode 100644 index 00000000000..1c74a8d8299 --- /dev/null +++ b/queue-4.9/sis900-fix-tx-completion.patch @@ -0,0 +1,117 @@ +From 75b8e3bfefa781918923a91632a759cd111419b8 Mon Sep 17 00:00:00 2001 +From: Sergej Benilov +Date: Thu, 20 Jun 2019 11:02:18 +0200 +Subject: sis900: fix TX completion + +[ Upstream commit 8ac8a01092b2added0749ef937037bf1912e13e3 ] + +Since commit 605ad7f184b60cfaacbc038aa6c55ee68dee3c89 "tcp: refine TSO autosizing", +outbound throughput is dramatically reduced for some connections, as sis900 +is doing TX completion within idle states only. + +Make TX completion happen after every transmitted packet. + +Test: +netperf + +before patch: +> netperf -H remote -l -2000000 -- -s 1000000 +MIGRATED TCP STREAM TEST from 0.0.0.0 () port 0 AF_INET to 95.223.112.76 () port 0 AF_INET : demo +Recv Send Send +Socket Socket Message Elapsed +Size Size Size Time Throughput +bytes bytes bytes secs. 10^6bits/sec + + 87380 327680 327680 253.44 0.06 + +after patch: +> netperf -H remote -l -10000000 -- -s 1000000 +MIGRATED TCP STREAM TEST from 0.0.0.0 () port 0 AF_INET to 95.223.112.76 () port 0 AF_INET : demo +Recv Send Send +Socket Socket Message Elapsed +Size Size Size Time Throughput +bytes bytes bytes secs. 10^6bits/sec + + 87380 327680 327680 5.38 14.89 + +Thx to Dave Miller and Eric Dumazet for helpful hints + +Signed-off-by: Sergej Benilov +Signed-off-by: David S. Miller +Signed-off-by: Sasha Levin +--- + drivers/net/ethernet/sis/sis900.c | 16 ++++++++-------- + 1 file changed, 8 insertions(+), 8 deletions(-) + +diff --git a/drivers/net/ethernet/sis/sis900.c b/drivers/net/ethernet/sis/sis900.c +index 6f85276376e8..ae9b983e8e5c 100644 +--- a/drivers/net/ethernet/sis/sis900.c ++++ b/drivers/net/ethernet/sis/sis900.c +@@ -1058,7 +1058,7 @@ sis900_open(struct net_device *net_dev) + sis900_set_mode(sis_priv, HW_SPEED_10_MBPS, FDX_CAPABLE_HALF_SELECTED); + + /* Enable all known interrupts by setting the interrupt mask. */ +- sw32(imr, RxSOVR | RxORN | RxERR | RxOK | TxURN | TxERR | TxIDLE); ++ sw32(imr, RxSOVR | RxORN | RxERR | RxOK | TxURN | TxERR | TxIDLE | TxDESC); + sw32(cr, RxENA | sr32(cr)); + sw32(ier, IE); + +@@ -1581,7 +1581,7 @@ static void sis900_tx_timeout(struct net_device *net_dev) + sw32(txdp, sis_priv->tx_ring_dma); + + /* Enable all known interrupts by setting the interrupt mask. */ +- sw32(imr, RxSOVR | RxORN | RxERR | RxOK | TxURN | TxERR | TxIDLE); ++ sw32(imr, RxSOVR | RxORN | RxERR | RxOK | TxURN | TxERR | TxIDLE | TxDESC); + } + + /** +@@ -1621,7 +1621,7 @@ sis900_start_xmit(struct sk_buff *skb, struct net_device *net_dev) + spin_unlock_irqrestore(&sis_priv->lock, flags); + return NETDEV_TX_OK; + } +- sis_priv->tx_ring[entry].cmdsts = (OWN | skb->len); ++ sis_priv->tx_ring[entry].cmdsts = (OWN | INTR | skb->len); + sw32(cr, TxENA | sr32(cr)); + + sis_priv->cur_tx ++; +@@ -1677,7 +1677,7 @@ static irqreturn_t sis900_interrupt(int irq, void *dev_instance) + do { + status = sr32(isr); + +- if ((status & (HIBERR|TxURN|TxERR|TxIDLE|RxORN|RxERR|RxOK)) == 0) ++ if ((status & (HIBERR|TxURN|TxERR|TxIDLE|TxDESC|RxORN|RxERR|RxOK)) == 0) + /* nothing intresting happened */ + break; + handled = 1; +@@ -1687,7 +1687,7 @@ static irqreturn_t sis900_interrupt(int irq, void *dev_instance) + /* Rx interrupt */ + sis900_rx(net_dev); + +- if (status & (TxURN | TxERR | TxIDLE)) ++ if (status & (TxURN | TxERR | TxIDLE | TxDESC)) + /* Tx interrupt */ + sis900_finish_xmit(net_dev); + +@@ -1899,8 +1899,8 @@ static void sis900_finish_xmit (struct net_device *net_dev) + + if (tx_status & OWN) { + /* The packet is not transmitted yet (owned by hardware) ! +- * Note: the interrupt is generated only when Tx Machine +- * is idle, so this is an almost impossible case */ ++ * Note: this is an almost impossible condition ++ * in case of TxDESC ('descriptor interrupt') */ + break; + } + +@@ -2476,7 +2476,7 @@ static int sis900_resume(struct pci_dev *pci_dev) + sis900_set_mode(sis_priv, HW_SPEED_10_MBPS, FDX_CAPABLE_HALF_SELECTED); + + /* Enable all known interrupts by setting the interrupt mask. */ +- sw32(imr, RxSOVR | RxORN | RxERR | RxOK | TxURN | TxERR | TxIDLE); ++ sw32(imr, RxSOVR | RxORN | RxERR | RxOK | TxURN | TxERR | TxIDLE | TxDESC); + sw32(cr, RxENA | sr32(cr)); + sw32(ier, IE); + +-- +2.20.1 +