From: Greg Kroah-Hartman Date: Mon, 29 Mar 2021 06:24:42 +0000 (+0200) Subject: 5.11-stable patches X-Git-Tag: v5.11.11~23 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=f076a96d32e25afb97e52373e4d3451362c0d9ef;p=thirdparty%2Fkernel%2Fstable-queue.git 5.11-stable patches added patches: net-dsa-b53-vlan-filtering-is-global-to-all-users.patch r8169-fix-dma-being-used-after-buffer-free-if-wol-is-enabled.patch --- diff --git a/queue-5.11/net-dsa-b53-vlan-filtering-is-global-to-all-users.patch b/queue-5.11/net-dsa-b53-vlan-filtering-is-global-to-all-users.patch new file mode 100644 index 00000000000..e61c95f8d3a --- /dev/null +++ b/queue-5.11/net-dsa-b53-vlan-filtering-is-global-to-all-users.patch @@ -0,0 +1,52 @@ +From d45c36bafb94e72fdb6dee437279b61b6d97e706 Mon Sep 17 00:00:00 2001 +From: Florian Fainelli +Date: Wed, 10 Mar 2021 10:46:10 -0800 +Subject: net: dsa: b53: VLAN filtering is global to all users + +From: Florian Fainelli + +commit d45c36bafb94e72fdb6dee437279b61b6d97e706 upstream. + +The bcm_sf2 driver uses the b53 driver as a library but does not make +usre of the b53_setup() function, this made it fail to inherit the +vlan_filtering_is_global attribute. Fix this by moving the assignment to +b53_switch_alloc() which is used by bcm_sf2. + +Fixes: 7228b23e68f7 ("net: dsa: b53: Let DSA handle mismatched VLAN filtering settings") +Signed-off-by: Florian Fainelli +Signed-off-by: David S. Miller +Signed-off-by: Greg Kroah-Hartman +--- + drivers/net/dsa/b53/b53_common.c | 14 +++++++------- + 1 file changed, 7 insertions(+), 7 deletions(-) + +--- a/drivers/net/dsa/b53/b53_common.c ++++ b/drivers/net/dsa/b53/b53_common.c +@@ -1070,13 +1070,6 @@ static int b53_setup(struct dsa_switch * + b53_disable_port(ds, port); + } + +- /* Let DSA handle the case were multiple bridges span the same switch +- * device and different VLAN awareness settings are requested, which +- * would be breaking filtering semantics for any of the other bridge +- * devices. (not hardware supported) +- */ +- ds->vlan_filtering_is_global = true; +- + return b53_setup_devlink_resources(ds); + } + +@@ -2627,6 +2620,13 @@ struct b53_device *b53_switch_alloc(stru + ds->configure_vlan_while_not_filtering = true; + ds->untag_bridge_pvid = true; + dev->vlan_enabled = ds->configure_vlan_while_not_filtering; ++ /* Let DSA handle the case were multiple bridges span the same switch ++ * device and different VLAN awareness settings are requested, which ++ * would be breaking filtering semantics for any of the other bridge ++ * devices. (not hardware supported) ++ */ ++ ds->vlan_filtering_is_global = true; ++ + mutex_init(&dev->reg_mutex); + mutex_init(&dev->stats_mutex); + diff --git a/queue-5.11/r8169-fix-dma-being-used-after-buffer-free-if-wol-is-enabled.patch b/queue-5.11/r8169-fix-dma-being-used-after-buffer-free-if-wol-is-enabled.patch new file mode 100644 index 00000000000..e3bb22a011b --- /dev/null +++ b/queue-5.11/r8169-fix-dma-being-used-after-buffer-free-if-wol-is-enabled.patch @@ -0,0 +1,53 @@ +From f658b90977d2e79822a558e48116e059a7e75dec Mon Sep 17 00:00:00 2001 +From: Heiner Kallweit +Date: Sat, 20 Mar 2021 21:40:08 +0100 +Subject: r8169: fix DMA being used after buffer free if WoL is enabled + +From: Heiner Kallweit + +commit f658b90977d2e79822a558e48116e059a7e75dec upstream. + +IOMMU errors have been reported if WoL is enabled and interface is +brought down. It turned out that the network chip triggers DMA +transfers after the DMA buffers have been freed. For WoL to work we +need to leave rx enabled, therefore simply stop the chip from being +a DMA busmaster. + +Fixes: 567ca57faa62 ("r8169: add rtl8169_up") +Tested-by: Paul Blazejowski +Signed-off-by: Heiner Kallweit +Signed-off-by: David S. Miller +Signed-off-by: Greg Kroah-Hartman +--- + drivers/net/ethernet/realtek/r8169_main.c | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) + +--- a/drivers/net/ethernet/realtek/r8169_main.c ++++ b/drivers/net/ethernet/realtek/r8169_main.c +@@ -4677,6 +4677,9 @@ static void rtl8169_down(struct rtl8169_ + + rtl8169_update_counters(tp); + ++ pci_clear_master(tp->pci_dev); ++ rtl_pci_commit(tp); ++ + rtl8169_cleanup(tp, true); + + rtl_pll_power_down(tp); +@@ -4684,6 +4687,7 @@ static void rtl8169_down(struct rtl8169_ + + static void rtl8169_up(struct rtl8169_private *tp) + { ++ pci_set_master(tp->pci_dev); + rtl_pll_power_up(tp); + rtl8169_init_phy(tp); + napi_enable(&tp->napi); +@@ -5348,8 +5352,6 @@ static int rtl_init_one(struct pci_dev * + + rtl_hw_reset(tp); + +- pci_set_master(pdev); +- + rc = rtl_alloc_irq(tp); + if (rc < 0) { + dev_err(&pdev->dev, "Can't allocate interrupt\n"); diff --git a/queue-5.11/series b/queue-5.11/series index e52a295237e..261e45b9a57 100644 --- a/queue-5.11/series +++ b/queue-5.11/series @@ -243,3 +243,5 @@ x86-mem_encrypt-correct-physical-address-calculation-in-__set_clr_pte_enc.patch fs-cachefiles-remove-wait_bit_key-layout-dependency.patch ch_ktls-fix-enum-conversion-warning.patch can-dev-move-device-back-to-init-netns-on-owning-netns-delete.patch +r8169-fix-dma-being-used-after-buffer-free-if-wol-is-enabled.patch +net-dsa-b53-vlan-filtering-is-global-to-all-users.patch