]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
Fixes for 4.9
authorSasha Levin <sashal@kernel.org>
Mon, 27 Jun 2022 03:09:33 +0000 (23:09 -0400)
committerSasha Levin <sashal@kernel.org>
Mon, 27 Jun 2022 03:09:33 +0000 (23:09 -0400)
Signed-off-by: Sasha Levin <sashal@kernel.org>
queue-4.9/bonding-arp-monitor-spams-netdev_notify_peers-notifi.patch [new file with mode: 0644]
queue-4.9/igb-make-dma-faster-when-cpu-is-active-on-the-pcie-l.patch [new file with mode: 0644]
queue-4.9/iio-adc-vf610-fix-conversion-mode-sysfs-node-name.patch [new file with mode: 0644]
queue-4.9/mips-remove-repetitive-increase-irq_err_count.patch [new file with mode: 0644]
queue-4.9/series
queue-4.9/x86-xen-remove-undefined-behavior-in-setup_features.patch [new file with mode: 0644]

diff --git a/queue-4.9/bonding-arp-monitor-spams-netdev_notify_peers-notifi.patch b/queue-4.9/bonding-arp-monitor-spams-netdev_notify_peers-notifi.patch
new file mode 100644 (file)
index 0000000..7b85b6e
--- /dev/null
@@ -0,0 +1,48 @@
+From 749770b797817d65c594228d1f7862390840d3e3 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Thu, 16 Jun 2022 12:32:40 -0700
+Subject: bonding: ARP monitor spams NETDEV_NOTIFY_PEERS notifiers
+
+From: Jay Vosburgh <jay.vosburgh@canonical.com>
+
+[ Upstream commit 7a9214f3d88cfdb099f3896e102a306b316d8707 ]
+
+The bonding ARP monitor fails to decrement send_peer_notif, the
+number of peer notifications (gratuitous ARP or ND) to be sent. This
+results in a continuous series of notifications.
+
+Correct this by decrementing the counter for each notification.
+
+Reported-by: Jonathan Toppins <jtoppins@redhat.com>
+Signed-off-by: Jay Vosburgh <jay.vosburgh@canonical.com>
+Fixes: b0929915e035 ("bonding: Fix RTNL: assertion failed at net/core/rtnetlink.c for ab arp monitor")
+Link: https://lore.kernel.org/netdev/b2fd4147-8f50-bebd-963a-1a3e8d1d9715@redhat.com/
+Tested-by: Jonathan Toppins <jtoppins@redhat.com>
+Reviewed-by: Jonathan Toppins <jtoppins@redhat.com>
+Link: https://lore.kernel.org/r/9400.1655407960@famine
+Signed-off-by: Jakub Kicinski <kuba@kernel.org>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/net/bonding/bond_main.c | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c
+index 0d9226bdf661..33843b89ab04 100644
+--- a/drivers/net/bonding/bond_main.c
++++ b/drivers/net/bonding/bond_main.c
+@@ -3014,9 +3014,11 @@ static void bond_activebackup_arp_mon(struct work_struct *work)
+               if (!rtnl_trylock())
+                       return;
+-              if (should_notify_peers)
++              if (should_notify_peers) {
++                      bond->send_peer_notif--;
+                       call_netdevice_notifiers(NETDEV_NOTIFY_PEERS,
+                                                bond->dev);
++              }
+               if (should_notify_rtnl) {
+                       bond_slave_state_notify(bond);
+                       bond_slave_link_notify(bond);
+-- 
+2.35.1
+
diff --git a/queue-4.9/igb-make-dma-faster-when-cpu-is-active-on-the-pcie-l.patch b/queue-4.9/igb-make-dma-faster-when-cpu-is-active-on-the-pcie-l.patch
new file mode 100644 (file)
index 0000000..a84705f
--- /dev/null
@@ -0,0 +1,83 @@
+From 7e5c1c33bef15fabce0d906e65e4333bbe6d1cb7 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Tue, 21 Jun 2022 15:10:56 -0700
+Subject: igb: Make DMA faster when CPU is active on the PCIe link
+
+From: Kai-Heng Feng <kai.heng.feng@canonical.com>
+
+[ Upstream commit 4e0effd9007ea0be31f7488611eb3824b4541554 ]
+
+Intel I210 on some Intel Alder Lake platforms can only achieve ~750Mbps
+Tx speed via iperf. The RR2DCDELAY shows around 0x2xxx DMA delay, which
+will be significantly lower when 1) ASPM is disabled or 2) SoC package
+c-state stays above PC3. When the RR2DCDELAY is around 0x1xxx the Tx
+speed can reach to ~950Mbps.
+
+According to the I210 datasheet "8.26.1 PCIe Misc. Register - PCIEMISC",
+"DMA Idle Indication" doesn't seem to tie to DMA coalesce anymore, so
+set it to 1b for "DMA is considered idle when there is no Rx or Tx AND
+when there are no TLPs indicating that CPU is active detected on the
+PCIe link (such as the host executes CSR or Configuration register read
+or write operation)" and performing Tx should also fall under "active
+CPU on PCIe link" case.
+
+In addition to that, commit b6e0c419f040 ("igb: Move DMA Coalescing init
+code to separate function.") seems to wrongly changed from enabling
+E1000_PCIEMISC_LX_DECISION to disabling it, also fix that.
+
+Fixes: b6e0c419f040 ("igb: Move DMA Coalescing init code to separate function.")
+Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
+Tested-by: Gurucharan <gurucharanx.g@intel.com> (A Contingent worker at Intel)
+Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
+Link: https://lore.kernel.org/r/20220621221056.604304-1-anthony.l.nguyen@intel.com
+Signed-off-by: Jakub Kicinski <kuba@kernel.org>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/net/ethernet/intel/igb/igb_main.c | 12 +++++-------
+ 1 file changed, 5 insertions(+), 7 deletions(-)
+
+diff --git a/drivers/net/ethernet/intel/igb/igb_main.c b/drivers/net/ethernet/intel/igb/igb_main.c
+index d825e527ec1a..2e713e5f75cd 100644
+--- a/drivers/net/ethernet/intel/igb/igb_main.c
++++ b/drivers/net/ethernet/intel/igb/igb_main.c
+@@ -8161,11 +8161,10 @@ static void igb_init_dmac(struct igb_adapter *adapter, u32 pba)
+       struct e1000_hw *hw = &adapter->hw;
+       u32 dmac_thr;
+       u16 hwm;
++      u32 reg;
+       if (hw->mac.type > e1000_82580) {
+               if (adapter->flags & IGB_FLAG_DMAC) {
+-                      u32 reg;
+-
+                       /* force threshold to 0. */
+                       wr32(E1000_DMCTXTH, 0);
+@@ -8198,7 +8197,6 @@ static void igb_init_dmac(struct igb_adapter *adapter, u32 pba)
+                       /* Disable BMC-to-OS Watchdog Enable */
+                       if (hw->mac.type != e1000_i354)
+                               reg &= ~E1000_DMACR_DC_BMC2OSW_EN;
+-
+                       wr32(E1000_DMACR, reg);
+                       /* no lower threshold to disable
+@@ -8215,12 +8213,12 @@ static void igb_init_dmac(struct igb_adapter *adapter, u32 pba)
+                        */
+                       wr32(E1000_DMCTXTH, (IGB_MIN_TXPBSIZE -
+                            (IGB_TX_BUF_4096 + adapter->max_frame_size)) >> 6);
++              }
+-                      /* make low power state decision controlled
+-                       * by DMA coal
+-                       */
++              if (hw->mac.type >= e1000_i210 ||
++                  (adapter->flags & IGB_FLAG_DMAC)) {
+                       reg = rd32(E1000_PCIEMISC);
+-                      reg &= ~E1000_PCIEMISC_LX_DECISION;
++                      reg |= E1000_PCIEMISC_LX_DECISION;
+                       wr32(E1000_PCIEMISC, reg);
+               } /* endif adapter->dmac is not disabled */
+       } else if (hw->mac.type == e1000_82580) {
+-- 
+2.35.1
+
diff --git a/queue-4.9/iio-adc-vf610-fix-conversion-mode-sysfs-node-name.patch b/queue-4.9/iio-adc-vf610-fix-conversion-mode-sysfs-node-name.patch
new file mode 100644 (file)
index 0000000..51babd4
--- /dev/null
@@ -0,0 +1,35 @@
+From 8d16ed30e2e03845acdc40a73dfbf0c0fc7c0091 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Mon, 30 May 2022 11:50:26 +0300
+Subject: iio: adc: vf610: fix conversion mode sysfs node name
+
+From: Baruch Siach <baruch@tkos.co.il>
+
+[ Upstream commit f1a633b15cd5371a2a83f02c513984e51132dd68 ]
+
+The documentation missed the "in_" prefix for this IIO_SHARED_BY_DIR
+entry.
+
+Fixes: bf04c1a367e3 ("iio: adc: vf610: implement configurable conversion modes")
+Signed-off-by: Baruch Siach <baruch@tkos.co.il>
+Acked-by: Haibo Chen <haibo.chen@nxp.com>
+Link: https://lore.kernel.org/r/560dc93fafe5ef7e9a409885fd20b6beac3973d8.1653900626.git.baruch@tkos.co.il
+Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ Documentation/ABI/testing/sysfs-bus-iio-vf610 | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/Documentation/ABI/testing/sysfs-bus-iio-vf610 b/Documentation/ABI/testing/sysfs-bus-iio-vf610
+index 308a6756d3bf..491ead804488 100644
+--- a/Documentation/ABI/testing/sysfs-bus-iio-vf610
++++ b/Documentation/ABI/testing/sysfs-bus-iio-vf610
+@@ -1,4 +1,4 @@
+-What:         /sys/bus/iio/devices/iio:deviceX/conversion_mode
++What:         /sys/bus/iio/devices/iio:deviceX/in_conversion_mode
+ KernelVersion:        4.2
+ Contact:      linux-iio@vger.kernel.org
+ Description:
+-- 
+2.35.1
+
diff --git a/queue-4.9/mips-remove-repetitive-increase-irq_err_count.patch b/queue-4.9/mips-remove-repetitive-increase-irq_err_count.patch
new file mode 100644 (file)
index 0000000..4103d85
--- /dev/null
@@ -0,0 +1,61 @@
+From bb2cdb9f6e7e658c0a4af3df7c2a880758e3d525 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Fri, 10 Jun 2022 19:14:20 +0800
+Subject: MIPS: Remove repetitive increase irq_err_count
+
+From: huhai <huhai@kylinos.cn>
+
+[ Upstream commit c81aba8fde2aee4f5778ebab3a1d51bd2ef48e4c ]
+
+commit 979934da9e7a ("[PATCH] mips: update IRQ handling for vr41xx") added
+a function irq_dispatch, and it'll increase irq_err_count when the get_irq
+callback returns a negative value, but increase irq_err_count in get_irq
+was not removed.
+
+And also, modpost complains once gpio-vr41xx drivers become modules.
+  ERROR: modpost: "irq_err_count" [drivers/gpio/gpio-vr41xx.ko] undefined!
+
+So it would be a good idea to remove repetitive increase irq_err_count in
+get_irq callback.
+
+Fixes: 27fdd325dace ("MIPS: Update VR41xx GPIO driver to use gpiolib")
+Fixes: 979934da9e7a ("[PATCH] mips: update IRQ handling for vr41xx")
+Reported-by: k2ci <kernel-bot@kylinos.cn>
+Signed-off-by: huhai <huhai@kylinos.cn>
+Signed-off-by: Genjian Zhang <zhanggenjian@kylinos.cn>
+Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ arch/mips/vr41xx/common/icu.c | 2 --
+ drivers/gpio/gpio-vr41xx.c    | 2 --
+ 2 files changed, 4 deletions(-)
+
+diff --git a/arch/mips/vr41xx/common/icu.c b/arch/mips/vr41xx/common/icu.c
+index 41e873bc8474..a174fda8b397 100644
+--- a/arch/mips/vr41xx/common/icu.c
++++ b/arch/mips/vr41xx/common/icu.c
+@@ -653,8 +653,6 @@ static int icu_get_irq(unsigned int irq)
+       printk(KERN_ERR "spurious ICU interrupt: %04x,%04x\n", pend1, pend2);
+-      atomic_inc(&irq_err_count);
+-
+       return -1;
+ }
+diff --git a/drivers/gpio/gpio-vr41xx.c b/drivers/gpio/gpio-vr41xx.c
+index ac8deb01f6f6..ee3163dd794b 100644
+--- a/drivers/gpio/gpio-vr41xx.c
++++ b/drivers/gpio/gpio-vr41xx.c
+@@ -224,8 +224,6 @@ static int giu_get_irq(unsigned int irq)
+       printk(KERN_ERR "spurious GIU interrupt: %04x(%04x),%04x(%04x)\n",
+              maskl, pendl, maskh, pendh);
+-      atomic_inc(&irq_err_count);
+-
+       return -EINVAL;
+ }
+-- 
+2.35.1
+
index 3fa2ad46f8e98fedf24a1f359788e8f544640016..2d8ee3380823c0fa4dfc6efc9d0178646fc55265 100644 (file)
@@ -4,3 +4,8 @@ ata-libata-add-qc-flags-in-ata_qc_complete_template-tracepoint.patch
 dm-era-commit-metadata-in-postsuspend-after-worker-stops.patch
 random-quiet-urandom-warning-ratelimit-suppression-message.patch
 usb-serial-option-add-telit-le910cx-0x1250-composition.patch
