]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
Fixes for 6.6
authorSasha Levin <sashal@kernel.org>
Sat, 24 May 2025 10:22:29 +0000 (06:22 -0400)
committerSasha Levin <sashal@kernel.org>
Sat, 24 May 2025 10:22:29 +0000 (06:22 -0400)
Signed-off-by: Sasha Levin <sashal@kernel.org>
26 files changed:
queue-6.6/bluetooth-btusb-use-skb_pull-to-avoid-unsafe-access-.patch [new file with mode: 0644]
queue-6.6/bluetooth-l2cap-fix-not-checking-l2cap_chan-security.patch [new file with mode: 0644]
queue-6.6/bridge-netfilter-fix-forwarding-of-fragmented-packet.patch [new file with mode: 0644]
queue-6.6/clk-sunxi-ng-d1-add-missing-divider-for-mmc-mod-cloc.patch [new file with mode: 0644]
queue-6.6/dmaengine-fsl-edma-fix-return-code-for-unhandled-int.patch [new file with mode: 0644]
queue-6.6/dmaengine-idxd-add-wq-driver-name-support-for-accel-.patch [new file with mode: 0644]
queue-6.6/dmaengine-idxd-fix-allowing-write-from-different-add.patch [new file with mode: 0644]
queue-6.6/dmaengine-idxd-fix-poll-return-value.patch [new file with mode: 0644]
queue-6.6/espintcp-remove-encap-socket-caching-to-avoid-refere.patch [new file with mode: 0644]
queue-6.6/ice-fix-lacp-bonds-without-sriov-environment.patch [new file with mode: 0644]
queue-6.6/ice-fix-vf-num_mac-count-with-port-representors.patch [new file with mode: 0644]
queue-6.6/io_uring-fix-overflow-resched-cqe-reordering.patch [new file with mode: 0644]
queue-6.6/kernel-fork-only-call-untrack_pfn_clear-on-vmas-dupl.patch [new file with mode: 0644]
queue-6.6/net-dwmac-sun8i-use-parsed-internal-phy-address-inst.patch [new file with mode: 0644]
queue-6.6/net-lan743x-restore-sgmii-ctrl-register-on-resume.patch [new file with mode: 0644]
queue-6.6/net-tipc-fix-slab-use-after-free-read-in-tipc_aead_e.patch [new file with mode: 0644]
queue-6.6/octeontx2-af-fix-apr-entry-mapping-based-on-apr_lmt_.patch [new file with mode: 0644]
queue-6.6/octeontx2-af-set-lmt_ena-bit-for-apr-table-entries.patch [new file with mode: 0644]
queue-6.6/octeontx2-pf-add-af_xdp-non-zero-copy-support.patch [new file with mode: 0644]
queue-6.6/pinctrl-qcom-msm-convert-to-platform-remove-callback.patch [new file with mode: 0644]
queue-6.6/pinctrl-qcom-switch-to-devm_register_sys_off_handler.patch [new file with mode: 0644]
queue-6.6/remoteproc-qcom_wcnss-fix-on-platforms-without-fallb.patch [new file with mode: 0644]
queue-6.6/sch_hfsc-fix-qlen-accounting-bug-when-using-peek-in-.patch [new file with mode: 0644]
queue-6.6/series
queue-6.6/soundwire-bus-fix-race-on-the-creation-of-the-irq-do.patch [new file with mode: 0644]
queue-6.6/xfrm-sanitize-marks-before-insert.patch [new file with mode: 0644]

