From: Sasha Levin Date: Thu, 12 Sep 2024 12:20:59 +0000 (-0400) Subject: Fixes for 5.15 X-Git-Tag: v6.1.111~50 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=685f392b78e3e79859f761f787bd114b66eae0bd;p=thirdparty%2Fkernel%2Fstable-queue.git Fixes for 5.15 Signed-off-by: Sasha Levin --- diff --git a/queue-5.15/btrfs-update-target-inode-s-ctime-on-unlink.patch b/queue-5.15/btrfs-update-target-inode-s-ctime-on-unlink.patch new file mode 100644 index 00000000000..fc2fdaec0cd --- /dev/null +++ b/queue-5.15/btrfs-update-target-inode-s-ctime-on-unlink.patch @@ -0,0 +1,43 @@ +From e07ae641482c64adf4eafa9594809597bf6a01e1 Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Mon, 12 Aug 2024 12:30:52 -0400 +Subject: btrfs: update target inode's ctime on unlink + +From: Jeff Layton + +[ Upstream commit 3bc2ac2f8f0b78a13140fc72022771efe0c9b778 ] + +Unlink changes the link count on the target inode. POSIX mandates that +the ctime must also change when this occurs. + +According to https://pubs.opengroup.org/onlinepubs/9699919799/functions/unlink.html: + +"Upon successful completion, unlink() shall mark for update the last data + modification and last file status change timestamps of the parent + directory. Also, if the file's link count is not 0, the last file status + change timestamp of the file shall be marked for update." + +Signed-off-by: Jeff Layton +Reviewed-by: David Sterba +[ add link to the opengroup docs ] +Signed-off-by: David Sterba +Signed-off-by: Sasha Levin +--- + fs/btrfs/inode.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c +index f7807f36c8e3..eb12ba64ac7a 100644 +--- a/fs/btrfs/inode.c ++++ b/fs/btrfs/inode.c +@@ -4199,6 +4199,7 @@ static int __btrfs_unlink_inode(struct btrfs_trans_handle *trans, + + btrfs_i_size_write(dir, dir->vfs_inode.i_size - name_len * 2); + inode_inc_iversion(&inode->vfs_inode); ++ inode_set_ctime_current(&inode->vfs_inode); + inode_inc_iversion(&dir->vfs_inode); + inode->vfs_inode.i_ctime = dir->vfs_inode.i_mtime = + dir->vfs_inode.i_ctime = current_time(&inode->vfs_inode); +-- +2.43.0 + diff --git a/queue-5.15/drm-msm-adreno-fix-error-return-if-missing-firmware-.patch b/queue-5.15/drm-msm-adreno-fix-error-return-if-missing-firmware-.patch new file mode 100644 index 00000000000..1e534b714bc --- /dev/null +++ b/queue-5.15/drm-msm-adreno-fix-error-return-if-missing-firmware-.patch @@ -0,0 +1,40 @@ +From b9d9ca6e57b63dc937313f529690c3e0830963b0 Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Tue, 16 Jul 2024 09:06:30 -0700 +Subject: drm/msm/adreno: Fix error return if missing firmware-name + +From: Rob Clark + +[ Upstream commit 624ab9cde26a9f150b4fd268b0f3dae3184dc40c ] + +-ENODEV is used to signify that there is no zap shader for the platform, +and the CPU can directly take the GPU out of secure mode. We want to +use this return code when there is no zap-shader node. But not when +there is, but without a firmware-name property. This case we want to +treat as-if the needed fw is not found. + +Signed-off-by: Rob Clark +Reviewed-by: Dmitry Baryshkov +Reviewed-by: Akhil P Oommen +Patchwork: https://patchwork.freedesktop.org/patch/604564/ +Signed-off-by: Sasha Levin +--- + drivers/gpu/drm/msm/adreno/adreno_gpu.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/drivers/gpu/drm/msm/adreno/adreno_gpu.c b/drivers/gpu/drm/msm/adreno/adreno_gpu.c +index 47a260715a89..4c61f9906808 100644 +--- a/drivers/gpu/drm/msm/adreno/adreno_gpu.c ++++ b/drivers/gpu/drm/msm/adreno/adreno_gpu.c +@@ -94,7 +94,7 @@ static int zap_shader_load_mdt(struct msm_gpu *gpu, const char *fwname, + * was a bad idea, and is only provided for backwards + * compatibility for older targets. + */ +- return -ENODEV; ++ return -ENOENT; + } + + if (IS_ERR(fw)) { +-- +2.43.0 + diff --git a/queue-5.15/hid-multitouch-add-support-for-gt7868q.patch b/queue-5.15/hid-multitouch-add-support-for-gt7868q.patch new file mode 100644 index 00000000000..ad49ae4c2a3 --- /dev/null +++ b/queue-5.15/hid-multitouch-add-support-for-gt7868q.patch @@ -0,0 +1,95 @@ +From f4a1cf36d40c0ae99860e41cbd39f5dacda0500c Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Tue, 16 Jul 2024 23:27:57 +0100 +Subject: HID: multitouch: Add support for GT7868Q + +From: Dmitry Savin + +[ Upstream commit c8000deb68365b461b324d68c7ea89d730f0bb85 ] + +GT7868Q has incorrect data in the report and needs a fixup. +The change enables haptic touchpad on Lenovo ThinkBook 13x Gen 4 +and has been tested on the device. + +Signed-off-by: Dmitry Savin +Signed-off-by: Jiri Kosina +Signed-off-by: Sasha Levin +--- + drivers/hid/hid-ids.h | 2 ++ + drivers/hid/hid-multitouch.c | 33 +++++++++++++++++++++++++++++++++ + 2 files changed, 35 insertions(+) + +diff --git a/drivers/hid/hid-ids.h b/drivers/hid/hid-ids.h +index 5988d9c67a30..917207b0deef 100644 +--- a/drivers/hid/hid-ids.h ++++ b/drivers/hid/hid-ids.h +@@ -484,6 +484,8 @@ + #define USB_DEVICE_ID_GENERAL_TOUCH_WIN8_PIT_E100 0xe100 + + #define I2C_VENDOR_ID_GOODIX 0x27c6 ++#define I2C_DEVICE_ID_GOODIX_01E8 0x01e8 ++#define I2C_DEVICE_ID_GOODIX_01E9 0x01e9 + #define I2C_DEVICE_ID_GOODIX_01F0 0x01f0 + + #define USB_VENDOR_ID_GOODTOUCH 0x1aad +diff --git a/drivers/hid/hid-multitouch.c b/drivers/hid/hid-multitouch.c +index fea27d66d91c..36226f43ac5e 100644 +--- a/drivers/hid/hid-multitouch.c ++++ b/drivers/hid/hid-multitouch.c +@@ -1442,6 +1442,30 @@ static int mt_event(struct hid_device *hid, struct hid_field *field, + return 0; + } + ++static __u8 *mt_report_fixup(struct hid_device *hdev, __u8 *rdesc, ++ unsigned int *size) ++{ ++ if (hdev->vendor == I2C_VENDOR_ID_GOODIX && ++ (hdev->product == I2C_DEVICE_ID_GOODIX_01E8 || ++ hdev->product == I2C_DEVICE_ID_GOODIX_01E9)) { ++ if (rdesc[607] == 0x15) { ++ rdesc[607] = 0x25; ++ dev_info( ++ &hdev->dev, ++ "GT7868Q report descriptor fixup is applied.\n"); ++ } else { ++ dev_info( ++ &hdev->dev, ++ "The byte is not expected for fixing the report descriptor. \ ++It's possible that the touchpad firmware is not suitable for applying the fix. \ ++got: %x\n", ++ rdesc[607]); ++ } ++ } ++ ++ return rdesc; ++} ++ + static void mt_report(struct hid_device *hid, struct hid_report *report) + { + struct mt_device *td = hid_get_drvdata(hid); +@@ -2036,6 +2060,14 @@ static const struct hid_device_id mt_devices[] = { + MT_BT_DEVICE(USB_VENDOR_ID_FRUCTEL, + USB_DEVICE_ID_GAMETEL_MT_MODE) }, + ++ /* Goodix GT7868Q devices */ ++ { .driver_data = MT_CLS_WIN_8_FORCE_MULTI_INPUT_NSMU, ++ HID_DEVICE(BUS_I2C, HID_GROUP_ANY, I2C_VENDOR_ID_GOODIX, ++ I2C_DEVICE_ID_GOODIX_01E8) }, ++ { .driver_data = MT_CLS_WIN_8_FORCE_MULTI_INPUT_NSMU, ++ HID_DEVICE(BUS_I2C, HID_GROUP_ANY, I2C_VENDOR_ID_GOODIX, ++ I2C_DEVICE_ID_GOODIX_01E8) }, ++ + /* GoodTouch panels */ + { .driver_data = MT_CLS_NSMU, + MT_USB_DEVICE(USB_VENDOR_ID_GOODTOUCH, +@@ -2271,6 +2303,7 @@ static struct hid_driver mt_driver = { + .feature_mapping = mt_feature_mapping, + .usage_table = mt_grabbed_usages, + .event = mt_event, ++ .report_fixup = mt_report_fixup, + .report = mt_report, + #ifdef CONFIG_PM + .suspend = mt_suspend, +-- +2.43.0 + diff --git a/queue-5.15/input-ads7846-ratelimit-the-spi_sync-error-message.patch b/queue-5.15/input-ads7846-ratelimit-the-spi_sync-error-message.patch new file mode 100644 index 00000000000..924e21d96c1 --- /dev/null +++ b/queue-5.15/input-ads7846-ratelimit-the-spi_sync-error-message.patch @@ -0,0 +1,40 @@ +From 395dc3db256c253720d19dadd95aa39e1cb7ed29 Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Mon, 8 Jul 2024 23:18:57 +0200 +Subject: Input: ads7846 - ratelimit the spi_sync error message + +From: Marek Vasut + +[ Upstream commit ccbfea78adf75d3d9e87aa739dab83254f5333fa ] + +In case the touch controller is not connected, this message keeps scrolling +on the console indefinitelly. Ratelimit it to avoid filling kernel logs. + +" +ads7846 spi2.1: spi_sync --> -22 +" + +Signed-off-by: Marek Vasut +Link: https://lore.kernel.org/r/20240708211913.171243-1-marex@denx.de +Signed-off-by: Dmitry Torokhov +Signed-off-by: Sasha Levin +--- + drivers/input/touchscreen/ads7846.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/drivers/input/touchscreen/ads7846.c b/drivers/input/touchscreen/ads7846.c +index 1db61185f7be..524e16647b96 100644 +--- a/drivers/input/touchscreen/ads7846.c ++++ b/drivers/input/touchscreen/ads7846.c +@@ -818,7 +818,7 @@ static void ads7846_read_state(struct ads7846 *ts) + m = &ts->msg[msg_idx]; + error = spi_sync(ts->spi, m); + if (error) { +- dev_err(&ts->spi->dev, "spi_sync --> %d\n", error); ++ dev_err_ratelimited(&ts->spi->dev, "spi_sync --> %d\n", error); + packet->ignore = true; + return; + } +-- +2.43.0 + diff --git a/queue-5.15/input-i8042-add-fujitsu-lifebook-e756-to-i8042-quirk.patch b/queue-5.15/input-i8042-add-fujitsu-lifebook-e756-to-i8042-quirk.patch new file mode 100644 index 00000000000..982b71b2a88 --- /dev/null +++ b/queue-5.15/input-i8042-add-fujitsu-lifebook-e756-to-i8042-quirk.patch @@ -0,0 +1,44 @@ +From af929c282110ead45d29c6b5e32b4b22e5d2b047 Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Wed, 14 Aug 2024 12:06:19 +0200 +Subject: Input: i8042 - add Fujitsu Lifebook E756 to i8042 quirk table + +From: Takashi Iwai + +[ Upstream commit 7ce7c2283fa6843ab3c2adfeb83dcc504a107858 ] + +Yet another quirk entry for Fujitsu laptop. Lifebook E756 requires +i8041.nomux for keeping the touchpad working after suspend/resume. + +Link: https://bugzilla.suse.com/show_bug.cgi?id=1229056 +Signed-off-by: Takashi Iwai +Link: https://lore.kernel.org/r/20240814100630.2048-1-tiwai@suse.de +Signed-off-by: Dmitry Torokhov +Signed-off-by: Sasha Levin +--- + drivers/input/serio/i8042-acpipnpio.h | 9 +++++++++ + 1 file changed, 9 insertions(+) + +diff --git a/drivers/input/serio/i8042-acpipnpio.h b/drivers/input/serio/i8042-acpipnpio.h +index 49d87f56cb90..a6474090a882 100644 +--- a/drivers/input/serio/i8042-acpipnpio.h ++++ b/drivers/input/serio/i8042-acpipnpio.h +@@ -617,6 +617,15 @@ static const struct dmi_system_id i8042_dmi_quirk_table[] __initconst = { + }, + .driver_data = (void *)(SERIO_QUIRK_NOMUX) + }, ++ { ++ /* Fujitsu Lifebook E756 */ ++ /* https://bugzilla.suse.com/show_bug.cgi?id=1229056 */ ++ .matches = { ++ DMI_MATCH(DMI_SYS_VENDOR, "FUJITSU"), ++ DMI_MATCH(DMI_PRODUCT_NAME, "LIFEBOOK E756"), ++ }, ++ .driver_data = (void *)(SERIO_QUIRK_NOMUX) ++ }, + { + /* Fujitsu Lifebook E5411 */ + .matches = { +-- +2.43.0 + diff --git a/queue-5.15/input-synaptics-enable-smbus-for-hp-elitebook-840-g2.patch b/queue-5.15/input-synaptics-enable-smbus-for-hp-elitebook-840-g2.patch new file mode 100644 index 00000000000..37e1f928236 --- /dev/null +++ b/queue-5.15/input-synaptics-enable-smbus-for-hp-elitebook-840-g2.patch @@ -0,0 +1,38 @@ +From 99cd12807dee6847d9672e303662b872b5940002 Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Tue, 23 Jul 2024 21:33:30 -0700 +Subject: Input: synaptics - enable SMBus for HP Elitebook 840 G2 + +From: Jonathan Denose + +[ Upstream commit da897484557b34a54fabb81f6c223c19a69e546d ] + +The kernel reports that the touchpad for this device can support a +different bus. + +With SMBus enabled the touchpad movement is smoother and three-finger +gestures are recognized. + +Signed-off-by: Jonathan Denose +Link: https://lore.kernel.org/r/20240719180612.1.Ib652dd808c274076f32cd7fc6c1160d2cf71753b@changeid +Signed-off-by: Dmitry Torokhov +Signed-off-by: Sasha Levin +--- + drivers/input/mouse/synaptics.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/drivers/input/mouse/synaptics.c b/drivers/input/mouse/synaptics.c +index c3a341c16d45..f64f25079481 100644 +--- a/drivers/input/mouse/synaptics.c ++++ b/drivers/input/mouse/synaptics.c +@@ -187,6 +187,7 @@ static const char * const smbus_pnp_ids[] = { + "LEN2054", /* E480 */ + "LEN2055", /* E580 */ + "LEN2068", /* T14 Gen 1 */ ++ "SYN3015", /* HP EliteBook 840 G2 */ + "SYN3052", /* HP EliteBook 840 G4 */ + "SYN3221", /* HP 15-ay000 */ + "SYN323d", /* HP Spectre X360 13-w013dx */ +-- +2.43.0 + diff --git a/queue-5.15/net-ethernet-use-ip_hdrlen-instead-of-bit-shift.patch b/queue-5.15/net-ethernet-use-ip_hdrlen-instead-of-bit-shift.patch new file mode 100644 index 00000000000..33474b97f03 --- /dev/null +++ b/queue-5.15/net-ethernet-use-ip_hdrlen-instead-of-bit-shift.patch @@ -0,0 +1,50 @@ +From 898667168f8bcf54530c5b208be795276e26969e Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Wed, 7 Aug 2024 19:07:21 +0900 +Subject: net: ethernet: use ip_hdrlen() instead of bit shift + +From: Moon Yeounsu + +[ Upstream commit 9a039eeb71a42c8b13408a1976e300f3898e1be0 ] + +`ip_hdr(skb)->ihl << 2` is the same as `ip_hdrlen(skb)` +Therefore, we should use a well-defined function not a bit shift +to find the header length. + +It also compresses two lines to a single line. + +Signed-off-by: Moon Yeounsu +Reviewed-by: Christophe JAILLET +Signed-off-by: David S. Miller +Signed-off-by: Sasha Levin +--- + drivers/net/ethernet/jme.c | 10 ++++------ + 1 file changed, 4 insertions(+), 6 deletions(-) + +diff --git a/drivers/net/ethernet/jme.c b/drivers/net/ethernet/jme.c +index 1bdc4f23e1e5..06890993662a 100644 +--- a/drivers/net/ethernet/jme.c ++++ b/drivers/net/ethernet/jme.c +@@ -945,15 +945,13 @@ jme_udpsum(struct sk_buff *skb) + if (skb->protocol != htons(ETH_P_IP)) + return csum; + skb_set_network_header(skb, ETH_HLEN); +- if ((ip_hdr(skb)->protocol != IPPROTO_UDP) || +- (skb->len < (ETH_HLEN + +- (ip_hdr(skb)->ihl << 2) + +- sizeof(struct udphdr)))) { ++ ++ if (ip_hdr(skb)->protocol != IPPROTO_UDP || ++ skb->len < (ETH_HLEN + ip_hdrlen(skb) + sizeof(struct udphdr))) { + skb_reset_network_header(skb); + return csum; + } +- skb_set_transport_header(skb, +- ETH_HLEN + (ip_hdr(skb)->ihl << 2)); ++ skb_set_transport_header(skb, ETH_HLEN + ip_hdrlen(skb)); + csum = udp_hdr(skb)->check; + skb_reset_transport_header(skb); + skb_reset_network_header(skb); +-- +2.43.0 + diff --git a/queue-5.15/net-phy-vitesse-repair-vsc73xx-autonegotiation.patch b/queue-5.15/net-phy-vitesse-repair-vsc73xx-autonegotiation.patch new file mode 100644 index 00000000000..a4820c85e8b --- /dev/null +++ b/queue-5.15/net-phy-vitesse-repair-vsc73xx-autonegotiation.patch @@ -0,0 +1,76 @@ +From 937b7f8399bf9ed7a836a17af483f6d68f5befc3 Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Fri, 9 Aug 2024 21:38:06 +0200 +Subject: net: phy: vitesse: repair vsc73xx autonegotiation + +From: Pawel Dembicki + +[ Upstream commit de7a670f8defe4ed2115552ad23dea0f432f7be4 ] + +When the vsc73xx mdio bus work properly, the generic autonegotiation +configuration works well. + +Reviewed-by: Linus Walleij +Signed-off-by: Pawel Dembicki +Signed-off-by: David S. Miller +Signed-off-by: Sasha Levin +--- + drivers/net/phy/vitesse.c | 14 -------------- + 1 file changed, 14 deletions(-) + +diff --git a/drivers/net/phy/vitesse.c b/drivers/net/phy/vitesse.c +index 897b979ec03c..3b5fcaf0dd36 100644 +--- a/drivers/net/phy/vitesse.c ++++ b/drivers/net/phy/vitesse.c +@@ -237,16 +237,6 @@ static int vsc739x_config_init(struct phy_device *phydev) + return 0; + } + +-static int vsc73xx_config_aneg(struct phy_device *phydev) +-{ +- /* The VSC73xx switches does not like to be instructed to +- * do autonegotiation in any way, it prefers that you just go +- * with the power-on/reset defaults. Writing some registers will +- * just make autonegotiation permanently fail. +- */ +- return 0; +-} +- + /* This adds a skew for both TX and RX clocks, so the skew should only be + * applied to "rgmii-id" interfaces. It may not work as expected + * on "rgmii-txid", "rgmii-rxid" or "rgmii" interfaces. +@@ -444,7 +434,6 @@ static struct phy_driver vsc82xx_driver[] = { + .phy_id_mask = 0x000ffff0, + /* PHY_GBIT_FEATURES */ + .config_init = vsc738x_config_init, +- .config_aneg = vsc73xx_config_aneg, + .read_page = vsc73xx_read_page, + .write_page = vsc73xx_write_page, + }, { +@@ -453,7 +442,6 @@ static struct phy_driver vsc82xx_driver[] = { + .phy_id_mask = 0x000ffff0, + /* PHY_GBIT_FEATURES */ + .config_init = vsc738x_config_init, +- .config_aneg = vsc73xx_config_aneg, + .read_page = vsc73xx_read_page, + .write_page = vsc73xx_write_page, + }, { +@@ -462,7 +450,6 @@ static struct phy_driver vsc82xx_driver[] = { + .phy_id_mask = 0x000ffff0, + /* PHY_GBIT_FEATURES */ + .config_init = vsc739x_config_init, +- .config_aneg = vsc73xx_config_aneg, + .read_page = vsc73xx_read_page, + .write_page = vsc73xx_write_page, + }, { +@@ -471,7 +458,6 @@ static struct phy_driver vsc82xx_driver[] = { + .phy_id_mask = 0x000ffff0, + /* PHY_GBIT_FEATURES */ + .config_init = vsc739x_config_init, +- .config_aneg = vsc73xx_config_aneg, + .read_page = vsc73xx_read_page, + .write_page = vsc73xx_write_page, + }, { +-- +2.43.0 + diff --git a/queue-5.15/nfs-avoid-unnecessary-rescanning-of-the-per-server-d.patch b/queue-5.15/nfs-avoid-unnecessary-rescanning-of-the-per-server-d.patch new file mode 100644 index 00000000000..1f898de8c57 --- /dev/null +++ b/queue-5.15/nfs-avoid-unnecessary-rescanning-of-the-per-server-d.patch @@ -0,0 +1,84 @@ +From 3d30d05f10cfb5dd8f79c9d5e1c380da9a6497fd Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Wed, 21 Aug 2024 14:05:02 -0400 +Subject: NFS: Avoid unnecessary rescanning of the per-server delegation list + +From: Trond Myklebust + +[ Upstream commit f92214e4c312f6ea9d78650cc6291d200f17abb6 ] + +If the call to nfs_delegation_grab_inode() fails, we will not have +dropped any locks that require us to rescan the list. + +Signed-off-by: Trond Myklebust +Reviewed-by: Jeff Layton +Signed-off-by: Anna Schumaker +Signed-off-by: Sasha Levin +--- + fs/nfs/delegation.c | 15 +++++---------- + 1 file changed, 5 insertions(+), 10 deletions(-) + +diff --git a/fs/nfs/delegation.c b/fs/nfs/delegation.c +index 6a3ba306c321..8124d4f8b29a 100644 +--- a/fs/nfs/delegation.c ++++ b/fs/nfs/delegation.c +@@ -627,6 +627,9 @@ static int nfs_server_return_marked_delegations(struct nfs_server *server, + prev = delegation; + continue; + } ++ inode = nfs_delegation_grab_inode(delegation); ++ if (inode == NULL) ++ continue; + + if (prev) { + struct inode *tmp = nfs_delegation_grab_inode(prev); +@@ -637,12 +640,6 @@ static int nfs_server_return_marked_delegations(struct nfs_server *server, + } + } + +- inode = nfs_delegation_grab_inode(delegation); +- if (inode == NULL) { +- rcu_read_unlock(); +- iput(to_put); +- goto restart; +- } + delegation = nfs_start_delegation_return_locked(NFS_I(inode)); + rcu_read_unlock(); + +@@ -1164,7 +1161,6 @@ static int nfs_server_reap_unclaimed_delegations(struct nfs_server *server, + struct inode *inode; + restart: + rcu_read_lock(); +-restart_locked: + list_for_each_entry_rcu(delegation, &server->delegations, super_list) { + if (test_bit(NFS_DELEGATION_INODE_FREEING, + &delegation->flags) || +@@ -1175,7 +1171,7 @@ static int nfs_server_reap_unclaimed_delegations(struct nfs_server *server, + continue; + inode = nfs_delegation_grab_inode(delegation); + if (inode == NULL) +- goto restart_locked; ++ continue; + delegation = nfs_start_delegation_return_locked(NFS_I(inode)); + rcu_read_unlock(); + if (delegation != NULL) { +@@ -1296,7 +1292,6 @@ static int nfs_server_reap_expired_delegations(struct nfs_server *server, + nfs4_stateid stateid; + restart: + rcu_read_lock(); +-restart_locked: + list_for_each_entry_rcu(delegation, &server->delegations, super_list) { + if (test_bit(NFS_DELEGATION_INODE_FREEING, + &delegation->flags) || +@@ -1307,7 +1302,7 @@ static int nfs_server_reap_expired_delegations(struct nfs_server *server, + continue; + inode = nfs_delegation_grab_inode(delegation); + if (inode == NULL) +- goto restart_locked; ++ continue; + spin_lock(&delegation->lock); + cred = get_cred_rcu(delegation->cred); + nfs4_stateid_copy(&stateid, &delegation->stateid); +-- +2.43.0 + diff --git a/queue-5.15/nfsv4-fix-clearing-of-layout-segments-in-layoutretur.patch b/queue-5.15/nfsv4-fix-clearing-of-layout-segments-in-layoutretur.patch new file mode 100644 index 00000000000..8c6290390a6 --- /dev/null +++ b/queue-5.15/nfsv4-fix-clearing-of-layout-segments-in-layoutretur.patch @@ -0,0 +1,65 @@ +From f66e8acb90687096f5cc5cb8a9d76153c47e9b81 Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Wed, 21 Aug 2024 14:05:01 -0400 +Subject: NFSv4: Fix clearing of layout segments in layoutreturn + +From: Trond Myklebust + +[ Upstream commit d72b7963115bea971a28eaa2cb76722c023f9fdf ] + +Make sure that we clear the layout segments in cases where we see a +fatal error, and also in the case where the layout is invalid. + +Signed-off-by: Trond Myklebust +Reviewed-by: Jeff Layton +Signed-off-by: Anna Schumaker +Signed-off-by: Sasha Levin +--- + fs/nfs/nfs4proc.c | 9 ++++++--- + fs/nfs/pnfs.c | 5 ++--- + 2 files changed, 8 insertions(+), 6 deletions(-) + +diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c +index 770fa1cb112d..f1c351e40c7a 100644 +--- a/fs/nfs/nfs4proc.c ++++ b/fs/nfs/nfs4proc.c +@@ -9755,13 +9755,16 @@ static void nfs4_layoutreturn_done(struct rpc_task *task, void *calldata) + fallthrough; + default: + task->tk_status = 0; ++ lrp->res.lrs_present = 0; + fallthrough; + case 0: + break; + case -NFS4ERR_DELAY: +- if (nfs4_async_handle_error(task, server, NULL, NULL) != -EAGAIN) +- break; +- goto out_restart; ++ if (nfs4_async_handle_error(task, server, NULL, NULL) == ++ -EAGAIN) ++ goto out_restart; ++ lrp->res.lrs_present = 0; ++ break; + } + dprintk("<-- %s\n", __func__); + return; +diff --git a/fs/nfs/pnfs.c b/fs/nfs/pnfs.c +index e13f1c762951..fb12a2193884 100644 +--- a/fs/nfs/pnfs.c ++++ b/fs/nfs/pnfs.c +@@ -1169,10 +1169,9 @@ void pnfs_layoutreturn_free_lsegs(struct pnfs_layout_hdr *lo, + LIST_HEAD(freeme); + + spin_lock(&inode->i_lock); +- if (!pnfs_layout_is_valid(lo) || +- !nfs4_stateid_match_other(&lo->plh_stateid, arg_stateid)) ++ if (!nfs4_stateid_match_other(&lo->plh_stateid, arg_stateid)) + goto out_unlock; +- if (stateid) { ++ if (stateid && pnfs_layout_is_valid(lo)) { + u32 seq = be32_to_cpu(arg_stateid->seqid); + + pnfs_mark_matching_lsegs_invalid(lo, &freeme, range, seq); +-- +2.43.0 + diff --git a/queue-5.15/platform-surface-aggregator_registry-add-support-for.patch b/queue-5.15/platform-surface-aggregator_registry-add-support-for.patch new file mode 100644 index 00000000000..f6e2405b8c6 --- /dev/null +++ b/queue-5.15/platform-surface-aggregator_registry-add-support-for.patch @@ -0,0 +1,43 @@ +From 95900acc800455fbdbd5b183769d35426ce90792 Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Sun, 11 Aug 2024 15:19:45 +0200 +Subject: platform/surface: aggregator_registry: Add support for Surface Laptop + Go 3 +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +From: Maximilian Luz + +[ Upstream commit ed235163c3f02329d5e37ed4485bbc39ed2568d4 ] + +Add SAM client device nodes for the Surface Laptop Go 3. It seems to use +the same SAM client devices as the Surface Laptop Go 1 and 2, so re-use +their node group. + +Signed-off-by: Maximilian Luz +Link: https://lore.kernel.org/r/20240811131948.261806-3-luzmaximilian@gmail.com +Reviewed-by: Ilpo Järvinen +Signed-off-by: Ilpo Järvinen +Signed-off-by: Sasha Levin +--- + drivers/platform/surface/surface_aggregator_registry.c | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/drivers/platform/surface/surface_aggregator_registry.c b/drivers/platform/surface/surface_aggregator_registry.c +index 5c0451c56ea8..04dd212f73ae 100644 +--- a/drivers/platform/surface/surface_aggregator_registry.c ++++ b/drivers/platform/surface/surface_aggregator_registry.c +@@ -561,6 +561,9 @@ static const struct acpi_device_id ssam_platform_hub_match[] = { + /* Surface Laptop Go 2 */ + { "MSHW0290", (unsigned long)ssam_node_group_slg1 }, + ++ /* Surface Laptop Go 3 */ ++ { "MSHW0440", (unsigned long)ssam_node_group_slg1 }, ++ + /* Surface Laptop Studio */ + { "MSHW0123", (unsigned long)ssam_node_group_sls }, + +-- +2.43.0 + diff --git a/queue-5.15/powerpc-mm-fix-boot-warning-with-hugepages-and-confi.patch b/queue-5.15/powerpc-mm-fix-boot-warning-with-hugepages-and-confi.patch new file mode 100644 index 00000000000..981bc654383 --- /dev/null +++ b/queue-5.15/powerpc-mm-fix-boot-warning-with-hugepages-and-confi.patch @@ -0,0 +1,85 @@ +From 577b40ef8221596b841db8959388739fbe1f0dd6 Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Thu, 8 Aug 2024 09:05:08 +0200 +Subject: powerpc/mm: Fix boot warning with hugepages and CONFIG_DEBUG_VIRTUAL + +From: Christophe Leroy + +[ Upstream commit e7e846dc6c73fbc94ae8b4ec20d05627646416f2 ] + +Booting with CONFIG_DEBUG_VIRTUAL leads to following warning when +passing hugepage reservation on command line: + + Kernel command line: hugepagesz=1g hugepages=1 hugepagesz=64m hugepages=1 hugepagesz=256m hugepages=1 noreboot + HugeTLB: allocating 1 of page size 1.00 GiB failed. Only allocated 0 hugepages. + ------------[ cut here ]------------ + WARNING: CPU: 0 PID: 0 at arch/powerpc/include/asm/io.h:948 __alloc_bootmem_huge_page+0xd4/0x284 + Modules linked in: + CPU: 0 PID: 0 Comm: swapper Not tainted 6.10.0-rc6-00396-g6b0e82791bd0-dirty #936 + Hardware name: MPC8544DS e500v2 0x80210030 MPC8544 DS + NIP: c1020240 LR: c10201d0 CTR: 00000000 + REGS: c13fdd30 TRAP: 0700 Not tainted (6.10.0-rc6-00396-g6b0e82791bd0-dirty) + MSR: 00021000 CR: 44084288 XER: 20000000 + + GPR00: c10201d0 c13fde20 c130b560 e8000000 e8001000 00000000 00000000 c1420000 + GPR08: 00000000 00028001 00000000 00000004 44084282 01066ac0 c0eb7c9c efffe149 + GPR16: c0fc4228 0000005f ffffffff c0eb7d0c c0eb7cc0 c0eb7ce0 ffffffff 00000000 + GPR24: c1441cec efffe153 e8001000 c14240c0 00000000 c1441d64 00000000 e8000000 + NIP [c1020240] __alloc_bootmem_huge_page+0xd4/0x284 + LR [c10201d0] __alloc_bootmem_huge_page+0x64/0x284 + Call Trace: + [c13fde20] [c10201d0] __alloc_bootmem_huge_page+0x64/0x284 (unreliable) + [c13fde50] [c10207b8] hugetlb_hstate_alloc_pages+0x8c/0x3e8 + [c13fdeb0] [c1021384] hugepages_setup+0x240/0x2cc + [c13fdef0] [c1000574] unknown_bootoption+0xfc/0x280 + [c13fdf30] [c0078904] parse_args+0x200/0x4c4 + [c13fdfa0] [c1000d9c] start_kernel+0x238/0x7d0 + [c13fdff0] [c0000434] set_ivor+0x12c/0x168 + Code: 554aa33e 7c042840 3ce0c142 80a7427c 5109a016 50caa016 7c9a2378 7fdcf378 4180000c 7c052040 41810160 7c095040 <0fe00000> 38c00000 40800108 3c60c0eb + ---[ end trace 0000000000000000 ]--- + +This is due to virt_addr_valid() using high_memory before it is set. + +high_memory is set in mem_init() using max_low_pfn, but max_low_pfn +is available long before, it is set in mem_topology_setup(). So just +like commit daa9ada2093e ("powerpc/mm: Fix boot crash with FLATMEM") +moved the setting of max_mapnr immediately after the call to +mem_topology_setup(), the same can be done for high_memory. + +Signed-off-by: Christophe Leroy +Signed-off-by: Michael Ellerman +Link: https://msgid.link/62b69c4baad067093f39e7e60df0fe27a86b8d2a.1723100702.git.christophe.leroy@csgroup.eu +Signed-off-by: Sasha Levin +--- + arch/powerpc/kernel/setup-common.c | 1 + + arch/powerpc/mm/mem.c | 2 -- + 2 files changed, 1 insertion(+), 2 deletions(-) + +diff --git a/arch/powerpc/kernel/setup-common.c b/arch/powerpc/kernel/setup-common.c +index 42338e2921d6..6192088159a9 100644 +--- a/arch/powerpc/kernel/setup-common.c ++++ b/arch/powerpc/kernel/setup-common.c +@@ -889,6 +889,7 @@ void __init setup_arch(char **cmdline_p) + mem_topology_setup(); + /* Set max_mapnr before paging_init() */ + set_max_mapnr(max_pfn); ++ high_memory = (void *)__va(max_low_pfn * PAGE_SIZE); + + /* + * Release secondary cpus out of their spinloops at 0x60 now that +diff --git a/arch/powerpc/mm/mem.c b/arch/powerpc/mm/mem.c +index 01fc77564cac..b26c0fa776de 100644 +--- a/arch/powerpc/mm/mem.c ++++ b/arch/powerpc/mm/mem.c +@@ -287,8 +287,6 @@ void __init mem_init(void) + swiotlb_init(0); + #endif + +- high_memory = (void *) __va(max_low_pfn * PAGE_SIZE); +- + kasan_late_init(); + + memblock_free_all(); +-- +2.43.0 + diff --git a/queue-5.15/scripts-kconfig-merge_config-config-files-add-a-trai.patch b/queue-5.15/scripts-kconfig-merge_config-config-files-add-a-trai.patch new file mode 100644 index 00000000000..2f85ed06ee0 --- /dev/null +++ b/queue-5.15/scripts-kconfig-merge_config-config-files-add-a-trai.patch @@ -0,0 +1,48 @@ +From da1a6be355fd0c9b632e06d280c9a1fb58b8bdbc Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Mon, 5 Aug 2024 11:22:34 +0200 +Subject: scripts: kconfig: merge_config: config files: add a trailing newline + +From: Anders Roxell + +[ Upstream commit 33330bcf031818e60a816db0cfd3add9eecc3b28 ] + +When merging files without trailing newlines at the end of the file, two +config fragments end up at the same row if file1.config doens't have a +trailing newline at the end of the file. + +file1.config "CONFIG_1=y" +file2.config "CONFIG_2=y" +./scripts/kconfig/merge_config.sh -m .config file1.config file2.config + +This will generate a .config looking like this. +cat .config +... +CONFIG_1=yCONFIG_2=y" + +Making sure so we add a newline at the end of every config file that is +passed into the script. + +Signed-off-by: Anders Roxell +Signed-off-by: Masahiro Yamada +Signed-off-by: Sasha Levin +--- + scripts/kconfig/merge_config.sh | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/scripts/kconfig/merge_config.sh b/scripts/kconfig/merge_config.sh +index e5b46980c22a..72da3b8d6f30 100755 +--- a/scripts/kconfig/merge_config.sh ++++ b/scripts/kconfig/merge_config.sh +@@ -160,6 +160,8 @@ for ORIG_MERGE_FILE in $MERGE_LIST ; do + sed -i "/$CFG[ =]/d" $MERGE_FILE + fi + done ++ # In case the previous file lacks a new line at the end ++ echo >> $TMP_FILE + cat $MERGE_FILE >> $TMP_FILE + done + +-- +2.43.0 + diff --git a/queue-5.15/series b/queue-5.15/series new file mode 100644 index 00000000000..6779100891d --- /dev/null +++ b/queue-5.15/series @@ -0,0 +1,14 @@ +usbnet-ipheth-fix-carrier-detection-in-modes-1-and-4.patch +net-ethernet-use-ip_hdrlen-instead-of-bit-shift.patch +net-phy-vitesse-repair-vsc73xx-autonegotiation.patch +powerpc-mm-fix-boot-warning-with-hugepages-and-confi.patch +btrfs-update-target-inode-s-ctime-on-unlink.patch +input-ads7846-ratelimit-the-spi_sync-error-message.patch +input-synaptics-enable-smbus-for-hp-elitebook-840-g2.patch +hid-multitouch-add-support-for-gt7868q.patch +scripts-kconfig-merge_config-config-files-add-a-trai.patch +platform-surface-aggregator_registry-add-support-for.patch +drm-msm-adreno-fix-error-return-if-missing-firmware-.patch +input-i8042-add-fujitsu-lifebook-e756-to-i8042-quirk.patch +nfsv4-fix-clearing-of-layout-segments-in-layoutretur.patch +nfs-avoid-unnecessary-rescanning-of-the-per-server-d.patch diff --git a/queue-5.15/usbnet-ipheth-fix-carrier-detection-in-modes-1-and-4.patch b/queue-5.15/usbnet-ipheth-fix-carrier-detection-in-modes-1-and-4.patch new file mode 100644 index 00000000000..71708ebe3ba --- /dev/null +++ b/queue-5.15/usbnet-ipheth-fix-carrier-detection-in-modes-1-and-4.patch @@ -0,0 +1,80 @@ +From 8c80f321e38eab3d4f61cba6f6a23978f0837b61 Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Tue, 6 Aug 2024 19:28:09 +0200 +Subject: usbnet: ipheth: fix carrier detection in modes 1 and 4 + +From: Foster Snowhill + +[ Upstream commit 67927a1b255d883881be9467508e0af9a5e0be9d ] + +Apart from the standard "configurations", "interfaces" and "alternate +interface settings" in USB, iOS devices also have a notion of +"modes". In different modes, the device exposes a different set of +available configurations. + +Depending on the iOS version, and depending on the current mode, the +length and contents of the carrier state control message differs: + +* 1 byte (seen on iOS 4.2.1, 8.4): + * 03: carrier off (mode 0) + * 04: carrier on (mode 0) +* 3 bytes (seen on iOS 10.3.4, 15.7.6): + * 03 03 03: carrier off (mode 0) + * 04 04 03: carrier on (mode 0) +* 4 bytes (seen on iOS 16.5, 17.6): + * 03 03 03 00: carrier off (mode 0) + * 04 03 03 00: carrier off (mode 1) + * 06 03 03 00: carrier off (mode 4) + * 04 04 03 04: carrier on (mode 0 and 1) + * 06 04 03 04: carrier on (mode 4) + +Before this change, the driver always used the first byte of the +response to determine carrier state. + +From this larger sample, the first byte seems to indicate the number of +available USB configurations in the current mode (with the exception of +the default mode 0), and in some cases (namely mode 1 and 4) does not +correlate with the carrier state. + +Previous logic erroneously counted `04 03 03 00` as "carrier on" and +`06 04 03 04` as "carrier off" on iOS versions that support mode 1 and +mode 4 respectively. + +Only modes 0, 1 and 4 expose the USB Ethernet interfaces necessary for +the ipheth driver. + +Check the second byte of the control message where possible, and fall +back to checking the first byte on older iOS versions. + +Signed-off-by: Foster Snowhill +Tested-by: Georgi Valkov +Signed-off-by: David S. Miller +Signed-off-by: Sasha Levin +--- + drivers/net/usb/ipheth.c | 5 +++-- + 1 file changed, 3 insertions(+), 2 deletions(-) + +diff --git a/drivers/net/usb/ipheth.c b/drivers/net/usb/ipheth.c +index 4485388dcff2..bb3d4c5dadfc 100644 +--- a/drivers/net/usb/ipheth.c ++++ b/drivers/net/usb/ipheth.c +@@ -253,13 +253,14 @@ static int ipheth_carrier_set(struct ipheth_device *dev) + 0x02, /* index */ + dev->ctrl_buf, IPHETH_CTRL_BUF_SIZE, + IPHETH_CTRL_TIMEOUT); +- if (retval < 0) { ++ if (retval <= 0) { + dev_err(&dev->intf->dev, "%s: usb_control_msg: %d\n", + __func__, retval); + return retval; + } + +- if (dev->ctrl_buf[0] == IPHETH_CARRIER_ON) { ++ if ((retval == 1 && dev->ctrl_buf[0] == IPHETH_CARRIER_ON) || ++ (retval >= 2 && dev->ctrl_buf[1] == IPHETH_CARRIER_ON)) { + netif_carrier_on(dev->net); + if (dev->tx_urb->status != -EINPROGRESS) + netif_wake_queue(dev->net); +-- +2.43.0 +