]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
Fixes for 4.4
authorSasha Levin <sashal@kernel.org>
Sat, 13 Nov 2021 13:48:34 +0000 (08:48 -0500)
committerSasha Levin <sashal@kernel.org>
Sat, 13 Nov 2021 13:48:34 +0000 (08:48 -0500)
Signed-off-by: Sasha Levin <sashal@kernel.org>
queue-4.4/hyperv-vmbus-include-linux-bitops.h.patch [new file with mode: 0644]
queue-4.4/mmc-winbond-don-t-build-on-m68k.patch [new file with mode: 0644]
queue-4.4/series
queue-4.4/spi-spl022-fix-microwire-full-duplex-mode.patch [new file with mode: 0644]
queue-4.4/vmxnet3-do-not-stop-tx-queues-after-netif_device_det.patch [new file with mode: 0644]
queue-4.4/xen-netfront-stop-tx-queues-during-live-migration.patch [new file with mode: 0644]

diff --git a/queue-4.4/hyperv-vmbus-include-linux-bitops.h.patch b/queue-4.4/hyperv-vmbus-include-linux-bitops.h.patch
new file mode 100644 (file)
index 0000000..60e0260
--- /dev/null
@@ -0,0 +1,45 @@
+From b37d84c3c74ef34d763a6448ac5aa5fbeb037646 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Mon, 18 Oct 2021 15:19:08 +0200
+Subject: hyperv/vmbus: include linux/bitops.h
+
+From: Arnd Bergmann <arnd@arndb.de>
+
+[ Upstream commit 8017c99680fa65e1e8d999df1583de476a187830 ]
+
+On arm64 randconfig builds, hyperv sometimes fails with this
+error:
+
+In file included from drivers/hv/hv_trace.c:3:
+In file included from drivers/hv/hyperv_vmbus.h:16:
+In file included from arch/arm64/include/asm/sync_bitops.h:5:
+arch/arm64/include/asm/bitops.h:11:2: error: only <linux/bitops.h> can be included directly
+In file included from include/asm-generic/bitops/hweight.h:5:
+include/asm-generic/bitops/arch_hweight.h:9:9: error: implicit declaration of function '__sw_hweight32' [-Werror,-Wimplicit-function-declaration]
+include/asm-generic/bitops/atomic.h:17:7: error: implicit declaration of function 'BIT_WORD' [-Werror,-Wimplicit-function-declaration]
+
+Include the correct header first.
+
+Signed-off-by: Arnd Bergmann <arnd@arndb.de>
+Link: https://lore.kernel.org/r/20211018131929.2260087-1-arnd@kernel.org
+Signed-off-by: Wei Liu <wei.liu@kernel.org>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/hv/hyperv_vmbus.h | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/drivers/hv/hyperv_vmbus.h b/drivers/hv/hyperv_vmbus.h
+index 15e06493c53aa..4e7592addfe2b 100644
+--- a/drivers/hv/hyperv_vmbus.h
++++ b/drivers/hv/hyperv_vmbus.h
+@@ -26,6 +26,7 @@
+ #define _HYPERV_VMBUS_H
+ #include <linux/list.h>
++#include <linux/bitops.h>
+ #include <asm/sync_bitops.h>
+ #include <linux/atomic.h>
+ #include <linux/hyperv.h>
+-- 
+2.33.0
+
diff --git a/queue-4.4/mmc-winbond-don-t-build-on-m68k.patch b/queue-4.4/mmc-winbond-don-t-build-on-m68k.patch
new file mode 100644 (file)
index 0000000..e0ee2fa
--- /dev/null
@@ -0,0 +1,45 @@
+From 916ab6203beca39c6eff1ccaf269222abce9168e Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Sun, 17 Oct 2021 10:59:49 -0700
+Subject: mmc: winbond: don't build on M68K
+
+From: Randy Dunlap <rdunlap@infradead.org>
+
+[ Upstream commit 162079f2dccd02cb4b6654defd32ca387dd6d4d4 ]
+
+The Winbond MMC driver fails to build on ARCH=m68k so prevent
+that build config. Silences these build errors:
+
+../drivers/mmc/host/wbsd.c: In function 'wbsd_request_end':
+../drivers/mmc/host/wbsd.c:212:28: error: implicit declaration of function 'claim_dma_lock' [-Werror=implicit-function-declaration]
+  212 |                 dmaflags = claim_dma_lock();
+../drivers/mmc/host/wbsd.c:215:17: error: implicit declaration of function 'release_dma_lock'; did you mean 'release_task'? [-Werror=implicit-function-declaration]
+  215 |                 release_dma_lock(dmaflags);
+
+Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
+Cc: Pierre Ossman <pierre@ossman.eu>
+Cc: Geert Uytterhoeven <geert@linux-m68k.org>
+Cc: Arnd Bergmann <arnd@arndb.de>
+Link: https://lore.kernel.org/r/20211017175949.23838-1-rdunlap@infradead.org
+Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/mmc/host/Kconfig | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/drivers/mmc/host/Kconfig b/drivers/mmc/host/Kconfig
+index 2e6d2fff1096a..fb1231a882e65 100644
+--- a/drivers/mmc/host/Kconfig
++++ b/drivers/mmc/host/Kconfig
+@@ -377,7 +377,7 @@ config MMC_OMAP_HS
+ config MMC_WBSD
+       tristate "Winbond W83L51xD SD/MMC Card Interface support"
+-      depends on ISA_DMA_API
++      depends on ISA_DMA_API && !M68K
+       help
+         This selects the Winbond(R) W83L51xD Secure digital and
+           Multimedia card Interface.
+-- 
+2.33.0
+
index 6ec827f718b505990b47931fe54d92797f44d770..b79992099834da6d4d25edaf3ceb1c7cbc0057f6 100644 (file)
@@ -15,3 +15,8 @@ alsa-synth-missing-check-for-possible-null-after-the-call-to-kstrdup.patch
 alsa-timer-fix-use-after-free-problem.patch
 alsa-timer-unconditionally-unlink-slave-instances-too.patch
 x86-irq-ensure-pi-wakeup-handler-is-unregistered-before-module-unload.patch