+bonding-arp-monitor-spams-netdev_notify_peers-notifi.patch
+x86-xen-remove-undefined-behavior-in-setup_features.patch
+mips-remove-repetitive-increase-irq_err_count.patch
+igb-make-dma-faster-when-cpu-is-active-on-the-pcie-l.patch
+iio-adc-vf610-fix-conversion-mode-sysfs-node-name.patch
diff --git a/queue-4.9/x86-xen-remove-undefined-behavior-in-setup_features.patch b/queue-4.9/x86-xen-remove-undefined-behavior-in-setup_features.patch
new file mode 100644 (file)
index 0000000..0f0ae54
--- /dev/null
@@ -0,0 +1,36 @@
+From dfe87f12fd2d0bf6414a5f55a830c96c9c140fc5 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Fri, 17 Jun 2022 11:30:37 +0100
+Subject: x86/xen: Remove undefined behavior in setup_features()
+
+From: Julien Grall <jgrall@amazon.com>
+
+[ Upstream commit ecb6237fa397b7b810d798ad19322eca466dbab1 ]
+
+1 << 31 is undefined. So switch to 1U << 31.
+
+Fixes: 5ead97c84fa7 ("xen: Core Xen implementation")
+Signed-off-by: Julien Grall <jgrall@amazon.com>
+Reviewed-by: Juergen Gross <jgross@suse.com>
+Link: https://lore.kernel.org/r/20220617103037.57828-1-julien@xen.org
+Signed-off-by: Juergen Gross <jgross@suse.com>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/xen/features.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/drivers/xen/features.c b/drivers/xen/features.c
+index d7d34fdfc993..f466f776604f 100644
+--- a/drivers/xen/features.c
++++ b/drivers/xen/features.c
+@@ -28,6 +28,6 @@ void xen_setup_features(void)
+               if (HYPERVISOR_xen_version(XENVER_get_features, &fi) < 0)
+                       break;
+               for (j = 0; j < 32; j++)
+-                      xen_features[i * 32 + j] = !!(fi.submap & 1<<j);
++                      xen_features[i * 32 + j] = !!(fi.submap & 1U << j);
+       }
+ }
+-- 
+2.35.1
+