diff --git a/queue-6.6/bluetooth-btusb-use-skb_pull-to-avoid-unsafe-access-.patch b/queue-6.6/bluetooth-btusb-use-skb_pull-to-avoid-unsafe-access-.patch
new file mode 100644 (file)
index 0000000..0fb7d8f
--- /dev/null
@@ -0,0 +1,193 @@
+From 756ce9524a6398594d24d0808ac7d8129d481bc3 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Thu, 8 May 2025 22:15:20 +0800
+Subject: Bluetooth: btusb: use skb_pull to avoid unsafe access in QCA dump
+ handling
+
+From: En-Wei Wu <en-wei.wu@canonical.com>
+
+[ Upstream commit 4bcb0c7dc25446b99fc7a8fa2a143d69f3314162 ]
+
+Use skb_pull() and skb_pull_data() to safely parse QCA dump packets.
+
+This avoids direct pointer math on skb->data, which could lead to
+invalid access if the packet is shorter than expected.
+
+Fixes: 20981ce2d5a5 ("Bluetooth: btusb: Add WCN6855 devcoredump support")
+Signed-off-by: En-Wei Wu <en-wei.wu@canonical.com>
+Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/bluetooth/btusb.c | 98 ++++++++++++++++-----------------------
+ 1 file changed, 40 insertions(+), 58 deletions(-)
+
+diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c
+index d6195565ef7ae..e0dd698896088 100644
+--- a/drivers/bluetooth/btusb.c
++++ b/drivers/bluetooth/btusb.c
+@@ -3525,9 +3525,8 @@ static void btusb_coredump_qca(struct hci_dev *hdev)
+ static int handle_dump_pkt_qca(struct hci_dev *hdev, struct sk_buff *skb)
+ {
+       int ret = 0;
++      unsigned int skip = 0;
+       u8 pkt_type;
+-      u8 *sk_ptr;
+-      unsigned int sk_len;
+       u16 seqno;
+       u32 dump_size;
+@@ -3536,18 +3535,13 @@ static int handle_dump_pkt_qca(struct hci_dev *hdev, struct sk_buff *skb)
+       struct usb_device *udev = btdata->udev;
+       pkt_type = hci_skb_pkt_type(skb);
+-      sk_ptr = skb->data;
+-      sk_len = skb->len;
++      skip = sizeof(struct hci_event_hdr);
++      if (pkt_type == HCI_ACLDATA_PKT)
++              skip += sizeof(struct hci_acl_hdr);
+-      if (pkt_type == HCI_ACLDATA_PKT) {
+-              sk_ptr += HCI_ACL_HDR_SIZE;
+-              sk_len -= HCI_ACL_HDR_SIZE;
+-      }
+-
+-      sk_ptr += HCI_EVENT_HDR_SIZE;
+-      sk_len -= HCI_EVENT_HDR_SIZE;
++      skb_pull(skb, skip);
++      dump_hdr = (struct qca_dump_hdr *)skb->data;
+-      dump_hdr = (struct qca_dump_hdr *)sk_ptr;
+       seqno = le16_to_cpu(dump_hdr->seqno);
+       if (seqno == 0) {
+               set_bit(BTUSB_HW_SSR_ACTIVE, &btdata->flags);
+@@ -3567,16 +3561,15 @@ static int handle_dump_pkt_qca(struct hci_dev *hdev, struct sk_buff *skb)
+               btdata->qca_dump.ram_dump_size = dump_size;
+               btdata->qca_dump.ram_dump_seqno = 0;
+-              sk_ptr += offsetof(struct qca_dump_hdr, data0);
+-              sk_len -= offsetof(struct qca_dump_hdr, data0);
++
++              skb_pull(skb, offsetof(struct qca_dump_hdr, data0));
+               usb_disable_autosuspend(udev);
+               bt_dev_info(hdev, "%s memdump size(%u)\n",
+                           (pkt_type == HCI_ACLDATA_PKT) ? "ACL" : "event",
+                           dump_size);
+       } else {
+-              sk_ptr += offsetof(struct qca_dump_hdr, data);
+-              sk_len -= offsetof(struct qca_dump_hdr, data);
++              skb_pull(skb, offsetof(struct qca_dump_hdr, data));
+       }
+       if (!btdata->qca_dump.ram_dump_size) {
+@@ -3596,7 +3589,6 @@ static int handle_dump_pkt_qca(struct hci_dev *hdev, struct sk_buff *skb)
+               return ret;
+       }
+-      skb_pull(skb, skb->len - sk_len);
+       hci_devcd_append(hdev, skb);
+       btdata->qca_dump.ram_dump_seqno++;
+       if (seqno == QCA_LAST_SEQUENCE_NUM) {
+@@ -3624,68 +3616,58 @@ static int handle_dump_pkt_qca(struct hci_dev *hdev, struct sk_buff *skb)
+ /* Return: true if the ACL packet is a dump packet, false otherwise. */
+ static bool acl_pkt_is_dump_qca(struct hci_dev *hdev, struct sk_buff *skb)
+ {
+-      u8 *sk_ptr;
+-      unsigned int sk_len;
+-
+       struct hci_event_hdr *event_hdr;
+       struct hci_acl_hdr *acl_hdr;
+       struct qca_dump_hdr *dump_hdr;
++      struct sk_buff *clone = skb_clone(skb, GFP_ATOMIC);
++      bool is_dump = false;
+-      sk_ptr = skb->data;
+-      sk_len = skb->len;
+-
+-      acl_hdr = hci_acl_hdr(skb);
+-      if (le16_to_cpu(acl_hdr->handle) != QCA_MEMDUMP_ACL_HANDLE)
++      if (!clone)
+               return false;
+-      sk_ptr += HCI_ACL_HDR_SIZE;
+-      sk_len -= HCI_ACL_HDR_SIZE;
+-      event_hdr = (struct hci_event_hdr *)sk_ptr;
+-
+-      if ((event_hdr->evt != HCI_VENDOR_PKT) ||
+-          (event_hdr->plen != (sk_len - HCI_EVENT_HDR_SIZE)))
+-              return false;
++      acl_hdr = skb_pull_data(clone, sizeof(*acl_hdr));
++      if (!acl_hdr || (le16_to_cpu(acl_hdr->handle) != QCA_MEMDUMP_ACL_HANDLE))
++              goto out;
+-      sk_ptr += HCI_EVENT_HDR_SIZE;
+-      sk_len -= HCI_EVENT_HDR_SIZE;
++      event_hdr = skb_pull_data(clone, sizeof(*event_hdr));
++      if (!event_hdr || (event_hdr->evt != HCI_VENDOR_PKT))
++              goto out;
+-      dump_hdr = (struct qca_dump_hdr *)sk_ptr;
+-      if ((sk_len < offsetof(struct qca_dump_hdr, data)) ||
+-          (dump_hdr->vse_class != QCA_MEMDUMP_VSE_CLASS) ||
+-          (dump_hdr->msg_type != QCA_MEMDUMP_MSG_TYPE))
+-              return false;
++      dump_hdr = skb_pull_data(clone, sizeof(*dump_hdr));
++      if (!dump_hdr || (dump_hdr->vse_class != QCA_MEMDUMP_VSE_CLASS) ||
++         (dump_hdr->msg_type != QCA_MEMDUMP_MSG_TYPE))
++              goto out;
+-      return true;
++      is_dump = true;
++out:
++      consume_skb(clone);
++      return is_dump;
+ }
+ /* Return: true if the event packet is a dump packet, false otherwise. */
+ static bool evt_pkt_is_dump_qca(struct hci_dev *hdev, struct sk_buff *skb)
+ {
+-      u8 *sk_ptr;
+-      unsigned int sk_len;
+-
+       struct hci_event_hdr *event_hdr;
+       struct qca_dump_hdr *dump_hdr;
++      struct sk_buff *clone = skb_clone(skb, GFP_ATOMIC);
++      bool is_dump = false;
+-      sk_ptr = skb->data;
+-      sk_len = skb->len;
+-
+-      event_hdr = hci_event_hdr(skb);
+-
+-      if ((event_hdr->evt != HCI_VENDOR_PKT)
+-          || (event_hdr->plen != (sk_len - HCI_EVENT_HDR_SIZE)))
++      if (!clone)
+               return false;
+-      sk_ptr += HCI_EVENT_HDR_SIZE;
+-      sk_len -= HCI_EVENT_HDR_SIZE;
++      event_hdr = skb_pull_data(clone, sizeof(*event_hdr));
++      if (!event_hdr || (event_hdr->evt != HCI_VENDOR_PKT))
++              goto out;
+-      dump_hdr = (struct qca_dump_hdr *)sk_ptr;
+-      if ((sk_len < offsetof(struct qca_dump_hdr, data)) ||
+-          (dump_hdr->vse_class != QCA_MEMDUMP_VSE_CLASS) ||
+-          (dump_hdr->msg_type != QCA_MEMDUMP_MSG_TYPE))
+-              return false;
++      dump_hdr = skb_pull_data(clone, sizeof(*dump_hdr));
++      if (!dump_hdr || (dump_hdr->vse_class != QCA_MEMDUMP_VSE_CLASS) ||
++         (dump_hdr->msg_type != QCA_MEMDUMP_MSG_TYPE))
++              goto out;
+-      return true;
++      is_dump = true;
++out:
++      consume_skb(clone);
++      return is_dump;
+ }
+ static int btusb_recv_acl_qca(struct hci_dev *hdev, struct sk_buff *skb)
+-- 
+2.39.5
+
diff --git a/queue-6.6/bluetooth-l2cap-fix-not-checking-l2cap_chan-security.patch b/queue-6.6/bluetooth-l2cap-fix-not-checking-l2cap_chan-security.patch
new file mode 100644 (file)
index 0000000..ea0d67f
--- /dev/null
@@ -0,0 +1,92 @@
+From f0b8e0e0a1f4d4b10dc9f6d715860094d633b90b Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Wed, 7 May 2025 15:00:30 -0400
+Subject: Bluetooth: L2CAP: Fix not checking l2cap_chan security level
+
+From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
+
+[ Upstream commit 7af8479d9eb4319b4ba7b47a8c4d2c55af1c31e1 ]
+
+l2cap_check_enc_key_size shall check the security level of the
+l2cap_chan rather than the hci_conn since for incoming connection
+request that may be different as hci_conn may already been
+encrypted using a different security level.
+
+Fixes: 522e9ed157e3 ("Bluetooth: l2cap: Check encryption key size on incoming connection")
+Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ net/bluetooth/l2cap_core.c | 15 ++++++++-------
+ 1 file changed, 8 insertions(+), 7 deletions(-)
+
+diff --git a/net/bluetooth/l2cap_core.c b/net/bluetooth/l2cap_core.c
+index 72ee41b894a52..1c54e812ef1f7 100644
+--- a/net/bluetooth/l2cap_core.c
++++ b/net/bluetooth/l2cap_core.c
+@@ -1411,7 +1411,8 @@ static void l2cap_request_info(struct l2cap_conn *conn)
+                      sizeof(req), &req);
+ }
+-static bool l2cap_check_enc_key_size(struct hci_conn *hcon)
++static bool l2cap_check_enc_key_size(struct hci_conn *hcon,
++                                   struct l2cap_chan *chan)
+ {
+       /* The minimum encryption key size needs to be enforced by the
+        * host stack before establishing any L2CAP connections. The
+@@ -1425,7 +1426,7 @@ static bool l2cap_check_enc_key_size(struct hci_conn *hcon)
+       int min_key_size = hcon->hdev->min_enc_key_size;
+       /* On FIPS security level, key size must be 16 bytes */
+-      if (hcon->sec_level == BT_SECURITY_FIPS)
++      if (chan->sec_level == BT_SECURITY_FIPS)
+               min_key_size = 16;
+       return (!test_bit(HCI_CONN_ENCRYPT, &hcon->flags) ||
+@@ -1453,7 +1454,7 @@ static void l2cap_do_start(struct l2cap_chan *chan)
+           !__l2cap_no_conn_pending(chan))
+               return;
+-      if (l2cap_check_enc_key_size(conn->hcon))
++      if (l2cap_check_enc_key_size(conn->hcon, chan))
+               l2cap_start_connection(chan);
+       else
+               __set_chan_timer(chan, L2CAP_DISC_TIMEOUT);
+@@ -1528,7 +1529,7 @@ static void l2cap_conn_start(struct l2cap_conn *conn)
+                               continue;
+                       }
+-                      if (l2cap_check_enc_key_size(conn->hcon))
++                      if (l2cap_check_enc_key_size(conn->hcon, chan))
+                               l2cap_start_connection(chan);
+                       else
+                               l2cap_chan_close(chan, ECONNREFUSED);
+@@ -3955,7 +3956,7 @@ static void l2cap_connect(struct l2cap_conn *conn, struct l2cap_cmd_hdr *cmd,
+       /* Check if the ACL is secure enough (if not SDP) */
+       if (psm != cpu_to_le16(L2CAP_PSM_SDP) &&
+           (!hci_conn_check_link_mode(conn->hcon) ||
+-          !l2cap_check_enc_key_size(conn->hcon))) {
++          !l2cap_check_enc_key_size(conn->hcon, pchan))) {
+               conn->disc_reason = HCI_ERROR_AUTH_FAILURE;
+               result = L2CAP_CR_SEC_BLOCK;
+               goto response;
+@@ -7323,7 +7324,7 @@ static void l2cap_security_cfm(struct hci_conn *hcon, u8 status, u8 encrypt)
+               }
+               if (chan->state == BT_CONNECT) {
+-                      if (!status && l2cap_check_enc_key_size(hcon))
++                      if (!status && l2cap_check_enc_key_size(hcon, chan))
+                               l2cap_start_connection(chan);
+                       else
+                               __set_chan_timer(chan, L2CAP_DISC_TIMEOUT);
+@@ -7333,7 +7334,7 @@ static void l2cap_security_cfm(struct hci_conn *hcon, u8 status, u8 encrypt)
+                       struct l2cap_conn_rsp rsp;
+                       __u16 res, stat;
+-                      if (!status && l2cap_check_enc_key_size(hcon)) {
++                      if (!status && l2cap_check_enc_key_size(hcon, chan)) {
+                               if (test_bit(FLAG_DEFER_SETUP, &chan->flags)) {
+                                       res = L2CAP_CR_PEND;
+                                       stat = L2CAP_CS_AUTHOR_PEND;
+-- 
+2.39.5
+
diff --git a/queue-6.6/bridge-netfilter-fix-forwarding-of-fragmented-packet.patch b/queue-6.6/bridge-netfilter-fix-forwarding-of-fragmented-packet.patch
new file mode 100644 (file)
index 0000000..67d6d7c
--- /dev/null
@@ -0,0 +1,95 @@
+From b3bd118084b6c5574d57f44c74e9a01e61f37f4d Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Thu, 15 May 2025 11:48:48 +0300
+Subject: bridge: netfilter: Fix forwarding of fragmented packets
+
+From: Ido Schimmel <idosch@nvidia.com>
+
+[ Upstream commit 91b6dbced0ef1d680afdd69b14fc83d50ebafaf3 ]
+
+When netfilter defrag hooks are loaded (due to the presence of conntrack
+rules, for example), fragmented packets entering the bridge will be
+defragged by the bridge's pre-routing hook (br_nf_pre_routing() ->
+ipv4_conntrack_defrag()).
+
+Later on, in the bridge's post-routing hook, the defragged packet will
+be fragmented again. If the size of the largest fragment is larger than
+what the kernel has determined as the destination MTU (using
+ip_skb_dst_mtu()), the defragged packet will be dropped.
+
+Before commit ac6627a28dbf ("net: ipv4: Consolidate ipv4_mtu and
+ip_dst_mtu_maybe_forward"), ip_skb_dst_mtu() would return dst_mtu() as
+the destination MTU. Assuming the dst entry attached to the packet is
+the bridge's fake rtable one, this would simply be the bridge's MTU (see
+fake_mtu()).
+
+However, after above mentioned commit, ip_skb_dst_mtu() ends up
+returning the route's MTU stored in the dst entry's metrics. Ideally, in
+case the dst entry is the bridge's fake rtable one, this should be the
+bridge's MTU as the bridge takes care of updating this metric when its
+MTU changes (see br_change_mtu()).
+
+Unfortunately, the last operation is a no-op given the metrics attached
+to the fake rtable entry are marked as read-only. Therefore,
+ip_skb_dst_mtu() ends up returning 1500 (the initial MTU value) and
+defragged packets are dropped during fragmentation when dealing with
+large fragments and high MTU (e.g., 9k).
+
+Fix by moving the fake rtable entry's metrics to be per-bridge (in a
+similar fashion to the fake rtable entry itself) and marking them as
+writable, thereby allowing MTU changes to be reflected.
+
+Fixes: 62fa8a846d7d ("net: Implement read-only protection and COW'ing of metrics.")
+Fixes: 33eb9873a283 ("bridge: initialize fake_rtable metrics")
+Reported-by: Venkat Venkatsubra <venkat.x.venkatsubra@oracle.com>
+Closes: https://lore.kernel.org/netdev/PH0PR10MB4504888284FF4CBA648197D0ACB82@PH0PR10MB4504.namprd10.prod.outlook.com/
+Tested-by: Venkat Venkatsubra <venkat.x.venkatsubra@oracle.com>
+Signed-off-by: Ido Schimmel <idosch@nvidia.com>
+Acked-by: Nikolay Aleksandrov <razor@blackwall.org>
+Link: https://patch.msgid.link/20250515084848.727706-1-idosch@nvidia.com
+Signed-off-by: Jakub Kicinski <kuba@kernel.org>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ net/bridge/br_nf_core.c | 7 ++-----
+ net/bridge/br_private.h | 1 +
+ 2 files changed, 3 insertions(+), 5 deletions(-)
+
+diff --git a/net/bridge/br_nf_core.c b/net/bridge/br_nf_core.c
+index 98aea5485aaef..a8c67035e23c0 100644
+--- a/net/bridge/br_nf_core.c
++++ b/net/bridge/br_nf_core.c
+@@ -65,17 +65,14 @@ static struct dst_ops fake_dst_ops = {
+  * ipt_REJECT needs it.  Future netfilter modules might
+  * require us to fill additional fields.
+  */
+-static const u32 br_dst_default_metrics[RTAX_MAX] = {
+-      [RTAX_MTU - 1] = 1500,
+-};
+-
+ void br_netfilter_rtable_init(struct net_bridge *br)
+ {
+       struct rtable *rt = &br->fake_rtable;
+       rcuref_init(&rt->dst.__rcuref, 1);
+       rt->dst.dev = br->dev;
+-      dst_init_metrics(&rt->dst, br_dst_default_metrics, true);
++      dst_init_metrics(&rt->dst, br->metrics, false);
++      dst_metric_set(&rt->dst, RTAX_MTU, br->dev->mtu);
+       rt->dst.flags   = DST_NOXFRM | DST_FAKE_RTABLE;
+       rt->dst.ops = &fake_dst_ops;
+ }
+diff --git a/net/bridge/br_private.h b/net/bridge/br_private.h
+index 72d80fd943a8a..9197b511e4597 100644
+--- a/net/bridge/br_private.h
++++ b/net/bridge/br_private.h
+@@ -502,6 +502,7 @@ struct net_bridge {
+               struct rtable           fake_rtable;
+               struct rt6_info         fake_rt6_info;
+       };
++      u32                             metrics[RTAX_MAX];
+ #endif
+       u16                             group_fwd_mask;
+       u16                             group_fwd_mask_required;
+-- 
+2.39.5
+
diff --git a/queue-6.6/clk-sunxi-ng-d1-add-missing-divider-for-mmc-mod-cloc.patch b/queue-6.6/clk-sunxi-ng-d1-add-missing-divider-for-mmc-mod-cloc.patch
new file mode 100644 (file)
index 0000000..91e209a
--- /dev/null
@@ -0,0 +1,131 @@
+From ac78e1b44c8eedaa502e7a5a7ba61e7e734663e3 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Thu, 1 May 2025 13:06:31 +0100
+Subject: clk: sunxi-ng: d1: Add missing divider for MMC mod clocks
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+From: Andre Przywara <andre.przywara@arm.com>
+
+[ Upstream commit 98e6da673cc6dd46ca9a599802bd2c8f83606710 ]
+
+The D1/R528/T113 SoCs have a hidden divider of 2 in the MMC mod clocks,
+just as other recent SoCs. So far we did not describe that, which led
+to the resulting MMC clock rate to be only half of its intended value.
+
+Use a macro that allows to describe a fixed post-divider, to compensate
+for that divisor.
+
+This brings the MMC performance on those SoCs to its expected level,
+so about 23 MB/s for SD cards, instead of the 11 MB/s measured so far.
+
+Fixes: 35b97bb94111 ("clk: sunxi-ng: Add support for the D1 SoC clocks")
+Reported-by: Kuba SzczodrzyĹ„ski <kuba@szczodrzynski.pl>
+Signed-off-by: Andre Przywara <andre.przywara@arm.com>
+Link: https://patch.msgid.link/20250501120631.837186-1-andre.przywara@arm.com
+Signed-off-by: Chen-Yu Tsai <wens@csie.org>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/clk/sunxi-ng/ccu-sun20i-d1.c | 44 ++++++++++++++++------------
+ drivers/clk/sunxi-ng/ccu_mp.h        | 22 ++++++++++++++
+ 2 files changed, 47 insertions(+), 19 deletions(-)
+
+diff --git a/drivers/clk/sunxi-ng/ccu-sun20i-d1.c b/drivers/clk/sunxi-ng/ccu-sun20i-d1.c
+index f95c3615ca772..98f107e96317e 100644
+--- a/drivers/clk/sunxi-ng/ccu-sun20i-d1.c
++++ b/drivers/clk/sunxi-ng/ccu-sun20i-d1.c
+@@ -412,19 +412,23 @@ static const struct clk_parent_data mmc0_mmc1_parents[] = {
+       { .hw = &pll_periph0_2x_clk.common.hw },
+       { .hw = &pll_audio1_div2_clk.common.hw },
+ };
+-static SUNXI_CCU_MP_DATA_WITH_MUX_GATE(mmc0_clk, "mmc0", mmc0_mmc1_parents, 0x830,
+-                                     0, 4,    /* M */
+-                                     8, 2,    /* P */
+-                                     24, 3,   /* mux */
+-                                     BIT(31), /* gate */
+-                                     0);
+-
+-static SUNXI_CCU_MP_DATA_WITH_MUX_GATE(mmc1_clk, "mmc1", mmc0_mmc1_parents, 0x834,
+-                                     0, 4,    /* M */
+-                                     8, 2,    /* P */
+-                                     24, 3,   /* mux */
+-                                     BIT(31), /* gate */
+-                                     0);
++static SUNXI_CCU_MP_DATA_WITH_MUX_GATE_POSTDIV(mmc0_clk, "mmc0",
++                                             mmc0_mmc1_parents, 0x830,
++                                             0, 4,            /* M */
++                                             8, 2,            /* P */
++                                             24, 3,           /* mux */
++                                             BIT(31),         /* gate */
++                                             2,               /* post-div */
++                                             0);
++
++static SUNXI_CCU_MP_DATA_WITH_MUX_GATE_POSTDIV(mmc1_clk, "mmc1",
++                                             mmc0_mmc1_parents, 0x834,
++                                             0, 4,            /* M */
++                                             8, 2,            /* P */
++                                             24, 3,           /* mux */
++                                             BIT(31),         /* gate */
++                                             2,               /* post-div */
++                                             0);
+ static const struct clk_parent_data mmc2_parents[] = {
+       { .fw_name = "hosc" },
+@@ -433,12 +437,14 @@ static const struct clk_parent_data mmc2_parents[] = {
+       { .hw = &pll_periph0_800M_clk.common.hw },
+       { .hw = &pll_audio1_div2_clk.common.hw },
+ };
+-static SUNXI_CCU_MP_DATA_WITH_MUX_GATE(mmc2_clk, "mmc2", mmc2_parents, 0x838,
+-                                     0, 4,    /* M */
+-                                     8, 2,    /* P */
+-                                     24, 3,   /* mux */
+-                                     BIT(31), /* gate */
+-                                     0);
++static SUNXI_CCU_MP_DATA_WITH_MUX_GATE_POSTDIV(mmc2_clk, "mmc2", mmc2_parents,
++                                             0x838,
++                                             0, 4,            /* M */
++                                             8, 2,            /* P */
++                                             24, 3,           /* mux */
++                                             BIT(31),         /* gate */
++                                             2,               /* post-div */
++                                             0);
+ static SUNXI_CCU_GATE_HWS(bus_mmc0_clk, "bus-mmc0", psi_ahb_hws,
+                         0x84c, BIT(0), 0);
+diff --git a/drivers/clk/sunxi-ng/ccu_mp.h b/drivers/clk/sunxi-ng/ccu_mp.h
+index 6e50f3728fb5f..7d836a9fb3db3 100644
+--- a/drivers/clk/sunxi-ng/ccu_mp.h
++++ b/drivers/clk/sunxi-ng/ccu_mp.h
+@@ -52,6 +52,28 @@ struct ccu_mp {
+               }                                                       \
+       }
++#define SUNXI_CCU_MP_DATA_WITH_MUX_GATE_POSTDIV(_struct, _name, _parents, \
++                                              _reg,                   \
++                                              _mshift, _mwidth,       \
++                                              _pshift, _pwidth,       \
++                                              _muxshift, _muxwidth,   \
++                                              _gate, _postdiv, _flags)\
++      struct ccu_mp _struct = {                                       \
++              .enable = _gate,                                        \
++              .m      = _SUNXI_CCU_DIV(_mshift, _mwidth),             \
++              .p      = _SUNXI_CCU_DIV(_pshift, _pwidth),             \
++              .mux    = _SUNXI_CCU_MUX(_muxshift, _muxwidth),         \
++              .fixed_post_div = _postdiv,                             \
++              .common = {                                             \
++                      .reg            = _reg,                         \
++                      .features       = CCU_FEATURE_FIXED_POSTDIV,    \
++                      .hw.init        = CLK_HW_INIT_PARENTS_DATA(_name, \
++                                                      _parents,       \
++                                                      &ccu_mp_ops,    \
++                                                      _flags),        \
++              }                                                       \
++      }
++
+ #define SUNXI_CCU_MP_WITH_MUX_GATE(_struct, _name, _parents, _reg,    \
+                                  _mshift, _mwidth,                    \
+                                  _pshift, _pwidth,                    \
+-- 
+2.39.5
+
diff --git a/queue-6.6/dmaengine-fsl-edma-fix-return-code-for-unhandled-int.patch b/queue-6.6/dmaengine-fsl-edma-fix-return-code-for-unhandled-int.patch
new file mode 100644 (file)
index 0000000..1dc55aa
--- /dev/null
@@ -0,0 +1,40 @@
+From edb8aa9eed6c7e84861df40eb43ad3798e2a225d Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Thu, 24 Apr 2025 13:48:29 +0200
+Subject: dmaengine: fsl-edma: Fix return code for unhandled interrupts
+
+From: Stefan Wahren <wahrenst@gmx.net>
+
+[ Upstream commit 5e27af0514e2249a9ccc9a762abd3b74e03a1f90 ]
+
+For fsl,imx93-edma4 two DMA channels share the same interrupt.
+So in case fsl_edma3_tx_handler is called for the "wrong"
+channel, the return code must be IRQ_NONE. This signalize that
+the interrupt wasn't handled.
+
+Fixes: 72f5801a4e2b ("dmaengine: fsl-edma: integrate v3 support")
+Signed-off-by: Stefan Wahren <wahrenst@gmx.net>
+Reviewed-by: Joy Zou <joy.zou@nxp.com>
+Link: https://lore.kernel.org/r/20250424114829.9055-1-wahrenst@gmx.net
+Signed-off-by: Vinod Koul <vkoul@kernel.org>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/dma/fsl-edma-main.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/drivers/dma/fsl-edma-main.c b/drivers/dma/fsl-edma-main.c
+index cc9923ab686dc..eccbcf67951fb 100644
+--- a/drivers/dma/fsl-edma-main.c
++++ b/drivers/dma/fsl-edma-main.c
+@@ -58,7 +58,7 @@ static irqreturn_t fsl_edma3_tx_handler(int irq, void *dev_id)
+       intr = edma_readl_chreg(fsl_chan, ch_int);
+       if (!intr)
+-              return IRQ_HANDLED;
++              return IRQ_NONE;
+       edma_writel_chreg(fsl_chan, 1, ch_int);
+-- 
+2.39.5
+
diff --git a/queue-6.6/dmaengine-idxd-add-wq-driver-name-support-for-accel-.patch b/queue-6.6/dmaengine-idxd-add-wq-driver-name-support-for-accel-.patch
new file mode 100644 (file)
index 0000000..81180bb
--- /dev/null
@@ -0,0 +1,193 @@
+From 256ed7bb1a2e92fe991fa97c033f69ed0b72f534 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Fri, 8 Sep 2023 13:10:45 -0700
+Subject: dmaengine: idxd: add wq driver name support for accel-config user
+ tool
+
+From: Dave Jiang <dave.jiang@intel.com>
+
+[ Upstream commit 7af1e0aceeb321cbc90fcf6fa0bec8870290377f ]
+
+With the possibility of multiple wq drivers that can be bound to the wq,
+the user config tool accel-config needs a way to know which wq driver to
+bind to the wq. Introduce per wq driver_name sysfs attribute where the user
+can indicate the driver to be bound to the wq. This allows accel-config to
+just bind to the driver using wq->driver_name.
+
+Signed-off-by: Dave Jiang <dave.jiang@intel.com>
+Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com>
+Reviewed-by: Fenghua Yu <fenghua.yu@intel.com>
+Acked-by: Vinod Koul <vkoul@kernel.org>
+Link: https://lore.kernel.org/r/20230908201045.4115614-1-fenghua.yu@intel.com
+Signed-off-by: Vinod Koul <vkoul@kernel.org>
+Stable-dep-of: 8dfa57aabff6 ("dmaengine: idxd: Fix allowing write() from different address spaces")
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ .../ABI/stable/sysfs-driver-dma-idxd          |  6 ++++
+ drivers/dma/idxd/cdev.c                       |  7 ++++
+ drivers/dma/idxd/dma.c                        |  6 ++++
+ drivers/dma/idxd/idxd.h                       |  9 +++++
+ drivers/dma/idxd/sysfs.c                      | 34 +++++++++++++++++++
+ include/uapi/linux/idxd.h                     |  1 +
+ 6 files changed, 63 insertions(+)
+
+diff --git a/Documentation/ABI/stable/sysfs-driver-dma-idxd b/Documentation/ABI/stable/sysfs-driver-dma-idxd
+index 825e619250bf2..f2ec42949a54d 100644
+--- a/Documentation/ABI/stable/sysfs-driver-dma-idxd
++++ b/Documentation/ABI/stable/sysfs-driver-dma-idxd
+@@ -270,6 +270,12 @@ Description:      Shows the operation capability bits displayed in bitmap format
+               correlates to the operations allowed. It's visible only
+               on platforms that support the capability.
++What:         /sys/bus/dsa/devices/wq<m>.<n>/driver_name
++Date:         Sept 8, 2023
++KernelVersion:        6.7.0
++Contact:      dmaengine@vger.kernel.org
++Description:  Name of driver to be bounded to the wq.
++
+ What:           /sys/bus/dsa/devices/engine<m>.<n>/group_id
+ Date:           Oct 25, 2019
+ KernelVersion:  5.6.0
+diff --git a/drivers/dma/idxd/cdev.c b/drivers/dma/idxd/cdev.c
+index c18633ad8455f..7ddf5f933475d 100644
+--- a/drivers/dma/idxd/cdev.c
++++ b/drivers/dma/idxd/cdev.c
+@@ -584,6 +584,7 @@ void idxd_wq_del_cdev(struct idxd_wq *wq)
+ static int idxd_user_drv_probe(struct idxd_dev *idxd_dev)
+ {
++      struct device *dev = &idxd_dev->conf_dev;
+       struct idxd_wq *wq = idxd_dev_to_wq(idxd_dev);
+       struct idxd_device *idxd = wq->idxd;
+       int rc;
+@@ -611,6 +612,12 @@ static int idxd_user_drv_probe(struct idxd_dev *idxd_dev)
+       mutex_lock(&wq->wq_lock);
++      if (!idxd_wq_driver_name_match(wq, dev)) {
++              idxd->cmd_status = IDXD_SCMD_WQ_NO_DRV_NAME;
++              rc = -ENODEV;
++              goto wq_err;
++      }
++
+       wq->wq = create_workqueue(dev_name(wq_confdev(wq)));
+       if (!wq->wq) {
+               rc = -ENOMEM;
+diff --git a/drivers/dma/idxd/dma.c b/drivers/dma/idxd/dma.c
+index 07623fb0f52fc..47a01893cfdbf 100644
+--- a/drivers/dma/idxd/dma.c
++++ b/drivers/dma/idxd/dma.c
+@@ -306,6 +306,12 @@ static int idxd_dmaengine_drv_probe(struct idxd_dev *idxd_dev)
+               return -ENXIO;
+       mutex_lock(&wq->wq_lock);
++      if (!idxd_wq_driver_name_match(wq, dev)) {
++              idxd->cmd_status = IDXD_SCMD_WQ_NO_DRV_NAME;
++              rc = -ENODEV;
++              goto err;
++      }
++
+       wq->type = IDXD_WQT_KERNEL;
+       rc = drv_enable_wq(wq);
+diff --git a/drivers/dma/idxd/idxd.h b/drivers/dma/idxd/idxd.h
+index bea10c5cdb76b..fcbb8caea8995 100644
+--- a/drivers/dma/idxd/idxd.h
++++ b/drivers/dma/idxd/idxd.h
+@@ -159,6 +159,8 @@ struct idxd_cdev {
+       int minor;
+ };
++#define DRIVER_NAME_SIZE              128
++
+ #define IDXD_ALLOCATED_BATCH_SIZE     128U
+ #define WQ_NAME_SIZE   1024
+ #define WQ_TYPE_SIZE   10
+@@ -227,6 +229,8 @@ struct idxd_wq {
+       /* Lock to protect upasid_xa access. */
+       struct mutex uc_lock;
+       struct xarray upasid_xa;
++
++      char driver_name[DRIVER_NAME_SIZE + 1];
+ };
+ struct idxd_engine {
+@@ -648,6 +652,11 @@ static inline void idxd_wqcfg_set_max_batch_shift(int idxd_type, union wqcfg *wq
+               wqcfg->max_batch_shift = max_batch_shift;
+ }
++static inline int idxd_wq_driver_name_match(struct idxd_wq *wq, struct device *dev)
++{
++      return (strncmp(wq->driver_name, dev->driver->name, strlen(dev->driver->name)) == 0);
++}
++
+ int __must_check __idxd_driver_register(struct idxd_device_driver *idxd_drv,
+                                       struct module *module, const char *mod_name);
+ #define idxd_driver_register(driver) \
+diff --git a/drivers/dma/idxd/sysfs.c b/drivers/dma/idxd/sysfs.c
+index 1fd5a93045f79..3a5ce477a81ad 100644
+--- a/drivers/dma/idxd/sysfs.c
++++ b/drivers/dma/idxd/sysfs.c
+@@ -1282,6 +1282,39 @@ static ssize_t wq_op_config_store(struct device *dev, struct device_attribute *a
+ static struct device_attribute dev_attr_wq_op_config =
+               __ATTR(op_config, 0644, wq_op_config_show, wq_op_config_store);
++static ssize_t wq_driver_name_show(struct device *dev, struct device_attribute *attr, char *buf)
++{
++      struct idxd_wq *wq = confdev_to_wq(dev);
++
++      return sysfs_emit(buf, "%s\n", wq->driver_name);
++}
++
++static ssize_t wq_driver_name_store(struct device *dev, struct device_attribute *attr,
++                                  const char *buf, size_t count)
++{
++      struct idxd_wq *wq = confdev_to_wq(dev);
++      char *input, *pos;
++
++      if (wq->state != IDXD_WQ_DISABLED)
++              return -EPERM;
++
++      if (strlen(buf) > DRIVER_NAME_SIZE || strlen(buf) == 0)
++              return -EINVAL;
++
++      input = kstrndup(buf, count, GFP_KERNEL);
++      if (!input)
++              return -ENOMEM;
++
++      pos = strim(input);
++      memset(wq->driver_name, 0, DRIVER_NAME_SIZE + 1);
++      sprintf(wq->driver_name, "%s", pos);
++      kfree(input);
++      return count;
++}
++
++static struct device_attribute dev_attr_wq_driver_name =
++              __ATTR(driver_name, 0644, wq_driver_name_show, wq_driver_name_store);
++
+ static struct attribute *idxd_wq_attributes[] = {
+       &dev_attr_wq_clients.attr,
+       &dev_attr_wq_state.attr,
+@@ -1301,6 +1334,7 @@ static struct attribute *idxd_wq_attributes[] = {
+       &dev_attr_wq_occupancy.attr,
+       &dev_attr_wq_enqcmds_retries.attr,
+       &dev_attr_wq_op_config.attr,
++      &dev_attr_wq_driver_name.attr,
+       NULL,
+ };
+diff --git a/include/uapi/linux/idxd.h b/include/uapi/linux/idxd.h
+index 606b52e88ce33..3d1987e1bb2dd 100644
+--- a/include/uapi/linux/idxd.h
++++ b/include/uapi/linux/idxd.h
+@@ -31,6 +31,7 @@ enum idxd_scmd_stat {
+       IDXD_SCMD_WQ_IRQ_ERR = 0x80100000,
+       IDXD_SCMD_WQ_USER_NO_IOMMU = 0x80110000,
+       IDXD_SCMD_DEV_EVL_ERR = 0x80120000,
++      IDXD_SCMD_WQ_NO_DRV_NAME = 0x80200000,
+ };
+ #define IDXD_SCMD_SOFTERR_MASK        0x80000000
+-- 
+2.39.5
+
diff --git a/queue-6.6/dmaengine-idxd-fix-allowing-write-from-different-add.patch b/queue-6.6/dmaengine-idxd-fix-allowing-write-from-different-add.patch
new file mode 100644 (file)
index 0000000..ae48980
--- /dev/null
@@ -0,0 +1,59 @@
+From 397426f6d90da45aa778dde536cacaf99528762b Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Mon, 21 Apr 2025 10:03:37 -0700
+Subject: dmaengine: idxd: Fix allowing write() from different address spaces
+
+From: Vinicius Costa Gomes <vinicius.gomes@intel.com>
+
+[ Upstream commit 8dfa57aabff625bf445548257f7711ef294cd30e ]
+
+Check if the process submitting the descriptor belongs to the same
+address space as the one that opened the file, reject otherwise.
+
+Fixes: 6827738dc684 ("dmaengine: idxd: add a write() method for applications to submit work")
+Signed-off-by: Vinicius Costa Gomes <vinicius.gomes@intel.com>
+Signed-off-by: Dave Jiang <dave.jiang@intel.com>
+Link: https://lore.kernel.org/r/20250421170337.3008875-1-dave.jiang@intel.com
+Signed-off-by: Vinod Koul <vkoul@kernel.org>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/dma/idxd/cdev.c | 9 +++++++++
+ 1 file changed, 9 insertions(+)
+
+diff --git a/drivers/dma/idxd/cdev.c b/drivers/dma/idxd/cdev.c
+index 7ddf5f933475d..ba53675ced55a 100644
+--- a/drivers/dma/idxd/cdev.c
++++ b/drivers/dma/idxd/cdev.c
+@@ -412,6 +412,9 @@ static int idxd_cdev_mmap(struct file *filp, struct vm_area_struct *vma)
+       if (!idxd->user_submission_safe && !capable(CAP_SYS_RAWIO))
+               return -EPERM;
++      if (current->mm != ctx->mm)
++              return -EPERM;
++
+       rc = check_vma(wq, vma, __func__);
+       if (rc < 0)
+               return rc;
+@@ -478,6 +481,9 @@ static ssize_t idxd_cdev_write(struct file *filp, const char __user *buf, size_t
+       ssize_t written = 0;
+       int i;
++      if (current->mm != ctx->mm)
++              return -EPERM;
++
+       for (i = 0; i < len/sizeof(struct dsa_hw_desc); i++) {
+               int rc = idxd_submit_user_descriptor(ctx, udesc + i);
+@@ -498,6 +504,9 @@ static __poll_t idxd_cdev_poll(struct file *filp,
+       struct idxd_device *idxd = wq->idxd;
+       __poll_t out = 0;
++      if (current->mm != ctx->mm)
++              return -EPERM;
++
+       poll_wait(filp, &wq->err_queue, wait);
+       spin_lock(&idxd->dev_lock);
+       if (idxd->sw_err.valid)
+-- 
+2.39.5
+
diff --git a/queue-6.6/dmaengine-idxd-fix-poll-return-value.patch b/queue-6.6/dmaengine-idxd-fix-poll-return-value.patch
new file mode 100644 (file)
index 0000000..919fec2
--- /dev/null
@@ -0,0 +1,41 @@
+From 637a5545254b39d2db5d2e1bbcb502f466880c5a Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Thu, 8 May 2025 10:05:48 -0700
+Subject: dmaengine: idxd: Fix ->poll() return value
+
+From: Dave Jiang <dave.jiang@intel.com>
+
+[ Upstream commit ae74cd15ade833adc289279b5c6f12e78f64d4d7 ]
+
+The fix to block access from different address space did not return a
+correct value for ->poll() change.  kernel test bot reported that a
+return value of type __poll_t is expected rather than int. Fix to return
+POLLNVAL to indicate invalid request.
+
+Fixes: 8dfa57aabff6 ("dmaengine: idxd: Fix allowing write() from different address spaces")
+Reported-by: kernel test robot <lkp@intel.com>
+Closes: https://lore.kernel.org/oe-kbuild-all/202505081851.rwD7jVxg-lkp@intel.com/
+Signed-off-by: Dave Jiang <dave.jiang@intel.com>
+Link: https://lore.kernel.org/r/20250508170548.2747425-1-dave.jiang@intel.com
+Signed-off-by: Vinod Koul <vkoul@kernel.org>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/dma/idxd/cdev.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/drivers/dma/idxd/cdev.c b/drivers/dma/idxd/cdev.c
+index ba53675ced55a..6cfcef3cf4cd1 100644
+--- a/drivers/dma/idxd/cdev.c
++++ b/drivers/dma/idxd/cdev.c
+@@ -505,7 +505,7 @@ static __poll_t idxd_cdev_poll(struct file *filp,
+       __poll_t out = 0;
+       if (current->mm != ctx->mm)
+-              return -EPERM;
++              return POLLNVAL;
+       poll_wait(filp, &wq->err_queue, wait);
+       spin_lock(&idxd->dev_lock);
+-- 
+2.39.5
+
diff --git a/queue-6.6/espintcp-remove-encap-socket-caching-to-avoid-refere.patch b/queue-6.6/espintcp-remove-encap-socket-caching-to-avoid-refere.patch
new file mode 100644 (file)
index 0000000..6b0408e
--- /dev/null
@@ -0,0 +1,252 @@
+From 04709d52eafd133653fe2fc9a892a5b7b32b17ce Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Wed, 9 Apr 2025 15:59:57 +0200
+Subject: espintcp: remove encap socket caching to avoid reference leak
+
+From: Sabrina Dubroca <sd@queasysnail.net>
+
+[ Upstream commit 028363685bd0b7a19b4a820f82dd905b1dc83999 ]
+
+The current scheme for caching the encap socket can lead to reference
+leaks when we try to delete the netns.
+
+The reference chain is: xfrm_state -> enacp_sk -> netns
+
+Since the encap socket is a userspace socket, it holds a reference on
+the netns. If we delete the espintcp state (through flush or
+individual delete) before removing the netns, the reference on the
+socket is dropped and the netns is correctly deleted. Otherwise, the
+netns may not be reachable anymore (if all processes within the ns
+have terminated), so we cannot delete the xfrm state to drop its
+reference on the socket.
+
+This patch results in a small (~2% in my tests) performance
+regression.
+
+A GC-type mechanism could be added for the socket cache, to clear
+references if the state hasn't been used "recently", but it's a lot
+more complex than just not caching the socket.
+
+Fixes: e27cca96cd68 ("xfrm: add espintcp (RFC 8229)")
+Signed-off-by: Sabrina Dubroca <sd@queasysnail.net>
+Reviewed-by: Simon Horman <horms@kernel.org>
+Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ include/net/xfrm.h    |  1 -
+ net/ipv4/esp4.c       | 49 ++++---------------------------------------
+ net/ipv6/esp6.c       | 49 ++++---------------------------------------
+ net/xfrm/xfrm_state.c |  3 ---
+ 4 files changed, 8 insertions(+), 94 deletions(-)
+
+diff --git a/include/net/xfrm.h b/include/net/xfrm.h
+index b33d27e42cff3..fd550c0b56345 100644
+--- a/include/net/xfrm.h
++++ b/include/net/xfrm.h
+@@ -228,7 +228,6 @@ struct xfrm_state {
+       /* Data for encapsulator */
+       struct xfrm_encap_tmpl  *encap;
+-      struct sock __rcu       *encap_sk;
+       /* Data for care-of address */
+       xfrm_address_t  *coaddr;
+diff --git a/net/ipv4/esp4.c b/net/ipv4/esp4.c
+index eeace9b509cec..49fd664f50fc0 100644
+--- a/net/ipv4/esp4.c
++++ b/net/ipv4/esp4.c
+@@ -118,47 +118,16 @@ static void esp_ssg_unref(struct xfrm_state *x, void *tmp, struct sk_buff *skb)
+ }
+ #ifdef CONFIG_INET_ESPINTCP
+-struct esp_tcp_sk {
+-      struct sock *sk;
+-      struct rcu_head rcu;
+-};
+-
+-static void esp_free_tcp_sk(struct rcu_head *head)
+-{
+-      struct esp_tcp_sk *esk = container_of(head, struct esp_tcp_sk, rcu);
+-
+-      sock_put(esk->sk);
+-      kfree(esk);
+-}
+-
+ static struct sock *esp_find_tcp_sk(struct xfrm_state *x)
+ {
+       struct xfrm_encap_tmpl *encap = x->encap;
+       struct net *net = xs_net(x);
+-      struct esp_tcp_sk *esk;
+       __be16 sport, dport;
+-      struct sock *nsk;
+       struct sock *sk;
+-      sk = rcu_dereference(x->encap_sk);
+-      if (sk && sk->sk_state == TCP_ESTABLISHED)
+-              return sk;
+-
+       spin_lock_bh(&x->lock);
+       sport = encap->encap_sport;
+       dport = encap->encap_dport;
+-      nsk = rcu_dereference_protected(x->encap_sk,
+-                                      lockdep_is_held(&x->lock));
+-      if (sk && sk == nsk) {
+-              esk = kmalloc(sizeof(*esk), GFP_ATOMIC);
+-              if (!esk) {
+-                      spin_unlock_bh(&x->lock);
+-                      return ERR_PTR(-ENOMEM);
+-              }
+-              RCU_INIT_POINTER(x->encap_sk, NULL);
+-              esk->sk = sk;
+-              call_rcu(&esk->rcu, esp_free_tcp_sk);
+-      }
+       spin_unlock_bh(&x->lock);
+       sk = inet_lookup_established(net, net->ipv4.tcp_death_row.hashinfo, x->id.daddr.a4,
+@@ -171,20 +140,6 @@ static struct sock *esp_find_tcp_sk(struct xfrm_state *x)
+               return ERR_PTR(-EINVAL);
+       }
+-      spin_lock_bh(&x->lock);
+-      nsk = rcu_dereference_protected(x->encap_sk,
+-                                      lockdep_is_held(&x->lock));
+-      if (encap->encap_sport != sport ||
+-          encap->encap_dport != dport) {
+-              sock_put(sk);
+-              sk = nsk ?: ERR_PTR(-EREMCHG);
+-      } else if (sk == nsk) {
+-              sock_put(sk);
+-      } else {
+-              rcu_assign_pointer(x->encap_sk, sk);
+-      }
+-      spin_unlock_bh(&x->lock);
+-
+       return sk;
+ }
+@@ -207,6 +162,8 @@ static int esp_output_tcp_finish(struct xfrm_state *x, struct sk_buff *skb)
+               err = espintcp_push_skb(sk, skb);
+       bh_unlock_sock(sk);
++      sock_put(sk);
++
+ out:
+       rcu_read_unlock();
+       return err;
+@@ -391,6 +348,8 @@ static struct ip_esp_hdr *esp_output_tcp_encap(struct xfrm_state *x,
+       if (IS_ERR(sk))
+               return ERR_CAST(sk);
++      sock_put(sk);
++
+       *lenp = htons(len);
+       esph = (struct ip_esp_hdr *)(lenp + 1);
+diff --git a/net/ipv6/esp6.c b/net/ipv6/esp6.c
+index 62bb9651133c4..7e4c8628cf983 100644
+--- a/net/ipv6/esp6.c
++++ b/net/ipv6/esp6.c
+@@ -135,47 +135,16 @@ static void esp_ssg_unref(struct xfrm_state *x, void *tmp, struct sk_buff *skb)
+ }
+ #ifdef CONFIG_INET6_ESPINTCP
+-struct esp_tcp_sk {
+-      struct sock *sk;
+-      struct rcu_head rcu;
+-};
+-
+-static void esp_free_tcp_sk(struct rcu_head *head)
+-{
+-      struct esp_tcp_sk *esk = container_of(head, struct esp_tcp_sk, rcu);
+-
+-      sock_put(esk->sk);
+-      kfree(esk);
+-}
+-
+ static struct sock *esp6_find_tcp_sk(struct xfrm_state *x)
+ {
+       struct xfrm_encap_tmpl *encap = x->encap;
+       struct net *net = xs_net(x);
+-      struct esp_tcp_sk *esk;
+       __be16 sport, dport;
+-      struct sock *nsk;
+       struct sock *sk;
+-      sk = rcu_dereference(x->encap_sk);
+-      if (sk && sk->sk_state == TCP_ESTABLISHED)
+-              return sk;
+-
+       spin_lock_bh(&x->lock);
+       sport = encap->encap_sport;
+       dport = encap->encap_dport;
+-      nsk = rcu_dereference_protected(x->encap_sk,
+-                                      lockdep_is_held(&x->lock));
+-      if (sk && sk == nsk) {
+-              esk = kmalloc(sizeof(*esk), GFP_ATOMIC);
+-              if (!esk) {
+-                      spin_unlock_bh(&x->lock);
+-                      return ERR_PTR(-ENOMEM);
+-              }
+-              RCU_INIT_POINTER(x->encap_sk, NULL);
+-              esk->sk = sk;
+-              call_rcu(&esk->rcu, esp_free_tcp_sk);
+-      }
+       spin_unlock_bh(&x->lock);
+       sk = __inet6_lookup_established(net, net->ipv4.tcp_death_row.hashinfo, &x->id.daddr.in6,
+@@ -188,20 +157,6 @@ static struct sock *esp6_find_tcp_sk(struct xfrm_state *x)
+               return ERR_PTR(-EINVAL);
+       }
+-      spin_lock_bh(&x->lock);
+-      nsk = rcu_dereference_protected(x->encap_sk,
+-                                      lockdep_is_held(&x->lock));
+-      if (encap->encap_sport != sport ||
+-          encap->encap_dport != dport) {
+-              sock_put(sk);
+-              sk = nsk ?: ERR_PTR(-EREMCHG);
+-      } else if (sk == nsk) {
+-              sock_put(sk);
+-      } else {
+-              rcu_assign_pointer(x->encap_sk, sk);
+-      }
+-      spin_unlock_bh(&x->lock);
+-
+       return sk;
+ }
+@@ -224,6 +179,8 @@ static int esp_output_tcp_finish(struct xfrm_state *x, struct sk_buff *skb)
+               err = espintcp_push_skb(sk, skb);
+       bh_unlock_sock(sk);
++      sock_put(sk);
++
+ out:
+       rcu_read_unlock();
+       return err;
+@@ -427,6 +384,8 @@ static struct ip_esp_hdr *esp6_output_tcp_encap(struct xfrm_state *x,
+       if (IS_ERR(sk))
+               return ERR_CAST(sk);
++      sock_put(sk);
++
+       *lenp = htons(len);
+       esph = (struct ip_esp_hdr *)(lenp + 1);
+diff --git a/net/xfrm/xfrm_state.c b/net/xfrm/xfrm_state.c
+index 8a6e8656d014f..7222ba50390d6 100644
+--- a/net/xfrm/xfrm_state.c
++++ b/net/xfrm/xfrm_state.c
+@@ -754,9 +754,6 @@ int __xfrm_state_delete(struct xfrm_state *x)
+               net->xfrm.state_num--;
+               spin_unlock(&net->xfrm.xfrm_state_lock);
+-              if (x->encap_sk)
+-                      sock_put(rcu_dereference_raw(x->encap_sk));
+-
+               xfrm_dev_state_delete(x);
+               /* All xfrm_state objects are created by xfrm_state_alloc.
+-- 
+2.39.5
+
diff --git a/queue-6.6/ice-fix-lacp-bonds-without-sriov-environment.patch b/queue-6.6/ice-fix-lacp-bonds-without-sriov-environment.patch
new file mode 100644 (file)
index 0000000..45fdb30
--- /dev/null
@@ -0,0 +1,68 @@
+From f2187682ddf613fffb776acfce70764735103e00 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Mon, 28 Apr 2025 15:33:39 -0400
+Subject: ice: Fix LACP bonds without SRIOV environment
+
+From: Dave Ertman <david.m.ertman@intel.com>
+
+[ Upstream commit 6c778f1b839b63525b30046c9d1899424a62be0a ]
+
+If an aggregate has the following conditions:
+- The SRIOV LAG DDP package has been enabled
+- The bond is in 802.3ad LACP mode
+- The bond is disqualified from supporting SRIOV VF LAG
+- Both interfaces were added simultaneously to the bond (same command)
+
+Then there is a chance that the two interfaces will be assigned different
+LACP Aggregator ID's.  This will cause a failure of the LACP control over
+the bond.
+
+To fix this, we can detect if the primary interface for the bond (as
+defined by the driver) is not in switchdev mode, and exit the setup flow
+if so.
+
+Reproduction steps:
+
+%> ip link add bond0 type bond mode 802.3ad miimon 100
+%> ip link set bond0 up
+%> ifenslave bond0 eth0 eth1
+%> cat /proc/net/bonding/bond0 | grep Agg
+
+Check for Aggregator IDs that differ.
+
+Fixes: ec5a6c5f79ed ("ice: process events created by lag netdev event handler")
+Reviewed-by: Aleksandr Loktionov <aleksandr.loktionov@intel.com>
+Signed-off-by: Dave Ertman <david.m.ertman@intel.com>
+Tested-by: Sujai Buvaneswaran <sujai.buvaneswaran@intel.com>
+Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/net/ethernet/intel/ice/ice_lag.c | 6 ++++++
+ 1 file changed, 6 insertions(+)
+
+diff --git a/drivers/net/ethernet/intel/ice/ice_lag.c b/drivers/net/ethernet/intel/ice/ice_lag.c
+index 4e675c7c199fa..4db0b770420e6 100644
+--- a/drivers/net/ethernet/intel/ice/ice_lag.c
++++ b/drivers/net/ethernet/intel/ice/ice_lag.c
+@@ -1229,12 +1229,18 @@ static void ice_lag_changeupper_event(struct ice_lag *lag, void *ptr)
+                */
+               if (!primary_lag) {
+                       lag->primary = true;
++                      if (!ice_is_switchdev_running(lag->pf))
++                              return;
++
+                       /* Configure primary's SWID to be shared */
+                       ice_lag_primary_swid(lag, true);
+                       primary_lag = lag;
+               } else {
+                       u16 swid;
++                      if (!ice_is_switchdev_running(primary_lag->pf))
++                              return;
++
+                       swid = primary_lag->pf->hw.port_info->sw_id;
+                       ice_lag_set_swid(swid, lag, true);
+                       ice_lag_add_prune_list(primary_lag, lag->pf);
+-- 
+2.39.5
+
diff --git a/queue-6.6/ice-fix-vf-num_mac-count-with-port-representors.patch b/queue-6.6/ice-fix-vf-num_mac-count-with-port-representors.patch
new file mode 100644 (file)
index 0000000..bcfcbd1
--- /dev/null
@@ -0,0 +1,53 @@
+From e7e16a2b64997ef86e4e1e9a640a2f0b95d04ee6 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Thu, 10 Apr 2025 11:13:52 -0700
+Subject: ice: fix vf->num_mac count with port representors
+
+From: Jacob Keller <jacob.e.keller@intel.com>
+
+[ Upstream commit bbd95160a03dbfcd01a541f25c27ddb730dfbbd5 ]
+
+The ice_vc_repr_add_mac() function indicates that it does not store the MAC
+address filters in the firmware. However, it still increments vf->num_mac.
+This is incorrect, as vf->num_mac should represent the number of MAC
+filters currently programmed to firmware.
+
+Indeed, we only perform this increment if the requested filter is a unicast
+address that doesn't match the existing vf->hw_lan_addr. In addition,
+ice_vc_repr_del_mac() does not decrement the vf->num_mac counter. This
+results in the counter becoming out of sync with the actual count.
+
+As it turns out, vf->num_mac is currently only used in legacy made without
+port representors. The single place where the value is checked is for
+enforcing a filter limit on untrusted VFs.
+
+Upcoming patches to support VF Live Migration will use this value when
+determining the size of the TLV for MAC address filters. Fix the
+representor mode function to stop incrementing the counter incorrectly.
+
+Fixes: ac19e03ef780 ("ice: allow process VF opcodes in different ways")
+Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
+Reviewed-by: Michal Swiatkowski <michal.swiatkowski@linux.intel.com>
+Reviewed-by: Simon Horman <horms@kernel.org>
+Tested-by: Sujai Buvaneswaran <sujai.buvaneswaran@intel.com>
+Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/net/ethernet/intel/ice/ice_virtchnl.c | 1 -
+ 1 file changed, 1 deletion(-)
+
+diff --git a/drivers/net/ethernet/intel/ice/ice_virtchnl.c b/drivers/net/ethernet/intel/ice/ice_virtchnl.c
+index e709b10a29761..1edcf93031831 100644
+--- a/drivers/net/ethernet/intel/ice/ice_virtchnl.c
++++ b/drivers/net/ethernet/intel/ice/ice_virtchnl.c
+@@ -3769,7 +3769,6 @@ static int ice_vc_repr_add_mac(struct ice_vf *vf, u8 *msg)
+               }
+               ice_vfhw_mac_add(vf, &al->list[i]);
+-              vf->num_mac++;
+               break;
+       }
+-- 
+2.39.5
+
diff --git a/queue-6.6/io_uring-fix-overflow-resched-cqe-reordering.patch b/queue-6.6/io_uring-fix-overflow-resched-cqe-reordering.patch
new file mode 100644 (file)
index 0000000..6fd2b16
--- /dev/null
@@ -0,0 +1,38 @@
+From 9bbc83156bb6af3abb359840b32836b7eb639968 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Sat, 17 May 2025 13:27:37 +0100
+Subject: io_uring: fix overflow resched cqe reordering
+
+From: Pavel Begunkov <asml.silence@gmail.com>
+
+[ Upstream commit a7d755ed9ce9738af3db602eb29d32774a180bc7 ]
+
+Leaving the CQ critical section in the middle of a overflow flushing
+can cause cqe reordering since the cache cq pointers are reset and any
+new cqe emitters that might get called in between are not going to be
+forced into io_cqe_cache_refill().
+
+Fixes: eac2ca2d682f9 ("io_uring: check if we need to reschedule during overflow flush")
+Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
+Link: https://lore.kernel.org/r/90ba817f1a458f091f355f407de1c911d2b93bbf.1747483784.git.asml.silence@gmail.com
+Signed-off-by: Jens Axboe <axboe@kernel.dk>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ io_uring/io_uring.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/io_uring/io_uring.c b/io_uring/io_uring.c
+index db592fa549b73..43b46098279a1 100644
+--- a/io_uring/io_uring.c
++++ b/io_uring/io_uring.c
+@@ -701,6 +701,7 @@ static void __io_cqring_overflow_flush(struct io_ring_ctx *ctx)
+                * to care for a non-real case.
+                */
+               if (need_resched()) {
++                      ctx->cqe_sentinel = ctx->cqe_cached;
+                       io_cq_unlock_post(ctx);
+                       mutex_unlock(&ctx->uring_lock);
+                       cond_resched();
+-- 
+2.39.5
+
diff --git a/queue-6.6/kernel-fork-only-call-untrack_pfn_clear-on-vmas-dupl.patch b/queue-6.6/kernel-fork-only-call-untrack_pfn_clear-on-vmas-dupl.patch
new file mode 100644 (file)
index 0000000..407e60d
--- /dev/null
@@ -0,0 +1,98 @@
+From a744dc3e6f81c452f2f4a0afdd362aefb6bf9fe4 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Tue, 22 Apr 2025 16:49:42 +0200
+Subject: kernel/fork: only call untrack_pfn_clear() on VMAs duplicated for
+ fork()
+
+From: David Hildenbrand <david@redhat.com>
+
+[ Upstream commit e9f180d7cfde23b9f8eebd60272465176373ab2c ]
+
+Not intuitive, but vm_area_dup() located in kernel/fork.c is not only used
+for duplicating VMAs during fork(), but also for duplicating VMAs when
+splitting VMAs or when mremap()'ing them.
+
+VM_PFNMAP mappings can at least get ordinarily mremap()'ed (no change in
+size) and apparently also shrunk during mremap(), which implies
+duplicating the VMA in __split_vma() first.
+
+In case of ordinary mremap() (no change in size), we first duplicate the
+VMA in copy_vma_and_data()->copy_vma() to then call untrack_pfn_clear() on
+the old VMA: we effectively move the VM_PAT reservation.  So the
+untrack_pfn_clear() call on the new VMA duplicating is wrong in that
+context.
+
+Splitting of VMAs seems problematic, because we don't duplicate/adjust the
+reservation when splitting the VMA.  Instead, in memtype_erase() -- called
+during zapping/munmap -- we shrink a reservation in case only the end
+address matches: Assume we split a VMA into A and B, both would share a
+reservation until B is unmapped.
+
+So when unmapping B, the reservation would be updated to cover only A.
+When unmapping A, we would properly remove the now-shrunk reservation.
+That scenario describes the mremap() shrinking (old_size > new_size),
+where we split + unmap B, and the untrack_pfn_clear() on the new VMA when
+is wrong.
+
+What if we manage to split a VM_PFNMAP VMA into A and B and unmap A first?
+It would be broken because we would never free the reservation.  Likely,
+there are ways to trigger such a VMA split outside of mremap().
+
+Affecting other VMA duplication was not intended, vm_area_dup() being used
+outside of kernel/fork.c was an oversight.  So let's fix that for; how to
+handle VMA splits better should be investigated separately.
+
+With a simple reproducer that uses mprotect() to split such a VMA I can
+trigger
+
+x86/PAT: pat_mremap:26448 freeing invalid memtype [mem 0x00000000-0x00000fff]
+
+Link: https://lkml.kernel.org/r/20250422144942.2871395-1-david@redhat.com
+Fixes: dc84bc2aba85 ("x86/mm/pat: Fix VM_PAT handling when fork() fails in copy_page_range()")
+Signed-off-by: David Hildenbrand <david@redhat.com>
+Reviewed-by: Lorenzo Stoakes <lorenzo.stoakes@oracle.com>
+Cc: Ingo Molnar <mingo@kernel.org>
+Cc: Dave Hansen <dave.hansen@linux.intel.com>
+Cc: Andy Lutomirski <luto@kernel.org>
+Cc: Peter Zijlstra <peterz@infradead.org>
+Cc: Thomas Gleixner <tglx@linutronix.de>
+Cc: Borislav Petkov <bp@alien8.de>
+Cc: Rik van Riel <riel@surriel.com>
+Cc: "H. Peter Anvin" <hpa@zytor.com>
+Cc: Linus Torvalds <torvalds@linux-foundation.org>
+Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ kernel/fork.c | 9 +++++----
+ 1 file changed, 5 insertions(+), 4 deletions(-)
+
+diff --git a/kernel/fork.c b/kernel/fork.c
+index 97f433fb4b5ef..7966c9a1c163d 100644
+--- a/kernel/fork.c
++++ b/kernel/fork.c
+@@ -518,10 +518,6 @@ struct vm_area_struct *vm_area_dup(struct vm_area_struct *orig)
+       vma_numab_state_init(new);
+       dup_anon_vma_name(orig, new);
+-      /* track_pfn_copy() will later take care of copying internal state. */
+-      if (unlikely(new->vm_flags & VM_PFNMAP))
+-              untrack_pfn_clear(new);
+-
+       return new;
+ }
+@@ -715,6 +711,11 @@ static __latent_entropy int dup_mmap(struct mm_struct *mm,
+               tmp = vm_area_dup(mpnt);
+               if (!tmp)
+                       goto fail_nomem;
++
++              /* track_pfn_copy() will later take care of copying internal state. */
++              if (unlikely(tmp->vm_flags & VM_PFNMAP))
++                      untrack_pfn_clear(tmp);
++
+               retval = vma_dup_policy(mpnt, tmp);
+               if (retval)
+                       goto fail_nomem_policy;
+-- 
+2.39.5
+
diff --git a/queue-6.6/net-dwmac-sun8i-use-parsed-internal-phy-address-inst.patch b/queue-6.6/net-dwmac-sun8i-use-parsed-internal-phy-address-inst.patch
new file mode 100644 (file)
index 0000000..8f2d045
--- /dev/null
@@ -0,0 +1,48 @@
+From 5cde5b537c820fcf36674c3a7145523678e733d9 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Mon, 19 May 2025 18:49:36 +0200
+Subject: net: dwmac-sun8i: Use parsed internal PHY address instead of 1
+
+From: Paul Kocialkowski <paulk@sys-base.io>
+
+[ Upstream commit 47653e4243f2b0a26372e481ca098936b51ec3a8 ]
+
+While the MDIO address of the internal PHY on Allwinner sun8i chips is
+generally 1, of_mdio_parse_addr is used to cleanly parse the address
+from the device-tree instead of hardcoding it.
+
+A commit reworking the code ditched the parsed value and hardcoded the
+value 1 instead, which didn't really break anything but is more fragile
+and not future-proof.
+
+Restore the initial behavior using the parsed address returned from the
+helper.
+
+Fixes: 634db83b8265 ("net: stmmac: dwmac-sun8i: Handle integrated/external MDIOs")
+Signed-off-by: Paul Kocialkowski <paulk@sys-base.io>
+Reviewed-by: Andrew Lunn <andrew@lunn.ch>
+Acked-by: Corentin LABBE <clabbe.montjoie@gmail.com>
+Tested-by: Corentin LABBE <clabbe.montjoie@gmail.com>
+Link: https://patch.msgid.link/20250519164936.4172658-1-paulk@sys-base.io
+Signed-off-by: Jakub Kicinski <kuba@kernel.org>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c
+index 63998d65fef8e..9377b05bfc71e 100644
+--- a/drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c
++++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c
+@@ -966,7 +966,7 @@ static int sun8i_dwmac_set_syscon(struct device *dev,
+               /* of_mdio_parse_addr returns a valid (0 ~ 31) PHY
+                * address. No need to mask it again.
+                */
+-              reg |= 1 << H3_EPHY_ADDR_SHIFT;
++              reg |= ret << H3_EPHY_ADDR_SHIFT;
+       } else {
+               /* For SoCs without internal PHY the PHY selection bit should be
+                * set to 0 (external PHY).
+-- 
+2.39.5
+
diff --git a/queue-6.6/net-lan743x-restore-sgmii-ctrl-register-on-resume.patch b/queue-6.6/net-lan743x-restore-sgmii-ctrl-register-on-resume.patch
new file mode 100644 (file)
index 0000000..6a60a12
--- /dev/null
@@ -0,0 +1,92 @@
+From b0e8ed107fc8f2dbf40f4e329132ad6716b167fc Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Fri, 16 May 2025 09:27:19 +0530
+Subject: net: lan743x: Restore SGMII CTRL register on resume
+
+From: Thangaraj Samynathan <thangaraj.s@microchip.com>
+
+[ Upstream commit 293e38ff4e4c2ba53f3fd47d8a4a9f0f0414a7a6 ]
+
+SGMII_CTRL register, which specifies the active interface, was not
+properly restored when resuming from suspend. This led to incorrect
+interface selection after resume particularly in scenarios involving
+the FPGA.
+
+To fix this:
+- Move the SGMII_CTRL setup out of the probe function.
+- Initialize the register in the hardware initialization helper function,
+which is called during both device initialization and resume.
+
+This ensures the interface configuration is consistently restored after
+suspend/resume cycles.
+
+Fixes: a46d9d37c4f4f ("net: lan743x: Add support for SGMII interface")
+Signed-off-by: Thangaraj Samynathan <thangaraj.s@microchip.com>
+Link: https://patch.msgid.link/20250516035719.117960-1-thangaraj.s@microchip.com
+Signed-off-by: Jakub Kicinski <kuba@kernel.org>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/net/ethernet/microchip/lan743x_main.c | 19 ++++++++++---------
+ 1 file changed, 10 insertions(+), 9 deletions(-)
+
+diff --git a/drivers/net/ethernet/microchip/lan743x_main.c b/drivers/net/ethernet/microchip/lan743x_main.c
+index 5d2ceff72784f..f971d60484f06 100644
+--- a/drivers/net/ethernet/microchip/lan743x_main.c
++++ b/drivers/net/ethernet/microchip/lan743x_main.c
+@@ -3259,6 +3259,7 @@ static int lan743x_hardware_init(struct lan743x_adapter *adapter,
+                                struct pci_dev *pdev)
+ {
+       struct lan743x_tx *tx;
++      u32 sgmii_ctl;
+       int index;
+       int ret;
+@@ -3271,6 +3272,15 @@ static int lan743x_hardware_init(struct lan743x_adapter *adapter,
+               spin_lock_init(&adapter->eth_syslock_spinlock);
+               mutex_init(&adapter->sgmii_rw_lock);
+               pci11x1x_set_rfe_rd_fifo_threshold(adapter);
++              sgmii_ctl = lan743x_csr_read(adapter, SGMII_CTL);
++              if (adapter->is_sgmii_en) {
++                      sgmii_ctl |= SGMII_CTL_SGMII_ENABLE_;
++                      sgmii_ctl &= ~SGMII_CTL_SGMII_POWER_DN_;
++              } else {
++                      sgmii_ctl &= ~SGMII_CTL_SGMII_ENABLE_;
++                      sgmii_ctl |= SGMII_CTL_SGMII_POWER_DN_;
++              }
++              lan743x_csr_write(adapter, SGMII_CTL, sgmii_ctl);
+       } else {
+               adapter->max_tx_channels = LAN743X_MAX_TX_CHANNELS;
+               adapter->used_tx_channels = LAN743X_USED_TX_CHANNELS;
+@@ -3319,7 +3329,6 @@ static int lan743x_hardware_init(struct lan743x_adapter *adapter,
+ static int lan743x_mdiobus_init(struct lan743x_adapter *adapter)
+ {
+-      u32 sgmii_ctl;
+       int ret;
+       adapter->mdiobus = devm_mdiobus_alloc(&adapter->pdev->dev);
+@@ -3331,10 +3340,6 @@ static int lan743x_mdiobus_init(struct lan743x_adapter *adapter)
+       adapter->mdiobus->priv = (void *)adapter;
+       if (adapter->is_pci11x1x) {
+               if (adapter->is_sgmii_en) {
+-                      sgmii_ctl = lan743x_csr_read(adapter, SGMII_CTL);
+-                      sgmii_ctl |= SGMII_CTL_SGMII_ENABLE_;
+-                      sgmii_ctl &= ~SGMII_CTL_SGMII_POWER_DN_;
+-                      lan743x_csr_write(adapter, SGMII_CTL, sgmii_ctl);
+                       netif_dbg(adapter, drv, adapter->netdev,
+                                 "SGMII operation\n");
+                       adapter->mdiobus->read = lan743x_mdiobus_read_c22;
+@@ -3345,10 +3350,6 @@ static int lan743x_mdiobus_init(struct lan743x_adapter *adapter)
+                       netif_dbg(adapter, drv, adapter->netdev,
+                                 "lan743x-mdiobus-c45\n");
+               } else {
+-                      sgmii_ctl = lan743x_csr_read(adapter, SGMII_CTL);
+-                      sgmii_ctl &= ~SGMII_CTL_SGMII_ENABLE_;
+-                      sgmii_ctl |= SGMII_CTL_SGMII_POWER_DN_;
+-                      lan743x_csr_write(adapter, SGMII_CTL, sgmii_ctl);
+                       netif_dbg(adapter, drv, adapter->netdev,
+                                 "RGMII operation\n");
+                       // Only C22 support when RGMII I/F
+-- 
+2.39.5
+
diff --git a/queue-6.6/net-tipc-fix-slab-use-after-free-read-in-tipc_aead_e.patch b/queue-6.6/net-tipc-fix-slab-use-after-free-read-in-tipc_aead_e.patch
new file mode 100644 (file)
index 0000000..6de4da0
--- /dev/null
@@ -0,0 +1,125 @@
+From e0bb1a0a2c2aae290f4687a0658f031c3af3dee2 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Tue, 20 May 2025 18:14:04 +0800
+Subject: net/tipc: fix slab-use-after-free Read in tipc_aead_encrypt_done
+
+From: Wang Liang <wangliang74@huawei.com>
+
+[ Upstream commit e279024617134c94fd3e37470156534d5f2b3472 ]
+
+Syzbot reported a slab-use-after-free with the following call trace:
+
+  ==================================================================
+  BUG: KASAN: slab-use-after-free in tipc_aead_encrypt_done+0x4bd/0x510 net/tipc/crypto.c:840
+  Read of size 8 at addr ffff88807a733000 by task kworker/1:0/25
+
+  Call Trace:
+   kasan_report+0xd9/0x110 mm/kasan/report.c:601
+   tipc_aead_encrypt_done+0x4bd/0x510 net/tipc/crypto.c:840
+   crypto_request_complete include/crypto/algapi.h:266
+   aead_request_complete include/crypto/internal/aead.h:85
+   cryptd_aead_crypt+0x3b8/0x750 crypto/cryptd.c:772
+   crypto_request_complete include/crypto/algapi.h:266
+   cryptd_queue_worker+0x131/0x200 crypto/cryptd.c:181
+   process_one_work+0x9fb/0x1b60 kernel/workqueue.c:3231
+
+  Allocated by task 8355:
+   kzalloc_noprof include/linux/slab.h:778
+   tipc_crypto_start+0xcc/0x9e0 net/tipc/crypto.c:1466
+   tipc_init_net+0x2dd/0x430 net/tipc/core.c:72
+   ops_init+0xb9/0x650 net/core/net_namespace.c:139
+   setup_net+0x435/0xb40 net/core/net_namespace.c:343
+   copy_net_ns+0x2f0/0x670 net/core/net_namespace.c:508
+   create_new_namespaces+0x3ea/0xb10 kernel/nsproxy.c:110
+   unshare_nsproxy_namespaces+0xc0/0x1f0 kernel/nsproxy.c:228
+   ksys_unshare+0x419/0x970 kernel/fork.c:3323
+   __do_sys_unshare kernel/fork.c:3394
+
+  Freed by task 63:
+   kfree+0x12a/0x3b0 mm/slub.c:4557
+   tipc_crypto_stop+0x23c/0x500 net/tipc/crypto.c:1539
+   tipc_exit_net+0x8c/0x110 net/tipc/core.c:119
+   ops_exit_list+0xb0/0x180 net/core/net_namespace.c:173
+   cleanup_net+0x5b7/0xbf0 net/core/net_namespace.c:640
+   process_one_work+0x9fb/0x1b60 kernel/workqueue.c:3231
+
+After freed the tipc_crypto tx by delete namespace, tipc_aead_encrypt_done
+may still visit it in cryptd_queue_worker workqueue.
+
+I reproduce this issue by:
+  ip netns add ns1
+  ip link add veth1 type veth peer name veth2
+  ip link set veth1 netns ns1
+  ip netns exec ns1 tipc bearer enable media eth dev veth1
+  ip netns exec ns1 tipc node set key this_is_a_master_key master
+  ip netns exec ns1 tipc bearer disable media eth dev veth1
+  ip netns del ns1
+
+The key of reproduction is that, simd_aead_encrypt is interrupted, leading
+to crypto_simd_usable() return false. Thus, the cryptd_queue_worker is
+triggered, and the tipc_crypto tx will be visited.
+
+  tipc_disc_timeout
+    tipc_bearer_xmit_skb
+      tipc_crypto_xmit
+        tipc_aead_encrypt
+          crypto_aead_encrypt
+            // encrypt()
+            simd_aead_encrypt
+              // crypto_simd_usable() is false
+              child = &ctx->cryptd_tfm->base;
+
+  simd_aead_encrypt
+    crypto_aead_encrypt
+      // encrypt()
+      cryptd_aead_encrypt_enqueue
+        cryptd_aead_enqueue
+          cryptd_enqueue_request
+            // trigger cryptd_queue_worker
+            queue_work_on(smp_processor_id(), cryptd_wq, &cpu_queue->work)
+
+Fix this by holding net reference count before encrypt.
+
+Reported-by: syzbot+55c12726619ff85ce1f6@syzkaller.appspotmail.com
+Closes: https://syzkaller.appspot.com/bug?extid=55c12726619ff85ce1f6
+Fixes: fc1b6d6de220 ("tipc: introduce TIPC encryption & authentication")
+Signed-off-by: Wang Liang <wangliang74@huawei.com>
+Link: https://patch.msgid.link/20250520101404.1341730-1-wangliang74@huawei.com
+Signed-off-by: Paolo Abeni <pabeni@redhat.com>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ net/tipc/crypto.c | 5 +++++
+ 1 file changed, 5 insertions(+)
+
+diff --git a/net/tipc/crypto.c b/net/tipc/crypto.c
+index c524421ec6525..8584893b47851 100644
+--- a/net/tipc/crypto.c
++++ b/net/tipc/crypto.c
+@@ -817,12 +817,16 @@ static int tipc_aead_encrypt(struct tipc_aead *aead, struct sk_buff *skb,
+               goto exit;
+       }
++      /* Get net to avoid freed tipc_crypto when delete namespace */
++      get_net(aead->crypto->net);
++
+       /* Now, do encrypt */
+       rc = crypto_aead_encrypt(req);
+       if (rc == -EINPROGRESS || rc == -EBUSY)
+               return rc;
+       tipc_bearer_put(b);
++      put_net(aead->crypto->net);
+ exit:
+       kfree(ctx);
+@@ -860,6 +864,7 @@ static void tipc_aead_encrypt_done(void *data, int err)
+       kfree(tx_ctx);
+       tipc_bearer_put(b);
+       tipc_aead_put(aead);
++      put_net(net);
+ }
+ /**
+-- 
+2.39.5
+
diff --git a/queue-6.6/octeontx2-af-fix-apr-entry-mapping-based-on-apr_lmt_.patch b/queue-6.6/octeontx2-af-fix-apr-entry-mapping-based-on-apr_lmt_.patch
new file mode 100644 (file)
index 0000000..00fcb9e
--- /dev/null
@@ -0,0 +1,111 @@
+From f3336f2bd3815fa8cdd75dfb03a721308128d3e6 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Wed, 21 May 2025 11:38:34 +0530
+Subject: octeontx2-af: Fix APR entry mapping based on APR_LMT_CFG
+
+From: Geetha sowjanya <gakula@marvell.com>
+
+[ Upstream commit a6ae7129819ad20788e610261246e71736543b8b ]
+
+The current implementation maps the APR table using a fixed size,
+which can lead to incorrect mapping when the number of PFs and VFs
+varies.
+This patch corrects the mapping by calculating the APR table
+size dynamically based on the values configured in the
+APR_LMT_CFG register, ensuring accurate representation
+of APR entries in debugfs.
+
+Fixes: 0daa55d033b0 ("octeontx2-af: cn10k: debugfs for dumping LMTST map table").
+Signed-off-by: Geetha sowjanya <gakula@marvell.com>
+Link: https://patch.msgid.link/20250521060834.19780-3-gakula@marvell.com
+Signed-off-by: Paolo Abeni <pabeni@redhat.com>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/net/ethernet/marvell/octeontx2/af/rvu_cn10k.c |  9 ++++++---
+ .../net/ethernet/marvell/octeontx2/af/rvu_debugfs.c   | 11 ++++++++---
+ 2 files changed, 14 insertions(+), 6 deletions(-)
+
+diff --git a/drivers/net/ethernet/marvell/octeontx2/af/rvu_cn10k.c b/drivers/net/ethernet/marvell/octeontx2/af/rvu_cn10k.c
+index de91053ad5a3d..1e4cd4f7d0cfd 100644
+--- a/drivers/net/ethernet/marvell/octeontx2/af/rvu_cn10k.c
++++ b/drivers/net/ethernet/marvell/octeontx2/af/rvu_cn10k.c
+@@ -13,7 +13,6 @@
+ /* RVU LMTST */
+ #define LMT_TBL_OP_READ               0
+ #define LMT_TBL_OP_WRITE      1
+-#define LMT_MAP_TABLE_SIZE    (128 * 1024)
+ #define LMT_MAPTBL_ENTRY_SIZE 16
+ #define LMT_MAX_VFS           256
+@@ -26,10 +25,14 @@ static int lmtst_map_table_ops(struct rvu *rvu, u32 index, u64 *val,
+ {
+       void __iomem *lmt_map_base;
+       u64 tbl_base, cfg;
++      int pfs, vfs;
+       tbl_base = rvu_read64(rvu, BLKADDR_APR, APR_AF_LMT_MAP_BASE);
++      cfg  = rvu_read64(rvu, BLKADDR_APR, APR_AF_LMT_CFG);
++      vfs = 1 << (cfg & 0xF);
++      pfs = 1 << ((cfg >> 4) & 0x7);
+-      lmt_map_base = ioremap_wc(tbl_base, LMT_MAP_TABLE_SIZE);
++      lmt_map_base = ioremap_wc(tbl_base, pfs * vfs * LMT_MAPTBL_ENTRY_SIZE);
+       if (!lmt_map_base) {
+               dev_err(rvu->dev, "Failed to setup lmt map table mapping!!\n");
+               return -ENOMEM;
+@@ -80,7 +83,7 @@ static int rvu_get_lmtaddr(struct rvu *rvu, u16 pcifunc,
+       mutex_lock(&rvu->rsrc_lock);
+       rvu_write64(rvu, BLKADDR_RVUM, RVU_AF_SMMU_ADDR_REQ, iova);
+-      pf = rvu_get_pf(pcifunc) & 0x1F;
++      pf = rvu_get_pf(pcifunc) & RVU_PFVF_PF_MASK;
+       val = BIT_ULL(63) | BIT_ULL(14) | BIT_ULL(13) | pf << 8 |
+             ((pcifunc & RVU_PFVF_FUNC_MASK) & 0xFF);
+       rvu_write64(rvu, BLKADDR_RVUM, RVU_AF_SMMU_TXN_REQ, val);
+diff --git a/drivers/net/ethernet/marvell/octeontx2/af/rvu_debugfs.c b/drivers/net/ethernet/marvell/octeontx2/af/rvu_debugfs.c
+index feca86e429df2..56dab11833b53 100644
+--- a/drivers/net/ethernet/marvell/octeontx2/af/rvu_debugfs.c
++++ b/drivers/net/ethernet/marvell/octeontx2/af/rvu_debugfs.c
+@@ -580,6 +580,7 @@ static ssize_t rvu_dbg_lmtst_map_table_display(struct file *filp,
+       u64 lmt_addr, val, tbl_base;
+       int pf, vf, num_vfs, hw_vfs;
+       void __iomem *lmt_map_base;
++      int apr_pfs, apr_vfs;
+       int buf_size = 10240;
+       size_t off = 0;
+       int index = 0;
+@@ -595,8 +596,12 @@ static ssize_t rvu_dbg_lmtst_map_table_display(struct file *filp,
+               return -ENOMEM;
+       tbl_base = rvu_read64(rvu, BLKADDR_APR, APR_AF_LMT_MAP_BASE);
++      val  = rvu_read64(rvu, BLKADDR_APR, APR_AF_LMT_CFG);
++      apr_vfs = 1 << (val & 0xF);
++      apr_pfs = 1 << ((val >> 4) & 0x7);
+-      lmt_map_base = ioremap_wc(tbl_base, 128 * 1024);
++      lmt_map_base = ioremap_wc(tbl_base, apr_pfs * apr_vfs *
++                                LMT_MAPTBL_ENTRY_SIZE);
+       if (!lmt_map_base) {
+               dev_err(rvu->dev, "Failed to setup lmt map table mapping!!\n");
+               kfree(buf);
+@@ -618,7 +623,7 @@ static ssize_t rvu_dbg_lmtst_map_table_display(struct file *filp,
+               off += scnprintf(&buf[off], buf_size - 1 - off, "PF%d  \t\t\t",
+                                   pf);
+-              index = pf * rvu->hw->total_vfs * LMT_MAPTBL_ENTRY_SIZE;
++              index = pf * apr_vfs * LMT_MAPTBL_ENTRY_SIZE;
+               off += scnprintf(&buf[off], buf_size - 1 - off, " 0x%llx\t\t",
+                                (tbl_base + index));
+               lmt_addr = readq(lmt_map_base + index);
+@@ -631,7 +636,7 @@ static ssize_t rvu_dbg_lmtst_map_table_display(struct file *filp,
+               /* Reading num of VFs per PF */
+               rvu_get_pf_numvfs(rvu, pf, &num_vfs, &hw_vfs);
+               for (vf = 0; vf < num_vfs; vf++) {
+-                      index = (pf * rvu->hw->total_vfs * 16) +
++                      index = (pf * apr_vfs * LMT_MAPTBL_ENTRY_SIZE) +
+                               ((vf + 1)  * LMT_MAPTBL_ENTRY_SIZE);
+                       off += scnprintf(&buf[off], buf_size - 1 - off,
+                                           "PF%d:VF%d  \t\t", pf, vf);
+-- 
+2.39.5
+
diff --git a/queue-6.6/octeontx2-af-set-lmt_ena-bit-for-apr-table-entries.patch b/queue-6.6/octeontx2-af-set-lmt_ena-bit-for-apr-table-entries.patch
new file mode 100644 (file)
index 0000000..ef21302
--- /dev/null
@@ -0,0 +1,76 @@
+From 36796bb45c5660d5f1114d46ee93ca371e7bc3b9 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Wed, 21 May 2025 11:38:33 +0530
+Subject: octeontx2-af: Set LMT_ENA bit for APR table entries
+
+From: Subbaraya Sundeep <sbhatta@marvell.com>
+
+[ Upstream commit 0eefa27b493306928d88af6368193b134c98fd64 ]
+
+This patch enables the LMT line for a PF/VF by setting the
+LMT_ENA bit in the APR_LMT_MAP_ENTRY_S structure.
+
+Additionally, it simplifies the logic for calculating the
+LMTST table index by consistently using the maximum
+number of hw supported VFs (i.e., 256).
+
+Fixes: 873a1e3d207a ("octeontx2-af: cn10k: Setting up lmtst map table").
+Signed-off-by: Subbaraya Sundeep <sbhatta@marvell.com>
+Signed-off-by: Geetha sowjanya <gakula@marvell.com>
+Reviewed-by: Michal Swiatkowski <michal.swiatkowski@linux.intel.com>
+Link: https://patch.msgid.link/20250521060834.19780-2-gakula@marvell.com
+Signed-off-by: Paolo Abeni <pabeni@redhat.com>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ .../net/ethernet/marvell/octeontx2/af/rvu_cn10k.c | 15 +++++++++++++--
+ 1 file changed, 13 insertions(+), 2 deletions(-)
+
+diff --git a/drivers/net/ethernet/marvell/octeontx2/af/rvu_cn10k.c b/drivers/net/ethernet/marvell/octeontx2/af/rvu_cn10k.c
+index 0e74c5a2231e6..de91053ad5a3d 100644
+--- a/drivers/net/ethernet/marvell/octeontx2/af/rvu_cn10k.c
++++ b/drivers/net/ethernet/marvell/octeontx2/af/rvu_cn10k.c
+@@ -15,13 +15,17 @@
+ #define LMT_TBL_OP_WRITE      1
+ #define LMT_MAP_TABLE_SIZE    (128 * 1024)
+ #define LMT_MAPTBL_ENTRY_SIZE 16
++#define LMT_MAX_VFS           256
++
++#define LMT_MAP_ENTRY_ENA      BIT_ULL(20)
++#define LMT_MAP_ENTRY_LINES    GENMASK_ULL(18, 16)
+ /* Function to perform operations (read/write) on lmtst map table */
+ static int lmtst_map_table_ops(struct rvu *rvu, u32 index, u64 *val,
+                              int lmt_tbl_op)
+ {
+       void __iomem *lmt_map_base;
+-      u64 tbl_base;
++      u64 tbl_base, cfg;
+       tbl_base = rvu_read64(rvu, BLKADDR_APR, APR_AF_LMT_MAP_BASE);
+@@ -35,6 +39,13 @@ static int lmtst_map_table_ops(struct rvu *rvu, u32 index, u64 *val,
+               *val = readq(lmt_map_base + index);
+       } else {
+               writeq((*val), (lmt_map_base + index));
++
++              cfg = FIELD_PREP(LMT_MAP_ENTRY_ENA, 0x1);
++              /* 2048 LMTLINES */
++              cfg |= FIELD_PREP(LMT_MAP_ENTRY_LINES, 0x6);
++
++              writeq(cfg, (lmt_map_base + (index + 8)));
++
+               /* Flushing the AP interceptor cache to make APR_LMT_MAP_ENTRY_S
+                * changes effective. Write 1 for flush and read is being used as a
+                * barrier and sets up a data dependency. Write to 0 after a write
+@@ -52,7 +63,7 @@ static int lmtst_map_table_ops(struct rvu *rvu, u32 index, u64 *val,
+ #define LMT_MAP_TBL_W1_OFF  8
+ static u32 rvu_get_lmtst_tbl_index(struct rvu *rvu, u16 pcifunc)
+ {
+-      return ((rvu_get_pf(pcifunc) * rvu->hw->total_vfs) +
++      return ((rvu_get_pf(pcifunc) * LMT_MAX_VFS) +
+               (pcifunc & RVU_PFVF_FUNC_MASK)) * LMT_MAPTBL_ENTRY_SIZE;
+ }
+-- 
+2.39.5
+
diff --git a/queue-6.6/octeontx2-pf-add-af_xdp-non-zero-copy-support.patch b/queue-6.6/octeontx2-pf-add-af_xdp-non-zero-copy-support.patch
new file mode 100644 (file)
index 0000000..2a3cc21
--- /dev/null
@@ -0,0 +1,51 @@
+From 13166cfa3e28fb634e56dca529a05397a30f5640 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Thu, 13 Feb 2025 11:01:37 +0530
+Subject: octeontx2-pf: Add AF_XDP non-zero copy support
+
+From: Suman Ghosh <sumang@marvell.com>
+
+[ Upstream commit b4164de5041b51cda3438e75bce668e2556057c3 ]
+
+Set xdp rx ring memory type as MEM_TYPE_PAGE_POOL for
+af-xdp to work. This is needed since xdp_return_frame
+internally will use page pools.
+
+Fixes: 06059a1a9a4a ("octeontx2-pf: Add XDP support to netdev PF")
+Signed-off-by: Suman Ghosh <sumang@marvell.com>
+Signed-off-by: Paolo Abeni <pabeni@redhat.com>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.c | 8 +++++++-
+ 1 file changed, 7 insertions(+), 1 deletion(-)
+
+diff --git a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.c b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.c
+index 47adccf7a7776..1999918ca500f 100644
+--- a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.c
++++ b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.c
+@@ -988,6 +988,7 @@ static int otx2_cq_init(struct otx2_nic *pfvf, u16 qidx)
+       int err, pool_id, non_xdp_queues;
+       struct nix_aq_enq_req *aq;
+       struct otx2_cq_queue *cq;
++      struct otx2_pool *pool;
+       cq = &qset->cq[qidx];
+       cq->cq_idx = qidx;
+@@ -996,8 +997,13 @@ static int otx2_cq_init(struct otx2_nic *pfvf, u16 qidx)
+               cq->cq_type = CQ_RX;
+               cq->cint_idx = qidx;
+               cq->cqe_cnt = qset->rqe_cnt;
+-              if (pfvf->xdp_prog)
++              if (pfvf->xdp_prog) {
++                      pool = &qset->pool[qidx];
+                       xdp_rxq_info_reg(&cq->xdp_rxq, pfvf->netdev, qidx, 0);
++                      xdp_rxq_info_reg_mem_model(&cq->xdp_rxq,
++                                                 MEM_TYPE_PAGE_POOL,
++                                                 pool->page_pool);
++              }
+       } else if (qidx < non_xdp_queues) {
+               cq->cq_type = CQ_TX;
+               cq->cint_idx = qidx - pfvf->hw.rx_queues;
+-- 
+2.39.5
+
diff --git a/queue-6.6/pinctrl-qcom-msm-convert-to-platform-remove-callback.patch b/queue-6.6/pinctrl-qcom-msm-convert-to-platform-remove-callback.patch
new file mode 100644 (file)
index 0000000..3edcba7
--- /dev/null
@@ -0,0 +1,729 @@
+From 6261c6dfe1772eba921e81a72e6df70d7e20c0dd Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Mon, 9 Oct 2023 18:25:09 +0200
+Subject: pinctrl: qcom/msm: Convert to platform remove callback returning void
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+From: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
+
+[ Upstream commit 22ee670a8ad3ec7cd9d872d4512fe8797130e191 ]
+
+The .remove() callback for a platform driver returns an int which makes
+many driver authors wrongly assume it's possible to do error handling by
+returning an error code. However the value returned is ignored (apart
+from emitting a warning) and this typically results in resource leaks.
+
+To improve here there is a quest to make the remove callback return
+void. In the first step of this quest all drivers are converted to
+.remove_new(), which already returns void. Eventually after all drivers
+are converted, .remove_new() will be renamed to .remove().
+
+To convert all those qcom pinctrl drivers, make msm_pinctrl_remove()
+return void (instead of zero) and use .remove_new in all drivers.
+
+Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
+Link: https://lore.kernel.org/r/20231009162510.335208-3-u.kleine-koenig@pengutronix.de
+Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
+Stable-dep-of: 41e452e6933d ("pinctrl: qcom: switch to devm_register_sys_off_handler()")
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/pinctrl/qcom/pinctrl-apq8064.c  | 2 +-
+ drivers/pinctrl/qcom/pinctrl-apq8084.c  | 2 +-
+ drivers/pinctrl/qcom/pinctrl-ipq4019.c  | 2 +-
+ drivers/pinctrl/qcom/pinctrl-ipq5018.c  | 2 +-
+ drivers/pinctrl/qcom/pinctrl-ipq5332.c  | 2 +-
+ drivers/pinctrl/qcom/pinctrl-ipq6018.c  | 2 +-
+ drivers/pinctrl/qcom/pinctrl-ipq8064.c  | 2 +-
+ drivers/pinctrl/qcom/pinctrl-ipq8074.c  | 2 +-
+ drivers/pinctrl/qcom/pinctrl-ipq9574.c  | 2 +-
+ drivers/pinctrl/qcom/pinctrl-mdm9607.c  | 2 +-
+ drivers/pinctrl/qcom/pinctrl-mdm9615.c  | 2 +-
+ drivers/pinctrl/qcom/pinctrl-msm.c      | 4 +---
+ drivers/pinctrl/qcom/pinctrl-msm.h      | 2 +-
+ drivers/pinctrl/qcom/pinctrl-msm8226.c  | 2 +-
+ drivers/pinctrl/qcom/pinctrl-msm8660.c  | 2 +-
+ drivers/pinctrl/qcom/pinctrl-msm8909.c  | 2 +-
+ drivers/pinctrl/qcom/pinctrl-msm8916.c  | 2 +-
+ drivers/pinctrl/qcom/pinctrl-msm8953.c  | 2 +-
+ drivers/pinctrl/qcom/pinctrl-msm8960.c  | 2 +-
+ drivers/pinctrl/qcom/pinctrl-msm8976.c  | 2 +-
+ drivers/pinctrl/qcom/pinctrl-msm8994.c  | 2 +-
+ drivers/pinctrl/qcom/pinctrl-msm8996.c  | 2 +-
+ drivers/pinctrl/qcom/pinctrl-msm8998.c  | 2 +-
+ drivers/pinctrl/qcom/pinctrl-msm8x74.c  | 2 +-
+ drivers/pinctrl/qcom/pinctrl-qcm2290.c  | 2 +-
+ drivers/pinctrl/qcom/pinctrl-qcs404.c   | 2 +-
+ drivers/pinctrl/qcom/pinctrl-qdf2xxx.c  | 2 +-
+ drivers/pinctrl/qcom/pinctrl-qdu1000.c  | 2 +-
+ drivers/pinctrl/qcom/pinctrl-sa8775p.c  | 2 +-
+ drivers/pinctrl/qcom/pinctrl-sc7180.c   | 2 +-
+ drivers/pinctrl/qcom/pinctrl-sc7280.c   | 2 +-
+ drivers/pinctrl/qcom/pinctrl-sc8180x.c  | 2 +-
+ drivers/pinctrl/qcom/pinctrl-sc8280xp.c | 2 +-
+ drivers/pinctrl/qcom/pinctrl-sdm660.c   | 2 +-
+ drivers/pinctrl/qcom/pinctrl-sdm670.c   | 2 +-
+ drivers/pinctrl/qcom/pinctrl-sdm845.c   | 2 +-
+ drivers/pinctrl/qcom/pinctrl-sdx55.c    | 2 +-
+ drivers/pinctrl/qcom/pinctrl-sdx65.c    | 2 +-
+ drivers/pinctrl/qcom/pinctrl-sdx75.c    | 2 +-
+ drivers/pinctrl/qcom/pinctrl-sm6115.c   | 2 +-
+ drivers/pinctrl/qcom/pinctrl-sm6125.c   | 2 +-
+ drivers/pinctrl/qcom/pinctrl-sm6350.c   | 2 +-
+ drivers/pinctrl/qcom/pinctrl-sm6375.c   | 2 +-
+ drivers/pinctrl/qcom/pinctrl-sm7150.c   | 2 +-
+ drivers/pinctrl/qcom/pinctrl-sm8150.c   | 2 +-
+ drivers/pinctrl/qcom/pinctrl-sm8250.c   | 2 +-
+ drivers/pinctrl/qcom/pinctrl-sm8350.c   | 2 +-
+ drivers/pinctrl/qcom/pinctrl-sm8450.c   | 2 +-
+ drivers/pinctrl/qcom/pinctrl-sm8550.c   | 2 +-
+ 49 files changed, 49 insertions(+), 51 deletions(-)
+
+diff --git a/drivers/pinctrl/qcom/pinctrl-apq8064.c b/drivers/pinctrl/qcom/pinctrl-apq8064.c
+index 20c3b90250445..a18df41622999 100644
+--- a/drivers/pinctrl/qcom/pinctrl-apq8064.c
++++ b/drivers/pinctrl/qcom/pinctrl-apq8064.c
+@@ -629,7 +629,7 @@ static struct platform_driver apq8064_pinctrl_driver = {
+               .of_match_table = apq8064_pinctrl_of_match,
+       },
+       .probe = apq8064_pinctrl_probe,
+-      .remove = msm_pinctrl_remove,
++      .remove_new = msm_pinctrl_remove,
+ };
+ static int __init apq8064_pinctrl_init(void)
+diff --git a/drivers/pinctrl/qcom/pinctrl-apq8084.c b/drivers/pinctrl/qcom/pinctrl-apq8084.c
+index 3fc0a40762b63..afada80e52a23 100644
+--- a/drivers/pinctrl/qcom/pinctrl-apq8084.c
++++ b/drivers/pinctrl/qcom/pinctrl-apq8084.c
+@@ -1207,7 +1207,7 @@ static struct platform_driver apq8084_pinctrl_driver = {
+               .of_match_table = apq8084_pinctrl_of_match,
+       },
+       .probe = apq8084_pinctrl_probe,
+-      .remove = msm_pinctrl_remove,
++      .remove_new = msm_pinctrl_remove,
+ };
+ static int __init apq8084_pinctrl_init(void)
+diff --git a/drivers/pinctrl/qcom/pinctrl-ipq4019.c b/drivers/pinctrl/qcom/pinctrl-ipq4019.c
+index 1f7944dd829d1..cb13576ad6cfb 100644
+--- a/drivers/pinctrl/qcom/pinctrl-ipq4019.c
++++ b/drivers/pinctrl/qcom/pinctrl-ipq4019.c
+@@ -710,7 +710,7 @@ static struct platform_driver ipq4019_pinctrl_driver = {
+               .of_match_table = ipq4019_pinctrl_of_match,
+       },
+       .probe = ipq4019_pinctrl_probe,
+-      .remove = msm_pinctrl_remove,
++      .remove_new = msm_pinctrl_remove,
+ };
+ static int __init ipq4019_pinctrl_init(void)
+diff --git a/drivers/pinctrl/qcom/pinctrl-ipq5018.c b/drivers/pinctrl/qcom/pinctrl-ipq5018.c
+index e2951f81c3eeb..68f65b57003e9 100644
+--- a/drivers/pinctrl/qcom/pinctrl-ipq5018.c
++++ b/drivers/pinctrl/qcom/pinctrl-ipq5018.c
+@@ -754,7 +754,7 @@ static struct platform_driver ipq5018_pinctrl_driver = {
+               .of_match_table = ipq5018_pinctrl_of_match,
+       },
+       .probe = ipq5018_pinctrl_probe,
+-      .remove = msm_pinctrl_remove,
++      .remove_new = msm_pinctrl_remove,
+ };
+ static int __init ipq5018_pinctrl_init(void)
+diff --git a/drivers/pinctrl/qcom/pinctrl-ipq5332.c b/drivers/pinctrl/qcom/pinctrl-ipq5332.c
+index 625f8014051f6..8821751189708 100644
+--- a/drivers/pinctrl/qcom/pinctrl-ipq5332.c
++++ b/drivers/pinctrl/qcom/pinctrl-ipq5332.c
+@@ -834,7 +834,7 @@ static struct platform_driver ipq5332_pinctrl_driver = {
+               .of_match_table = ipq5332_pinctrl_of_match,
+       },
+       .probe = ipq5332_pinctrl_probe,
+-      .remove = msm_pinctrl_remove,
++      .remove_new = msm_pinctrl_remove,
+ };
+ static int __init ipq5332_pinctrl_init(void)
+diff --git a/drivers/pinctrl/qcom/pinctrl-ipq6018.c b/drivers/pinctrl/qcom/pinctrl-ipq6018.c
+index 0ad08647dbcdf..ac330d8712b5c 100644
+--- a/drivers/pinctrl/qcom/pinctrl-ipq6018.c
++++ b/drivers/pinctrl/qcom/pinctrl-ipq6018.c
+@@ -1080,7 +1080,7 @@ static struct platform_driver ipq6018_pinctrl_driver = {
+               .of_match_table = ipq6018_pinctrl_of_match,
+       },
+       .probe = ipq6018_pinctrl_probe,
+-      .remove = msm_pinctrl_remove,
++      .remove_new = msm_pinctrl_remove,
+ };
+ static int __init ipq6018_pinctrl_init(void)
+diff --git a/drivers/pinctrl/qcom/pinctrl-ipq8064.c b/drivers/pinctrl/qcom/pinctrl-ipq8064.c
+index e2bb94e86aef6..e10e1bc4c9113 100644
+--- a/drivers/pinctrl/qcom/pinctrl-ipq8064.c
++++ b/drivers/pinctrl/qcom/pinctrl-ipq8064.c
+@@ -631,7 +631,7 @@ static struct platform_driver ipq8064_pinctrl_driver = {
+               .of_match_table = ipq8064_pinctrl_of_match,
+       },
+       .probe = ipq8064_pinctrl_probe,
+-      .remove = msm_pinctrl_remove,
++      .remove_new = msm_pinctrl_remove,
+ };
+ static int __init ipq8064_pinctrl_init(void)
+diff --git a/drivers/pinctrl/qcom/pinctrl-ipq8074.c b/drivers/pinctrl/qcom/pinctrl-ipq8074.c
+index 337f3a1c92c19..fee32c1d1d3e9 100644
+--- a/drivers/pinctrl/qcom/pinctrl-ipq8074.c
++++ b/drivers/pinctrl/qcom/pinctrl-ipq8074.c
+@@ -1041,7 +1041,7 @@ static struct platform_driver ipq8074_pinctrl_driver = {
+               .of_match_table = ipq8074_pinctrl_of_match,
+       },
+       .probe = ipq8074_pinctrl_probe,
+-      .remove = msm_pinctrl_remove,
++      .remove_new = msm_pinctrl_remove,
+ };
+ static int __init ipq8074_pinctrl_init(void)
+diff --git a/drivers/pinctrl/qcom/pinctrl-ipq9574.c b/drivers/pinctrl/qcom/pinctrl-ipq9574.c
+index e2491617b2364..20ab59cb621bc 100644
+--- a/drivers/pinctrl/qcom/pinctrl-ipq9574.c
++++ b/drivers/pinctrl/qcom/pinctrl-ipq9574.c
+@@ -799,7 +799,7 @@ static struct platform_driver ipq9574_pinctrl_driver = {
+               .of_match_table = ipq9574_pinctrl_of_match,
+       },
+       .probe = ipq9574_pinctrl_probe,
+-      .remove = msm_pinctrl_remove,
++      .remove_new = msm_pinctrl_remove,
+ };
+ static int __init ipq9574_pinctrl_init(void)
+diff --git a/drivers/pinctrl/qcom/pinctrl-mdm9607.c b/drivers/pinctrl/qcom/pinctrl-mdm9607.c
+index e7cd3ef1cf3e8..415d24e16267d 100644
+--- a/drivers/pinctrl/qcom/pinctrl-mdm9607.c
++++ b/drivers/pinctrl/qcom/pinctrl-mdm9607.c
+@@ -1059,7 +1059,7 @@ static struct platform_driver mdm9607_pinctrl_driver = {
+               .of_match_table = mdm9607_pinctrl_of_match,
+       },
+       .probe = mdm9607_pinctrl_probe,
+-      .remove = msm_pinctrl_remove,
++      .remove_new = msm_pinctrl_remove,
+ };
+ static int __init mdm9607_pinctrl_init(void)
+diff --git a/drivers/pinctrl/qcom/pinctrl-mdm9615.c b/drivers/pinctrl/qcom/pinctrl-mdm9615.c
+index 0a2ae383d3d57..3f2eafea0b246 100644
+--- a/drivers/pinctrl/qcom/pinctrl-mdm9615.c
++++ b/drivers/pinctrl/qcom/pinctrl-mdm9615.c
+@@ -446,7 +446,7 @@ static struct platform_driver mdm9615_pinctrl_driver = {
+               .of_match_table = mdm9615_pinctrl_of_match,
+       },
+       .probe = mdm9615_pinctrl_probe,
+-      .remove = msm_pinctrl_remove,
++      .remove_new = msm_pinctrl_remove,
+ };
+ static int __init mdm9615_pinctrl_init(void)
+diff --git a/drivers/pinctrl/qcom/pinctrl-msm.c b/drivers/pinctrl/qcom/pinctrl-msm.c
+index b252fc22f64e6..4714d60f9ab9c 100644
+--- a/drivers/pinctrl/qcom/pinctrl-msm.c
++++ b/drivers/pinctrl/qcom/pinctrl-msm.c
+@@ -1547,15 +1547,13 @@ int msm_pinctrl_probe(struct platform_device *pdev,
+ }
+ EXPORT_SYMBOL(msm_pinctrl_probe);
+-int msm_pinctrl_remove(struct platform_device *pdev)
++void msm_pinctrl_remove(struct platform_device *pdev)
+ {
+       struct msm_pinctrl *pctrl = platform_get_drvdata(pdev);
+       gpiochip_remove(&pctrl->chip);
+       unregister_restart_handler(&pctrl->restart_nb);
+-
+-      return 0;
+ }
+ EXPORT_SYMBOL(msm_pinctrl_remove);
+diff --git a/drivers/pinctrl/qcom/pinctrl-msm.h b/drivers/pinctrl/qcom/pinctrl-msm.h
+index 1d2f2e904da19..4968d08a384da 100644
+--- a/drivers/pinctrl/qcom/pinctrl-msm.h
++++ b/drivers/pinctrl/qcom/pinctrl-msm.h
+@@ -166,6 +166,6 @@ extern const struct dev_pm_ops msm_pinctrl_dev_pm_ops;
+ int msm_pinctrl_probe(struct platform_device *pdev,
+                     const struct msm_pinctrl_soc_data *soc_data);
+-int msm_pinctrl_remove(struct platform_device *pdev);
++void msm_pinctrl_remove(struct platform_device *pdev);
+ #endif
+diff --git a/drivers/pinctrl/qcom/pinctrl-msm8226.c b/drivers/pinctrl/qcom/pinctrl-msm8226.c
+index 994619840a706..90b4004e7faf1 100644
+--- a/drivers/pinctrl/qcom/pinctrl-msm8226.c
++++ b/drivers/pinctrl/qcom/pinctrl-msm8226.c
+@@ -638,7 +638,7 @@ static struct platform_driver msm8226_pinctrl_driver = {
+               .of_match_table = msm8226_pinctrl_of_match,
+       },
+       .probe = msm8226_pinctrl_probe,
+-      .remove = msm_pinctrl_remove,
++      .remove_new = msm_pinctrl_remove,
+ };
+ static int __init msm8226_pinctrl_init(void)
+diff --git a/drivers/pinctrl/qcom/pinctrl-msm8660.c b/drivers/pinctrl/qcom/pinctrl-msm8660.c
+index 999a5f867eb50..dba6d531b4a14 100644
+--- a/drivers/pinctrl/qcom/pinctrl-msm8660.c
++++ b/drivers/pinctrl/qcom/pinctrl-msm8660.c
+@@ -981,7 +981,7 @@ static struct platform_driver msm8660_pinctrl_driver = {
+               .of_match_table = msm8660_pinctrl_of_match,
+       },
+       .probe = msm8660_pinctrl_probe,
+-      .remove = msm_pinctrl_remove,
++      .remove_new = msm_pinctrl_remove,
+ };
+ static int __init msm8660_pinctrl_init(void)
+diff --git a/drivers/pinctrl/qcom/pinctrl-msm8909.c b/drivers/pinctrl/qcom/pinctrl-msm8909.c
+index 756856d20d6b5..14b17ba9f9061 100644
+--- a/drivers/pinctrl/qcom/pinctrl-msm8909.c
++++ b/drivers/pinctrl/qcom/pinctrl-msm8909.c
+@@ -929,7 +929,7 @@ static struct platform_driver msm8909_pinctrl_driver = {
+               .of_match_table = msm8909_pinctrl_of_match,
+       },
+       .probe = msm8909_pinctrl_probe,
+-      .remove = msm_pinctrl_remove,
++      .remove_new = msm_pinctrl_remove,
+ };
+ static int __init msm8909_pinctrl_init(void)
+diff --git a/drivers/pinctrl/qcom/pinctrl-msm8916.c b/drivers/pinctrl/qcom/pinctrl-msm8916.c
+index cea5c54f92fec..184dcf8422735 100644
+--- a/drivers/pinctrl/qcom/pinctrl-msm8916.c
++++ b/drivers/pinctrl/qcom/pinctrl-msm8916.c
+@@ -969,7 +969,7 @@ static struct platform_driver msm8916_pinctrl_driver = {
+               .of_match_table = msm8916_pinctrl_of_match,
+       },
+       .probe = msm8916_pinctrl_probe,
+-      .remove = msm_pinctrl_remove,
++      .remove_new = msm_pinctrl_remove,
+ };
+ static int __init msm8916_pinctrl_init(void)
+diff --git a/drivers/pinctrl/qcom/pinctrl-msm8953.c b/drivers/pinctrl/qcom/pinctrl-msm8953.c
+index 998351bdfee13..c2253821ae8d3 100644
+--- a/drivers/pinctrl/qcom/pinctrl-msm8953.c
++++ b/drivers/pinctrl/qcom/pinctrl-msm8953.c
+@@ -1816,7 +1816,7 @@ static struct platform_driver msm8953_pinctrl_driver = {
+               .of_match_table = msm8953_pinctrl_of_match,
+       },
+       .probe = msm8953_pinctrl_probe,
+-      .remove = msm_pinctrl_remove,
++      .remove_new = msm_pinctrl_remove,
+ };
+ static int __init msm8953_pinctrl_init(void)
+diff --git a/drivers/pinctrl/qcom/pinctrl-msm8960.c b/drivers/pinctrl/qcom/pinctrl-msm8960.c
+index ebe230b3b437c..6b9148d226e9b 100644
+--- a/drivers/pinctrl/qcom/pinctrl-msm8960.c
++++ b/drivers/pinctrl/qcom/pinctrl-msm8960.c
+@@ -1246,7 +1246,7 @@ static struct platform_driver msm8960_pinctrl_driver = {
+               .of_match_table = msm8960_pinctrl_of_match,
+       },
+       .probe = msm8960_pinctrl_probe,
+-      .remove = msm_pinctrl_remove,
++      .remove_new = msm_pinctrl_remove,
+ };
+ static int __init msm8960_pinctrl_init(void)
+diff --git a/drivers/pinctrl/qcom/pinctrl-msm8976.c b/drivers/pinctrl/qcom/pinctrl-msm8976.c
+index c30d80e4e98ca..9a951888e8a1b 100644
+--- a/drivers/pinctrl/qcom/pinctrl-msm8976.c
++++ b/drivers/pinctrl/qcom/pinctrl-msm8976.c
+@@ -1096,7 +1096,7 @@ static struct platform_driver msm8976_pinctrl_driver = {
+               .of_match_table = msm8976_pinctrl_of_match,
+       },
+       .probe = msm8976_pinctrl_probe,
+-      .remove = msm_pinctrl_remove,
++      .remove_new = msm_pinctrl_remove,
+ };
+ static int __init msm8976_pinctrl_init(void)
+diff --git a/drivers/pinctrl/qcom/pinctrl-msm8994.c b/drivers/pinctrl/qcom/pinctrl-msm8994.c
+index b1a6759ab4a5e..1ed1dd32d6c79 100644
+--- a/drivers/pinctrl/qcom/pinctrl-msm8994.c
++++ b/drivers/pinctrl/qcom/pinctrl-msm8994.c
+@@ -1343,7 +1343,7 @@ static struct platform_driver msm8994_pinctrl_driver = {
+               .of_match_table = msm8994_pinctrl_of_match,
+       },
+       .probe = msm8994_pinctrl_probe,
+-      .remove = msm_pinctrl_remove,
++      .remove_new = msm_pinctrl_remove,
+ };
+ static int __init msm8994_pinctrl_init(void)
+diff --git a/drivers/pinctrl/qcom/pinctrl-msm8996.c b/drivers/pinctrl/qcom/pinctrl-msm8996.c
+index 46cc0b49dbab5..5f0e7f78fd517 100644
+--- a/drivers/pinctrl/qcom/pinctrl-msm8996.c
++++ b/drivers/pinctrl/qcom/pinctrl-msm8996.c
+@@ -1906,7 +1906,7 @@ static struct platform_driver msm8996_pinctrl_driver = {
+               .of_match_table = msm8996_pinctrl_of_match,
+       },
+       .probe = msm8996_pinctrl_probe,
+-      .remove = msm_pinctrl_remove,
++      .remove_new = msm_pinctrl_remove,
+ };
+ static int __init msm8996_pinctrl_init(void)
+diff --git a/drivers/pinctrl/qcom/pinctrl-msm8998.c b/drivers/pinctrl/qcom/pinctrl-msm8998.c
+index b7cbf32b3125a..4aaf45e54f3a7 100644
+--- a/drivers/pinctrl/qcom/pinctrl-msm8998.c
++++ b/drivers/pinctrl/qcom/pinctrl-msm8998.c
+@@ -1535,7 +1535,7 @@ static struct platform_driver msm8998_pinctrl_driver = {
+               .of_match_table = msm8998_pinctrl_of_match,
+       },
+       .probe = msm8998_pinctrl_probe,
+-      .remove = msm_pinctrl_remove,
++      .remove_new = msm_pinctrl_remove,
+ };
+ static int __init msm8998_pinctrl_init(void)
+diff --git a/drivers/pinctrl/qcom/pinctrl-msm8x74.c b/drivers/pinctrl/qcom/pinctrl-msm8x74.c
+index d5fe62992849c..58b4f6f31ae6a 100644
+--- a/drivers/pinctrl/qcom/pinctrl-msm8x74.c
++++ b/drivers/pinctrl/qcom/pinctrl-msm8x74.c
+@@ -1071,7 +1071,7 @@ static struct platform_driver msm8x74_pinctrl_driver = {
+               .of_match_table = msm8x74_pinctrl_of_match,
+       },
+       .probe = msm8x74_pinctrl_probe,
+-      .remove = msm_pinctrl_remove,
++      .remove_new = msm_pinctrl_remove,
+ };
+ static int __init msm8x74_pinctrl_init(void)
+diff --git a/drivers/pinctrl/qcom/pinctrl-qcm2290.c b/drivers/pinctrl/qcom/pinctrl-qcm2290.c
+index ba699eac9ee8b..f5c1c427b44e9 100644
+--- a/drivers/pinctrl/qcom/pinctrl-qcm2290.c
++++ b/drivers/pinctrl/qcom/pinctrl-qcm2290.c
+@@ -1113,7 +1113,7 @@ static struct platform_driver qcm2290_pinctrl_driver = {
+               .of_match_table = qcm2290_pinctrl_of_match,
+       },
+       .probe = qcm2290_pinctrl_probe,
+-      .remove = msm_pinctrl_remove,
++      .remove_new = msm_pinctrl_remove,
+ };
+ static int __init qcm2290_pinctrl_init(void)
+diff --git a/drivers/pinctrl/qcom/pinctrl-qcs404.c b/drivers/pinctrl/qcom/pinctrl-qcs404.c
+index ae7224012f8aa..9a875b7dc9989 100644
+--- a/drivers/pinctrl/qcom/pinctrl-qcs404.c
++++ b/drivers/pinctrl/qcom/pinctrl-qcs404.c
+@@ -1644,7 +1644,7 @@ static struct platform_driver qcs404_pinctrl_driver = {
+               .of_match_table = qcs404_pinctrl_of_match,
+       },
+       .probe = qcs404_pinctrl_probe,
+-      .remove = msm_pinctrl_remove,
++      .remove_new = msm_pinctrl_remove,
+ };
+ static int __init qcs404_pinctrl_init(void)
+diff --git a/drivers/pinctrl/qcom/pinctrl-qdf2xxx.c b/drivers/pinctrl/qcom/pinctrl-qdf2xxx.c
+index b5808fcfb13cd..4d2f6f495163b 100644
+--- a/drivers/pinctrl/qcom/pinctrl-qdf2xxx.c
++++ b/drivers/pinctrl/qcom/pinctrl-qdf2xxx.c
+@@ -145,7 +145,7 @@ static struct platform_driver qdf2xxx_pinctrl_driver = {
+               .acpi_match_table = qdf2xxx_acpi_ids,
+       },
+       .probe = qdf2xxx_pinctrl_probe,
+-      .remove = msm_pinctrl_remove,
++      .remove_new = msm_pinctrl_remove,
+ };
+ static int __init qdf2xxx_pinctrl_init(void)
+diff --git a/drivers/pinctrl/qcom/pinctrl-qdu1000.c b/drivers/pinctrl/qcom/pinctrl-qdu1000.c
+index 47bc529ef550d..da4f940bc8d4e 100644
+--- a/drivers/pinctrl/qcom/pinctrl-qdu1000.c
++++ b/drivers/pinctrl/qcom/pinctrl-qdu1000.c
+@@ -1248,7 +1248,7 @@ static struct platform_driver qdu1000_tlmm_driver = {
+               .of_match_table = qdu1000_tlmm_of_match,
+       },
+       .probe = qdu1000_tlmm_probe,
+-      .remove = msm_pinctrl_remove,
++      .remove_new = msm_pinctrl_remove,
+ };
+ static int __init qdu1000_tlmm_init(void)
+diff --git a/drivers/pinctrl/qcom/pinctrl-sa8775p.c b/drivers/pinctrl/qcom/pinctrl-sa8775p.c
+index 8fdea25d8d67e..5459c0c681a23 100644
+--- a/drivers/pinctrl/qcom/pinctrl-sa8775p.c
++++ b/drivers/pinctrl/qcom/pinctrl-sa8775p.c
+@@ -1530,7 +1530,7 @@ static struct platform_driver sa8775p_pinctrl_driver = {
+               .of_match_table = sa8775p_pinctrl_of_match,
+       },
+       .probe = sa8775p_pinctrl_probe,
+-      .remove = msm_pinctrl_remove,
++      .remove_new = msm_pinctrl_remove,
+ };
+ static int __init sa8775p_pinctrl_init(void)
+diff --git a/drivers/pinctrl/qcom/pinctrl-sc7180.c b/drivers/pinctrl/qcom/pinctrl-sc7180.c
+index 6eb0c73791c0b..c27aaa599b917 100644
+--- a/drivers/pinctrl/qcom/pinctrl-sc7180.c
++++ b/drivers/pinctrl/qcom/pinctrl-sc7180.c
+@@ -1159,7 +1159,7 @@ static struct platform_driver sc7180_pinctrl_driver = {
+               .of_match_table = sc7180_pinctrl_of_match,
+       },
+       .probe = sc7180_pinctrl_probe,
+-      .remove = msm_pinctrl_remove,
++      .remove_new = msm_pinctrl_remove,
+ };
+ static int __init sc7180_pinctrl_init(void)
+diff --git a/drivers/pinctrl/qcom/pinctrl-sc7280.c b/drivers/pinctrl/qcom/pinctrl-sc7280.c
+index 0c10eeb60b55e..c2db663e396eb 100644
+--- a/drivers/pinctrl/qcom/pinctrl-sc7280.c
++++ b/drivers/pinctrl/qcom/pinctrl-sc7280.c
+@@ -1505,7 +1505,7 @@ static struct platform_driver sc7280_pinctrl_driver = {
+               .of_match_table = sc7280_pinctrl_of_match,
+       },
+       .probe = sc7280_pinctrl_probe,
+-      .remove = msm_pinctrl_remove,
++      .remove_new = msm_pinctrl_remove,
+ };
+ static int __init sc7280_pinctrl_init(void)
+diff --git a/drivers/pinctrl/qcom/pinctrl-sc8180x.c b/drivers/pinctrl/qcom/pinctrl-sc8180x.c
+index d6a79ad41a40a..cfa7c8be9770c 100644
+--- a/drivers/pinctrl/qcom/pinctrl-sc8180x.c
++++ b/drivers/pinctrl/qcom/pinctrl-sc8180x.c
+@@ -1720,7 +1720,7 @@ static struct platform_driver sc8180x_pinctrl_driver = {
+               .acpi_match_table = sc8180x_pinctrl_acpi_match,
+       },
+       .probe = sc8180x_pinctrl_probe,
+-      .remove = msm_pinctrl_remove,
++      .remove_new = msm_pinctrl_remove,
+ };
+ static int __init sc8180x_pinctrl_init(void)
+diff --git a/drivers/pinctrl/qcom/pinctrl-sc8280xp.c b/drivers/pinctrl/qcom/pinctrl-sc8280xp.c
+index 96f4fb5a5d297..4b1c49697698d 100644
+--- a/drivers/pinctrl/qcom/pinctrl-sc8280xp.c
++++ b/drivers/pinctrl/qcom/pinctrl-sc8280xp.c
+@@ -1926,7 +1926,7 @@ static struct platform_driver sc8280xp_pinctrl_driver = {
+               .of_match_table = sc8280xp_pinctrl_of_match,
+       },
+       .probe = sc8280xp_pinctrl_probe,
+-      .remove = msm_pinctrl_remove,
++      .remove_new = msm_pinctrl_remove,
+ };
+ static int __init sc8280xp_pinctrl_init(void)
+diff --git a/drivers/pinctrl/qcom/pinctrl-sdm660.c b/drivers/pinctrl/qcom/pinctrl-sdm660.c
+index c2e0d5c034acf..b0c29a24b09b5 100644
+--- a/drivers/pinctrl/qcom/pinctrl-sdm660.c
++++ b/drivers/pinctrl/qcom/pinctrl-sdm660.c
+@@ -1428,7 +1428,7 @@ static struct platform_driver sdm660_pinctrl_driver = {
+               .of_match_table = sdm660_pinctrl_of_match,
+       },
+       .probe = sdm660_pinctrl_probe,
+-      .remove = msm_pinctrl_remove,
++      .remove_new = msm_pinctrl_remove,
+ };
+ static int __init sdm660_pinctrl_init(void)
+diff --git a/drivers/pinctrl/qcom/pinctrl-sdm670.c b/drivers/pinctrl/qcom/pinctrl-sdm670.c
+index cc3cce077de4e..1e694a966953a 100644
+--- a/drivers/pinctrl/qcom/pinctrl-sdm670.c
++++ b/drivers/pinctrl/qcom/pinctrl-sdm670.c
+@@ -1318,7 +1318,7 @@ static struct platform_driver sdm670_pinctrl_driver = {
+               .of_match_table = sdm670_pinctrl_of_match,
+       },
+       .probe = sdm670_pinctrl_probe,
+-      .remove = msm_pinctrl_remove,
++      .remove_new = msm_pinctrl_remove,
+ };
+ static int __init sdm670_pinctrl_init(void)
+diff --git a/drivers/pinctrl/qcom/pinctrl-sdm845.c b/drivers/pinctrl/qcom/pinctrl-sdm845.c
+index cc05c415ed155..3f3265e0018d6 100644
+--- a/drivers/pinctrl/qcom/pinctrl-sdm845.c
++++ b/drivers/pinctrl/qcom/pinctrl-sdm845.c
+@@ -1351,7 +1351,7 @@ static struct platform_driver sdm845_pinctrl_driver = {
+               .acpi_match_table = ACPI_PTR(sdm845_pinctrl_acpi_match),
+       },
+       .probe = sdm845_pinctrl_probe,
+-      .remove = msm_pinctrl_remove,
++      .remove_new = msm_pinctrl_remove,
+ };
+ static int __init sdm845_pinctrl_init(void)
+diff --git a/drivers/pinctrl/qcom/pinctrl-sdx55.c b/drivers/pinctrl/qcom/pinctrl-sdx55.c
+index 8826db9d21d04..c88b8bfcacb6a 100644
+--- a/drivers/pinctrl/qcom/pinctrl-sdx55.c
++++ b/drivers/pinctrl/qcom/pinctrl-sdx55.c
+@@ -990,7 +990,7 @@ static struct platform_driver sdx55_pinctrl_driver = {
+               .of_match_table = sdx55_pinctrl_of_match,
+       },
+       .probe = sdx55_pinctrl_probe,
+-      .remove = msm_pinctrl_remove,
++      .remove_new = msm_pinctrl_remove,
+ };
+ static int __init sdx55_pinctrl_init(void)
+diff --git a/drivers/pinctrl/qcom/pinctrl-sdx65.c b/drivers/pinctrl/qcom/pinctrl-sdx65.c
+index f6f319c997fc7..bd44ec0fcab43 100644
+--- a/drivers/pinctrl/qcom/pinctrl-sdx65.c
++++ b/drivers/pinctrl/qcom/pinctrl-sdx65.c
+@@ -939,7 +939,7 @@ static struct platform_driver sdx65_pinctrl_driver = {
+               .of_match_table = sdx65_pinctrl_of_match,
+       },
+       .probe = sdx65_pinctrl_probe,
+-      .remove = msm_pinctrl_remove,
++      .remove_new = msm_pinctrl_remove,
+ };
+ static int __init sdx65_pinctrl_init(void)
+diff --git a/drivers/pinctrl/qcom/pinctrl-sdx75.c b/drivers/pinctrl/qcom/pinctrl-sdx75.c
+index 3cfe8c7f04df8..396f6fc779a2e 100644
+--- a/drivers/pinctrl/qcom/pinctrl-sdx75.c
++++ b/drivers/pinctrl/qcom/pinctrl-sdx75.c
+@@ -1124,7 +1124,7 @@ static struct platform_driver sdx75_pinctrl_driver = {
+               .of_match_table = sdx75_pinctrl_of_match,
+       },
+       .probe = sdx75_pinctrl_probe,
+-      .remove = msm_pinctrl_remove,
++      .remove_new = msm_pinctrl_remove,
+ };
+ static int __init sdx75_pinctrl_init(void)
+diff --git a/drivers/pinctrl/qcom/pinctrl-sm6115.c b/drivers/pinctrl/qcom/pinctrl-sm6115.c
+index 2a06025f48858..87057089b2b64 100644
+--- a/drivers/pinctrl/qcom/pinctrl-sm6115.c
++++ b/drivers/pinctrl/qcom/pinctrl-sm6115.c
+@@ -895,7 +895,7 @@ static struct platform_driver sm6115_tlmm_driver = {
+               .of_match_table = sm6115_tlmm_of_match,
+       },
+       .probe = sm6115_tlmm_probe,
+-      .remove = msm_pinctrl_remove,
++      .remove_new = msm_pinctrl_remove,
+ };
+ static int __init sm6115_tlmm_init(void)
+diff --git a/drivers/pinctrl/qcom/pinctrl-sm6125.c b/drivers/pinctrl/qcom/pinctrl-sm6125.c
+index d5e2b896954c2..e07339ba72bca 100644
+--- a/drivers/pinctrl/qcom/pinctrl-sm6125.c
++++ b/drivers/pinctrl/qcom/pinctrl-sm6125.c
+@@ -1249,7 +1249,7 @@ static struct platform_driver sm6125_tlmm_driver = {
+               .of_match_table = sm6125_tlmm_of_match,
+       },
+       .probe = sm6125_tlmm_probe,
+-      .remove = msm_pinctrl_remove,
++      .remove_new = msm_pinctrl_remove,
+ };
+ static int __init sm6125_tlmm_init(void)
+diff --git a/drivers/pinctrl/qcom/pinctrl-sm6350.c b/drivers/pinctrl/qcom/pinctrl-sm6350.c
+index f3828c07b1345..4aeb1ba43ee3d 100644
+--- a/drivers/pinctrl/qcom/pinctrl-sm6350.c
++++ b/drivers/pinctrl/qcom/pinctrl-sm6350.c
+@@ -1373,7 +1373,7 @@ static struct platform_driver sm6350_tlmm_driver = {
+               .of_match_table = sm6350_tlmm_of_match,
+       },
+       .probe = sm6350_tlmm_probe,
+-      .remove = msm_pinctrl_remove,
++      .remove_new = msm_pinctrl_remove,
+ };
+ static int __init sm6350_tlmm_init(void)
+diff --git a/drivers/pinctrl/qcom/pinctrl-sm6375.c b/drivers/pinctrl/qcom/pinctrl-sm6375.c
+index c82c8516932ea..d86630d7125c2 100644
+--- a/drivers/pinctrl/qcom/pinctrl-sm6375.c
++++ b/drivers/pinctrl/qcom/pinctrl-sm6375.c
+@@ -1516,7 +1516,7 @@ static struct platform_driver sm6375_tlmm_driver = {
+               .of_match_table = sm6375_tlmm_of_match,
+       },
+       .probe = sm6375_tlmm_probe,
+-      .remove = msm_pinctrl_remove,
++      .remove_new = msm_pinctrl_remove,
+ };
+ static int __init sm6375_tlmm_init(void)
+diff --git a/drivers/pinctrl/qcom/pinctrl-sm7150.c b/drivers/pinctrl/qcom/pinctrl-sm7150.c
+index edb5984cd3519..b9f067de8ef0e 100644
+--- a/drivers/pinctrl/qcom/pinctrl-sm7150.c
++++ b/drivers/pinctrl/qcom/pinctrl-sm7150.c
+@@ -1254,7 +1254,7 @@ static struct platform_driver sm7150_tlmm_driver = {
+               .of_match_table = sm7150_tlmm_of_match,
+       },
+       .probe = sm7150_tlmm_probe,
+-      .remove = msm_pinctrl_remove,
++      .remove_new = msm_pinctrl_remove,
+ };
+ static int __init sm7150_tlmm_init(void)
+diff --git a/drivers/pinctrl/qcom/pinctrl-sm8150.c b/drivers/pinctrl/qcom/pinctrl-sm8150.c
+index 01aea9c70b7a7..f8f5bee74f1dc 100644
+--- a/drivers/pinctrl/qcom/pinctrl-sm8150.c
++++ b/drivers/pinctrl/qcom/pinctrl-sm8150.c
+@@ -1542,7 +1542,7 @@ static struct platform_driver sm8150_pinctrl_driver = {
+               .of_match_table = sm8150_pinctrl_of_match,
+       },
+       .probe = sm8150_pinctrl_probe,
+-      .remove = msm_pinctrl_remove,
++      .remove_new = msm_pinctrl_remove,
+ };
+ static int __init sm8150_pinctrl_init(void)
+diff --git a/drivers/pinctrl/qcom/pinctrl-sm8250.c b/drivers/pinctrl/qcom/pinctrl-sm8250.c
+index e9961a49ff981..54fda77bf2968 100644
+--- a/drivers/pinctrl/qcom/pinctrl-sm8250.c
++++ b/drivers/pinctrl/qcom/pinctrl-sm8250.c
+@@ -1351,7 +1351,7 @@ static struct platform_driver sm8250_pinctrl_driver = {
+               .of_match_table = sm8250_pinctrl_of_match,
+       },
+       .probe = sm8250_pinctrl_probe,
+-      .remove = msm_pinctrl_remove,
++      .remove_new = msm_pinctrl_remove,
+ };
+ static int __init sm8250_pinctrl_init(void)
+diff --git a/drivers/pinctrl/qcom/pinctrl-sm8350.c b/drivers/pinctrl/qcom/pinctrl-sm8350.c
+index 9c69458bd9109..ac7f2820f2cbf 100644
+--- a/drivers/pinctrl/qcom/pinctrl-sm8350.c
++++ b/drivers/pinctrl/qcom/pinctrl-sm8350.c
+@@ -1642,7 +1642,7 @@ static struct platform_driver sm8350_tlmm_driver = {
+               .of_match_table = sm8350_tlmm_of_match,
+       },
+       .probe = sm8350_tlmm_probe,
+-      .remove = msm_pinctrl_remove,
++      .remove_new = msm_pinctrl_remove,
+ };
+ static int __init sm8350_tlmm_init(void)
+diff --git a/drivers/pinctrl/qcom/pinctrl-sm8450.c b/drivers/pinctrl/qcom/pinctrl-sm8450.c
+index d11bb1ee9e3d8..6172867116952 100644
+--- a/drivers/pinctrl/qcom/pinctrl-sm8450.c
++++ b/drivers/pinctrl/qcom/pinctrl-sm8450.c
+@@ -1677,7 +1677,7 @@ static struct platform_driver sm8450_tlmm_driver = {
+               .of_match_table = sm8450_tlmm_of_match,
+       },
+       .probe = sm8450_tlmm_probe,
+-      .remove = msm_pinctrl_remove,
++      .remove_new = msm_pinctrl_remove,
+ };
+ static int __init sm8450_tlmm_init(void)
+diff --git a/drivers/pinctrl/qcom/pinctrl-sm8550.c b/drivers/pinctrl/qcom/pinctrl-sm8550.c
+index 3c847d9cb5d93..9184e0183755d 100644
+--- a/drivers/pinctrl/qcom/pinctrl-sm8550.c
++++ b/drivers/pinctrl/qcom/pinctrl-sm8550.c
+@@ -1762,7 +1762,7 @@ static struct platform_driver sm8550_tlmm_driver = {
+               .of_match_table = sm8550_tlmm_of_match,
+       },
+       .probe = sm8550_tlmm_probe,
+-      .remove = msm_pinctrl_remove,
++      .remove_new = msm_pinctrl_remove,
+ };
+ static int __init sm8550_tlmm_init(void)
+-- 
+2.39.5
+
diff --git a/queue-6.6/pinctrl-qcom-switch-to-devm_register_sys_off_handler.patch b/queue-6.6/pinctrl-qcom-switch-to-devm_register_sys_off_handler.patch
new file mode 100644 (file)
index 0000000..5c5f903
--- /dev/null
@@ -0,0 +1,96 @@
+From b2fc320fc04587600c23c08d0245f2bb169d6c84 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Tue, 13 May 2025 21:38:58 +0300
+Subject: pinctrl: qcom: switch to devm_register_sys_off_handler()
+
+From: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
+
+[ Upstream commit 41e452e6933d14146381ea25cff5e4d1ac2abea1 ]
+
+Error-handling paths in msm_pinctrl_probe() don't call
+a function required to unroll restart handler registration,
+unregister_restart_handler(). Instead of adding calls to this function,
+switch the msm pinctrl code into using devm_register_sys_off_handler().
+
+Fixes: cf1fc1876289 ("pinctrl: qcom: use restart_notifier mechanism for ps_hold")
+Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
+Link: https://lore.kernel.org/20250513-pinctrl-msm-fix-v2-2-249999af0fc1@oss.qualcomm.com
+Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/pinctrl/qcom/pinctrl-msm.c | 23 ++++++++++++-----------
+ 1 file changed, 12 insertions(+), 11 deletions(-)
+
+diff --git a/drivers/pinctrl/qcom/pinctrl-msm.c b/drivers/pinctrl/qcom/pinctrl-msm.c
+index 4714d60f9ab9c..ed70767ca0f0c 100644
+--- a/drivers/pinctrl/qcom/pinctrl-msm.c
++++ b/drivers/pinctrl/qcom/pinctrl-msm.c
+@@ -43,7 +43,6 @@
+  * @pctrl:          pinctrl handle.
+  * @chip:           gpiochip handle.
+  * @desc:           pin controller descriptor
+- * @restart_nb:     restart notifier block.
+  * @irq:            parent irq for the TLMM irq_chip.
+  * @intr_target_use_scm: route irq to application cpu using scm calls
+  * @lock:           Spinlock to protect register resources as well
+@@ -63,7 +62,6 @@ struct msm_pinctrl {
+       struct pinctrl_dev *pctrl;
+       struct gpio_chip chip;
+       struct pinctrl_desc desc;
+-      struct notifier_block restart_nb;
+       int irq;
+@@ -1424,10 +1422,9 @@ static int msm_gpio_init(struct msm_pinctrl *pctrl)
+       return 0;
+ }
+-static int msm_ps_hold_restart(struct notifier_block *nb, unsigned long action,
+-                             void *data)
++static int msm_ps_hold_restart(struct sys_off_data *data)
+ {
+-      struct msm_pinctrl *pctrl = container_of(nb, struct msm_pinctrl, restart_nb);
++      struct msm_pinctrl *pctrl = data->cb_data;
+       writel(0, pctrl->regs[0] + PS_HOLD_OFFSET);
+       mdelay(1000);
+@@ -1438,7 +1435,11 @@ static struct msm_pinctrl *poweroff_pctrl;
+ static void msm_ps_hold_poweroff(void)
+ {
+-      msm_ps_hold_restart(&poweroff_pctrl->restart_nb, 0, NULL);
++      struct sys_off_data data = {
++              .cb_data = poweroff_pctrl,
++      };
++
++      msm_ps_hold_restart(&data);
+ }
+ static void msm_pinctrl_setup_pm_reset(struct msm_pinctrl *pctrl)
+@@ -1448,9 +1449,11 @@ static void msm_pinctrl_setup_pm_reset(struct msm_pinctrl *pctrl)
+       for (i = 0; i < pctrl->soc->nfunctions; i++)
+               if (!strcmp(func[i].name, "ps_hold")) {
+-                      pctrl->restart_nb.notifier_call = msm_ps_hold_restart;
+-                      pctrl->restart_nb.priority = 128;
+-                      if (register_restart_handler(&pctrl->restart_nb))
++                      if (devm_register_sys_off_handler(pctrl->dev,
++                                                        SYS_OFF_MODE_RESTART,
++                                                        128,
++                                                        msm_ps_hold_restart,
++                                                        pctrl))
+                               dev_err(pctrl->dev,
+                                       "failed to setup restart handler.\n");
+                       poweroff_pctrl = pctrl;
+@@ -1552,8 +1555,6 @@ void msm_pinctrl_remove(struct platform_device *pdev)
+       struct msm_pinctrl *pctrl = platform_get_drvdata(pdev);
+       gpiochip_remove(&pctrl->chip);
+-
+-      unregister_restart_handler(&pctrl->restart_nb);
+ }
+ EXPORT_SYMBOL(msm_pinctrl_remove);
+-- 
+2.39.5
+
diff --git a/queue-6.6/remoteproc-qcom_wcnss-fix-on-platforms-without-fallb.patch b/queue-6.6/remoteproc-qcom_wcnss-fix-on-platforms-without-fallb.patch
new file mode 100644 (file)
index 0000000..6ee0070
--- /dev/null
@@ -0,0 +1,45 @@
+From 6081b0c5b19aaeaabe390b9c284763f22a62fd54 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Mon, 12 May 2025 02:40:15 +0300
+Subject: remoteproc: qcom_wcnss: Fix on platforms without fallback regulators
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+From: Matti Lehtimäki <matti.lehtimaki@gmail.com>
+
+[ Upstream commit 4ca45af0a56d00b86285d6fdd720dca3215059a7 ]
+
+Recent change to handle platforms with only single power domain broke
+pronto-v3 which requires power domains and doesn't have fallback voltage
+regulators in case power domains are missing. Add a check to verify
+the number of fallback voltage regulators before using the code which
+handles single power domain situation.
+
+Fixes: 65991ea8a6d1 ("remoteproc: qcom_wcnss: Handle platforms with only single power domain")
+Signed-off-by: Matti Lehtimäki <matti.lehtimaki@gmail.com>
+Tested-by: Luca Weiss <luca.weiss@fairphone.com> # sdm632-fairphone-fp3
+Link: https://lore.kernel.org/r/20250511234026.94735-1-matti.lehtimaki@gmail.com
+Signed-off-by: Bjorn Andersson <andersson@kernel.org>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/remoteproc/qcom_wcnss.c | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/drivers/remoteproc/qcom_wcnss.c b/drivers/remoteproc/qcom_wcnss.c
+index 153260b4e2eb4..37174b544113f 100644
+--- a/drivers/remoteproc/qcom_wcnss.c
++++ b/drivers/remoteproc/qcom_wcnss.c
+@@ -456,7 +456,8 @@ static int wcnss_init_regulators(struct qcom_wcnss *wcnss,
+       if (wcnss->num_pds) {
+               info += wcnss->num_pds;
+               /* Handle single power domain case */
+-              num_vregs += num_pd_vregs - wcnss->num_pds;
++              if (wcnss->num_pds < num_pd_vregs)
++                      num_vregs += num_pd_vregs - wcnss->num_pds;
+       } else {
+               num_vregs += num_pd_vregs;
+       }
+-- 
+2.39.5
+
diff --git a/queue-6.6/sch_hfsc-fix-qlen-accounting-bug-when-using-peek-in-.patch b/queue-6.6/sch_hfsc-fix-qlen-accounting-bug-when-using-peek-in-.patch
new file mode 100644 (file)
index 0000000..281b1fb
--- /dev/null
@@ -0,0 +1,62 @@
+From 4402fbc0a6631cdd343205e182000285481df62c Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Sun, 18 May 2025 15:20:37 -0700
+Subject: sch_hfsc: Fix qlen accounting bug when using peek in hfsc_enqueue()
+
+From: Cong Wang <xiyou.wangcong@gmail.com>
+
+[ Upstream commit 3f981138109f63232a5fb7165938d4c945cc1b9d ]
+
+When enqueuing the first packet to an HFSC class, hfsc_enqueue() calls the
+child qdisc's peek() operation before incrementing sch->q.qlen and
+sch->qstats.backlog. If the child qdisc uses qdisc_peek_dequeued(), this may
+trigger an immediate dequeue and potential packet drop. In such cases,
+qdisc_tree_reduce_backlog() is called, but the HFSC qdisc's qlen and backlog
+have not yet been updated, leading to inconsistent queue accounting. This
+can leave an empty HFSC class in the active list, causing further
+consequences like use-after-free.
+
+This patch fixes the bug by moving the increment of sch->q.qlen and
+sch->qstats.backlog before the call to the child qdisc's peek() operation.
+This ensures that queue length and backlog are always accurate when packet
+drops or dequeues are triggered during the peek.
+
+Fixes: 12d0ad3be9c3 ("net/sched/sch_hfsc.c: handle corner cases where head may change invalidating calculated deadline")
+Reported-by: Mingi Cho <mincho@theori.io>
+Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com>
+Reviewed-by: Simon Horman <horms@kernel.org>
+Link: https://patch.msgid.link/20250518222038.58538-2-xiyou.wangcong@gmail.com
+Reviewed-by: Jamal Hadi Salim <jhs@mojatatu.com>
+Signed-off-by: Paolo Abeni <pabeni@redhat.com>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ net/sched/sch_hfsc.c | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/net/sched/sch_hfsc.c b/net/sched/sch_hfsc.c
+index 5d9cccfac4a15..1bf4fd698c417 100644
+--- a/net/sched/sch_hfsc.c
++++ b/net/sched/sch_hfsc.c
+@@ -1570,6 +1570,9 @@ hfsc_enqueue(struct sk_buff *skb, struct Qdisc *sch, struct sk_buff **to_free)
+               return err;
+       }
++      sch->qstats.backlog += len;
++      sch->q.qlen++;
++
+       if (first && !cl->cl_nactive) {
+               if (cl->cl_flags & HFSC_RSC)
+                       init_ed(cl, len);
+@@ -1585,9 +1588,6 @@ hfsc_enqueue(struct sk_buff *skb, struct Qdisc *sch, struct sk_buff **to_free)
+       }
+-      sch->qstats.backlog += len;
+-      sch->q.qlen++;
+-
+       return NET_XMIT_SUCCESS;
+ }
+-- 
+2.39.5
+
index 65a1ddc7ede892919ba195b2e269d84a4b68c7d1..863115c087202fc9adaba796d1000d7c655536fc 100644 (file)
@@ -330,3 +330,28 @@ tools-ynl-gen-validate-0-len-strings-from-kernel.patch
 wifi-iwlwifi-add-support-for-killer-on-mtl.patch
 xenbus-allow-pvh-dom0-a-non-local-xenstore.patch
 __legitimize_mnt-check-for-mnt_sync_umount-should-be.patch
+soundwire-bus-fix-race-on-the-creation-of-the-irq-do.patch
+espintcp-remove-encap-socket-caching-to-avoid-refere.patch
+dmaengine-idxd-add-wq-driver-name-support-for-accel-.patch
+dmaengine-idxd-fix-allowing-write-from-different-add.patch
+kernel-fork-only-call-untrack_pfn_clear-on-vmas-dupl.patch
+remoteproc-qcom_wcnss-fix-on-platforms-without-fallb.patch
+clk-sunxi-ng-d1-add-missing-divider-for-mmc-mod-cloc.patch
+xfrm-sanitize-marks-before-insert.patch
+dmaengine-idxd-fix-poll-return-value.patch
+dmaengine-fsl-edma-fix-return-code-for-unhandled-int.patch
+bluetooth-l2cap-fix-not-checking-l2cap_chan-security.patch
+bluetooth-btusb-use-skb_pull-to-avoid-unsafe-access-.patch
+bridge-netfilter-fix-forwarding-of-fragmented-packet.patch
+ice-fix-vf-num_mac-count-with-port-representors.patch
+ice-fix-lacp-bonds-without-sriov-environment.patch
+pinctrl-qcom-msm-convert-to-platform-remove-callback.patch
+pinctrl-qcom-switch-to-devm_register_sys_off_handler.patch
+net-dwmac-sun8i-use-parsed-internal-phy-address-inst.patch
+net-lan743x-restore-sgmii-ctrl-register-on-resume.patch
+io_uring-fix-overflow-resched-cqe-reordering.patch
+sch_hfsc-fix-qlen-accounting-bug-when-using-peek-in-.patch
+octeontx2-pf-add-af_xdp-non-zero-copy-support.patch
+net-tipc-fix-slab-use-after-free-read-in-tipc_aead_e.patch
+octeontx2-af-set-lmt_ena-bit-for-apr-table-entries.patch
+octeontx2-af-fix-apr-entry-mapping-based-on-apr_lmt_.patch
diff --git a/queue-6.6/soundwire-bus-fix-race-on-the-creation-of-the-irq-do.patch b/queue-6.6/soundwire-bus-fix-race-on-the-creation-of-the-irq-do.patch
new file mode 100644 (file)
index 0000000..e7e8662
--- /dev/null
@@ -0,0 +1,60 @@
+From 6bcd6e476f0a79f8953b320de6279657c7e634f5 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Wed, 9 Apr 2025 13:22:39 +0100
+Subject: soundwire: bus: Fix race on the creation of the IRQ domain
+
+From: Charles Keepax <ckeepax@opensource.cirrus.com>
+
+[ Upstream commit fd15594ba7d559d9da741504c322b9f57c4981e5 ]
+
+The SoundWire IRQ domain needs to be created before any slaves are added
+to the bus, such that the domain is always available when needed. Move
+the call to sdw_irq_create() before the calls to sdw_acpi_find_slaves()
+and sdw_of_find_slaves().
+
+Fixes: 12a95123bfe1 ("soundwire: bus: Allow SoundWire peripherals to register IRQ handlers")
+Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
+Link: https://lore.kernel.org/r/20250409122239.1396489-1-ckeepax@opensource.cirrus.com
+Signed-off-by: Vinod Koul <vkoul@kernel.org>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/soundwire/bus.c | 9 +++++----
+ 1 file changed, 5 insertions(+), 4 deletions(-)
+
+diff --git a/drivers/soundwire/bus.c b/drivers/soundwire/bus.c
+index e7553c38be59d..767942f19adb6 100644
+--- a/drivers/soundwire/bus.c
++++ b/drivers/soundwire/bus.c
+@@ -121,6 +121,10 @@ int sdw_bus_master_add(struct sdw_bus *bus, struct device *parent,
+       set_bit(SDW_GROUP13_DEV_NUM, bus->assigned);
+       set_bit(SDW_MASTER_DEV_NUM, bus->assigned);
++      ret = sdw_irq_create(bus, fwnode);
++      if (ret)
++              return ret;
++
+       /*
+        * SDW is an enumerable bus, but devices can be powered off. So,
+        * they won't be able to report as present.
+@@ -137,6 +141,7 @@ int sdw_bus_master_add(struct sdw_bus *bus, struct device *parent,
+       if (ret < 0) {
+               dev_err(bus->dev, "Finding slaves failed:%d\n", ret);
++              sdw_irq_delete(bus);
+               return ret;
+       }
+@@ -155,10 +160,6 @@ int sdw_bus_master_add(struct sdw_bus *bus, struct device *parent,
+       bus->params.curr_bank = SDW_BANK0;
+       bus->params.next_bank = SDW_BANK1;
+-      ret = sdw_irq_create(bus, fwnode);
+-      if (ret)
+-              return ret;
+-
+       return 0;
+ }
+ EXPORT_SYMBOL(sdw_bus_master_add);
+-- 
+2.39.5
+
diff --git a/queue-6.6/xfrm-sanitize-marks-before-insert.patch b/queue-6.6/xfrm-sanitize-marks-before-insert.patch
new file mode 100644 (file)
index 0000000..e053bdd
--- /dev/null
@@ -0,0 +1,71 @@
+From 6c11731f41c642ef2a1f0bca59480c4891fee1d0 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Wed, 7 May 2025 13:31:58 +0200
+Subject: xfrm: Sanitize marks before insert
+
+From: Paul Chaignon <paul.chaignon@gmail.com>
+
+[ Upstream commit 0b91fda3a1f044141e1e615456ff62508c32b202 ]
+
+Prior to this patch, the mark is sanitized (applying the state's mask to
+the state's value) only on inserts when checking if a conflicting XFRM
+state or policy exists.
+
+We discovered in Cilium that this same sanitization does not occur
+in the hot-path __xfrm_state_lookup. In the hot-path, the sk_buff's mark
+is simply compared to the state's value:
+
+    if ((mark & x->mark.m) != x->mark.v)
+        continue;
+
+Therefore, users can define unsanitized marks (ex. 0xf42/0xf00) which will
+never match any packet.
+
+This commit updates __xfrm_state_insert and xfrm_policy_insert to store
+the sanitized marks, thus removing this footgun.
+
+This has the side effect of changing the ip output, as the
+returned mark will have the mask applied to it when printed.
+
+Fixes: 3d6acfa7641f ("xfrm: SA lookups with mark")
+Signed-off-by: Paul Chaignon <paul.chaignon@gmail.com>
+Signed-off-by: Louis DeLosSantos <louis.delos.devel@gmail.com>
+Co-developed-by: Louis DeLosSantos <louis.delos.devel@gmail.com>
+Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ net/xfrm/xfrm_policy.c | 3 +++
+ net/xfrm/xfrm_state.c  | 3 +++
+ 2 files changed, 6 insertions(+)
+
+diff --git a/net/xfrm/xfrm_policy.c b/net/xfrm/xfrm_policy.c
+index 68b3f9e7edffd..2edb0f868c573 100644
+--- a/net/xfrm/xfrm_policy.c
++++ b/net/xfrm/xfrm_policy.c
+@@ -1603,6 +1603,9 @@ int xfrm_policy_insert(int dir, struct xfrm_policy *policy, int excl)
+       struct xfrm_policy *delpol;
+       struct hlist_head *chain;
++      /* Sanitize mark before store */
++      policy->mark.v &= policy->mark.m;
++
+       spin_lock_bh(&net->xfrm.xfrm_policy_lock);
+       chain = policy_hash_bysel(net, &policy->selector, policy->family, dir);
+       if (chain)
+diff --git a/net/xfrm/xfrm_state.c b/net/xfrm/xfrm_state.c
+index 7222ba50390d6..86029cf5358c7 100644
+--- a/net/xfrm/xfrm_state.c
++++ b/net/xfrm/xfrm_state.c
+@@ -1475,6 +1475,9 @@ static void __xfrm_state_insert(struct xfrm_state *x)
+       list_add(&x->km.all, &net->xfrm.state_all);
++      /* Sanitize mark before store */
++      x->mark.v &= x->mark.m;
++
+       h = xfrm_dst_hash(net, &x->id.daddr, &x->props.saddr,
+                         x->props.reqid, x->props.family);
+       XFRM_STATE_INSERT(bydst, &x->bydst, net->xfrm.state_bydst + h,
+-- 
+2.39.5
+