]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
Fixes for 4.19
authorSasha Levin <sashal@kernel.org>
Sat, 13 Nov 2021 13:48:31 +0000 (08:48 -0500)
committerSasha Levin <sashal@kernel.org>
Sat, 13 Nov 2021 13:48:31 +0000 (08:48 -0500)
Signed-off-by: Sasha Levin <sashal@kernel.org>
14 files changed:
queue-4.19/bpf-prevent-increasing-bpf_jit_limit-above-max.patch [new file with mode: 0644]
queue-4.19/cavium-fix-return-values-of-the-probe-function.patch [new file with mode: 0644]
queue-4.19/cavium-return-negative-value-when-pci_alloc_irq_vect.patch [new file with mode: 0644]
queue-4.19/drm-panel-orientation-quirks-add-quirk-for-aya-neo-2.patch [new file with mode: 0644]
queue-4.19/hyperv-vmbus-include-linux-bitops.h.patch [new file with mode: 0644]
queue-4.19/mmc-winbond-don-t-build-on-m68k.patch [new file with mode: 0644]
queue-4.19/reset-tegra-bpmp-handle-errors-in-bpmp-response.patch [new file with mode: 0644]
queue-4.19/scsi-qla2xxx-fix-unmap-of-already-freed-sgl.patch [new file with mode: 0644]
queue-4.19/series
queue-4.19/sfc-don-t-use-netif_info-before-net_device-setup.patch [new file with mode: 0644]
queue-4.19/spi-spl022-fix-microwire-full-duplex-mode.patch [new file with mode: 0644]
queue-4.19/vmxnet3-do-not-stop-tx-queues-after-netif_device_det.patch [new file with mode: 0644]
queue-4.19/watchdog-fix-omap-watchdog-early-handling.patch [new file with mode: 0644]
queue-4.19/xen-netfront-stop-tx-queues-during-live-migration.patch [new file with mode: 0644]

