From: Greg Kroah-Hartman Date: Fri, 10 Dec 2021 11:11:34 +0000 (+0100) Subject: 5.15-stable patches X-Git-Tag: v4.4.295~71 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=df320c4d46ed0430eda46f1d66c7b748e2d28050;p=thirdparty%2Fkernel%2Fstable-queue.git 5.15-stable patches added patches: hid-ignore-battery-for-elan-touchscreen-on-asus-ux550ve.patch hid-sony-fix-error-path-in-probe.patch nft_set_pipapo-fix-bucket-load-in-avx2-lookup-routine-for-six-8-bit-groups.patch platform-x86-intel-hid-add-quirk-to-support-surface-go-3.patch --- diff --git a/queue-5.15/hid-ignore-battery-for-elan-touchscreen-on-asus-ux550ve.patch b/queue-5.15/hid-ignore-battery-for-elan-touchscreen-on-asus-ux550ve.patch new file mode 100644 index 00000000000..a993b4db51c --- /dev/null +++ b/queue-5.15/hid-ignore-battery-for-elan-touchscreen-on-asus-ux550ve.patch @@ -0,0 +1,43 @@ +From 14902f8961dca9c66bf190f7b1583767c97a4197 Mon Sep 17 00:00:00 2001 +From: Hans de Goede +Date: Tue, 7 Dec 2021 13:10:53 +0100 +Subject: HID: Ignore battery for Elan touchscreen on Asus UX550VE + +From: Hans de Goede + +commit 14902f8961dca9c66bf190f7b1583767c97a4197 upstream. + +Battery status is reported for the Asus UX550VE touchscreen even though +it does not have a battery. Prevent it from always reporting the +battery as low. + +BugLink: https://bugzilla.redhat.com/show_bug.cgi?id=1897823 +Signed-off-by: Hans de Goede +Signed-off-by: Jiri Kosina +Signed-off-by: Greg Kroah-Hartman +--- + drivers/hid/hid-ids.h | 1 + + drivers/hid/hid-input.c | 2 ++ + 2 files changed, 3 insertions(+) + +--- a/drivers/hid/hid-ids.h ++++ b/drivers/hid/hid-ids.h +@@ -394,6 +394,7 @@ + #define USB_DEVICE_ID_HP_X2 0x074d + #define USB_DEVICE_ID_HP_X2_10_COVER 0x0755 + #define I2C_DEVICE_ID_HP_SPECTRE_X360_15 0x2817 ++#define USB_DEVICE_ID_ASUS_UX550VE_TOUCHSCREEN 0x2544 + #define USB_DEVICE_ID_ASUS_UX550_TOUCHSCREEN 0x2706 + #define I2C_DEVICE_ID_SURFACE_GO_TOUCHSCREEN 0x261A + +--- a/drivers/hid/hid-input.c ++++ b/drivers/hid/hid-input.c +@@ -325,6 +325,8 @@ static const struct hid_device_id hid_ba + HID_BATTERY_QUIRK_IGNORE }, + { HID_USB_DEVICE(USB_VENDOR_ID_ELAN, USB_DEVICE_ID_ASUS_UX550_TOUCHSCREEN), + HID_BATTERY_QUIRK_IGNORE }, ++ { HID_USB_DEVICE(USB_VENDOR_ID_ELAN, USB_DEVICE_ID_ASUS_UX550VE_TOUCHSCREEN), ++ HID_BATTERY_QUIRK_IGNORE }, + { HID_I2C_DEVICE(USB_VENDOR_ID_ELAN, I2C_DEVICE_ID_HP_SPECTRE_X360_15), + HID_BATTERY_QUIRK_IGNORE }, + { HID_I2C_DEVICE(USB_VENDOR_ID_ELAN, I2C_DEVICE_ID_SURFACE_GO_TOUCHSCREEN), diff --git a/queue-5.15/hid-sony-fix-error-path-in-probe.patch b/queue-5.15/hid-sony-fix-error-path-in-probe.patch new file mode 100644 index 00000000000..3139edc36de --- /dev/null +++ b/queue-5.15/hid-sony-fix-error-path-in-probe.patch @@ -0,0 +1,74 @@ +From 7998193bccc1c6e1537c5f3880fd0d5b949ec9d1 Mon Sep 17 00:00:00 2001 +From: Benjamin Tissoires +Date: Thu, 2 Dec 2021 10:53:31 +0100 +Subject: HID: sony: fix error path in probe + +From: Benjamin Tissoires + +commit 7998193bccc1c6e1537c5f3880fd0d5b949ec9d1 upstream. + +When the setup of the GHL fails, we are not calling hid_hw_stop(). +This leads to the hidraw node not being released, meaning a crash +whenever somebody attempts to open the file. + +Cc: stable@vger.kernel.org +Signed-off-by: Benjamin Tissoires +Reviewed-by: Greg Kroah-Hartman +Link: https://lore.kernel.org/r/20211202095334.14399-2-benjamin.tissoires@redhat.com +Signed-off-by: Greg Kroah-Hartman +--- + drivers/hid/hid-sony.c | 22 +++++++++++++++------- + 1 file changed, 15 insertions(+), 7 deletions(-) + +--- a/drivers/hid/hid-sony.c ++++ b/drivers/hid/hid-sony.c +@@ -3037,19 +3037,23 @@ static int sony_probe(struct hid_device + */ + if (!(hdev->claimed & HID_CLAIMED_INPUT)) { + hid_err(hdev, "failed to claim input\n"); +- hid_hw_stop(hdev); +- return -ENODEV; ++ ret = -ENODEV; ++ goto err; + } + + if (sc->quirks & (GHL_GUITAR_PS3WIIU | GHL_GUITAR_PS4)) { +- if (!hid_is_usb(hdev)) +- return -EINVAL; ++ if (!hid_is_usb(hdev)) { ++ ret = -EINVAL; ++ goto err; ++ } + + usbdev = to_usb_device(sc->hdev->dev.parent->parent); + + sc->ghl_urb = usb_alloc_urb(0, GFP_ATOMIC); +- if (!sc->ghl_urb) +- return -ENOMEM; ++ if (!sc->ghl_urb) { ++ ret = -ENOMEM; ++ goto err; ++ } + + if (sc->quirks & GHL_GUITAR_PS3WIIU) + ret = ghl_init_urb(sc, usbdev, ghl_ps3wiiu_magic_data, +@@ -3059,7 +3063,7 @@ static int sony_probe(struct hid_device + ARRAY_SIZE(ghl_ps4_magic_data)); + if (ret) { + hid_err(hdev, "error preparing URB\n"); +- return ret; ++ goto err; + } + + timer_setup(&sc->ghl_poke_timer, ghl_magic_poke, 0); +@@ -3068,6 +3072,10 @@ static int sony_probe(struct hid_device + } + + return ret; ++ ++err: ++ hid_hw_stop(hdev); ++ return ret; + } + + static void sony_remove(struct hid_device *hdev) diff --git a/queue-5.15/mmc-spi-add-device-tree-spi-ids.patch b/queue-5.15/mmc-spi-add-device-tree-spi-ids.patch index a91cdc2e1fd..3d5dad36301 100644 --- a/queue-5.15/mmc-spi-add-device-tree-spi-ids.patch +++ b/queue-5.15/mmc-spi-add-device-tree-spi-ids.patch @@ -22,14 +22,12 @@ Link: https://lore.kernel.org/r/20211115113813.238044-1-jonathanh@nvidia.com Signed-off-by: Ulf Hansson Signed-off-by: Greg Kroah-Hartman --- - drivers/mmc/host/mmc_spi.c | 7 +++++++ + drivers/mmc/host/mmc_spi.c | 7 +++++++ 1 file changed, 7 insertions(+) -diff --git a/drivers/mmc/host/mmc_spi.c b/drivers/mmc/host/mmc_spi.c -index f4c8e1a61f53..b431cdd27353 100644 --- a/drivers/mmc/host/mmc_spi.c +++ b/drivers/mmc/host/mmc_spi.c -@@ -1514,6 +1514,12 @@ static int mmc_spi_remove(struct spi_device *spi) +@@ -1514,6 +1514,12 @@ static int mmc_spi_remove(struct spi_dev return 0; } @@ -42,7 +40,7 @@ index f4c8e1a61f53..b431cdd27353 100644 static const struct of_device_id mmc_spi_of_match_table[] = { { .compatible = "mmc-spi-slot", }, {}, -@@ -1525,6 +1531,7 @@ static struct spi_driver mmc_spi_driver = { +@@ -1525,6 +1531,7 @@ static struct spi_driver mmc_spi_driver .name = "mmc_spi", .of_match_table = mmc_spi_of_match_table, }, @@ -50,6 +48,3 @@ index f4c8e1a61f53..b431cdd27353 100644 .probe = mmc_spi_probe, .remove = mmc_spi_remove, }; --- -2.34.1 - diff --git a/queue-5.15/nft_set_pipapo-fix-bucket-load-in-avx2-lookup-routine-for-six-8-bit-groups.patch b/queue-5.15/nft_set_pipapo-fix-bucket-load-in-avx2-lookup-routine-for-six-8-bit-groups.patch new file mode 100644 index 00000000000..404c3d35793 --- /dev/null +++ b/queue-5.15/nft_set_pipapo-fix-bucket-load-in-avx2-lookup-routine-for-six-8-bit-groups.patch @@ -0,0 +1,39 @@ +From b7e945e228d7df1b1473ef6fd2cdec67433065fb Mon Sep 17 00:00:00 2001 +From: Stefano Brivio +Date: Sat, 27 Nov 2021 11:33:37 +0100 +Subject: nft_set_pipapo: Fix bucket load in AVX2 lookup routine for six 8-bit groups + +From: Stefano Brivio + +commit b7e945e228d7df1b1473ef6fd2cdec67433065fb upstream. + +The sixth byte of packet data has to be looked up in the sixth group, +not in the seventh one, even if we load the bucket data into ymm6 +(and not ymm5, for convenience of tracking stalls). + +Without this fix, matching on a MAC address as first field of a set, +if 8-bit groups are selected (due to a small set size) would fail, +that is, the given MAC address would never match. + +Reported-by: Nikita Yushchenko +Cc: # 5.6.x +Fixes: 7400b063969b ("nft_set_pipapo: Introduce AVX2-based lookup implementation") +Signed-off-by: Stefano Brivio +Tested-By: Nikita Yushchenko +Signed-off-by: Pablo Neira Ayuso +Signed-off-by: Greg Kroah-Hartman +--- + net/netfilter/nft_set_pipapo_avx2.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/net/netfilter/nft_set_pipapo_avx2.c ++++ b/net/netfilter/nft_set_pipapo_avx2.c +@@ -886,7 +886,7 @@ static int nft_pipapo_avx2_lookup_8b_6(u + NFT_PIPAPO_AVX2_BUCKET_LOAD8(4, lt, 4, pkt[4], bsize); + + NFT_PIPAPO_AVX2_AND(5, 0, 1); +- NFT_PIPAPO_AVX2_BUCKET_LOAD8(6, lt, 6, pkt[5], bsize); ++ NFT_PIPAPO_AVX2_BUCKET_LOAD8(6, lt, 5, pkt[5], bsize); + NFT_PIPAPO_AVX2_AND(7, 2, 3); + + /* Stall */ diff --git a/queue-5.15/platform-x86-intel-hid-add-quirk-to-support-surface-go-3.patch b/queue-5.15/platform-x86-intel-hid-add-quirk-to-support-surface-go-3.patch new file mode 100644 index 00000000000..0ea65f6385e --- /dev/null +++ b/queue-5.15/platform-x86-intel-hid-add-quirk-to-support-surface-go-3.patch @@ -0,0 +1,39 @@ +From 7d0c009043f6a970f62dbf5aecda9f8c3ccafcff Mon Sep 17 00:00:00 2001 +From: Alex Hung +Date: Fri, 3 Dec 2021 14:28:10 -0700 +Subject: platform/x86/intel: hid: add quirk to support Surface Go 3 + +From: Alex Hung + +commit 7d0c009043f6a970f62dbf5aecda9f8c3ccafcff upstream. + +Similar to other systems Surface Go 3 requires a DMI quirk to enable +5 button array for power and volume buttons. + +Buglink: https://github.com/linux-surface/linux-surface/issues/595 + +Cc: stable@vger.kernel.org +Signed-off-by: Alex Hung +Link: https://lore.kernel.org/r/20211203212810.2666508-1-alex.hung@canonical.com +Signed-off-by: Hans de Goede +Signed-off-by: Greg Kroah-Hartman +--- + drivers/platform/x86/intel/hid.c | 7 +++++++ + 1 file changed, 7 insertions(+) + +--- a/drivers/platform/x86/intel/hid.c ++++ b/drivers/platform/x86/intel/hid.c +@@ -99,6 +99,13 @@ static const struct dmi_system_id button + DMI_MATCH(DMI_PRODUCT_FAMILY, "ThinkPad X1 Tablet Gen 2"), + }, + }, ++ { ++ .ident = "Microsoft Surface Go 3", ++ .matches = { ++ DMI_MATCH(DMI_SYS_VENDOR, "Microsoft Corporation"), ++ DMI_MATCH(DMI_PRODUCT_NAME, "Surface Go 3"), ++ }, ++ }, + { } + }; + diff --git a/queue-5.15/series b/queue-5.15/series index 64bdf2ccfbe..444dbff6983 100644 --- a/queue-5.15/series +++ b/queue-5.15/series @@ -11,3 +11,7 @@ hid-wacom-fix-problems-when-device-is-not-a-valid-usb-device.patch hid-check-for-valid-usb-device-for-many-hid-drivers.patch mtd-dataflash-add-device-tree-spi-ids.patch mmc-spi-add-device-tree-spi-ids.patch +hid-sony-fix-error-path-in-probe.patch +hid-ignore-battery-for-elan-touchscreen-on-asus-ux550ve.patch +platform-x86-intel-hid-add-quirk-to-support-surface-go-3.patch +nft_set_pipapo-fix-bucket-load-in-avx2-lookup-routine-for-six-8-bit-groups.patch