From 470084d98bd4392b264741430fcf548a263f9cfa Mon Sep 17 00:00:00 2001 From: Sasha Levin Date: Sat, 13 Nov 2021 08:48:28 -0500 Subject: [PATCH] Fixes for 5.14 Signed-off-by: Sasha Levin --- ...-fixes-hp-spectre-x360-15-eb1xxx-spe.patch | 123 ++++++++++++ ...0-olinuxino-lime2-fix-ethernet-phy-m.patch | 45 +++++ ...ure-0db-full-scale-volume-is-used-fo.patch | 63 ++++++ ...x-null-ptr-deref-in-snd_soc_del_comp.patch | 51 +++++ ...ueue-restart-after-blk_sts_zone_reso.patch | 95 ++++++++++ ...f_jit_alloc_exec_limit-for-arm64-jit.patch | 38 ++++ ...f_jit_alloc_exec_limit-for-riscv-jit.patch | 43 +++++ ...t-increasing-bpf_jit_limit-above-max.patch | 71 +++++++ ...-return-values-of-the-probe-function.patch | 44 +++++ ...gative-value-when-pci_alloc_irq_vect.patch | 35 ++++ ...ation-quirks-add-quirk-for-aya-neo-2.patch | 39 ++++ ...tation-quirks-add-quirk-for-gpd-win3.patch | 39 ++++ ...hanging-ping-nettest-binaries-on-cle.patch | 44 +++++ ...2.c-add-check-for-bgpio_init-failure.patch | 37 ++++ .../hyperv-vmbus-include-linux-bitops.h.patch | 45 +++++ ...m64-report-corrupted-refcount-at-el2.patch | 39 ++++ ...-return-values-of-the-probe-function.patch | 61 ++++++ .../mmc-winbond-don-t-build-on-m68k.patch | 45 +++++ ...hclge-hclgevf-workqueue-to-wq_unboun.patch | 140 ++++++++++++++ ...reset-event-before-initialization-pr.patch | 106 +++++++++++ ...c-ocelot-add-of_node_put-before-goto.patch | 38 ++++ ...lculate-csum-of-looped-back-and-forw.patch | 98 ++++++++++ ...ct-spelling-mistake-to-tcpf_syn_recv.patch | 35 ++++ ...-smc_link-llc_testlink_time-overflow.patch | 40 ++++ ...t-sparx5-add-of_node_put-before-goto.patch | 38 ++++ ...og-rejection-for-mtu-check-through-m.patch | 114 +++++++++++ ...a-memory-leak-when-releasing-a-queue.patch | 51 +++++ ...t-tcp-fix-header-digest-verification.patch | 37 ++++ ...-print-of-ptp_kvm-on-x86_64-platform.patch | 48 +++++ ...add-device-10ec-8162-to-driver-r8169.patch | 36 ++++ ...d-empty-driver-allowing-consumers-to.patch | 61 ++++++ ...-bpmp-handle-errors-in-bpmp-response.patch | 52 +++++ ...a2xxx-fix-unmap-of-already-freed-sgl.patch | 90 +++++++++ ...a2xxx-return-enomem-if-kzalloc-fails.patch | 37 ++++ queue-5.14/series | 42 ++++ ...e-netif_info-before-net_device-setup.patch | 66 +++++++ ...-fibre-specific-supported-link-modes.patch | 179 ++++++++++++++++++ ...ange-to-dynamic-allocation-of-spi-id.patch | 62 ++++++ ...pl022-fix-microwire-full-duplex-mode.patch | 44 +++++ ...lftests-vm-split_huge_page_test.c-fi.patch | 45 +++++ ...top-tx-queues-after-netif_device_det.patch | 34 ++++ ...dog-fix-omap-watchdog-early-handling.patch | 44 +++++ ...stop-tx-queues-during-live-migration.patch | 67 +++++++ 43 files changed, 2561 insertions(+) create mode 100644 queue-5.14/alsa-hda-realtek-fixes-hp-spectre-x360-15-eb1xxx-spe.patch create mode 100644 queue-5.14/arm-dts-sun7i-a20-olinuxino-lime2-fix-ethernet-phy-m.patch create mode 100644 queue-5.14/asoc-cs42l42-ensure-0db-full-scale-volume-is-used-fo.patch create mode 100644 queue-5.14/asoc-soc-core-fix-null-ptr-deref-in-snd_soc_del_comp.patch create mode 100644 queue-5.14/block-schedule-queue-restart-after-blk_sts_zone_reso.patch create mode 100644 queue-5.14/bpf-define-bpf_jit_alloc_exec_limit-for-arm64-jit.patch create mode 100644 queue-5.14/bpf-define-bpf_jit_alloc_exec_limit-for-riscv-jit.patch create mode 100644 queue-5.14/bpf-prevent-increasing-bpf_jit_limit-above-max.patch create mode 100644 queue-5.14/cavium-fix-return-values-of-the-probe-function.patch create mode 100644 queue-5.14/cavium-return-negative-value-when-pci_alloc_irq_vect.patch create mode 100644 queue-5.14/drm-panel-orientation-quirks-add-quirk-for-aya-neo-2.patch create mode 100644 queue-5.14/drm-panel-orientation-quirks-add-quirk-for-gpd-win3.patch create mode 100644 queue-5.14/fcnal-test-kill-hanging-ping-nettest-binaries-on-cle.patch create mode 100644 queue-5.14/gpio-mlxbf2.c-add-check-for-bgpio_init-failure.patch create mode 100644 queue-5.14/hyperv-vmbus-include-linux-bitops.h.patch create mode 100644 queue-5.14/kvm-arm64-report-corrupted-refcount-at-el2.patch create mode 100644 queue-5.14/misdn-fix-return-values-of-the-probe-function.patch create mode 100644 queue-5.14/mmc-winbond-don-t-build-on-m68k.patch create mode 100644 queue-5.14/net-hns3-change-hclge-hclgevf-workqueue-to-wq_unboun.patch create mode 100644 queue-5.14/net-hns3-ignore-reset-event-before-initialization-pr.patch create mode 100644 queue-5.14/net-mscc-ocelot-add-of_node_put-before-goto.patch create mode 100644 queue-5.14/net-multicast-calculate-csum-of-looped-back-and-forw.patch create mode 100644 queue-5.14/net-smc-correct-spelling-mistake-to-tcpf_syn_recv.patch create mode 100644 queue-5.14/net-smc-fix-smc_link-llc_testlink_time-overflow.patch create mode 100644 queue-5.14/net-sparx5-add-of_node_put-before-goto.patch create mode 100644 queue-5.14/nfp-bpf-relax-prog-rejection-for-mtu-check-through-m.patch create mode 100644 queue-5.14/nvmet-tcp-fix-a-memory-leak-when-releasing-a-queue.patch create mode 100644 queue-5.14/nvmet-tcp-fix-header-digest-verification.patch create mode 100644 queue-5.14/ptp-fix-error-print-of-ptp_kvm-on-x86_64-platform.patch create mode 100644 queue-5.14/r8169-add-device-10ec-8162-to-driver-r8169.patch create mode 100644 queue-5.14/reset-socfpga-add-empty-driver-allowing-consumers-to.patch create mode 100644 queue-5.14/reset-tegra-bpmp-handle-errors-in-bpmp-response.patch create mode 100644 queue-5.14/scsi-qla2xxx-fix-unmap-of-already-freed-sgl.patch create mode 100644 queue-5.14/scsi-qla2xxx-return-enomem-if-kzalloc-fails.patch create mode 100644 queue-5.14/sfc-don-t-use-netif_info-before-net_device-setup.patch create mode 100644 queue-5.14/sfc-export-fibre-specific-supported-link-modes.patch create mode 100644 queue-5.14/spi-altera-change-to-dynamic-allocation-of-spi-id.patch create mode 100644 queue-5.14/spi-spl022-fix-microwire-full-duplex-mode.patch create mode 100644 queue-5.14/tools-testing-selftests-vm-split_huge_page_test.c-fi.patch create mode 100644 queue-5.14/vmxnet3-do-not-stop-tx-queues-after-netif_device_det.patch create mode 100644 queue-5.14/watchdog-fix-omap-watchdog-early-handling.patch create mode 100644 queue-5.14/xen-netfront-stop-tx-queues-during-live-migration.patch diff --git a/queue-5.14/alsa-hda-realtek-fixes-hp-spectre-x360-15-eb1xxx-spe.patch b/queue-5.14/alsa-hda-realtek-fixes-hp-spectre-x360-15-eb1xxx-spe.patch new file mode 100644 index 00000000000..2c8865c8b80 --- /dev/null +++ b/queue-5.14/alsa-hda-realtek-fixes-hp-spectre-x360-15-eb1xxx-spe.patch @@ -0,0 +1,123 @@ +From 674ff28e2641e42f348d1dccc35b480f422d4efb Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Fri, 15 Oct 2021 09:21:22 +0200 +Subject: ALSA: hda/realtek: Fixes HP Spectre x360 15-eb1xxx speakers + +From: Davide Baldo + +[ Upstream commit d94befbb5ae379f6dfd4fa6d460eacc09fa7b9c3 ] + +In laptop 'HP Spectre x360 Convertible 15-eb1xxx/8811' both front and +rear speakers are silent, this patch fixes that by overriding the pin +layout and by initializing the amplifier which needs a GPIO pin to be +set to 1 then 0, similar to the existing HP Spectre x360 14 model. + +In order to have volume control, both front and rear speakers were +forced to use the DAC1. + +This patch also correctly map the mute LED but since there is no +microphone on/off switch exposed by the alsa subsystem it never turns +on by itself. + +There are still known audio issues in this laptop: headset microphone +doesn't work, the button to mute/unmute microphone is not yet mapped, +the LED of the mute/unmute speakers doesn't seems to be exposed via +GPIO and never turns on. + +BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=213953 +Signed-off-by: Davide Baldo +Link: https://lore.kernel.org/r/20211015072121.5287-1-davide@baldo.me +Signed-off-by: Takashi Iwai +Signed-off-by: Sasha Levin +--- + sound/pci/hda/patch_realtek.c | 46 +++++++++++++++++++++++++++++++++++ + 1 file changed, 46 insertions(+) + +diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c +index ae2974dfd83f6..752857908e466 100644 +--- a/sound/pci/hda/patch_realtek.c ++++ b/sound/pci/hda/patch_realtek.c +@@ -6430,6 +6430,44 @@ static void alc_fixup_no_int_mic(struct hda_codec *codec, + } + } + ++/* GPIO1 = amplifier on/off ++ * GPIO3 = mic mute LED ++ */ ++static void alc285_fixup_hp_spectre_x360_eb1(struct hda_codec *codec, ++ const struct hda_fixup *fix, int action) ++{ ++ static const hda_nid_t conn[] = { 0x02 }; ++ ++ struct alc_spec *spec = codec->spec; ++ static const struct hda_pintbl pincfgs[] = { ++ { 0x14, 0x90170110 }, /* front/high speakers */ ++ { 0x17, 0x90170130 }, /* back/bass speakers */ ++ { } ++ }; ++ ++ //enable micmute led ++ alc_fixup_hp_gpio_led(codec, action, 0x00, 0x04); ++ ++ switch (action) { ++ case HDA_FIXUP_ACT_PRE_PROBE: ++ spec->micmute_led_polarity = 1; ++ /* needed for amp of back speakers */ ++ spec->gpio_mask |= 0x01; ++ spec->gpio_dir |= 0x01; ++ snd_hda_apply_pincfgs(codec, pincfgs); ++ /* share DAC to have unified volume control */ ++ snd_hda_override_conn_list(codec, 0x14, ARRAY_SIZE(conn), conn); ++ snd_hda_override_conn_list(codec, 0x17, ARRAY_SIZE(conn), conn); ++ break; ++ case HDA_FIXUP_ACT_INIT: ++ /* need to toggle GPIO to enable the amp of back speakers */ ++ alc_update_gpio_data(codec, 0x01, true); ++ msleep(100); ++ alc_update_gpio_data(codec, 0x01, false); ++ break; ++ } ++} ++ + static void alc285_fixup_hp_spectre_x360(struct hda_codec *codec, + const struct hda_fixup *fix, int action) + { +@@ -6582,6 +6620,7 @@ enum { + ALC269_FIXUP_HP_DOCK_GPIO_MIC1_LED, + ALC280_FIXUP_HP_9480M, + ALC245_FIXUP_HP_X360_AMP, ++ ALC285_FIXUP_HP_SPECTRE_X360_EB1, + ALC288_FIXUP_DELL_HEADSET_MODE, + ALC288_FIXUP_DELL1_MIC_NO_PRESENCE, + ALC288_FIXUP_DELL_XPS_13, +@@ -8279,6 +8318,10 @@ static const struct hda_fixup alc269_fixups[] = { + .type = HDA_FIXUP_FUNC, + .v.func = alc285_fixup_hp_spectre_x360, + }, ++ [ALC285_FIXUP_HP_SPECTRE_X360_EB1] = { ++ .type = HDA_FIXUP_FUNC, ++ .v.func = alc285_fixup_hp_spectre_x360_eb1 ++ }, + [ALC287_FIXUP_IDEAPAD_BASS_SPK_AMP] = { + .type = HDA_FIXUP_FUNC, + .v.func = alc285_fixup_ideapad_s740_coef, +@@ -8629,6 +8672,8 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = { + SND_PCI_QUIRK(0x103c, 0x87f7, "HP Spectre x360 14", ALC245_FIXUP_HP_X360_AMP), + SND_PCI_QUIRK(0x103c, 0x8805, "HP ProBook 650 G8 Notebook PC", ALC236_FIXUP_HP_GPIO_LED), + SND_PCI_QUIRK(0x103c, 0x880d, "HP EliteBook 830 G8 Notebook PC", ALC285_FIXUP_HP_GPIO_LED), ++ SND_PCI_QUIRK(0x103c, 0x8811, "HP Spectre x360 15-eb1xxx", ALC285_FIXUP_HP_SPECTRE_X360_EB1), ++ SND_PCI_QUIRK(0x103c, 0x8812, "HP Spectre x360 15-eb1xxx", ALC285_FIXUP_HP_SPECTRE_X360_EB1), + SND_PCI_QUIRK(0x103c, 0x8846, "HP EliteBook 850 G8 Notebook PC", ALC285_FIXUP_HP_GPIO_LED), + SND_PCI_QUIRK(0x103c, 0x8847, "HP EliteBook x360 830 G8 Notebook PC", ALC285_FIXUP_HP_GPIO_LED), + SND_PCI_QUIRK(0x103c, 0x884b, "HP EliteBook 840 Aero G8 Notebook PC", ALC285_FIXUP_HP_GPIO_LED), +@@ -9055,6 +9100,7 @@ static const struct hda_model_fixup alc269_fixup_models[] = { + {.id = ALC245_FIXUP_HP_X360_AMP, .name = "alc245-hp-x360-amp"}, + {.id = ALC295_FIXUP_HP_OMEN, .name = "alc295-hp-omen"}, + {.id = ALC285_FIXUP_HP_SPECTRE_X360, .name = "alc285-hp-spectre-x360"}, ++ {.id = ALC285_FIXUP_HP_SPECTRE_X360_EB1, .name = "alc285-hp-spectre-x360-eb1"}, + {.id = ALC287_FIXUP_IDEAPAD_BASS_SPK_AMP, .name = "alc287-ideapad-bass-spk-amp"}, + {.id = ALC623_FIXUP_LENOVO_THINKSTATION_P340, .name = "alc623-lenovo-thinkstation-p340"}, + {.id = ALC255_FIXUP_ACER_HEADPHONE_AND_MIC, .name = "alc255-acer-headphone-and-mic"}, +-- +2.33.0 + diff --git a/queue-5.14/arm-dts-sun7i-a20-olinuxino-lime2-fix-ethernet-phy-m.patch b/queue-5.14/arm-dts-sun7i-a20-olinuxino-lime2-fix-ethernet-phy-m.patch new file mode 100644 index 00000000000..227ec285ca3 --- /dev/null +++ b/queue-5.14/arm-dts-sun7i-a20-olinuxino-lime2-fix-ethernet-phy-m.patch @@ -0,0 +1,45 @@ +From 3c4bb80f9635d507ea123f07632e0456b565cf95 Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Thu, 16 Sep 2021 08:17:21 +0000 +Subject: ARM: dts: sun7i: A20-olinuxino-lime2: Fix ethernet phy-mode +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +From: Bastien Roucariès + +[ Upstream commit 55dd7e059098ce4bd0a55c251cb78e74604abb57 ] + +Commit bbc4d71d6354 ("net: phy: realtek: fix rtl8211e rx/tx delay +config") sets the RX/TX delay according to the phy-mode property in the +device tree. For the A20-olinuxino-lime2 board this is "rgmii", which is the +wrong setting. + +Following the example of a900cac3750b ("ARM: dts: sun7i: a20: bananapro: +Fix ethernet phy-mode") the phy-mode is changed to "rgmii-id" which gets +the Ethernet working again on this board. + +Signed-off-by: Bastien Roucariès +Signed-off-by: Maxime Ripard +Link: https://lore.kernel.org/r/20210916081721.237137-1-rouca@debian.org +Signed-off-by: Sasha Levin +--- + arch/arm/boot/dts/sun7i-a20-olinuxino-lime2.dts | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/arch/arm/boot/dts/sun7i-a20-olinuxino-lime2.dts b/arch/arm/boot/dts/sun7i-a20-olinuxino-lime2.dts +index 8077f1716fbc8..ecb91fb899ff3 100644 +--- a/arch/arm/boot/dts/sun7i-a20-olinuxino-lime2.dts ++++ b/arch/arm/boot/dts/sun7i-a20-olinuxino-lime2.dts +@@ -112,7 +112,7 @@ + pinctrl-names = "default"; + pinctrl-0 = <&gmac_rgmii_pins>; + phy-handle = <&phy1>; +- phy-mode = "rgmii"; ++ phy-mode = "rgmii-id"; + status = "okay"; + }; + +-- +2.33.0 + diff --git a/queue-5.14/asoc-cs42l42-ensure-0db-full-scale-volume-is-used-fo.patch b/queue-5.14/asoc-cs42l42-ensure-0db-full-scale-volume-is-used-fo.patch new file mode 100644 index 00000000000..49c65cc6c8c --- /dev/null +++ b/queue-5.14/asoc-cs42l42-ensure-0db-full-scale-volume-is-used-fo.patch @@ -0,0 +1,63 @@ +From 09aeec0a21d2f36fc7195d1e0ead30afbf7dbbf3 Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Mon, 11 Oct 2021 15:49:03 +0100 +Subject: ASoC: cs42l42: Ensure 0dB full scale volume is used for headsets + +From: Stefan Binding + +[ Upstream commit aa18457c4af7a9dad1f2b150b11beae1d8ab57aa ] + +Ensure the default 0dB playback path is always used. + +The code that set FULL_SCALE_VOL based on LOAD_DET_RCSTAT was +spurious, and resulted in a -6dB attenuation being accidentally +inserted into the playback path. + +Signed-off-by: Stefan Binding +Signed-off-by: Richard Fitzgerald +Link: https://lore.kernel.org/r/20211011144903.28915-1-rf@opensource.cirrus.com +Signed-off-by: Mark Brown +Signed-off-by: Sasha Levin +--- + sound/soc/codecs/cs42l42.c | 16 +++------------- + 1 file changed, 3 insertions(+), 13 deletions(-) + +diff --git a/sound/soc/codecs/cs42l42.c b/sound/soc/codecs/cs42l42.c +index 99c022be94a68..8838b9a0de8e4 100644 +--- a/sound/soc/codecs/cs42l42.c ++++ b/sound/soc/codecs/cs42l42.c +@@ -901,7 +901,6 @@ static int cs42l42_mute_stream(struct snd_soc_dai *dai, int mute, int stream) + struct snd_soc_component *component = dai->component; + struct cs42l42_private *cs42l42 = snd_soc_component_get_drvdata(component); + unsigned int regval; +- u8 fullScaleVol; + int ret; + + if (mute) { +@@ -972,20 +971,11 @@ static int cs42l42_mute_stream(struct snd_soc_dai *dai, int mute, int stream) + cs42l42->stream_use |= 1 << stream; + + if (stream == SNDRV_PCM_STREAM_PLAYBACK) { +- /* Read the headphone load */ +- regval = snd_soc_component_read(component, CS42L42_LOAD_DET_RCSTAT); +- if (((regval & CS42L42_RLA_STAT_MASK) >> CS42L42_RLA_STAT_SHIFT) == +- CS42L42_RLA_STAT_15_OHM) { +- fullScaleVol = CS42L42_HP_FULL_SCALE_VOL_MASK; +- } else { +- fullScaleVol = 0; +- } +- +- /* Un-mute the headphone, set the full scale volume flag */ ++ /* Un-mute the headphone */ + snd_soc_component_update_bits(component, CS42L42_HP_CTL, + CS42L42_HP_ANA_AMUTE_MASK | +- CS42L42_HP_ANA_BMUTE_MASK | +- CS42L42_HP_FULL_SCALE_VOL_MASK, fullScaleVol); ++ CS42L42_HP_ANA_BMUTE_MASK, ++ 0); + } + } + +-- +2.33.0 + diff --git a/queue-5.14/asoc-soc-core-fix-null-ptr-deref-in-snd_soc_del_comp.patch b/queue-5.14/asoc-soc-core-fix-null-ptr-deref-in-snd_soc_del_comp.patch new file mode 100644 index 00000000000..f6498780aca --- /dev/null +++ b/queue-5.14/asoc-soc-core-fix-null-ptr-deref-in-snd_soc_del_comp.patch @@ -0,0 +1,51 @@ +From 093c01c873e3bd60a643a767037b6ecdb1f43f17 Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Sat, 9 Oct 2021 14:58:40 +0800 +Subject: ASoC: soc-core: fix null-ptr-deref in + snd_soc_del_component_unlocked() + +From: Yang Yingliang + +[ Upstream commit c448b7aa3e66042fc0f849d9a0fb90d1af82e948 ] + +'component' is allocated in snd_soc_register_component(), but component->list +is not initalized, this may cause snd_soc_del_component_unlocked() deref null +ptr in the error handing case. + +KASAN: null-ptr-deref in range [0x0000000000000000-0x0000000000000007] +RIP: 0010:__list_del_entry_valid+0x81/0xf0 +Call Trace: + snd_soc_del_component_unlocked+0x69/0x1b0 [snd_soc_core] + snd_soc_add_component.cold+0x54/0x6c [snd_soc_core] + snd_soc_register_component+0x70/0x90 [snd_soc_core] + devm_snd_soc_register_component+0x5e/0xd0 [snd_soc_core] + tas2552_probe+0x265/0x320 [snd_soc_tas2552] + ? tas2552_component_probe+0x1e0/0x1e0 [snd_soc_tas2552] + i2c_device_probe+0xa31/0xbe0 + +Fix by adding INIT_LIST_HEAD() to snd_soc_component_initialize(). + +Reported-by: Hulk Robot +Signed-off-by: Yang Yingliang +Link: https://lore.kernel.org/r/20211009065840.3196239-1-yangyingliang@huawei.com +Signed-off-by: Mark Brown +Signed-off-by: Sasha Levin +--- + sound/soc/soc-core.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c +index 583f2381cfc82..e926985bb2f87 100644 +--- a/sound/soc/soc-core.c ++++ b/sound/soc/soc-core.c +@@ -2599,6 +2599,7 @@ int snd_soc_component_initialize(struct snd_soc_component *component, + INIT_LIST_HEAD(&component->dai_list); + INIT_LIST_HEAD(&component->dobj_list); + INIT_LIST_HEAD(&component->card_list); ++ INIT_LIST_HEAD(&component->list); + mutex_init(&component->io_mutex); + + component->name = fmt_single_name(dev, &component->id); +-- +2.33.0 + diff --git a/queue-5.14/block-schedule-queue-restart-after-blk_sts_zone_reso.patch b/queue-5.14/block-schedule-queue-restart-after-blk_sts_zone_reso.patch new file mode 100644 index 00000000000..7f44be7a162 --- /dev/null +++ b/queue-5.14/block-schedule-queue-restart-after-blk_sts_zone_reso.patch @@ -0,0 +1,95 @@ +From 7eb0482c00fb4eac62e3e04b2d4bc62fa76f4911 Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Wed, 27 Oct 2021 01:51:27 +0900 +Subject: block: schedule queue restart after BLK_STS_ZONE_RESOURCE + +From: Naohiro Aota + +[ Upstream commit 9586e67b911c95ba158fcc247b230e9c2d718623 ] + +When dispatching a zone append write request to a SCSI zoned block device, +if the target zone of the request is already locked, the device driver will +return BLK_STS_ZONE_RESOURCE and the request will be pushed back to the +hctx dipatch queue. The queue will be marked as RESTART in +dd_finish_request() and restarted in __blk_mq_free_request(). However, this +restart applies to the hctx of the completed request. If the requeued +request is on a different hctx, dispatch will no be retried until another +request is submitted or the next periodic queue run triggers, leading to up +to 30 seconds latency for the requeued request. + +Fix this problem by scheduling a queue restart similarly to the +BLK_STS_RESOURCE case or when we cannot get the budget. + +Also, consolidate the checks into the "need_resource" variable to simplify +the condition. + +Signed-off-by: Naohiro Aota +Reviewed-by: Christoph Hellwig +Cc: Niklas Cassel +Link: https://lore.kernel.org/r/20211026165127.4151055-1-naohiro.aota@wdc.com +Signed-off-by: Jens Axboe +Signed-off-by: Sasha Levin +--- + block/blk-mq.c | 13 +++++++++---- + 1 file changed, 9 insertions(+), 4 deletions(-) + +diff --git a/block/blk-mq.c b/block/blk-mq.c +index 9c64f0025a562..dc49483334c72 100644 +--- a/block/blk-mq.c ++++ b/block/blk-mq.c +@@ -1318,6 +1318,7 @@ bool blk_mq_dispatch_rq_list(struct blk_mq_hw_ctx *hctx, struct list_head *list, + int errors, queued; + blk_status_t ret = BLK_STS_OK; + LIST_HEAD(zone_list); ++ bool needs_resource = false; + + if (list_empty(list)) + return false; +@@ -1363,6 +1364,8 @@ bool blk_mq_dispatch_rq_list(struct blk_mq_hw_ctx *hctx, struct list_head *list, + queued++; + break; + case BLK_STS_RESOURCE: ++ needs_resource = true; ++ fallthrough; + case BLK_STS_DEV_RESOURCE: + blk_mq_handle_dev_resource(rq, list); + goto out; +@@ -1373,6 +1376,7 @@ bool blk_mq_dispatch_rq_list(struct blk_mq_hw_ctx *hctx, struct list_head *list, + * accept. + */ + blk_mq_handle_zone_resource(rq, &zone_list); ++ needs_resource = true; + break; + default: + errors++; +@@ -1399,7 +1403,6 @@ out: + /* For non-shared tags, the RESTART check will suffice */ + bool no_tag = prep == PREP_DISPATCH_NO_TAG && + (hctx->flags & BLK_MQ_F_TAG_QUEUE_SHARED); +- bool no_budget_avail = prep == PREP_DISPATCH_NO_BUDGET; + + if (nr_budgets) + blk_mq_release_budgets(q, list); +@@ -1440,14 +1443,16 @@ out: + * If driver returns BLK_STS_RESOURCE and SCHED_RESTART + * bit is set, run queue after a delay to avoid IO stalls + * that could otherwise occur if the queue is idle. We'll do +- * similar if we couldn't get budget and SCHED_RESTART is set. ++ * similar if we couldn't get budget or couldn't lock a zone ++ * and SCHED_RESTART is set. + */ + needs_restart = blk_mq_sched_needs_restart(hctx); ++ if (prep == PREP_DISPATCH_NO_BUDGET) ++ needs_resource = true; + if (!needs_restart || + (no_tag && list_empty_careful(&hctx->dispatch_wait.entry))) + blk_mq_run_hw_queue(hctx, true); +- else if (needs_restart && (ret == BLK_STS_RESOURCE || +- no_budget_avail)) ++ else if (needs_restart && needs_resource) + blk_mq_delay_run_hw_queue(hctx, BLK_MQ_RESOURCE_DELAY); + + blk_mq_update_dispatch_busy(hctx, true); +-- +2.33.0 + diff --git a/queue-5.14/bpf-define-bpf_jit_alloc_exec_limit-for-arm64-jit.patch b/queue-5.14/bpf-define-bpf_jit_alloc_exec_limit-for-arm64-jit.patch new file mode 100644 index 00000000000..c86650912be --- /dev/null +++ b/queue-5.14/bpf-define-bpf_jit_alloc_exec_limit-for-arm64-jit.patch @@ -0,0 +1,38 @@ +From b10e0101cc52f7127faf441db3075045f8841456 Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Thu, 14 Oct 2021 15:25:52 +0100 +Subject: bpf: Define bpf_jit_alloc_exec_limit for arm64 JIT + +From: Lorenz Bauer + +[ Upstream commit 5d63ae908242f028bd10860cba98450d11c079b8 ] + +Expose the maximum amount of useable memory from the arm64 JIT. + +Signed-off-by: Lorenz Bauer +Signed-off-by: Alexei Starovoitov +Link: https://lore.kernel.org/bpf/20211014142554.53120-3-lmb@cloudflare.com +Signed-off-by: Sasha Levin +--- + arch/arm64/net/bpf_jit_comp.c | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/arch/arm64/net/bpf_jit_comp.c b/arch/arm64/net/bpf_jit_comp.c +index 41c23f474ea63..803e7773fa869 100644 +--- a/arch/arm64/net/bpf_jit_comp.c ++++ b/arch/arm64/net/bpf_jit_comp.c +@@ -1136,6 +1136,11 @@ out: + return prog; + } + ++u64 bpf_jit_alloc_exec_limit(void) ++{ ++ return BPF_JIT_REGION_SIZE; ++} ++ + void *bpf_jit_alloc_exec(unsigned long size) + { + return __vmalloc_node_range(size, PAGE_SIZE, BPF_JIT_REGION_START, +-- +2.33.0 + diff --git a/queue-5.14/bpf-define-bpf_jit_alloc_exec_limit-for-riscv-jit.patch b/queue-5.14/bpf-define-bpf_jit_alloc_exec_limit-for-riscv-jit.patch new file mode 100644 index 00000000000..4133f5793c5 --- /dev/null +++ b/queue-5.14/bpf-define-bpf_jit_alloc_exec_limit-for-riscv-jit.patch @@ -0,0 +1,43 @@ +From 797bb097d38d29f7ff264e2de8f8d6bd5b45a849 Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Thu, 14 Oct 2021 15:25:51 +0100 +Subject: bpf: Define bpf_jit_alloc_exec_limit for riscv JIT +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +From: Lorenz Bauer + +[ Upstream commit 8f04db78e4e36a5d4858ce841a3e9cc3d69bde36 ] + +Expose the maximum amount of useable memory from the riscv JIT. + +Signed-off-by: Lorenz Bauer +Signed-off-by: Alexei Starovoitov +Acked-by: Luke Nelson +Acked-by: Björn Töpel +Link: https://lore.kernel.org/bpf/20211014142554.53120-2-lmb@cloudflare.com +Signed-off-by: Sasha Levin +--- + arch/riscv/net/bpf_jit_core.c | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/arch/riscv/net/bpf_jit_core.c b/arch/riscv/net/bpf_jit_core.c +index 5d247198c30d3..753d85bdfad07 100644 +--- a/arch/riscv/net/bpf_jit_core.c ++++ b/arch/riscv/net/bpf_jit_core.c +@@ -167,6 +167,11 @@ out: + return prog; + } + ++u64 bpf_jit_alloc_exec_limit(void) ++{ ++ return BPF_JIT_REGION_SIZE; ++} ++ + void *bpf_jit_alloc_exec(unsigned long size) + { + return __vmalloc_node_range(size, PAGE_SIZE, BPF_JIT_REGION_START, +-- +2.33.0 + diff --git a/queue-5.14/bpf-prevent-increasing-bpf_jit_limit-above-max.patch b/queue-5.14/bpf-prevent-increasing-bpf_jit_limit-above-max.patch new file mode 100644 index 00000000000..7e17ca66f91 --- /dev/null +++ b/queue-5.14/bpf-prevent-increasing-bpf_jit_limit-above-max.patch @@ -0,0 +1,71 @@ +From e0b8e0434f52248777189df68e1d15a39733369a Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Thu, 14 Oct 2021 15:25:53 +0100 +Subject: bpf: Prevent increasing bpf_jit_limit above max + +From: Lorenz Bauer + +[ Upstream commit fadb7ff1a6c2c565af56b4aacdd086b067eed440 ] + +Restrict bpf_jit_limit to the maximum supported by the arch's JIT. + +Signed-off-by: Lorenz Bauer +Signed-off-by: Alexei Starovoitov +Link: https://lore.kernel.org/bpf/20211014142554.53120-4-lmb@cloudflare.com +Signed-off-by: Sasha Levin +--- + 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 83b896044e79f..c227c45121d6a 100644 +--- a/include/linux/filter.h ++++ b/include/linux/filter.h +@@ -1027,6 +1027,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 4c0c0146f956c..2340d11737cca 100644 +--- a/kernel/bpf/core.c ++++ b/kernel/bpf/core.c +@@ -524,6 +524,7 @@ int bpf_jit_enable __read_mostly = IS_BUILTIN(CONFIG_BPF_JIT_DEFAULT_ON); + int bpf_jit_kallsyms __read_mostly = IS_BUILTIN(CONFIG_BPF_JIT_DEFAULT_ON); + int bpf_jit_harden __read_mostly; + long bpf_jit_limit __read_mostly; ++long bpf_jit_limit_max __read_mostly; + + static void + bpf_prog_ksym_set_addr(struct bpf_prog *prog) +@@ -817,7 +818,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 c8496c1142c9d..5f88526ad61cc 100644 +--- a/net/core/sysctl_net_core.c ++++ b/net/core/sysctl_net_core.c +@@ -419,7 +419,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-5.14/cavium-fix-return-values-of-the-probe-function.patch b/queue-5.14/cavium-fix-return-values-of-the-probe-function.patch new file mode 100644 index 00000000000..36166e1398b --- /dev/null +++ b/queue-5.14/cavium-fix-return-values-of-the-probe-function.patch @@ -0,0 +1,44 @@ +From 4f1b6a744447bc4aa817a1db3295e0325930ab52 Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Mon, 18 Oct 2021 14:32:57 +0000 +Subject: cavium: Fix return values of the probe function + +From: Zheyu Ma + +[ 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 +Signed-off-by: David S. Miller +Signed-off-by: Sasha Levin +--- + 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 e2b290135fd97..a61107e05216c 100644 +--- a/drivers/net/ethernet/cavium/thunder/nicvf_main.c ++++ b/drivers/net/ethernet/cavium/thunder/nicvf_main.c +@@ -1224,7 +1224,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"); +@@ -1243,7 +1243,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-5.14/cavium-return-negative-value-when-pci_alloc_irq_vect.patch b/queue-5.14/cavium-return-negative-value-when-pci_alloc_irq_vect.patch new file mode 100644 index 00000000000..765bfdcaf01 --- /dev/null +++ b/queue-5.14/cavium-return-negative-value-when-pci_alloc_irq_vect.patch @@ -0,0 +1,35 @@ +From 3c0dba7413bbfc851c7c8e3d06a701debc16eba1 Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Mon, 18 Oct 2021 02:16:22 +0000 +Subject: cavium: Return negative value when pci_alloc_irq_vectors() fails + +From: Zheyu Ma + +[ 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 +Signed-off-by: David S. Miller +Signed-off-by: Sasha Levin +--- + 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 9361f964bb9b2..816453a4f8d6c 100644 +--- a/drivers/net/ethernet/cavium/thunder/nic_main.c ++++ b/drivers/net/ethernet/cavium/thunder/nic_main.c +@@ -1193,7 +1193,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-5.14/drm-panel-orientation-quirks-add-quirk-for-aya-neo-2.patch b/queue-5.14/drm-panel-orientation-quirks-add-quirk-for-aya-neo-2.patch new file mode 100644 index 00000000000..7bc0d94e10c --- /dev/null +++ b/queue-5.14/drm-panel-orientation-quirks-add-quirk-for-aya-neo-2.patch @@ -0,0 +1,39 @@ +From 3abd34efbdd2453e7278c5f4a1483a1de4da87ce Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Tue, 19 Oct 2021 09:24:33 -0500 +Subject: drm: panel-orientation-quirks: Add quirk for Aya Neo 2021 + +From: Bryant Mairs + +[ Upstream commit def0c3697287f6e85d5ac68b21302966c95474f9 ] + +Fixes screen orientation for the Aya Neo 2021 handheld gaming console. + +Signed-off-by: Bryant Mairs +Signed-off-by: Sam Ravnborg +Link: https://patchwork.freedesktop.org/patch/msgid/20211019142433.4295-1-bryant@mai.rs +Signed-off-by: Sasha Levin +--- + 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 f6bdec7fa9253..30c17a76f49ae 100644 +--- a/drivers/gpu/drm/drm_panel_orientation_quirks.c ++++ b/drivers/gpu/drm/drm_panel_orientation_quirks.c +@@ -134,6 +134,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-5.14/drm-panel-orientation-quirks-add-quirk-for-gpd-win3.patch b/queue-5.14/drm-panel-orientation-quirks-add-quirk-for-gpd-win3.patch new file mode 100644 index 00000000000..f27aa295cf4 --- /dev/null +++ b/queue-5.14/drm-panel-orientation-quirks-add-quirk-for-gpd-win3.patch @@ -0,0 +1,39 @@ +From b67532ddba41df8573d31623ae7643868f0bda05 Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Tue, 26 Oct 2021 13:27:37 +0200 +Subject: drm: panel-orientation-quirks: Add quirk for GPD Win3 + +From: Mario + +[ Upstream commit 61b1d445f3bfe4c3ba4335ceeb7e8ba688fd31e2 ] + +Fixes screen orientation for GPD Win 3 handheld gaming console. + +Signed-off-by: Mario Risoldi +Signed-off-by: Sam Ravnborg +Link: https://patchwork.freedesktop.org/patch/msgid/20211026112737.9181-1-awxkrnl@gmail.com +Signed-off-by: Sasha Levin +--- + 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 30c17a76f49ae..e1b2ce4921ae7 100644 +--- a/drivers/gpu/drm/drm_panel_orientation_quirks.c ++++ b/drivers/gpu/drm/drm_panel_orientation_quirks.c +@@ -191,6 +191,12 @@ static const struct dmi_system_id orientation_data[] = { + DMI_EXACT_MATCH(DMI_BOARD_NAME, "Default string"), + }, + .driver_data = (void *)&gpd_win2, ++ }, { /* GPD Win 3 */ ++ .matches = { ++ DMI_EXACT_MATCH(DMI_SYS_VENDOR, "GPD"), ++ DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "G1618-03") ++ }, ++ .driver_data = (void *)&lcd720x1280_rightside_up, + }, { /* I.T.Works TW891 */ + .matches = { + DMI_EXACT_MATCH(DMI_SYS_VENDOR, "To be filled by O.E.M."), +-- +2.33.0 + diff --git a/queue-5.14/fcnal-test-kill-hanging-ping-nettest-binaries-on-cle.patch b/queue-5.14/fcnal-test-kill-hanging-ping-nettest-binaries-on-cle.patch new file mode 100644 index 00000000000..4cbcc8f808a --- /dev/null +++ b/queue-5.14/fcnal-test-kill-hanging-ping-nettest-binaries-on-cle.patch @@ -0,0 +1,44 @@ +From 36e5382e9e11bd653d6fed376bc43b4379af11c1 Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Thu, 21 Oct 2021 16:02:47 +0200 +Subject: fcnal-test: kill hanging ping/nettest binaries on cleanup + +From: Florian Westphal + +[ Upstream commit 1f83b835a3eaa5ae4bd825fb07182698bfc243ba ] + +On my box I see a bunch of ping/nettest processes hanging +around after fcntal-test.sh is done. + +Clean those up before netns deletion. + +Signed-off-by: Florian Westphal +Acked-by: David Ahern +Link: https://lore.kernel.org/r/20211021140247.29691-1-fw@strlen.de +Signed-off-by: Jakub Kicinski +Signed-off-by: Sasha Levin +--- + tools/testing/selftests/net/fcnal-test.sh | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/tools/testing/selftests/net/fcnal-test.sh b/tools/testing/selftests/net/fcnal-test.sh +index a8ad92850e630..8acc4f2a20071 100755 +--- a/tools/testing/selftests/net/fcnal-test.sh ++++ b/tools/testing/selftests/net/fcnal-test.sh +@@ -436,10 +436,13 @@ cleanup() + ip -netns ${NSA} link set dev ${NSA_DEV} down + ip -netns ${NSA} link del dev ${NSA_DEV} + ++ ip netns pids ${NSA} | xargs kill 2>/dev/null + ip netns del ${NSA} + fi + ++ ip netns pids ${NSB} | xargs kill 2>/dev/null + ip netns del ${NSB} ++ ip netns pids ${NSC} | xargs kill 2>/dev/null + ip netns del ${NSC} >/dev/null 2>&1 + } + +-- +2.33.0 + diff --git a/queue-5.14/gpio-mlxbf2.c-add-check-for-bgpio_init-failure.patch b/queue-5.14/gpio-mlxbf2.c-add-check-for-bgpio_init-failure.patch new file mode 100644 index 00000000000..fa98879ff71 --- /dev/null +++ b/queue-5.14/gpio-mlxbf2.c-add-check-for-bgpio_init-failure.patch @@ -0,0 +1,37 @@ +From 217c0587a7b673a3e5d4334e4f5105da0736030b Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Fri, 22 Oct 2021 09:44:38 -0400 +Subject: gpio: mlxbf2.c: Add check for bgpio_init failure + +From: Asmaa Mnebhi + +[ Upstream commit c0eee6fbfa2b3377f1efed10dad539abeb7312aa ] + +Add a check if bgpio_init fails. + +Signed-off-by: Asmaa Mnebhi +Signed-off-by: Bartosz Golaszewski +Signed-off-by: Sasha Levin +--- + drivers/gpio/gpio-mlxbf2.c | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/drivers/gpio/gpio-mlxbf2.c b/drivers/gpio/gpio-mlxbf2.c +index befa5e1099439..d4b250b470b41 100644 +--- a/drivers/gpio/gpio-mlxbf2.c ++++ b/drivers/gpio/gpio-mlxbf2.c +@@ -268,6 +268,11 @@ mlxbf2_gpio_probe(struct platform_device *pdev) + NULL, + 0); + ++ if (ret) { ++ dev_err(dev, "bgpio_init failed\n"); ++ return ret; ++ } ++ + gc->direction_input = mlxbf2_gpio_direction_input; + gc->direction_output = mlxbf2_gpio_direction_output; + gc->ngpio = npins; +-- +2.33.0 + diff --git a/queue-5.14/hyperv-vmbus-include-linux-bitops.h.patch b/queue-5.14/hyperv-vmbus-include-linux-bitops.h.patch new file mode 100644 index 00000000000..dc3fbcb64f6 --- /dev/null +++ b/queue-5.14/hyperv-vmbus-include-linux-bitops.h.patch @@ -0,0 +1,45 @@ +From 1b9a1bcfc6ce9ac52b3f2b40de0e8a84e0dfd191 Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Mon, 18 Oct 2021 15:19:08 +0200 +Subject: hyperv/vmbus: include linux/bitops.h + +From: Arnd Bergmann + +[ 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 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 +Link: https://lore.kernel.org/r/20211018131929.2260087-1-arnd@kernel.org +Signed-off-by: Wei Liu +Signed-off-by: Sasha Levin +--- + 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 42f3d9d123a12..d030577ad6a2c 100644 +--- a/drivers/hv/hyperv_vmbus.h ++++ b/drivers/hv/hyperv_vmbus.h +@@ -13,6 +13,7 @@ + #define _HYPERV_VMBUS_H + + #include ++#include + #include + #include + #include +-- +2.33.0 + diff --git a/queue-5.14/kvm-arm64-report-corrupted-refcount-at-el2.patch b/queue-5.14/kvm-arm64-report-corrupted-refcount-at-el2.patch new file mode 100644 index 00000000000..711766aebed --- /dev/null +++ b/queue-5.14/kvm-arm64-report-corrupted-refcount-at-el2.patch @@ -0,0 +1,39 @@ +From 536e3f1ec7b8128670725be5318dcd6ea3336e4d Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Tue, 5 Oct 2021 10:01:42 +0100 +Subject: KVM: arm64: Report corrupted refcount at EL2 + +From: Quentin Perret + +[ Upstream commit 7615c2a514788559c6684234b8fc27f3a843c2c6 ] + +Some of the refcount manipulation helpers used at EL2 are instrumented +to catch a corrupted state, but not all of them are treated equally. Let's +make things more consistent by instrumenting hyp_page_ref_dec_and_test() +as well. + +Acked-by: Will Deacon +Suggested-by: Will Deacon +Signed-off-by: Quentin Perret +Signed-off-by: Marc Zyngier +Link: https://lore.kernel.org/r/20211005090155.734578-6-qperret@google.com +Signed-off-by: Sasha Levin +--- + arch/arm64/kvm/hyp/nvhe/page_alloc.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/arch/arm64/kvm/hyp/nvhe/page_alloc.c b/arch/arm64/kvm/hyp/nvhe/page_alloc.c +index a6e874e61a40e..0bd7701ad1df5 100644 +--- a/arch/arm64/kvm/hyp/nvhe/page_alloc.c ++++ b/arch/arm64/kvm/hyp/nvhe/page_alloc.c +@@ -152,6 +152,7 @@ static inline void hyp_page_ref_inc(struct hyp_page *p) + + static inline int hyp_page_ref_dec_and_test(struct hyp_page *p) + { ++ BUG_ON(!p->refcount); + p->refcount--; + return (p->refcount == 0); + } +-- +2.33.0 + diff --git a/queue-5.14/misdn-fix-return-values-of-the-probe-function.patch b/queue-5.14/misdn-fix-return-values-of-the-probe-function.patch new file mode 100644 index 00000000000..8f126937255 --- /dev/null +++ b/queue-5.14/misdn-fix-return-values-of-the-probe-function.patch @@ -0,0 +1,61 @@ +From f88d0cbe3559b84e602c7e2a1e3e6939d1f963a7 Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Mon, 18 Oct 2021 14:20:38 +0000 +Subject: mISDN: Fix return values of the probe function + +From: Zheyu Ma + +[ Upstream commit e211210098cb7490db2183d725f5c0f10463a704 ] + +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 +Signed-off-by: David S. Miller +Signed-off-by: Sasha Levin +--- + drivers/isdn/hardware/mISDN/hfcpci.c | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +diff --git a/drivers/isdn/hardware/mISDN/hfcpci.c b/drivers/isdn/hardware/mISDN/hfcpci.c +index e501cb03f211d..bd087cca1c1d2 100644 +--- a/drivers/isdn/hardware/mISDN/hfcpci.c ++++ b/drivers/isdn/hardware/mISDN/hfcpci.c +@@ -1994,14 +1994,14 @@ setup_hw(struct hfc_pci *hc) + pci_set_master(hc->pdev); + if (!hc->irq) { + printk(KERN_WARNING "HFC-PCI: No IRQ for PCI card found\n"); +- return 1; ++ return -EINVAL; + } + hc->hw.pci_io = + (char __iomem *)(unsigned long)hc->pdev->resource[1].start; + + if (!hc->hw.pci_io) { + printk(KERN_WARNING "HFC-PCI: No IO-Mem for PCI card found\n"); +- return 1; ++ return -ENOMEM; + } + /* Allocate memory for FIFOS */ + /* the memory needs to be on a 32k boundary within the first 4G */ +@@ -2012,7 +2012,7 @@ setup_hw(struct hfc_pci *hc) + if (!buffer) { + printk(KERN_WARNING + "HFC-PCI: Error allocating memory for FIFO!\n"); +- return 1; ++ return -ENOMEM; + } + hc->hw.fifos = buffer; + pci_write_config_dword(hc->pdev, 0x80, hc->hw.dmahandle); +@@ -2022,7 +2022,7 @@ setup_hw(struct hfc_pci *hc) + "HFC-PCI: Error in ioremap for PCI!\n"); + dma_free_coherent(&hc->pdev->dev, 0x8000, hc->hw.fifos, + hc->hw.dmahandle); +- return 1; ++ return -ENOMEM; + } + + printk(KERN_INFO +-- +2.33.0 + diff --git a/queue-5.14/mmc-winbond-don-t-build-on-m68k.patch b/queue-5.14/mmc-winbond-don-t-build-on-m68k.patch new file mode 100644 index 00000000000..537d8c8a6ff --- /dev/null +++ b/queue-5.14/mmc-winbond-don-t-build-on-m68k.patch @@ -0,0 +1,45 @@ +From 0add8e070ce100f242068d8f224bd2194f0e1c31 Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Sun, 17 Oct 2021 10:59:49 -0700 +Subject: mmc: winbond: don't build on M68K + +From: Randy Dunlap + +[ 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 +Cc: Pierre Ossman +Cc: Geert Uytterhoeven +Cc: Arnd Bergmann +Link: https://lore.kernel.org/r/20211017175949.23838-1-rdunlap@infradead.org +Signed-off-by: Ulf Hansson +Signed-off-by: Sasha Levin +--- + 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 71313961cc54d..8acf76ea431b1 100644 +--- a/drivers/mmc/host/Kconfig ++++ b/drivers/mmc/host/Kconfig +@@ -506,7 +506,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-5.14/net-hns3-change-hclge-hclgevf-workqueue-to-wq_unboun.patch b/queue-5.14/net-hns3-change-hclge-hclgevf-workqueue-to-wq_unboun.patch new file mode 100644 index 00000000000..987fde5b217 --- /dev/null +++ b/queue-5.14/net-hns3-change-hclge-hclgevf-workqueue-to-wq_unboun.patch @@ -0,0 +1,140 @@ +From 78dbec5edeaed33ddf845e338e6ee665a6ebb001 Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Wed, 27 Oct 2021 20:11:44 +0800 +Subject: net: hns3: change hclge/hclgevf workqueue to WQ_UNBOUND mode + +From: Yufeng Mo + +[ Upstream commit f29da4088fb4eeba457219a931327d1d5f45196a ] + +Currently, the workqueue of hclge/hclgevf is executed on +the CPU that initiates scheduling requests by default. In +stress scenarios, the CPU may be busy and workqueue scheduling +is completed after a long period of time. To avoid this +situation and implement proper scheduling, use the WQ_UNBOUND +mode instead. In this way, the workqueue can be performed on +a relatively idle CPU. + +Signed-off-by: Yufeng Mo +Signed-off-by: Guangbin Huang +Signed-off-by: David S. Miller +Signed-off-by: Sasha Levin +--- + .../hisilicon/hns3/hns3pf/hclge_main.c | 34 +++---------------- + .../hisilicon/hns3/hns3pf/hclge_main.h | 1 - + .../hisilicon/hns3/hns3vf/hclgevf_main.c | 2 +- + 3 files changed, 6 insertions(+), 31 deletions(-) + +diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c +index 721eb4e92f618..dc748f2f18434 100644 +--- a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c ++++ b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c +@@ -2846,33 +2846,28 @@ static void hclge_mbx_task_schedule(struct hclge_dev *hdev) + { + if (!test_bit(HCLGE_STATE_REMOVING, &hdev->state) && + !test_and_set_bit(HCLGE_STATE_MBX_SERVICE_SCHED, &hdev->state)) +- mod_delayed_work_on(cpumask_first(&hdev->affinity_mask), +- hclge_wq, &hdev->service_task, 0); ++ mod_delayed_work(hclge_wq, &hdev->service_task, 0); + } + + static void hclge_reset_task_schedule(struct hclge_dev *hdev) + { + if (!test_bit(HCLGE_STATE_REMOVING, &hdev->state) && + !test_and_set_bit(HCLGE_STATE_RST_SERVICE_SCHED, &hdev->state)) +- mod_delayed_work_on(cpumask_first(&hdev->affinity_mask), +- hclge_wq, &hdev->service_task, 0); ++ mod_delayed_work(hclge_wq, &hdev->service_task, 0); + } + + static void hclge_errhand_task_schedule(struct hclge_dev *hdev) + { + if (!test_bit(HCLGE_STATE_REMOVING, &hdev->state) && + !test_and_set_bit(HCLGE_STATE_ERR_SERVICE_SCHED, &hdev->state)) +- mod_delayed_work_on(cpumask_first(&hdev->affinity_mask), +- hclge_wq, &hdev->service_task, 0); ++ mod_delayed_work(hclge_wq, &hdev->service_task, 0); + } + + void hclge_task_schedule(struct hclge_dev *hdev, unsigned long delay_time) + { + if (!test_bit(HCLGE_STATE_REMOVING, &hdev->state) && + !test_bit(HCLGE_STATE_RST_FAIL, &hdev->state)) +- mod_delayed_work_on(cpumask_first(&hdev->affinity_mask), +- hclge_wq, &hdev->service_task, +- delay_time); ++ mod_delayed_work(hclge_wq, &hdev->service_task, delay_time); + } + + static int hclge_get_mac_link_status(struct hclge_dev *hdev, int *link_status) +@@ -3490,33 +3485,14 @@ static void hclge_get_misc_vector(struct hclge_dev *hdev) + hdev->num_msi_used += 1; + } + +-static void hclge_irq_affinity_notify(struct irq_affinity_notify *notify, +- const cpumask_t *mask) +-{ +- struct hclge_dev *hdev = container_of(notify, struct hclge_dev, +- affinity_notify); +- +- cpumask_copy(&hdev->affinity_mask, mask); +-} +- +-static void hclge_irq_affinity_release(struct kref *ref) +-{ +-} +- + static void hclge_misc_affinity_setup(struct hclge_dev *hdev) + { + irq_set_affinity_hint(hdev->misc_vector.vector_irq, + &hdev->affinity_mask); +- +- hdev->affinity_notify.notify = hclge_irq_affinity_notify; +- hdev->affinity_notify.release = hclge_irq_affinity_release; +- irq_set_affinity_notifier(hdev->misc_vector.vector_irq, +- &hdev->affinity_notify); + } + + static void hclge_misc_affinity_teardown(struct hclge_dev *hdev) + { +- irq_set_affinity_notifier(hdev->misc_vector.vector_irq, NULL); + irq_set_affinity_hint(hdev->misc_vector.vector_irq, NULL); + } + +@@ -13040,7 +13016,7 @@ static int hclge_init(void) + { + pr_info("%s is initializing\n", HCLGE_NAME); + +- hclge_wq = alloc_workqueue("%s", 0, 0, HCLGE_NAME); ++ hclge_wq = alloc_workqueue("%s", WQ_UNBOUND, 0, HCLGE_NAME); + if (!hclge_wq) { + pr_err("%s: failed to create workqueue\n", HCLGE_NAME); + return -ENOMEM; +diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.h b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.h +index e446b839a3715..0d0ebb9714234 100644 +--- a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.h ++++ b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.h +@@ -942,7 +942,6 @@ struct hclge_dev { + + /* affinity mask and notify for misc interrupt */ + cpumask_t affinity_mask; +- struct irq_affinity_notify affinity_notify; + struct hclge_ptp *ptp; + }; + +diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c b/drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c +index b8414f684e89d..a1713a1ce6839 100644 +--- a/drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c ++++ b/drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c +@@ -3890,7 +3890,7 @@ static int hclgevf_init(void) + { + pr_info("%s is initializing\n", HCLGEVF_NAME); + +- hclgevf_wq = alloc_workqueue("%s", 0, 0, HCLGEVF_NAME); ++ hclgevf_wq = alloc_workqueue("%s", WQ_UNBOUND, 0, HCLGEVF_NAME); + if (!hclgevf_wq) { + pr_err("%s: failed to create workqueue\n", HCLGEVF_NAME); + return -ENOMEM; +-- +2.33.0 + diff --git a/queue-5.14/net-hns3-ignore-reset-event-before-initialization-pr.patch b/queue-5.14/net-hns3-ignore-reset-event-before-initialization-pr.patch new file mode 100644 index 00000000000..d2ec76f13e9 --- /dev/null +++ b/queue-5.14/net-hns3-ignore-reset-event-before-initialization-pr.patch @@ -0,0 +1,106 @@ +From c5566a10c67b3800ccde57991dda81cea33878ac Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Wed, 27 Oct 2021 20:11:45 +0800 +Subject: net: hns3: ignore reset event before initialization process is done + +From: Guangbin Huang + +[ Upstream commit 0251d196b0e1a19c870be882e5d4f496de8ab758 ] + +Currently, if there is a reset event triggered by RAS during device in +initialization process, driver may run reset process concurrently with +initialization process. In this case, it may cause problem. For example, +the RSS indirection table may has not been alloc memory in initialization +process yet, but it is used in reset process, it will cause a call trace +like this: + +[61228.744836] Unable to handle kernel NULL pointer dereference at virtual address 0000000000000000 +... +[61228.897677] Workqueue: hclgevf hclgevf_service_task [hclgevf] +[61228.911390] pstate: 40400009 (nZcv daif +PAN -UAO -TCO BTYPE=--) +[61228.918670] pc : hclgevf_set_rss_indir_table+0xb4/0x190 [hclgevf] +[61228.927812] lr : hclgevf_set_rss_indir_table+0x90/0x190 [hclgevf] +[61228.937248] sp : ffff8000162ebb50 +[61228.941087] x29: ffff8000162ebb50 x28: ffffb77add72dbc0 x27: ffff0820c7dc8080 +[61228.949516] x26: 0000000000000000 x25: ffff0820ad4fc880 x24: ffff0820c7dc8080 +[61228.958220] x23: ffff0820c7dc8090 x22: 00000000ffffffff x21: 0000000000000040 +[61228.966360] x20: ffffb77add72b9c0 x19: 0000000000000000 x18: 0000000000000030 +[61228.974646] x17: 0000000000000000 x16: ffffb77ae713feb0 x15: ffff0820ad4fcce8 +[61228.982808] x14: ffffffffffffffff x13: ffff8000962eb7f7 x12: 00003834ec70c960 +[61228.991990] x11: 00e0fafa8c206982 x10: 9670facc78a8f9a8 x9 : ffffb77add717530 +[61229.001123] x8 : ffff0820ad4fd6b8 x7 : 0000000000000000 x6 : 0000000000000011 +[61229.010249] x5 : 00000000000cb1b0 x4 : 0000000000002adb x3 : 0000000000000049 +[61229.018662] x2 : ffff8000162ebbb8 x1 : 0000000000000000 x0 : 0000000000000480 +[61229.027002] Call trace: +[61229.030177] hclgevf_set_rss_indir_table+0xb4/0x190 [hclgevf] +[61229.039009] hclgevf_rss_init_hw+0x128/0x1b4 [hclgevf] +[61229.046809] hclgevf_reset_rebuild+0x17c/0x69c [hclgevf] +[61229.053862] hclgevf_reset_service_task+0x4cc/0xa80 [hclgevf] +[61229.061306] hclgevf_service_task+0x6c/0x630 [hclgevf] +[61229.068491] process_one_work+0x1dc/0x48c +[61229.074121] worker_thread+0x15c/0x464 +[61229.078562] kthread+0x168/0x16c +[61229.082873] ret_from_fork+0x10/0x18 +[61229.088221] Code: 7900e7f6 f904a683 d503201f 9101a3e2 (38616b43) +[61229.095357] ---[ end trace 153661a538f6768c ]--- + +To fix this problem, don't schedule reset task before initialization +process is done. + +Signed-off-by: Guangbin Huang +Signed-off-by: David S. Miller +Signed-off-by: Sasha Levin +--- + drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c | 1 + + drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c | 3 +++ + drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.h | 1 + + 3 files changed, 5 insertions(+) + +diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c +index dc748f2f18434..b1397d9f9a62e 100644 +--- a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c ++++ b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c +@@ -2852,6 +2852,7 @@ static void hclge_mbx_task_schedule(struct hclge_dev *hdev) + static void hclge_reset_task_schedule(struct hclge_dev *hdev) + { + if (!test_bit(HCLGE_STATE_REMOVING, &hdev->state) && ++ test_bit(HCLGE_STATE_SERVICE_INITED, &hdev->state) && + !test_and_set_bit(HCLGE_STATE_RST_SERVICE_SCHED, &hdev->state)) + mod_delayed_work(hclge_wq, &hdev->service_task, 0); + } +diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c b/drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c +index a1713a1ce6839..9d36620f9c035 100644 +--- a/drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c ++++ b/drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c +@@ -2230,6 +2230,7 @@ static void hclgevf_get_misc_vector(struct hclgevf_dev *hdev) + void hclgevf_reset_task_schedule(struct hclgevf_dev *hdev) + { + if (!test_bit(HCLGEVF_STATE_REMOVING, &hdev->state) && ++ test_bit(HCLGEVF_STATE_SERVICE_INITED, &hdev->state) && + !test_and_set_bit(HCLGEVF_STATE_RST_SERVICE_SCHED, + &hdev->state)) + mod_delayed_work(hclgevf_wq, &hdev->service_task, 0); +@@ -3443,6 +3444,8 @@ static int hclgevf_init_hdev(struct hclgevf_dev *hdev) + + hclgevf_init_rxd_adv_layout(hdev); + ++ set_bit(HCLGEVF_STATE_SERVICE_INITED, &hdev->state); ++ + hdev->last_reset_time = jiffies; + dev_info(&hdev->pdev->dev, "finished initializing %s driver\n", + HCLGEVF_DRIVER_NAME); +diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.h b/drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.h +index e8013be055f89..19f1494e356ab 100644 +--- a/drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.h ++++ b/drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.h +@@ -144,6 +144,7 @@ enum hclgevf_states { + HCLGEVF_STATE_REMOVING, + HCLGEVF_STATE_NIC_REGISTERED, + HCLGEVF_STATE_ROCE_REGISTERED, ++ HCLGEVF_STATE_SERVICE_INITED, + /* task states */ + HCLGEVF_STATE_RST_SERVICE_SCHED, + HCLGEVF_STATE_RST_HANDLING, +-- +2.33.0 + diff --git a/queue-5.14/net-mscc-ocelot-add-of_node_put-before-goto.patch b/queue-5.14/net-mscc-ocelot-add-of_node_put-before-goto.patch new file mode 100644 index 00000000000..e1de5d72d7d --- /dev/null +++ b/queue-5.14/net-mscc-ocelot-add-of_node_put-before-goto.patch @@ -0,0 +1,38 @@ +From dde95ef1c009fac16734c7a519036afe0d42a2e3 Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Sun, 17 Oct 2021 21:32:32 -0400 +Subject: net: mscc: ocelot: Add of_node_put() before goto + +From: Wan Jiabing + +[ Upstream commit d1a7b9e4696584ce05c12567762c18a866837a85 ] + +Fix following coccicheck warning: +./drivers/net/ethernet/mscc/ocelot_vsc7514.c:946:1-33: WARNING: Function +for_each_available_child_of_node should have of_node_put() before goto. + +Early exits from for_each_available_child_of_node should decrement the +node reference counter. + +Signed-off-by: Wan Jiabing +Signed-off-by: David S. Miller +Signed-off-by: Sasha Levin +--- + drivers/net/ethernet/mscc/ocelot_vsc7514.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/drivers/net/ethernet/mscc/ocelot_vsc7514.c b/drivers/net/ethernet/mscc/ocelot_vsc7514.c +index 4bd7e9d9ec61c..03cfa0dc7bf99 100644 +--- a/drivers/net/ethernet/mscc/ocelot_vsc7514.c ++++ b/drivers/net/ethernet/mscc/ocelot_vsc7514.c +@@ -972,6 +972,7 @@ static int mscc_ocelot_init_ports(struct platform_device *pdev, + target = ocelot_regmap_init(ocelot, res); + if (IS_ERR(target)) { + err = PTR_ERR(target); ++ of_node_put(portnp); + goto out_teardown; + } + +-- +2.33.0 + diff --git a/queue-5.14/net-multicast-calculate-csum-of-looped-back-and-forw.patch b/queue-5.14/net-multicast-calculate-csum-of-looped-back-and-forw.patch new file mode 100644 index 00000000000..abd92e419e5 --- /dev/null +++ b/queue-5.14/net-multicast-calculate-csum-of-looped-back-and-forw.patch @@ -0,0 +1,98 @@ +From fd113dcecb5e4807bf0bab73a5950165f9f7c4d0 Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Sun, 24 Oct 2021 22:14:25 +0200 +Subject: net: multicast: calculate csum of looped-back and forwarded packets + +From: Cyril Strejc + +[ Upstream commit 9122a70a6333705c0c35614ddc51c274ed1d3637 ] + +During a testing of an user-space application which transmits UDP +multicast datagrams and utilizes multicast routing to send the UDP +datagrams out of defined network interfaces, I've found a multicast +router does not fill-in UDP checksum into locally produced, looped-back +and forwarded UDP datagrams, if an original output NIC the datagrams +are sent to has UDP TX checksum offload enabled. + +The datagrams are sent malformed out of the NIC the datagrams have been +forwarded to. + +It is because: + +1. If TX checksum offload is enabled on the output NIC, UDP checksum + is not calculated by kernel and is not filled into skb data. + +2. dev_loopback_xmit(), which is called solely by + ip_mc_finish_output(), sets skb->ip_summed = CHECKSUM_UNNECESSARY + unconditionally. + +3. Since 35fc92a9 ("[NET]: Allow forwarding of ip_summed except + CHECKSUM_COMPLETE"), the ip_summed value is preserved during + forwarding. + +4. If ip_summed != CHECKSUM_PARTIAL, checksum is not calculated during + a packet egress. + +The minimum fix in dev_loopback_xmit(): + +1. Preserves skb->ip_summed CHECKSUM_PARTIAL. This is the + case when the original output NIC has TX checksum offload enabled. + The effects are: + + a) If the forwarding destination interface supports TX checksum + offloading, the NIC driver is responsible to fill-in the + checksum. + + b) If the forwarding destination interface does NOT support TX + checksum offloading, checksums are filled-in by kernel before + skb is submitted to the NIC driver. + + c) For local delivery, checksum validation is skipped as in the + case of CHECKSUM_UNNECESSARY, thanks to skb_csum_unnecessary(). + +2. Translates ip_summed CHECKSUM_NONE to CHECKSUM_UNNECESSARY. It + means, for CHECKSUM_NONE, the behavior is unmodified and is there + to skip a looped-back packet local delivery checksum validation. + +Signed-off-by: Cyril Strejc +Reviewed-by: Willem de Bruijn +Signed-off-by: David S. Miller +Signed-off-by: Sasha Levin +--- + include/net/udp.h | 5 +++-- + net/core/dev.c | 3 ++- + 2 files changed, 5 insertions(+), 3 deletions(-) + +diff --git a/include/net/udp.h b/include/net/udp.h +index 360df454356cb..909ecf447e0fb 100644 +--- a/include/net/udp.h ++++ b/include/net/udp.h +@@ -494,8 +494,9 @@ static inline struct sk_buff *udp_rcv_segment(struct sock *sk, + * CHECKSUM_NONE in __udp_gso_segment. UDP GRO indeed builds partial + * packets in udp_gro_complete_segment. As does UDP GSO, verified by + * udp_send_skb. But when those packets are looped in dev_loopback_xmit +- * their ip_summed is set to CHECKSUM_UNNECESSARY. Reset in this +- * specific case, where PARTIAL is both correct and required. ++ * their ip_summed CHECKSUM_NONE is changed to CHECKSUM_UNNECESSARY. ++ * Reset in this specific case, where PARTIAL is both correct and ++ * required. + */ + if (skb->pkt_type == PACKET_LOOPBACK) + skb->ip_summed = CHECKSUM_PARTIAL; +diff --git a/net/core/dev.c b/net/core/dev.c +index 9cb47618d4869..2015074d8d9ab 100644 +--- a/net/core/dev.c ++++ b/net/core/dev.c +@@ -3995,7 +3995,8 @@ int dev_loopback_xmit(struct net *net, struct sock *sk, struct sk_buff *skb) + skb_reset_mac_header(skb); + __skb_pull(skb, skb_network_offset(skb)); + skb->pkt_type = PACKET_LOOPBACK; +- skb->ip_summed = CHECKSUM_UNNECESSARY; ++ if (skb->ip_summed == CHECKSUM_NONE) ++ skb->ip_summed = CHECKSUM_UNNECESSARY; + WARN_ON(!skb_dst(skb)); + skb_dst_force(skb); + netif_rx_ni(skb); +-- +2.33.0 + diff --git a/queue-5.14/net-smc-correct-spelling-mistake-to-tcpf_syn_recv.patch b/queue-5.14/net-smc-correct-spelling-mistake-to-tcpf_syn_recv.patch new file mode 100644 index 00000000000..11ca1e37474 --- /dev/null +++ b/queue-5.14/net-smc-correct-spelling-mistake-to-tcpf_syn_recv.patch @@ -0,0 +1,35 @@ +From 8cb833f76513b7e51db7f27352f977e18884df0b Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Thu, 28 Oct 2021 15:13:47 +0800 +Subject: net/smc: Correct spelling mistake to TCPF_SYN_RECV + +From: Wen Gu + +[ Upstream commit f3a3a0fe0b644582fa5d83dd94b398f99fc57914 ] + +There should use TCPF_SYN_RECV instead of TCP_SYN_RECV. + +Signed-off-by: Wen Gu +Reviewed-by: Tony Lu +Signed-off-by: David S. Miller +Signed-off-by: Sasha Levin +--- + net/smc/af_smc.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/net/smc/af_smc.c b/net/smc/af_smc.c +index c038efc23ce38..78b663dbfa1f9 100644 +--- a/net/smc/af_smc.c ++++ b/net/smc/af_smc.c +@@ -1057,7 +1057,7 @@ static void smc_connect_work(struct work_struct *work) + if (smc->clcsock->sk->sk_err) { + smc->sk.sk_err = smc->clcsock->sk->sk_err; + } else if ((1 << smc->clcsock->sk->sk_state) & +- (TCPF_SYN_SENT | TCP_SYN_RECV)) { ++ (TCPF_SYN_SENT | TCPF_SYN_RECV)) { + rc = sk_stream_wait_connect(smc->clcsock->sk, &timeo); + if ((rc == -EPIPE) && + ((1 << smc->clcsock->sk->sk_state) & +-- +2.33.0 + diff --git a/queue-5.14/net-smc-fix-smc_link-llc_testlink_time-overflow.patch b/queue-5.14/net-smc-fix-smc_link-llc_testlink_time-overflow.patch new file mode 100644 index 00000000000..e61a8c666f0 --- /dev/null +++ b/queue-5.14/net-smc-fix-smc_link-llc_testlink_time-overflow.patch @@ -0,0 +1,40 @@ +From ff989bc1482b31f1b7621476d014b5dd7298553f Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Thu, 28 Oct 2021 15:13:45 +0800 +Subject: net/smc: Fix smc_link->llc_testlink_time overflow + +From: Tony Lu + +[ Upstream commit c4a146c7cf5e8ad76231523b174d161bf152c6e7 ] + +The value of llc_testlink_time is set to the value stored in +net->ipv4.sysctl_tcp_keepalive_time when linkgroup init. The value of +sysctl_tcp_keepalive_time is already jiffies, so we don't need to +multiply by HZ, which would cause smc_link->llc_testlink_time overflow, +and test_link send flood. + +Signed-off-by: Tony Lu +Reviewed-by: Xuan Zhuo +Reviewed-by: Wen Gu +Signed-off-by: David S. Miller +Signed-off-by: Sasha Levin +--- + net/smc/smc_llc.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/net/smc/smc_llc.c b/net/smc/smc_llc.c +index 72f4b72eb1753..f1d323439a2af 100644 +--- a/net/smc/smc_llc.c ++++ b/net/smc/smc_llc.c +@@ -1822,7 +1822,7 @@ void smc_llc_link_active(struct smc_link *link) + link->smcibdev->ibdev->name, link->ibport); + link->state = SMC_LNK_ACTIVE; + if (link->lgr->llc_testlink_time) { +- link->llc_testlink_time = link->lgr->llc_testlink_time * HZ; ++ link->llc_testlink_time = link->lgr->llc_testlink_time; + schedule_delayed_work(&link->llc_testlink_wrk, + link->llc_testlink_time); + } +-- +2.33.0 + diff --git a/queue-5.14/net-sparx5-add-of_node_put-before-goto.patch b/queue-5.14/net-sparx5-add-of_node_put-before-goto.patch new file mode 100644 index 00000000000..a2fc821a70e --- /dev/null +++ b/queue-5.14/net-sparx5-add-of_node_put-before-goto.patch @@ -0,0 +1,38 @@ +From 9beeae6c2ad5e19ad5c08ed5bd106f314a8ac2bf Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Sun, 17 Oct 2021 21:31:30 -0400 +Subject: net: sparx5: Add of_node_put() before goto + +From: Wan Jiabing + +[ Upstream commit d9fd7e9fccfac466fb528a783f2fc76f2982604c ] + +Fix following coccicheck warning: +./drivers/net/ethernet/microchip/sparx5/s4parx5_main.c:723:1-33: WARNING: Function +for_each_available_child_of_node should have of_node_put() before goto + +Early exits from for_each_available_child_of_node should decrement the +node reference counter. + +Signed-off-by: Wan Jiabing +Signed-off-by: David S. Miller +Signed-off-by: Sasha Levin +--- + drivers/net/ethernet/microchip/sparx5/sparx5_main.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/drivers/net/ethernet/microchip/sparx5/sparx5_main.c b/drivers/net/ethernet/microchip/sparx5/sparx5_main.c +index f666133a15dea..6e9058265d43e 100644 +--- a/drivers/net/ethernet/microchip/sparx5/sparx5_main.c ++++ b/drivers/net/ethernet/microchip/sparx5/sparx5_main.c +@@ -743,6 +743,7 @@ static int mchp_sparx5_probe(struct platform_device *pdev) + err = dev_err_probe(sparx5->dev, PTR_ERR(serdes), + "port %u: missing serdes\n", + portno); ++ of_node_put(portnp); + goto cleanup_config; + } + config->portno = portno; +-- +2.33.0 + diff --git a/queue-5.14/nfp-bpf-relax-prog-rejection-for-mtu-check-through-m.patch b/queue-5.14/nfp-bpf-relax-prog-rejection-for-mtu-check-through-m.patch new file mode 100644 index 00000000000..dd76daa2b81 --- /dev/null +++ b/queue-5.14/nfp-bpf-relax-prog-rejection-for-mtu-check-through-m.patch @@ -0,0 +1,114 @@ +From 2076f04bbb8b35bc6229e76b863aeb87adca8319 Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Thu, 28 Oct 2021 12:00:36 +0200 +Subject: nfp: bpf: relax prog rejection for mtu check through max_pkt_offset + +From: Yu Xiao + +[ Upstream commit 90a881fc352a953f1c8beb61977a2db0818157d4 ] + +MTU change is refused whenever the value of new MTU is bigger than +the max packet bytes that fits in NFP Cluster Target Memory (CTM). +However, an eBPF program doesn't always need to access the whole +packet data. + +The maximum direct packet access (DPA) offset has always been +caculated by verifier and stored in the max_pkt_offset field of prog +aux data. + +Signed-off-by: Yu Xiao +Reviewed-by: Yinjun Zhang +Reviewed-by: Niklas Soderlund +Signed-off-by: Simon Horman +Signed-off-by: David S. Miller +Signed-off-by: Sasha Levin +--- + drivers/net/ethernet/netronome/nfp/bpf/main.c | 16 +++++++++++----- + drivers/net/ethernet/netronome/nfp/bpf/main.h | 2 ++ + .../net/ethernet/netronome/nfp/bpf/offload.c | 17 +++++++++++++---- + 3 files changed, 26 insertions(+), 9 deletions(-) + +diff --git a/drivers/net/ethernet/netronome/nfp/bpf/main.c b/drivers/net/ethernet/netronome/nfp/bpf/main.c +index 11c83a99b0140..f469950c72657 100644 +--- a/drivers/net/ethernet/netronome/nfp/bpf/main.c ++++ b/drivers/net/ethernet/netronome/nfp/bpf/main.c +@@ -182,15 +182,21 @@ static int + nfp_bpf_check_mtu(struct nfp_app *app, struct net_device *netdev, int new_mtu) + { + struct nfp_net *nn = netdev_priv(netdev); +- unsigned int max_mtu; ++ struct nfp_bpf_vnic *bv; ++ struct bpf_prog *prog; + + if (~nn->dp.ctrl & NFP_NET_CFG_CTRL_BPF) + return 0; + +- max_mtu = nn_readb(nn, NFP_NET_CFG_BPF_INL_MTU) * 64 - 32; +- if (new_mtu > max_mtu) { +- nn_info(nn, "BPF offload active, MTU over %u not supported\n", +- max_mtu); ++ if (nn->xdp_hw.prog) { ++ prog = nn->xdp_hw.prog; ++ } else { ++ bv = nn->app_priv; ++ prog = bv->tc_prog; ++ } ++ ++ if (nfp_bpf_offload_check_mtu(nn, prog, new_mtu)) { ++ nn_info(nn, "BPF offload active, potential packet access beyond hardware packet boundary"); + return -EBUSY; + } + return 0; +diff --git a/drivers/net/ethernet/netronome/nfp/bpf/main.h b/drivers/net/ethernet/netronome/nfp/bpf/main.h +index d0e17eebddd94..16841bb750b72 100644 +--- a/drivers/net/ethernet/netronome/nfp/bpf/main.h ++++ b/drivers/net/ethernet/netronome/nfp/bpf/main.h +@@ -560,6 +560,8 @@ bool nfp_is_subprog_start(struct nfp_insn_meta *meta); + void nfp_bpf_jit_prepare(struct nfp_prog *nfp_prog); + int nfp_bpf_jit(struct nfp_prog *prog); + bool nfp_bpf_supported_opcode(u8 code); ++bool nfp_bpf_offload_check_mtu(struct nfp_net *nn, struct bpf_prog *prog, ++ unsigned int mtu); + + int nfp_verify_insn(struct bpf_verifier_env *env, int insn_idx, + int prev_insn_idx); +diff --git a/drivers/net/ethernet/netronome/nfp/bpf/offload.c b/drivers/net/ethernet/netronome/nfp/bpf/offload.c +index 53851853562c6..9d97cd281f18e 100644 +--- a/drivers/net/ethernet/netronome/nfp/bpf/offload.c ++++ b/drivers/net/ethernet/netronome/nfp/bpf/offload.c +@@ -481,19 +481,28 @@ int nfp_bpf_event_output(struct nfp_app_bpf *bpf, const void *data, + return 0; + } + ++bool nfp_bpf_offload_check_mtu(struct nfp_net *nn, struct bpf_prog *prog, ++ unsigned int mtu) ++{ ++ unsigned int fw_mtu, pkt_off; ++ ++ fw_mtu = nn_readb(nn, NFP_NET_CFG_BPF_INL_MTU) * 64 - 32; ++ pkt_off = min(prog->aux->max_pkt_offset, mtu); ++ ++ return fw_mtu < pkt_off; ++} ++ + static int + nfp_net_bpf_load(struct nfp_net *nn, struct bpf_prog *prog, + struct netlink_ext_ack *extack) + { + struct nfp_prog *nfp_prog = prog->aux->offload->dev_priv; +- unsigned int fw_mtu, pkt_off, max_stack, max_prog_len; ++ unsigned int max_stack, max_prog_len; + dma_addr_t dma_addr; + void *img; + int err; + +- fw_mtu = nn_readb(nn, NFP_NET_CFG_BPF_INL_MTU) * 64 - 32; +- pkt_off = min(prog->aux->max_pkt_offset, nn->dp.netdev->mtu); +- if (fw_mtu < pkt_off) { ++ if (nfp_bpf_offload_check_mtu(nn, prog, nn->dp.netdev->mtu)) { + NL_SET_ERR_MSG_MOD(extack, "BPF offload not supported with potential packet access beyond HW packet split boundary"); + return -EOPNOTSUPP; + } +-- +2.33.0 + diff --git a/queue-5.14/nvmet-tcp-fix-a-memory-leak-when-releasing-a-queue.patch b/queue-5.14/nvmet-tcp-fix-a-memory-leak-when-releasing-a-queue.patch new file mode 100644 index 00000000000..6351fc31ae1 --- /dev/null +++ b/queue-5.14/nvmet-tcp-fix-a-memory-leak-when-releasing-a-queue.patch @@ -0,0 +1,51 @@ +From 5586f12523eb80be7583f3acf8f60eda108d1bd9 Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Fri, 15 Oct 2021 10:26:34 +0200 +Subject: nvmet-tcp: fix a memory leak when releasing a queue + +From: Maurizio Lombardi + +[ Upstream commit 926245c7d22271307606c88b1fbb2539a8550e94 ] + +page_frag_free() won't completely release the memory +allocated for the commands, the cache page must be explicitly +freed by calling __page_frag_cache_drain(). + +This bug can be easily reproduced by repeatedly +executing the following command on the initiator: + +$echo 1 > /sys/devices/virtual/nvme-fabrics/ctl/nvme0/reset_controller + +Signed-off-by: Maurizio Lombardi +Reviewed-by: Sagi Grimberg +Reviewed-by: John Meneghini +Signed-off-by: Christoph Hellwig +Signed-off-by: Sasha Levin +--- + drivers/nvme/target/tcp.c | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/drivers/nvme/target/tcp.c b/drivers/nvme/target/tcp.c +index d641bfa07a801..586ca20837e7b 100644 +--- a/drivers/nvme/target/tcp.c ++++ b/drivers/nvme/target/tcp.c +@@ -1428,6 +1428,7 @@ static void nvmet_tcp_uninit_data_in_cmds(struct nvmet_tcp_queue *queue) + + static void nvmet_tcp_release_queue_work(struct work_struct *w) + { ++ struct page *page; + struct nvmet_tcp_queue *queue = + container_of(w, struct nvmet_tcp_queue, release_work); + +@@ -1447,6 +1448,8 @@ static void nvmet_tcp_release_queue_work(struct work_struct *w) + nvmet_tcp_free_crypto(queue); + ida_simple_remove(&nvmet_tcp_queue_ida, queue->idx); + ++ page = virt_to_head_page(queue->pf_cache.va); ++ __page_frag_cache_drain(page, queue->pf_cache.pagecnt_bias); + kfree(queue); + } + +-- +2.33.0 + diff --git a/queue-5.14/nvmet-tcp-fix-header-digest-verification.patch b/queue-5.14/nvmet-tcp-fix-header-digest-verification.patch new file mode 100644 index 00000000000..bbe425f648d --- /dev/null +++ b/queue-5.14/nvmet-tcp-fix-header-digest-verification.patch @@ -0,0 +1,37 @@ +From 1887eb52ff6877e821544faa606ea89d42057699 Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Wed, 27 Oct 2021 09:49:27 +0300 +Subject: nvmet-tcp: fix header digest verification + +From: Amit Engel + +[ Upstream commit 86aeda32b887cdaeb0f4b7bfc9971e36377181c7 ] + +Pass the correct length to nvmet_tcp_verify_hdgst, which is the pdu +header length. This fixes a wrong behaviour where header digest +verification passes although the digest is wrong. + +Signed-off-by: Amit Engel +Reviewed-by: Sagi Grimberg +Signed-off-by: Christoph Hellwig +Signed-off-by: Sasha Levin +--- + drivers/nvme/target/tcp.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/drivers/nvme/target/tcp.c b/drivers/nvme/target/tcp.c +index 586ca20837e7b..46c3b3be7e033 100644 +--- a/drivers/nvme/target/tcp.c ++++ b/drivers/nvme/target/tcp.c +@@ -1096,7 +1096,7 @@ recv: + } + + if (queue->hdr_digest && +- nvmet_tcp_verify_hdgst(queue, &queue->pdu, queue->offset)) { ++ nvmet_tcp_verify_hdgst(queue, &queue->pdu, hdr->hlen)) { + nvmet_tcp_fatal_error(queue); /* fatal */ + return -EPROTO; + } +-- +2.33.0 + diff --git a/queue-5.14/ptp-fix-error-print-of-ptp_kvm-on-x86_64-platform.patch b/queue-5.14/ptp-fix-error-print-of-ptp_kvm-on-x86_64-platform.patch new file mode 100644 index 00000000000..87392af497e --- /dev/null +++ b/queue-5.14/ptp-fix-error-print-of-ptp_kvm-on-x86_64-platform.patch @@ -0,0 +1,48 @@ +From 5ec91fd81679304f3e920819472b8e2fe2aeb24a Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Thu, 14 Oct 2021 11:19:52 +0800 +Subject: ptp: fix error print of ptp_kvm on X86_64 platform + +From: Kele Huang + +[ Upstream commit c2402d43d183b11445aed921e7bebcd47ef222f1 ] + +Commit a86ed2cfa13c5 ("ptp: Don't print an error if ptp_kvm is not supported") +fixes the error message print on ARM platform by only concerning about +the case that the error returned from kvm_arch_ptp_init() is not -EOPNOTSUPP. +Although the ARM platform returns -EOPNOTSUPP if ptp_kvm is not supported +while X86_64 platform returns -KVM_EOPNOTSUPP, both error codes share the +same value 95. + +Actually kvm_arch_ptp_init() on X86_64 platform can return three kinds of +errors (-KVM_ENOSYS, -KVM_EOPNOTSUPP and -KVM_EFAULT). The problem is that +-KVM_EOPNOTSUPP is masked out and -KVM_EFAULT is ignored among them. +This patch fixes this by returning them to ptp_kvm_init() respectively. + +Signed-off-by: Kele Huang +Signed-off-by: David S. Miller +Signed-off-by: Sasha Levin +--- + drivers/ptp/ptp_kvm_x86.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/drivers/ptp/ptp_kvm_x86.c b/drivers/ptp/ptp_kvm_x86.c +index d0096cd7096a8..4991054a21350 100644 +--- a/drivers/ptp/ptp_kvm_x86.c ++++ b/drivers/ptp/ptp_kvm_x86.c +@@ -31,10 +31,10 @@ int kvm_arch_ptp_init(void) + + ret = kvm_hypercall2(KVM_HC_CLOCK_PAIRING, clock_pair_gpa, + KVM_CLOCK_PAIRING_WALLCLOCK); +- if (ret == -KVM_ENOSYS || ret == -KVM_EOPNOTSUPP) ++ if (ret == -KVM_ENOSYS) + return -ENODEV; + +- return 0; ++ return ret; + } + + int kvm_arch_ptp_get_clock(struct timespec64 *ts) +-- +2.33.0 + diff --git a/queue-5.14/r8169-add-device-10ec-8162-to-driver-r8169.patch b/queue-5.14/r8169-add-device-10ec-8162-to-driver-r8169.patch new file mode 100644 index 00000000000..6dc58377bbc --- /dev/null +++ b/queue-5.14/r8169-add-device-10ec-8162-to-driver-r8169.patch @@ -0,0 +1,36 @@ +From 78a26feea75944843d952a10081c4cfe78ec9147 Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Tue, 26 Oct 2021 07:12:42 +0000 +Subject: r8169: Add device 10ec:8162 to driver r8169 + +From: Janghyub Seo + +[ Upstream commit 72f898ca0ab85fde6facf78b14d9f67a4a7b32d1 ] + +This patch makes the driver r8169 pick up device Realtek Semiconductor Co. +, Ltd. Device [10ec:8162]. + +Signed-off-by: Janghyub Seo +Suggested-by: Rushab Shah +Link: https://lore.kernel.org/r/1635231849296.1489250046.441294000@gmail.com +Signed-off-by: Jakub Kicinski +Signed-off-by: Sasha Levin +--- + drivers/net/ethernet/realtek/r8169_main.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/drivers/net/ethernet/realtek/r8169_main.c b/drivers/net/ethernet/realtek/r8169_main.c +index 55411c100a0e5..6a566676ec0e9 100644 +--- a/drivers/net/ethernet/realtek/r8169_main.c ++++ b/drivers/net/ethernet/realtek/r8169_main.c +@@ -157,6 +157,7 @@ static const struct pci_device_id rtl8169_pci_tbl[] = { + { PCI_VDEVICE(REALTEK, 0x8129) }, + { PCI_VDEVICE(REALTEK, 0x8136), RTL_CFG_NO_GBIT }, + { PCI_VDEVICE(REALTEK, 0x8161) }, ++ { PCI_VDEVICE(REALTEK, 0x8162) }, + { PCI_VDEVICE(REALTEK, 0x8167) }, + { PCI_VDEVICE(REALTEK, 0x8168) }, + { PCI_VDEVICE(NCUBE, 0x8168) }, +-- +2.33.0 + diff --git a/queue-5.14/reset-socfpga-add-empty-driver-allowing-consumers-to.patch b/queue-5.14/reset-socfpga-add-empty-driver-allowing-consumers-to.patch new file mode 100644 index 00000000000..eac0537ae54 --- /dev/null +++ b/queue-5.14/reset-socfpga-add-empty-driver-allowing-consumers-to.patch @@ -0,0 +1,61 @@ +From 55bc7f0ff5b40fced77fa33fb662124ca0f7dc03 Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Mon, 20 Sep 2021 14:41:41 +0200 +Subject: reset: socfpga: add empty driver allowing consumers to probe +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +From: Paweł Anikiel + +[ Upstream commit 3ad60b4b3570937f3278509fe6797a5093ce53f8 ] + +The early reset driver doesn't ever probe, which causes consuming +devices to be unable to probe. Add an empty driver to set this device +as available, allowing consumers to probe. + +Signed-off-by: Paweł Anikiel +Link: https://lore.kernel.org/r/20210920124141.1166544-4-pan@semihalf.com +Signed-off-by: Philipp Zabel +Signed-off-by: Sasha Levin +--- + drivers/reset/reset-socfpga.c | 26 ++++++++++++++++++++++++++ + 1 file changed, 26 insertions(+) + +diff --git a/drivers/reset/reset-socfpga.c b/drivers/reset/reset-socfpga.c +index 2a72f861f7983..8c6492e5693c7 100644 +--- a/drivers/reset/reset-socfpga.c ++++ b/drivers/reset/reset-socfpga.c +@@ -92,3 +92,29 @@ void __init socfpga_reset_init(void) + for_each_matching_node(np, socfpga_early_reset_dt_ids) + a10_reset_init(np); + } ++ ++/* ++ * The early driver is problematic, because it doesn't register ++ * itself as a driver. This causes certain device links to prevent ++ * consumer devices from probing. The hacky solution is to register ++ * an empty driver, whose only job is to attach itself to the reset ++ * manager and call probe. ++ */ ++static const struct of_device_id socfpga_reset_dt_ids[] = { ++ { .compatible = "altr,rst-mgr", }, ++ { /* sentinel */ }, ++}; ++ ++static int reset_simple_probe(struct platform_device *pdev) ++{ ++ return 0; ++} ++ ++static struct platform_driver reset_socfpga_driver = { ++ .probe = reset_simple_probe, ++ .driver = { ++ .name = "socfpga-reset", ++ .of_match_table = socfpga_reset_dt_ids, ++ }, ++}; ++builtin_platform_driver(reset_socfpga_driver); +-- +2.33.0 + diff --git a/queue-5.14/reset-tegra-bpmp-handle-errors-in-bpmp-response.patch b/queue-5.14/reset-tegra-bpmp-handle-errors-in-bpmp-response.patch new file mode 100644 index 00000000000..5cde2d35909 --- /dev/null +++ b/queue-5.14/reset-tegra-bpmp-handle-errors-in-bpmp-response.patch @@ -0,0 +1,52 @@ +From 56b49d170845d0454d6c313082d9c05d5a362fa2 Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Wed, 15 Sep 2021 11:55:14 +0300 +Subject: reset: tegra-bpmp: Handle errors in BPMP response + +From: Mikko Perttunen + +[ 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 +Link: https://lore.kernel.org/r/20210915085517.1669675-2-mperttunen@nvidia.com +Signed-off-by: Philipp Zabel +Signed-off-by: Sasha Levin +--- + 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 24d3395964cc4..4c5bba52b1059 100644 +--- a/drivers/reset/tegra/reset-bpmp.c ++++ b/drivers/reset/tegra/reset-bpmp.c +@@ -20,6 +20,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; +@@ -30,7 +31,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-5.14/scsi-qla2xxx-fix-unmap-of-already-freed-sgl.patch b/queue-5.14/scsi-qla2xxx-fix-unmap-of-already-freed-sgl.patch new file mode 100644 index 00000000000..e63794c8033 --- /dev/null +++ b/queue-5.14/scsi-qla2xxx-fix-unmap-of-already-freed-sgl.patch @@ -0,0 +1,90 @@ +From 98f3bc4c745eda791adb4919cdea46b74aac3ee0 Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Mon, 18 Oct 2021 15:26:50 +0300 +Subject: scsi: qla2xxx: Fix unmap of already freed sgl + +From: Dmitry Bogdanov + +[ 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 +Signed-off-by: Dmitry Bogdanov +Signed-off-by: Martin K. Petersen +Signed-off-by: Sasha Levin +--- + 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 eb47140a899fe..41219f4f1e114 100644 +--- a/drivers/scsi/qla2xxx/qla_target.c ++++ b/drivers/scsi/qla2xxx/qla_target.c +@@ -3261,8 +3261,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 */ +@@ -3385,10 +3384,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)) { + /* +@@ -3406,6 +3401,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); +@@ -3810,9 +3809,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 + diff --git a/queue-5.14/scsi-qla2xxx-return-enomem-if-kzalloc-fails.patch b/queue-5.14/scsi-qla2xxx-return-enomem-if-kzalloc-fails.patch new file mode 100644 index 00000000000..6c11a5ab8a9 --- /dev/null +++ b/queue-5.14/scsi-qla2xxx-return-enomem-if-kzalloc-fails.patch @@ -0,0 +1,37 @@ +From b2b3e2ee0c460ce507893a6e8d838d1c3f1e6b7e Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Mon, 18 Oct 2021 01:56:21 +0000 +Subject: scsi: qla2xxx: Return -ENOMEM if kzalloc() fails + +From: Zheyu Ma + +[ Upstream commit 06634d5b6e923ed0d4772aba8def5a618f44c7fe ] + +The driver probing function should return < 0 for failure, otherwise +kernel will treat value > 0 as success. + +Link: https://lore.kernel.org/r/1634522181-31166-1-git-send-email-zheyuma97@gmail.com +Reviewed-by: Himanshu Madhani +Signed-off-by: Zheyu Ma +Signed-off-by: Martin K. Petersen +Signed-off-by: Sasha Levin +--- + drivers/scsi/qla2xxx/qla_os.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/drivers/scsi/qla2xxx/qla_os.c b/drivers/scsi/qla2xxx/qla_os.c +index 0d25d2baa35e7..b48d2344fd4ce 100644 +--- a/drivers/scsi/qla2xxx/qla_os.c ++++ b/drivers/scsi/qla2xxx/qla_os.c +@@ -4073,7 +4073,7 @@ qla2x00_mem_alloc(struct qla_hw_data *ha, uint16_t req_len, uint16_t rsp_len, + ql_dbg_pci(ql_dbg_init, ha->pdev, + 0xe0ee, "%s: failed alloc dsd\n", + __func__); +- return 1; ++ return -ENOMEM; + } + ha->dif_bundle_kallocs++; + +-- +2.33.0 + diff --git a/queue-5.14/series b/queue-5.14/series index b930d9382c5..563580cec5a 100644 --- a/queue-5.14/series +++ b/queue-5.14/series @@ -53,3 +53,45 @@ x86-sme-use-define-use_early_pgtable_l5-in-mem_encrypt_identity.c.patch x86-cpu-fix-migration-safety-with-x86_bug_null_sel.patch x86-irq-ensure-pi-wakeup-handler-is-unregistered-before-module-unload.patch x86-iopl-fake-iopl-3-cli-sti-usage.patch +kvm-arm64-report-corrupted-refcount-at-el2.patch +asoc-soc-core-fix-null-ptr-deref-in-snd_soc_del_comp.patch +asoc-cs42l42-ensure-0db-full-scale-volume-is-used-fo.patch +alsa-hda-realtek-fixes-hp-spectre-x360-15-eb1xxx-spe.patch +ptp-fix-error-print-of-ptp_kvm-on-x86_64-platform.patch +net-sparx5-add-of_node_put-before-goto.patch +net-mscc-ocelot-add-of_node_put-before-goto.patch +cavium-return-negative-value-when-pci_alloc_irq_vect.patch +scsi-qla2xxx-return-enomem-if-kzalloc-fails.patch +scsi-qla2xxx-fix-unmap-of-already-freed-sgl.patch +misdn-fix-return-values-of-the-probe-function.patch +cavium-fix-return-values-of-the-probe-function.patch +sfc-export-fibre-specific-supported-link-modes.patch +sfc-don-t-use-netif_info-before-net_device-setup.patch +hyperv-vmbus-include-linux-bitops.h.patch +arm-dts-sun7i-a20-olinuxino-lime2-fix-ethernet-phy-m.patch +reset-tegra-bpmp-handle-errors-in-bpmp-response.patch +reset-socfpga-add-empty-driver-allowing-consumers-to.patch +mmc-winbond-don-t-build-on-m68k.patch +spi-altera-change-to-dynamic-allocation-of-spi-id.patch +drm-panel-orientation-quirks-add-quirk-for-aya-neo-2.patch +fcnal-test-kill-hanging-ping-nettest-binaries-on-cle.patch +bpf-define-bpf_jit_alloc_exec_limit-for-riscv-jit.patch +bpf-define-bpf_jit_alloc_exec_limit-for-arm64-jit.patch +bpf-prevent-increasing-bpf_jit_limit-above-max.patch +gpio-mlxbf2.c-add-check-for-bgpio_init-failure.patch +xen-netfront-stop-tx-queues-during-live-migration.patch +nvmet-tcp-fix-a-memory-leak-when-releasing-a-queue.patch +spi-spl022-fix-microwire-full-duplex-mode.patch +net-multicast-calculate-csum-of-looped-back-and-forw.patch +watchdog-fix-omap-watchdog-early-handling.patch +drm-panel-orientation-quirks-add-quirk-for-gpd-win3.patch +block-schedule-queue-restart-after-blk_sts_zone_reso.patch +nvmet-tcp-fix-header-digest-verification.patch +net-hns3-change-hclge-hclgevf-workqueue-to-wq_unboun.patch +net-hns3-ignore-reset-event-before-initialization-pr.patch +r8169-add-device-10ec-8162-to-driver-r8169.patch +vmxnet3-do-not-stop-tx-queues-after-netif_device_det.patch +nfp-bpf-relax-prog-rejection-for-mtu-check-through-m.patch +net-smc-fix-smc_link-llc_testlink_time-overflow.patch +net-smc-correct-spelling-mistake-to-tcpf_syn_recv.patch +tools-testing-selftests-vm-split_huge_page_test.c-fi.patch diff --git a/queue-5.14/sfc-don-t-use-netif_info-before-net_device-setup.patch b/queue-5.14/sfc-don-t-use-netif_info-before-net_device-setup.patch new file mode 100644 index 00000000000..d90b0b00cb8 --- /dev/null +++ b/queue-5.14/sfc-don-t-use-netif_info-before-net_device-setup.patch @@ -0,0 +1,66 @@ +From 95060b0f24800dfbf4d03303e743faeba8f07118 Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Wed, 20 Oct 2021 00:40:16 +0200 +Subject: sfc: Don't use netif_info before net_device setup + +From: Erik Ekman + +[ 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 +Acked-by: Martin Habets +Signed-off-by: David S. Miller +Signed-off-by: Sasha Levin +--- + 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 a39c5143b3864..797e51802ccbb 100644 +--- a/drivers/net/ethernet/sfc/ptp.c ++++ b/drivers/net/ethernet/sfc/ptp.c +@@ -648,7 +648,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), +@@ -824,7 +824,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 83dcfcae3d4b5..441e7f3e53751 100644 +--- a/drivers/net/ethernet/sfc/siena_sriov.c ++++ b/drivers/net/ethernet/sfc/siena_sriov.c +@@ -1057,7 +1057,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-5.14/sfc-export-fibre-specific-supported-link-modes.patch b/queue-5.14/sfc-export-fibre-specific-supported-link-modes.patch new file mode 100644 index 00000000000..ab36708a618 --- /dev/null +++ b/queue-5.14/sfc-export-fibre-specific-supported-link-modes.patch @@ -0,0 +1,179 @@ +From e17f1bdca28e00da02769cb1c683acfa12137c6e Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Tue, 19 Oct 2021 23:13:32 +0200 +Subject: sfc: Export fibre-specific supported link modes +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +From: Erik Ekman + +[ Upstream commit c62041c5baa9ded3bc6fd38d3f724de70683b489 ] + +The 1/10GbaseT modes were set up for cards with SFP+ cages in +3497ed8c852a5 ("sfc: report supported link speeds on SFP connections"). +10GbaseT was likely used since no 10G fibre mode existed. + +The missing fibre modes for 1/10G were added to ethtool.h in 5711a9822144 +("net: ethtool: add support for 1000BaseX and missing 10G link modes") +shortly thereafter. + +The user guide available at https://support-nic.xilinx.com/wp/drivers +lists support for the following cable and transceiver types in section 2.9: +- QSFP28 100G Direct Attach Cables +- QSFP28 100G SR Optical Transceivers (with SR4 modules listed) +- SFP28 25G Direct Attach Cables +- SFP28 25G SR Optical Transceivers +- QSFP+ 40G Direct Attach Cables +- QSFP+ 40G Active Optical Cables +- QSFP+ 40G SR4 Optical Transceivers +- QSFP+ to SFP+ Breakout Direct Attach Cables +- QSFP+ to SFP+ Breakout Active Optical Cables +- SFP+ 10G Direct Attach Cables +- SFP+ 10G SR Optical Transceivers +- SFP+ 10G LR Optical Transceivers +- SFP 1000BASE‐T Transceivers +- 1G Optical Transceivers +(From user guide issue 28. Issue 16 which also includes older cards like +SFN5xxx/SFN6xxx has matching lists for 1/10/40G transceiver types.) + +Regarding SFP+ 10GBASE‐T transceivers the latest guide says: +"Solarflare adapters do not support 10GBASE‐T transceiver modules." + +Tested using SFN5122F-R7 (with 2 SFP+ ports). Supported link modes do not change +depending on module used (tested with 1000BASE-T, 1000BASE-BX10, 10GBASE-LR). +Before: + +$ ethtool ext +Settings for ext: + Supported ports: [ FIBRE ] + Supported link modes: 1000baseT/Full + 10000baseT/Full + Supported pause frame use: Symmetric Receive-only + Supports auto-negotiation: No + Supported FEC modes: Not reported + Advertised link modes: Not reported + Advertised pause frame use: No + Advertised auto-negotiation: No + Advertised FEC modes: Not reported + Link partner advertised link modes: Not reported + Link partner advertised pause frame use: No + Link partner advertised auto-negotiation: No + Link partner advertised FEC modes: Not reported + Speed: 1000Mb/s + Duplex: Full + Auto-negotiation: off + Port: FIBRE + PHYAD: 255 + Transceiver: internal + Current message level: 0x000020f7 (8439) + drv probe link ifdown ifup rx_err tx_err hw + Link detected: yes + +After: + +$ ethtool ext +Settings for ext: + Supported ports: [ FIBRE ] + Supported link modes: 1000baseT/Full + 1000baseX/Full + 10000baseCR/Full + 10000baseSR/Full + 10000baseLR/Full + Supported pause frame use: Symmetric Receive-only + Supports auto-negotiation: No + Supported FEC modes: Not reported + Advertised link modes: Not reported + Advertised pause frame use: No + Advertised auto-negotiation: No + Advertised FEC modes: Not reported + Link partner advertised link modes: Not reported + Link partner advertised pause frame use: No + Link partner advertised auto-negotiation: No + Link partner advertised FEC modes: Not reported + Speed: 1000Mb/s + Duplex: Full + Auto-negotiation: off + Port: FIBRE + PHYAD: 255 + Transceiver: internal + Supports Wake-on: g + Wake-on: d + Current message level: 0x000020f7 (8439) + drv probe link ifdown ifup rx_err tx_err hw + Link detected: yes + +Signed-off-by: Erik Ekman +Acked-by: Martin Habets +Signed-off-by: David S. Miller +Signed-off-by: Sasha Levin +--- + drivers/net/ethernet/sfc/mcdi_port_common.c | 37 +++++++++++++++------ + 1 file changed, 26 insertions(+), 11 deletions(-) + +diff --git a/drivers/net/ethernet/sfc/mcdi_port_common.c b/drivers/net/ethernet/sfc/mcdi_port_common.c +index 4bd3ef8f3384e..c4fe3c48ac46a 100644 +--- a/drivers/net/ethernet/sfc/mcdi_port_common.c ++++ b/drivers/net/ethernet/sfc/mcdi_port_common.c +@@ -132,16 +132,27 @@ void mcdi_to_ethtool_linkset(u32 media, u32 cap, unsigned long *linkset) + case MC_CMD_MEDIA_SFP_PLUS: + case MC_CMD_MEDIA_QSFP_PLUS: + SET_BIT(FIBRE); +- if (cap & (1 << MC_CMD_PHY_CAP_1000FDX_LBN)) ++ if (cap & (1 << MC_CMD_PHY_CAP_1000FDX_LBN)) { + SET_BIT(1000baseT_Full); +- if (cap & (1 << MC_CMD_PHY_CAP_10000FDX_LBN)) +- SET_BIT(10000baseT_Full); +- if (cap & (1 << MC_CMD_PHY_CAP_40000FDX_LBN)) ++ SET_BIT(1000baseX_Full); ++ } ++ if (cap & (1 << MC_CMD_PHY_CAP_10000FDX_LBN)) { ++ SET_BIT(10000baseCR_Full); ++ SET_BIT(10000baseLR_Full); ++ SET_BIT(10000baseSR_Full); ++ } ++ if (cap & (1 << MC_CMD_PHY_CAP_40000FDX_LBN)) { + SET_BIT(40000baseCR4_Full); +- if (cap & (1 << MC_CMD_PHY_CAP_100000FDX_LBN)) ++ SET_BIT(40000baseSR4_Full); ++ } ++ if (cap & (1 << MC_CMD_PHY_CAP_100000FDX_LBN)) { + SET_BIT(100000baseCR4_Full); +- if (cap & (1 << MC_CMD_PHY_CAP_25000FDX_LBN)) ++ SET_BIT(100000baseSR4_Full); ++ } ++ if (cap & (1 << MC_CMD_PHY_CAP_25000FDX_LBN)) { + SET_BIT(25000baseCR_Full); ++ SET_BIT(25000baseSR_Full); ++ } + if (cap & (1 << MC_CMD_PHY_CAP_50000FDX_LBN)) + SET_BIT(50000baseCR2_Full); + break; +@@ -192,15 +203,19 @@ u32 ethtool_linkset_to_mcdi_cap(const unsigned long *linkset) + result |= (1 << MC_CMD_PHY_CAP_100FDX_LBN); + if (TEST_BIT(1000baseT_Half)) + result |= (1 << MC_CMD_PHY_CAP_1000HDX_LBN); +- if (TEST_BIT(1000baseT_Full) || TEST_BIT(1000baseKX_Full)) ++ if (TEST_BIT(1000baseT_Full) || TEST_BIT(1000baseKX_Full) || ++ TEST_BIT(1000baseX_Full)) + result |= (1 << MC_CMD_PHY_CAP_1000FDX_LBN); +- if (TEST_BIT(10000baseT_Full) || TEST_BIT(10000baseKX4_Full)) ++ if (TEST_BIT(10000baseT_Full) || TEST_BIT(10000baseKX4_Full) || ++ TEST_BIT(10000baseCR_Full) || TEST_BIT(10000baseLR_Full) || ++ TEST_BIT(10000baseSR_Full)) + result |= (1 << MC_CMD_PHY_CAP_10000FDX_LBN); +- if (TEST_BIT(40000baseCR4_Full) || TEST_BIT(40000baseKR4_Full)) ++ if (TEST_BIT(40000baseCR4_Full) || TEST_BIT(40000baseKR4_Full) || ++ TEST_BIT(40000baseSR4_Full)) + result |= (1 << MC_CMD_PHY_CAP_40000FDX_LBN); +- if (TEST_BIT(100000baseCR4_Full)) ++ if (TEST_BIT(100000baseCR4_Full) || TEST_BIT(100000baseSR4_Full)) + result |= (1 << MC_CMD_PHY_CAP_100000FDX_LBN); +- if (TEST_BIT(25000baseCR_Full)) ++ if (TEST_BIT(25000baseCR_Full) || TEST_BIT(25000baseSR_Full)) + result |= (1 << MC_CMD_PHY_CAP_25000FDX_LBN); + if (TEST_BIT(50000baseCR2_Full)) + result |= (1 << MC_CMD_PHY_CAP_50000FDX_LBN); +-- +2.33.0 + diff --git a/queue-5.14/spi-altera-change-to-dynamic-allocation-of-spi-id.patch b/queue-5.14/spi-altera-change-to-dynamic-allocation-of-spi-id.patch new file mode 100644 index 00000000000..d52d3dd2d78 --- /dev/null +++ b/queue-5.14/spi-altera-change-to-dynamic-allocation-of-spi-id.patch @@ -0,0 +1,62 @@ +From 821f8c05be72ce6955175ef0a2b3308f93e4761f Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Mon, 18 Oct 2021 17:24:01 -0700 +Subject: spi: altera: Change to dynamic allocation of spi id + +From: Russ Weight + +[ Upstream commit f09f6dfef8ce7b70a240cf83811e2b1909c3e47b ] + +The spi-altera driver has two flavors: platform and dfl. I'm seeing +a case where I have both device types in the same machine, and they +are conflicting on the SPI ID: + +... kernel: couldn't get idr +... kernel: WARNING: CPU: 28 PID: 912 at drivers/spi/spi.c:2920 spi_register_controller.cold+0x84/0xc0a + +Both the platform and dfl drivers use the parent's driver ID as the SPI +ID. In the error case, the parent devices are dfl_dev.4 and +subdev_spi_altera.4.auto. When the second spi-master is created, the +failure occurs because the SPI ID of 4 has already been allocated. + +Change the ID allocation to dynamic (by initializing bus_num to -1) to +avoid duplicate SPI IDs. + +Signed-off-by: Russ Weight +Link: https://lore.kernel.org/r/20211019002401.24041-1-russell.h.weight@intel.com +Signed-off-by: Mark Brown +Signed-off-by: Sasha Levin +--- + drivers/spi/spi-altera-dfl.c | 2 +- + drivers/spi/spi-altera-platform.c | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/drivers/spi/spi-altera-dfl.c b/drivers/spi/spi-altera-dfl.c +index 39a3e1a032e04..59a5b42c71226 100644 +--- a/drivers/spi/spi-altera-dfl.c ++++ b/drivers/spi/spi-altera-dfl.c +@@ -140,7 +140,7 @@ static int dfl_spi_altera_probe(struct dfl_device *dfl_dev) + if (!master) + return -ENOMEM; + +- master->bus_num = dfl_dev->id; ++ master->bus_num = -1; + + hw = spi_master_get_devdata(master); + +diff --git a/drivers/spi/spi-altera-platform.c b/drivers/spi/spi-altera-platform.c +index f7a7c14e36790..65147aae82a1a 100644 +--- a/drivers/spi/spi-altera-platform.c ++++ b/drivers/spi/spi-altera-platform.c +@@ -48,7 +48,7 @@ static int altera_spi_probe(struct platform_device *pdev) + return err; + + /* setup the master state. */ +- master->bus_num = pdev->id; ++ master->bus_num = -1; + + if (pdata) { + if (pdata->num_chipselect > ALTERA_SPI_MAX_CS) { +-- +2.33.0 + diff --git a/queue-5.14/spi-spl022-fix-microwire-full-duplex-mode.patch b/queue-5.14/spi-spl022-fix-microwire-full-duplex-mode.patch new file mode 100644 index 00000000000..02f46a63739 --- /dev/null +++ b/queue-5.14/spi-spl022-fix-microwire-full-duplex-mode.patch @@ -0,0 +1,44 @@ +From 6312db8af48a12356c23524e42c98573a6d794ab Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Fri, 22 Oct 2021 16:21:04 +0200 +Subject: spi: spl022: fix Microwire full duplex mode + +From: Thomas Perrot + +[ 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 +Link: https://lore.kernel.org/r/20211022142104.1386379-1-thomas.perrot@bootlin.com +Signed-off-by: Mark Brown +Signed-off-by: Sasha Levin +--- + 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 feebda66f56eb..e4484ace584e4 100644 +--- a/drivers/spi/spi-pl022.c ++++ b/drivers/spi/spi-pl022.c +@@ -1716,12 +1716,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-5.14/tools-testing-selftests-vm-split_huge_page_test.c-fi.patch b/queue-5.14/tools-testing-selftests-vm-split_huge_page_test.c-fi.patch new file mode 100644 index 00000000000..687368cadd3 --- /dev/null +++ b/queue-5.14/tools-testing-selftests-vm-split_huge_page_test.c-fi.patch @@ -0,0 +1,45 @@ +From 5c7978ffba521dd680a9fd4995a03d0bdb46227e Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Thu, 28 Oct 2021 14:36:36 -0700 +Subject: tools/testing/selftests/vm/split_huge_page_test.c: fix application of + sizeof to pointer + +From: David Yang + +[ Upstream commit 9c7516d669e68e94e17203469a873ff5d1d3a41a ] + +The coccinelle check report: + + ./tools/testing/selftests/vm/split_huge_page_test.c:344:36-42: + ERROR: application of sizeof to pointer + +Use "strlen" to fix it. + +Link: https://lkml.kernel.org/r/20211012030116.184027-1-davidcomponentone@gmail.com +Signed-off-by: David Yang +Reported-by: Zeal Robot +Cc: Zi Yan +Cc: Shuah Khan +Signed-off-by: Andrew Morton +Signed-off-by: Linus Torvalds +Signed-off-by: Sasha Levin +--- + tools/testing/selftests/vm/split_huge_page_test.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/tools/testing/selftests/vm/split_huge_page_test.c b/tools/testing/selftests/vm/split_huge_page_test.c +index 1af16d2c2a0ac..52497b7b9f1db 100644 +--- a/tools/testing/selftests/vm/split_huge_page_test.c ++++ b/tools/testing/selftests/vm/split_huge_page_test.c +@@ -341,7 +341,7 @@ void split_file_backed_thp(void) + } + + /* write something to the file, so a file-backed THP can be allocated */ +- num_written = write(fd, tmpfs_loc, sizeof(tmpfs_loc)); ++ num_written = write(fd, tmpfs_loc, strlen(tmpfs_loc) + 1); + close(fd); + + if (num_written < 1) { +-- +2.33.0 + diff --git a/queue-5.14/vmxnet3-do-not-stop-tx-queues-after-netif_device_det.patch b/queue-5.14/vmxnet3-do-not-stop-tx-queues-after-netif_device_det.patch new file mode 100644 index 00000000000..2b7beb47712 --- /dev/null +++ b/queue-5.14/vmxnet3-do-not-stop-tx-queues-after-netif_device_det.patch @@ -0,0 +1,34 @@ +From 804c15e584db0ed586020e916216fa4cc8a406fd Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Tue, 26 Oct 2021 14:50:31 -0700 +Subject: vmxnet3: do not stop tx queues after netif_device_detach() + +From: Dongli Zhang + +[ 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 +Signed-off-by: David S. Miller +Signed-off-by: Sasha Levin +--- + 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 6e87f1fc4874a..ceecee4081384 100644 +--- a/drivers/net/vmxnet3/vmxnet3_drv.c ++++ b/drivers/net/vmxnet3/vmxnet3_drv.c +@@ -3749,7 +3749,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-5.14/watchdog-fix-omap-watchdog-early-handling.patch b/queue-5.14/watchdog-fix-omap-watchdog-early-handling.patch new file mode 100644 index 00000000000..f024a6813cf --- /dev/null +++ b/queue-5.14/watchdog-fix-omap-watchdog-early-handling.patch @@ -0,0 +1,44 @@ +From 0daf3e057420717c1dbf0b5a812193a8cdb0f484 Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Thu, 14 Oct 2021 12:22:29 +0200 +Subject: watchdog: Fix OMAP watchdog early handling + +From: Walter Stoll + +[ 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 +Reviewed-by: Guenter Roeck +Link: https://lore.kernel.org/r/88a8fe5229cd68fa0f1fd22f5d66666c1b7057a0.camel@duagon.com +Signed-off-by: Guenter Roeck +Signed-off-by: Wim Van Sebroeck +Signed-off-by: Sasha Levin +--- + 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 1616f93dfad7f..74d785b2b478f 100644 +--- a/drivers/watchdog/omap_wdt.c ++++ b/drivers/watchdog/omap_wdt.c +@@ -268,8 +268,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-5.14/xen-netfront-stop-tx-queues-during-live-migration.patch b/queue-5.14/xen-netfront-stop-tx-queues-during-live-migration.patch new file mode 100644 index 00000000000..6e1765f8813 --- /dev/null +++ b/queue-5.14/xen-netfront-stop-tx-queues-during-live-migration.patch @@ -0,0 +1,67 @@ +From 8d65cf2d4c5b4062ef263ba4e4a2e2c9c811dac7 Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Fri, 22 Oct 2021 16:31:39 -0700 +Subject: xen/netfront: stop tx queues during live migration + +From: Dongli Zhang + +[ 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 +Signed-off-by: Dongli Zhang +Signed-off-by: David S. Miller +Signed-off-by: Sasha Levin +--- + 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 44275908d61a2..0169f7743b6d3 100644 +--- a/drivers/net/xen-netfront.c ++++ b/drivers/net/xen-netfront.c +@@ -1669,6 +1669,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; + } +@@ -2283,6 +2287,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 + -- 2.47.2