--- /dev/null
+From 14902f8961dca9c66bf190f7b1583767c97a4197 Mon Sep 17 00:00:00 2001
+From: Hans de Goede <hdegoede@redhat.com>
+Date: Tue, 7 Dec 2021 13:10:53 +0100
+Subject: HID: Ignore battery for Elan touchscreen on Asus UX550VE
+
+From: Hans de Goede <hdegoede@redhat.com>
+
+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 <hdegoede@redhat.com>
+Signed-off-by: Jiri Kosina <jkosina@suse.cz>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ 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),
--- /dev/null
+From 7998193bccc1c6e1537c5f3880fd0d5b949ec9d1 Mon Sep 17 00:00:00 2001
+From: Benjamin Tissoires <benjamin.tissoires@redhat.com>
+Date: Thu, 2 Dec 2021 10:53:31 +0100
+Subject: HID: sony: fix error path in probe
+
+From: Benjamin Tissoires <benjamin.tissoires@redhat.com>
+
+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 <benjamin.tissoires@redhat.com>
+Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+Link: https://lore.kernel.org/r/20211202095334.14399-2-benjamin.tissoires@redhat.com
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ 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)
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
- 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;
}
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,
},
.probe = mmc_spi_probe,
.remove = mmc_spi_remove,
};
---
-2.34.1
-
--- /dev/null
+From b7e945e228d7df1b1473ef6fd2cdec67433065fb Mon Sep 17 00:00:00 2001
+From: Stefano Brivio <sbrivio@redhat.com>
+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 <sbrivio@redhat.com>
+
+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 <nikita.yushchenko@virtuozzo.com>
+Cc: <stable@vger.kernel.org> # 5.6.x
+Fixes: 7400b063969b ("nft_set_pipapo: Introduce AVX2-based lookup implementation")
+Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
+Tested-By: Nikita Yushchenko <nikita.yushchenko@virtuozzo.com>
+Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ 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 */
--- /dev/null
+From 7d0c009043f6a970f62dbf5aecda9f8c3ccafcff Mon Sep 17 00:00:00 2001
+From: Alex Hung <alex.hung@canonical.com>
+Date: Fri, 3 Dec 2021 14:28:10 -0700
+Subject: platform/x86/intel: hid: add quirk to support Surface Go 3
+
+From: Alex Hung <alex.hung@canonical.com>
+
+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 <alex.hung@canonical.com>
+Link: https://lore.kernel.org/r/20211203212810.2666508-1-alex.hung@canonical.com
+Signed-off-by: Hans de Goede <hdegoede@redhat.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ 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"),
++ },
++ },
+ { }
+ };
+
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