diff --git a/queue-4.19/bpf-prevent-increasing-bpf_jit_limit-above-max.patch b/queue-4.19/bpf-prevent-increasing-bpf_jit_limit-above-max.patch
new file mode 100644 (file)
index 0000000..92da4d1
--- /dev/null
@@ -0,0 +1,71 @@
+From a0e9e39ccc11bd39c86b4a68161f82c1061f1e4d Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Thu, 14 Oct 2021 15:25:53 +0100
+Subject: bpf: Prevent increasing bpf_jit_limit above max
+
+From: Lorenz Bauer <lmb@cloudflare.com>
+
+[ Upstream commit fadb7ff1a6c2c565af56b4aacdd086b067eed440 ]
+
+Restrict bpf_jit_limit to the maximum supported by the arch's JIT.
+
+Signed-off-by: Lorenz Bauer <lmb@cloudflare.com>
+Signed-off-by: Alexei Starovoitov <ast@kernel.org>
+Link: https://lore.kernel.org/bpf/20211014142554.53120-4-lmb@cloudflare.com
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ include/linux/filter.h     | 1 +
+ kernel/bpf/core.c          | 4 +++-
+ net/core/sysctl_net_core.c | 2 +-
+ 3 files changed, 5 insertions(+), 2 deletions(-)
+
+diff --git a/include/linux/filter.h b/include/linux/filter.h
+index e981bd92a4e3a..89a6ef659b4ca 100644
+--- a/include/linux/filter.h
++++ b/include/linux/filter.h
+@@ -877,6 +877,7 @@ extern int bpf_jit_enable;
+ extern int bpf_jit_harden;
+ extern int bpf_jit_kallsyms;
+ extern long bpf_jit_limit;
++extern long bpf_jit_limit_max;
+ typedef void (*bpf_jit_fill_hole_t)(void *area, unsigned int size);
+diff --git a/kernel/bpf/core.c b/kernel/bpf/core.c
+index 341402bc1202d..4e5b5ae05406e 100644
+--- a/kernel/bpf/core.c
++++ b/kernel/bpf/core.c
+@@ -372,6 +372,7 @@ int bpf_jit_enable   __read_mostly = IS_BUILTIN(CONFIG_BPF_JIT_ALWAYS_ON);
+ int bpf_jit_harden   __read_mostly;
+ int bpf_jit_kallsyms __read_mostly;
+ long bpf_jit_limit   __read_mostly;
++long bpf_jit_limit_max __read_mostly;
+ static __always_inline void
+ bpf_get_prog_addr_region(const struct bpf_prog *prog,
+@@ -598,7 +599,8 @@ u64 __weak bpf_jit_alloc_exec_limit(void)
+ static int __init bpf_jit_charge_init(void)
+ {
+       /* Only used as heuristic here to derive limit. */
+-      bpf_jit_limit = min_t(u64, round_up(bpf_jit_alloc_exec_limit() >> 2,
++      bpf_jit_limit_max = bpf_jit_alloc_exec_limit();
++      bpf_jit_limit = min_t(u64, round_up(bpf_jit_limit_max >> 2,
+                                           PAGE_SIZE), LONG_MAX);
+       return 0;
+ }
+diff --git a/net/core/sysctl_net_core.c b/net/core/sysctl_net_core.c
+index 2597449ae9b48..0a0bf80623658 100644
+--- a/net/core/sysctl_net_core.c
++++ b/net/core/sysctl_net_core.c
+@@ -417,7 +417,7 @@ static struct ctl_table net_core_table[] = {
+               .mode           = 0600,
+               .proc_handler   = proc_dolongvec_minmax_bpf_restricted,
+               .extra1         = &long_one,
+-              .extra2         = &long_max,
++              .extra2         = &bpf_jit_limit_max,
+       },
+ #endif
+       {
+-- 
+2.33.0
+
diff --git a/queue-4.19/cavium-fix-return-values-of-the-probe-function.patch b/queue-4.19/cavium-fix-return-values-of-the-probe-function.patch
new file mode 100644 (file)
index 0000000..6bbedc8
--- /dev/null
@@ -0,0 +1,44 @@
+From da60b3cc52e75ea8bfe72915bff2dbdece03b29b Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Mon, 18 Oct 2021 14:32:57 +0000
+Subject: cavium: Fix return values of the probe function
+
+From: Zheyu Ma <zheyuma97@gmail.com>
+
+[ Upstream commit c69b2f46876825c726bd8a97c7fa852d8932bc32 ]
+
+During the process of driver probing, the probe function should return < 0
+for failure, otherwise, the kernel will treat value > 0 as success.
+
+Signed-off-by: Zheyu Ma <zheyuma97@gmail.com>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/net/ethernet/cavium/thunder/nicvf_main.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/drivers/net/ethernet/cavium/thunder/nicvf_main.c b/drivers/net/ethernet/cavium/thunder/nicvf_main.c
+index 99eea9e6a8ea6..0fbb0dee2dcfd 100644
+--- a/drivers/net/ethernet/cavium/thunder/nicvf_main.c
++++ b/drivers/net/ethernet/cavium/thunder/nicvf_main.c
+@@ -1223,7 +1223,7 @@ static int nicvf_register_misc_interrupt(struct nicvf *nic)
+       if (ret < 0) {
+               netdev_err(nic->netdev,
+                          "Req for #%d msix vectors failed\n", nic->num_vec);
+-              return 1;
++              return ret;
+       }
+       sprintf(nic->irq_name[irq], "%s Mbox", "NICVF");
+@@ -1242,7 +1242,7 @@ static int nicvf_register_misc_interrupt(struct nicvf *nic)
+       if (!nicvf_check_pf_ready(nic)) {
+               nicvf_disable_intr(nic, NICVF_INTR_MBOX, 0);
+               nicvf_unregister_interrupts(nic);
+-              return 1;
++              return -EIO;
+       }
+       return 0;
+-- 
+2.33.0
+
diff --git a/queue-4.19/cavium-return-negative-value-when-pci_alloc_irq_vect.patch b/queue-4.19/cavium-return-negative-value-when-pci_alloc_irq_vect.patch
new file mode 100644 (file)
index 0000000..e5562f3
--- /dev/null
@@ -0,0 +1,35 @@
+From a847d7725bf08db6f5acb7631febc82b313db4aa Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Mon, 18 Oct 2021 02:16:22 +0000
+Subject: cavium: Return negative value when pci_alloc_irq_vectors() fails
+
+From: Zheyu Ma <zheyuma97@gmail.com>
+
+[ Upstream commit b2cddb44bddc1a9c5949a978bb454bba863264db ]
+
+During the process of driver probing, the probe function should return < 0
+for failure, otherwise, the kernel will treat value > 0 as success.
+
+Signed-off-by: Zheyu Ma <zheyuma97@gmail.com>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/net/ethernet/cavium/thunder/nic_main.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/drivers/net/ethernet/cavium/thunder/nic_main.c b/drivers/net/ethernet/cavium/thunder/nic_main.c
+index 90497a27df184..7c0a67f1f43f7 100644
+--- a/drivers/net/ethernet/cavium/thunder/nic_main.c
++++ b/drivers/net/ethernet/cavium/thunder/nic_main.c
+@@ -1175,7 +1175,7 @@ static int nic_register_interrupts(struct nicpf *nic)
+               dev_err(&nic->pdev->dev,
+                       "Request for #%d msix vectors failed, returned %d\n",
+                          nic->num_vec, ret);
+-              return 1;
++              return ret;
+       }
+       /* Register mailbox interrupt handler */
+-- 
+2.33.0
+
diff --git a/queue-4.19/drm-panel-orientation-quirks-add-quirk-for-aya-neo-2.patch b/queue-4.19/drm-panel-orientation-quirks-add-quirk-for-aya-neo-2.patch
new file mode 100644 (file)
index 0000000..de43302
--- /dev/null
@@ -0,0 +1,39 @@
+From 94290327e65c2afbbbc739924f73a261f608a3e1 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Tue, 19 Oct 2021 09:24:33 -0500
+Subject: drm: panel-orientation-quirks: Add quirk for Aya Neo 2021
+
+From: Bryant Mairs <bryant@mai.rs>
+
+[ Upstream commit def0c3697287f6e85d5ac68b21302966c95474f9 ]
+
+Fixes screen orientation for the Aya Neo 2021 handheld gaming console.
+
+Signed-off-by: Bryant Mairs <bryant@mai.rs>
+Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
+Link: https://patchwork.freedesktop.org/patch/msgid/20211019142433.4295-1-bryant@mai.rs
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/gpu/drm/drm_panel_orientation_quirks.c | 6 ++++++
+ 1 file changed, 6 insertions(+)
+
+diff --git a/drivers/gpu/drm/drm_panel_orientation_quirks.c b/drivers/gpu/drm/drm_panel_orientation_quirks.c
+index 652de972c3aea..48be8590ebe81 100644
+--- a/drivers/gpu/drm/drm_panel_orientation_quirks.c
++++ b/drivers/gpu/drm/drm_panel_orientation_quirks.c
+@@ -113,6 +113,12 @@ static const struct dmi_system_id orientation_data[] = {
+                 DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "T103HAF"),
+               },
+               .driver_data = (void *)&lcd800x1280_rightside_up,
++      }, {    /* AYA NEO 2021 */
++              .matches = {
++                DMI_EXACT_MATCH(DMI_SYS_VENDOR, "AYADEVICE"),
++                DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "AYA NEO 2021"),
++              },
++              .driver_data = (void *)&lcd800x1280_rightside_up,
+       }, {    /* GPD MicroPC (generic strings, also match on bios date) */
+               .matches = {
+                 DMI_EXACT_MATCH(DMI_SYS_VENDOR, "Default string"),
+-- 
+2.33.0
+
diff --git a/queue-4.19/hyperv-vmbus-include-linux-bitops.h.patch b/queue-4.19/hyperv-vmbus-include-linux-bitops.h.patch
new file mode 100644 (file)
index 0000000..91e3724
--- /dev/null
@@ -0,0 +1,45 @@
+From 374eef79c1b49108bcf8780b302e714fc9dc1b4f 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 87d3d7da78f87..7e7c8debbd285 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 <asm/hyperv-tlfs.h>
+ #include <linux/atomic.h>
+-- 
+2.33.0
+
diff --git a/queue-4.19/mmc-winbond-don-t-build-on-m68k.patch b/queue-4.19/mmc-winbond-don-t-build-on-m68k.patch
new file mode 100644 (file)
index 0000000..9bdf1ff
--- /dev/null
@@ -0,0 +1,45 @@
+From 503f859285bc997fc1848363620f2b3da271b8fa 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 b7f809aa40c2c..2c11944686cf9 100644
+--- a/drivers/mmc/host/Kconfig
++++ b/drivers/mmc/host/Kconfig
+@@ -421,7 +421,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
+
diff --git a/queue-4.19/reset-tegra-bpmp-handle-errors-in-bpmp-response.patch b/queue-4.19/reset-tegra-bpmp-handle-errors-in-bpmp-response.patch
new file mode 100644 (file)
index 0000000..a82ef16
--- /dev/null
@@ -0,0 +1,52 @@
+From 29de6b25aa34db9dc47aa37742a1d04e277fd36f Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Wed, 15 Sep 2021 11:55:14 +0300
+Subject: reset: tegra-bpmp: Handle errors in BPMP response
+
+From: Mikko Perttunen <mperttunen@nvidia.com>
+
+[ Upstream commit c045ceb5a145d2a9a4bf33cbc55185ddf99f60ab ]
+
+The return value from tegra_bpmp_transfer indicates the success or
+failure of the IPC transaction with BPMP. If the transaction
+succeeded, we also need to check the actual command's result code.
+Add code to do this.
+
+Signed-off-by: Mikko Perttunen <mperttunen@nvidia.com>
+Link: https://lore.kernel.org/r/20210915085517.1669675-2-mperttunen@nvidia.com
+Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/reset/tegra/reset-bpmp.c | 9 ++++++++-
+ 1 file changed, 8 insertions(+), 1 deletion(-)
+
+diff --git a/drivers/reset/tegra/reset-bpmp.c b/drivers/reset/tegra/reset-bpmp.c
+index 5daf2ee1a396b..f9790b60f9964 100644
+--- a/drivers/reset/tegra/reset-bpmp.c
++++ b/drivers/reset/tegra/reset-bpmp.c
+@@ -23,6 +23,7 @@ static int tegra_bpmp_reset_common(struct reset_controller_dev *rstc,
+       struct tegra_bpmp *bpmp = to_tegra_bpmp(rstc);
+       struct mrq_reset_request request;
+       struct tegra_bpmp_message msg;
++      int err;
+       memset(&request, 0, sizeof(request));
+       request.cmd = command;
+@@ -33,7 +34,13 @@ static int tegra_bpmp_reset_common(struct reset_controller_dev *rstc,
+       msg.tx.data = &request;
+       msg.tx.size = sizeof(request);
+-      return tegra_bpmp_transfer(bpmp, &msg);
++      err = tegra_bpmp_transfer(bpmp, &msg);
++      if (err)
++              return err;
++      if (msg.rx.ret)
++              return -EINVAL;
++
++      return 0;
+ }
+ static int tegra_bpmp_reset_module(struct reset_controller_dev *rstc,
+-- 
+2.33.0
+
diff --git a/queue-4.19/scsi-qla2xxx-fix-unmap-of-already-freed-sgl.patch b/queue-4.19/scsi-qla2xxx-fix-unmap-of-already-freed-sgl.patch
new file mode 100644 (file)
index 0000000..d6423d9
--- /dev/null
@@ -0,0 +1,90 @@
+From 5210ec1045da1d353efccd32066d400cffdaeea8 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Mon, 18 Oct 2021 15:26:50 +0300
+Subject: scsi: qla2xxx: Fix unmap of already freed sgl
+
+From: Dmitry Bogdanov <d.bogdanov@yadro.com>
+
+[ Upstream commit 4a8f71014b4d56c4fb287607e844c0a9f68f46d9 ]
+
+The sgl is freed in the target stack in target_release_cmd_kref() before
+calling qlt_free_cmd() but there is an unmap of sgl in qlt_free_cmd() that
+causes a panic if sgl is not yet DMA unmapped:
+
+NIP dma_direct_unmap_sg+0xdc/0x180
+LR  dma_direct_unmap_sg+0xc8/0x180
+Call Trace:
+ ql_dbg_prefix+0x68/0xc0 [qla2xxx] (unreliable)
+ dma_unmap_sg_attrs+0x54/0xf0
+ qlt_unmap_sg.part.19+0x54/0x1c0 [qla2xxx]
+ qlt_free_cmd+0x124/0x1d0 [qla2xxx]
+ tcm_qla2xxx_release_cmd+0x4c/0xa0 [tcm_qla2xxx]
+ target_put_sess_cmd+0x198/0x370 [target_core_mod]
+ transport_generic_free_cmd+0x6c/0x1b0 [target_core_mod]
+ tcm_qla2xxx_complete_free+0x6c/0x90 [tcm_qla2xxx]
+
+The sgl may be left unmapped in error cases of response sending.  For
+instance, qlt_rdy_to_xfer() maps sgl and exits when session is being
+deleted keeping the sgl mapped.
+
+This patch removes use-after-free of the sgl and ensures that the sgl is
+unmapped for any command that was not sent to firmware.
+
+Link: https://lore.kernel.org/r/20211018122650.11846-1-d.bogdanov@yadro.com
+Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com>
+Signed-off-by: Dmitry Bogdanov <d.bogdanov@yadro.com>
+Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/scsi/qla2xxx/qla_target.c | 14 +++++---------
+ 1 file changed, 5 insertions(+), 9 deletions(-)
+
+diff --git a/drivers/scsi/qla2xxx/qla_target.c b/drivers/scsi/qla2xxx/qla_target.c
+index ec54c8f34bc84..5fbac85d7adfb 100644
+--- a/drivers/scsi/qla2xxx/qla_target.c
++++ b/drivers/scsi/qla2xxx/qla_target.c
+@@ -3216,8 +3216,7 @@ int qlt_xmit_response(struct qla_tgt_cmd *cmd, int xmit_type,
+                       "RESET-RSP online/active/old-count/new-count = %d/%d/%d/%d.\n",
+                       vha->flags.online, qla2x00_reset_active(vha),
+                       cmd->reset_count, qpair->chip_reset);
+-              spin_unlock_irqrestore(qpair->qp_lock_ptr, flags);
+-              return 0;
++              goto out_unmap_unlock;
+       }
+       /* Does F/W have an IOCBs for this request */
+@@ -3339,10 +3338,6 @@ int qlt_rdy_to_xfer(struct qla_tgt_cmd *cmd)
+       prm.sg = NULL;
+       prm.req_cnt = 1;
+-      /* Calculate number of entries and segments required */
+-      if (qlt_pci_map_calc_cnt(&prm) != 0)
+-              return -EAGAIN;
+-
+       if (!qpair->fw_started || (cmd->reset_count != qpair->chip_reset) ||
+           (cmd->sess && cmd->sess->deleted)) {
+               /*
+@@ -3358,6 +3353,10 @@ int qlt_rdy_to_xfer(struct qla_tgt_cmd *cmd)
+               return 0;
+       }
++      /* Calculate number of entries and segments required */
++      if (qlt_pci_map_calc_cnt(&prm) != 0)
++              return -EAGAIN;
++
+       spin_lock_irqsave(qpair->qp_lock_ptr, flags);
+       /* Does F/W have an IOCBs for this request */
+       res = qlt_check_reserve_free_req(qpair, prm.req_cnt);
+@@ -3785,9 +3784,6 @@ void qlt_free_cmd(struct qla_tgt_cmd *cmd)
+       BUG_ON(cmd->cmd_in_wq);
+-      if (cmd->sg_mapped)
+-              qlt_unmap_sg(cmd->vha, cmd);
+-
+       if (!cmd->q_full)
+               qlt_decr_num_pend_cmds(cmd->vha);
+-- 
+2.33.0
+
index 9829ac8e992240349c69e175fd1d5b99f725f8ab..3168c6e7301f7393f6b00dd82c7405b209abfe8a 100644 (file)
@@ -23,3 +23,16 @@ alsa-timer-unconditionally-unlink-slave-instances-too.patch
 fuse-fix-page-stealing.patch
 x86-sme-use-define-use_early_pgtable_l5-in-mem_encrypt_identity.c.patch
 x86-irq-ensure-pi-wakeup-handler-is-unregistered-before-module-unload.patch
+cavium-return-negative-value-when-pci_alloc_irq_vect.patch
+scsi-qla2xxx-fix-unmap-of-already-freed-sgl.patch
+cavium-fix-return-values-of-the-probe-function.patch
+sfc-don-t-use-netif_info-before-net_device-setup.patch
+hyperv-vmbus-include-linux-bitops.h.patch
+reset-tegra-bpmp-handle-errors-in-bpmp-response.patch
+mmc-winbond-don-t-build-on-m68k.patch
+drm-panel-orientation-quirks-add-quirk-for-aya-neo-2.patch
+bpf-prevent-increasing-bpf_jit_limit-above-max.patch
+xen-netfront-stop-tx-queues-during-live-migration.patch
+spi-spl022-fix-microwire-full-duplex-mode.patch
+watchdog-fix-omap-watchdog-early-handling.patch
+vmxnet3-do-not-stop-tx-queues-after-netif_device_det.patch
diff --git a/queue-4.19/sfc-don-t-use-netif_info-before-net_device-setup.patch b/queue-4.19/sfc-don-t-use-netif_info-before-net_device-setup.patch
new file mode 100644 (file)
index 0000000..83d829f
--- /dev/null
@@ -0,0 +1,66 @@
+From 5359e0b6e3499a9ccd2b9ced2860a418059666d0 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Wed, 20 Oct 2021 00:40:16 +0200
+Subject: sfc: Don't use netif_info before net_device setup
+
+From: Erik Ekman <erik@kryo.se>
+
+[ Upstream commit bf6abf345dfa77786aca554bc58c64bd428ecb1d ]
+
+Use pci_info instead to avoid unnamed/uninitialized noise:
+
+[197088.688729] sfc 0000:01:00.0: Solarflare NIC detected
+[197088.690333] sfc 0000:01:00.0: Part Number : SFN5122F
+[197088.729061] sfc 0000:01:00.0 (unnamed net_device) (uninitialized): no SR-IOV VFs probed
+[197088.729071] sfc 0000:01:00.0 (unnamed net_device) (uninitialized): no PTP support
+
+Inspired by fa44821a4ddd ("sfc: don't use netif_info et al before
+net_device is registered") from Heiner Kallweit.
+
+Signed-off-by: Erik Ekman <erik@kryo.se>
+Acked-by: Martin Habets <habetsm.xilinx@gmail.com>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/net/ethernet/sfc/ptp.c         | 4 ++--
+ drivers/net/ethernet/sfc/siena_sriov.c | 2 +-
+ 2 files changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/drivers/net/ethernet/sfc/ptp.c b/drivers/net/ethernet/sfc/ptp.c
+index d47151dbe804d..c0a810f740341 100644
+--- a/drivers/net/ethernet/sfc/ptp.c
++++ b/drivers/net/ethernet/sfc/ptp.c
+@@ -651,7 +651,7 @@ static int efx_ptp_get_attributes(struct efx_nic *efx)
+       } else if (rc == -EINVAL) {
+               fmt = MC_CMD_PTP_OUT_GET_ATTRIBUTES_SECONDS_NANOSECONDS;
+       } else if (rc == -EPERM) {
+-              netif_info(efx, probe, efx->net_dev, "no PTP support\n");
++              pci_info(efx->pci_dev, "no PTP support\n");
+               return rc;
+       } else {
+               efx_mcdi_display_error(efx, MC_CMD_PTP, sizeof(inbuf),
+@@ -827,7 +827,7 @@ static int efx_ptp_disable(struct efx_nic *efx)
+        * should only have been called during probe.
+        */
+       if (rc == -ENOSYS || rc == -EPERM)
+-              netif_info(efx, probe, efx->net_dev, "no PTP support\n");
++              pci_info(efx->pci_dev, "no PTP support\n");
+       else if (rc)
+               efx_mcdi_display_error(efx, MC_CMD_PTP,
+                                      MC_CMD_PTP_IN_DISABLE_LEN,
+diff --git a/drivers/net/ethernet/sfc/siena_sriov.c b/drivers/net/ethernet/sfc/siena_sriov.c
+index da7b94f346049..30d58f72725df 100644
+--- a/drivers/net/ethernet/sfc/siena_sriov.c
++++ b/drivers/net/ethernet/sfc/siena_sriov.c
+@@ -1059,7 +1059,7 @@ void efx_siena_sriov_probe(struct efx_nic *efx)
+               return;
+       if (efx_siena_sriov_cmd(efx, false, &efx->vi_scale, &count)) {
+-              netif_info(efx, probe, efx->net_dev, "no SR-IOV VFs probed\n");
++              pci_info(efx->pci_dev, "no SR-IOV VFs probed\n");
+               return;
+       }
+       if (count > 0 && count > max_vfs)
+-- 
+2.33.0
+
diff --git a/queue-4.19/spi-spl022-fix-microwire-full-duplex-mode.patch b/queue-4.19/spi-spl022-fix-microwire-full-duplex-mode.patch
new file mode 100644 (file)
index 0000000..eab6ac6
--- /dev/null
@@ -0,0 +1,44 @@
+From 824572c19a65643405b1095ccfbac4e9b15ad228 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 1af8c96b940e2..aa04ff6e01b9d 100644
+--- a/drivers/spi/spi-pl022.c
++++ b/drivers/spi/spi-pl022.c
+@@ -1703,12 +1703,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.19/vmxnet3-do-not-stop-tx-queues-after-netif_device_det.patch b/queue-4.19/vmxnet3-do-not-stop-tx-queues-after-netif_device_det.patch
new file mode 100644 (file)
index 0000000..df7c347
--- /dev/null
@@ -0,0 +1,34 @@
+From 36a32555afaab147e71e375131b1dc762d1082d8 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 e454dfc9ad8f2..c004819bebe35 100644
+--- a/drivers/net/vmxnet3/vmxnet3_drv.c
++++ b/drivers/net/vmxnet3/vmxnet3_drv.c
+@@ -3634,7 +3634,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.19/watchdog-fix-omap-watchdog-early-handling.patch b/queue-4.19/watchdog-fix-omap-watchdog-early-handling.patch
new file mode 100644 (file)
index 0000000..82260c7
--- /dev/null
@@ -0,0 +1,44 @@
+From 3156a87c58c995fa58e827731cc9f28a4dc5ac81 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Thu, 14 Oct 2021 12:22:29 +0200
+Subject: watchdog: Fix OMAP watchdog early handling
+
+From: Walter Stoll <walter.stoll@duagon.com>
+
+[ Upstream commit cd004d8299f1dc6cfa6a4eea8f94cb45eaedf070 ]
+
+TI's implementation does not service the watchdog even if the kernel
+command line parameter omap_wdt.early_enable is set to 1. This patch
+fixes the issue.
+
+Signed-off-by: Walter Stoll <walter.stoll@duagon.com>
+Reviewed-by: Guenter Roeck <linux@roeck-us.net>
+Link: https://lore.kernel.org/r/88a8fe5229cd68fa0f1fd22f5d66666c1b7057a0.camel@duagon.com
+Signed-off-by: Guenter Roeck <linux@roeck-us.net>
+Signed-off-by: Wim Van Sebroeck <wim@linux-watchdog.org>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/watchdog/omap_wdt.c | 6 +++++-
+ 1 file changed, 5 insertions(+), 1 deletion(-)
+
+diff --git a/drivers/watchdog/omap_wdt.c b/drivers/watchdog/omap_wdt.c
+index cbd752f9ac563..7376ba56cdf2e 100644
+--- a/drivers/watchdog/omap_wdt.c
++++ b/drivers/watchdog/omap_wdt.c
+@@ -272,8 +272,12 @@ static int omap_wdt_probe(struct platform_device *pdev)
+                       wdev->wdog.bootstatus = WDIOF_CARDRESET;
+       }
+-      if (!early_enable)
++      if (early_enable) {
++              omap_wdt_start(&wdev->wdog);
++              set_bit(WDOG_HW_RUNNING, &wdev->wdog.status);
++      } else {
+               omap_wdt_disable(wdev);
++      }
+       ret = watchdog_register_device(&wdev->wdog);
+       if (ret) {
+-- 
+2.33.0
+
diff --git a/queue-4.19/xen-netfront-stop-tx-queues-during-live-migration.patch b/queue-4.19/xen-netfront-stop-tx-queues-during-live-migration.patch
new file mode 100644 (file)
index 0000000..c2fd66c
--- /dev/null
@@ -0,0 +1,67 @@
+From 707bd0fa77c566e2d4d482c7c07ecaf5e58d9c2c 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 c8e84276e6397..a1c828ffac8b7 100644
+--- a/drivers/net/xen-netfront.c
++++ b/drivers/net/xen-netfront.c
+@@ -1442,6 +1442,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;
+ }
+@@ -1990,6 +1994,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
+