+hyperv-vmbus-include-linux-bitops.h.patch
+mmc-winbond-don-t-build-on-m68k.patch
+xen-netfront-stop-tx-queues-during-live-migration.patch
+spi-spl022-fix-microwire-full-duplex-mode.patch
+vmxnet3-do-not-stop-tx-queues-after-netif_device_det.patch
diff --git a/queue-4.4/spi-spl022-fix-microwire-full-duplex-mode.patch b/queue-4.4/spi-spl022-fix-microwire-full-duplex-mode.patch
new file mode 100644 (file)
index 0000000..89de069
--- /dev/null
@@ -0,0 +1,44 @@
+From d04c3b14900c7e95131400e5458fb64301c8f5ce Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Fri, 22 Oct 2021 16:21:04 +0200
+Subject: spi: spl022: fix Microwire full duplex mode
+
+From: Thomas Perrot <thomas.perrot@bootlin.com>
+
+[ Upstream commit d81d0e41ed5fe7229a2c9a29d13bad288c7cf2d2 ]
+
+There are missing braces in the function that verify controller parameters,
+then an error is always returned when the parameter to select Microwire
+frames operation is used on devices allowing it.
+
+Signed-off-by: Thomas Perrot <thomas.perrot@bootlin.com>
+Link: https://lore.kernel.org/r/20211022142104.1386379-1-thomas.perrot@bootlin.com
+Signed-off-by: Mark Brown <broonie@kernel.org>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/spi/spi-pl022.c | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/drivers/spi/spi-pl022.c b/drivers/spi/spi-pl022.c
+index 5e5fd77e27119..e294f21db2068 100644
+--- a/drivers/spi/spi-pl022.c
++++ b/drivers/spi/spi-pl022.c
+@@ -1710,12 +1710,13 @@ static int verify_controller_parameters(struct pl022 *pl022,
+                               return -EINVAL;
+                       }
+               } else {
+-                      if (chip_info->duplex != SSP_MICROWIRE_CHANNEL_FULL_DUPLEX)
++                      if (chip_info->duplex != SSP_MICROWIRE_CHANNEL_FULL_DUPLEX) {
+                               dev_err(&pl022->adev->dev,
+                                       "Microwire half duplex mode requested,"
+                                       " but this is only available in the"
+                                       " ST version of PL022\n");
+-                      return -EINVAL;
++                              return -EINVAL;
++                      }
+               }
+       }
+       return 0;
+-- 
+2.33.0
+
diff --git a/queue-4.4/vmxnet3-do-not-stop-tx-queues-after-netif_device_det.patch b/queue-4.4/vmxnet3-do-not-stop-tx-queues-after-netif_device_det.patch
new file mode 100644 (file)
index 0000000..e02ec4b
--- /dev/null
@@ -0,0 +1,34 @@
+From fc6b20d309382071a2806869aabf13d05f02a3a0 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Tue, 26 Oct 2021 14:50:31 -0700
+Subject: vmxnet3: do not stop tx queues after netif_device_detach()
+
+From: Dongli Zhang <dongli.zhang@oracle.com>
+
+[ Upstream commit 9159f102402a64ac85e676b75cc1f9c62c5b4b73 ]
+
+The netif_device_detach() conditionally stops all tx queues if the queues
+are running. There is no need to call netif_tx_stop_all_queues() again.
+
+Signed-off-by: Dongli Zhang <dongli.zhang@oracle.com>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/net/vmxnet3/vmxnet3_drv.c | 1 -
+ 1 file changed, 1 deletion(-)
+
+diff --git a/drivers/net/vmxnet3/vmxnet3_drv.c b/drivers/net/vmxnet3/vmxnet3_drv.c
+index 419c045d07527..474ee7e723d00 100644
+--- a/drivers/net/vmxnet3/vmxnet3_drv.c
++++ b/drivers/net/vmxnet3/vmxnet3_drv.c
+@@ -3389,7 +3389,6 @@ vmxnet3_suspend(struct device *device)
+       vmxnet3_free_intr_resources(adapter);
+       netif_device_detach(netdev);
+-      netif_tx_stop_all_queues(netdev);
+       /* Create wake-up filters. */
+       pmConf = adapter->pm_conf;
+-- 
+2.33.0
+
diff --git a/queue-4.4/xen-netfront-stop-tx-queues-during-live-migration.patch b/queue-4.4/xen-netfront-stop-tx-queues-during-live-migration.patch
new file mode 100644 (file)
index 0000000..f0e7750
--- /dev/null
@@ -0,0 +1,67 @@
+From 7697dc689072e4a9853612fd00ef328a8ebab778 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Fri, 22 Oct 2021 16:31:39 -0700
+Subject: xen/netfront: stop tx queues during live migration
+
+From: Dongli Zhang <dongli.zhang@oracle.com>
+
+[ Upstream commit 042b2046d0f05cf8124c26ff65dbb6148a4404fb ]
+
+The tx queues are not stopped during the live migration. As a result, the
+ndo_start_xmit() may access netfront_info->queues which is freed by
+talk_to_netback()->xennet_destroy_queues().
+
+This patch is to netif_device_detach() at the beginning of xen-netfront
+resuming, and netif_device_attach() at the end of resuming.
+
+     CPU A                                CPU B
+
+ talk_to_netback()
+ -> if (info->queues)
+        xennet_destroy_queues(info);
+    to free netfront_info->queues
+
+                                        xennet_start_xmit()
+                                        to access netfront_info->queues
+
+  -> err = xennet_create_queues(info, &num_queues);
+
+The idea is borrowed from virtio-net.
+
+Cc: Joe Jin <joe.jin@oracle.com>
+Signed-off-by: Dongli Zhang <dongli.zhang@oracle.com>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/net/xen-netfront.c | 8 ++++++++
+ 1 file changed, 8 insertions(+)
+
+diff --git a/drivers/net/xen-netfront.c b/drivers/net/xen-netfront.c
+index 7d4c0c46a889d..6d4bf37c660f7 100644
+--- a/drivers/net/xen-netfront.c
++++ b/drivers/net/xen-netfront.c
+@@ -1454,6 +1454,10 @@ static int netfront_resume(struct xenbus_device *dev)
+       dev_dbg(&dev->dev, "%s\n", dev->nodename);
++      netif_tx_lock_bh(info->netdev);
++      netif_device_detach(info->netdev);
++      netif_tx_unlock_bh(info->netdev);
++
+       xennet_disconnect_backend(info);
+       return 0;
+ }
+@@ -2014,6 +2018,10 @@ static int xennet_connect(struct net_device *dev)
+        * domain a kick because we've probably just requeued some
+        * packets.
+        */
++      netif_tx_lock_bh(np->netdev);
++      netif_device_attach(np->netdev);
++      netif_tx_unlock_bh(np->netdev);
++
+       netif_carrier_on(np->netdev);
+       for (j = 0; j < num_queues; ++j) {
+               queue = &np->queues[j];
+-- 
+2.33.0
+