]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
6.1-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 21 Sep 2025 17:24:09 +0000 (19:24 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 21 Sep 2025 17:24:09 +0000 (19:24 +0200)
added patches:
mptcp-pm-nl-announce-deny-join-id0-flag.patch
phy-broadcom-ns-usb3-fix-wvoid-pointer-to-enum-cast-warning.patch
phy-ti-omap-usb2-fix-device-leak-at-unbind.patch
phy-use-device_get_match_data.patch
selftests-mptcp-userspace-pm-validate-deny-join-id0-flag.patch
xhci-dbc-decouple-endpoint-allocation-from-initialization.patch
xhci-dbc-fix-full-dbc-transfer-ring-after-several-reconnects.patch

queue-6.1/mptcp-pm-nl-announce-deny-join-id0-flag.patch [new file with mode: 0644]
queue-6.1/phy-broadcom-ns-usb3-fix-wvoid-pointer-to-enum-cast-warning.patch [new file with mode: 0644]
queue-6.1/phy-ti-omap-usb2-fix-device-leak-at-unbind.patch [new file with mode: 0644]
queue-6.1/phy-use-device_get_match_data.patch [new file with mode: 0644]
queue-6.1/selftests-mptcp-userspace-pm-validate-deny-join-id0-flag.patch [new file with mode: 0644]
queue-6.1/series
queue-6.1/xhci-dbc-decouple-endpoint-allocation-from-initialization.patch [new file with mode: 0644]
queue-6.1/xhci-dbc-fix-full-dbc-transfer-ring-after-several-reconnects.patch [new file with mode: 0644]

diff --git a/queue-6.1/mptcp-pm-nl-announce-deny-join-id0-flag.patch b/queue-6.1/mptcp-pm-nl-announce-deny-join-id0-flag.patch
new file mode 100644 (file)
index 0000000..e89ac77
--- /dev/null
@@ -0,0 +1,109 @@
+From stable+bounces-180715-greg=kroah.com@vger.kernel.org Sat Sep 20 00:51:43 2025
+From: "Matthieu Baerts (NGI0)" <matttbe@kernel.org>
+Date: Sat, 20 Sep 2025 00:51:20 +0200
+Subject: mptcp: pm: nl: announce deny-join-id0 flag
+To: mptcp@lists.linux.dev, stable@vger.kernel.org, gregkh@linuxfoundation.org
+Cc: "Matthieu Baerts (NGI0)" <matttbe@kernel.org>, sashal@kernel.org, Marek Majkowski <marek@cloudflare.com>, Mat Martineau <martineau@kernel.org>, Jakub Kicinski <kuba@kernel.org>
+Message-ID: <20250919225118.3781035-5-matttbe@kernel.org>
+
+From: "Matthieu Baerts (NGI0)" <matttbe@kernel.org>
+
+commit 2293c57484ae64c9a3c847c8807db8c26a3a4d41 upstream.
+
+During the connection establishment, a peer can tell the other one that
+it cannot establish new subflows to the initial IP address and port by
+setting the 'C' flag [1]. Doing so makes sense when the sender is behind
+a strict NAT, operating behind a legacy Layer 4 load balancer, or using
+anycast IP address for example.
+
+When this 'C' flag is set, the path-managers must then not try to
+establish new subflows to the other peer's initial IP address and port.
+The in-kernel PM has access to this info, but the userspace PM didn't.
+
+The RFC8684 [1] is strict about that:
+
+  (...) therefore the receiver MUST NOT try to open any additional
+  subflows toward this address and port.
+
+So it is important to tell the userspace about that as it is responsible
+for the respect of this flag.
+
+When a new connection is created and established, the Netlink events
+now contain the existing but not currently used 'flags' attribute. When
+MPTCP_PM_EV_FLAG_DENY_JOIN_ID0 is set, it means no other subflows
+to the initial IP address and port -- info that are also part of the
+event -- can be established.
+
+Link: https://datatracker.ietf.org/doc/html/rfc8684#section-3.1-20.6 [1]
+Fixes: 702c2f646d42 ("mptcp: netlink: allow userspace-driven subflow establishment")
+Reported-by: Marek Majkowski <marek@cloudflare.com>
+Closes: https://github.com/multipath-tcp/mptcp_net-next/issues/532
+Reviewed-by: Mat Martineau <martineau@kernel.org>
+Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
+Link: https://patch.msgid.link/20250912-net-mptcp-pm-uspace-deny_join_id0-v1-2-40171884ade8@kernel.org
+Signed-off-by: Jakub Kicinski <kuba@kernel.org>
+[ Conflicts in mptcp_pm.yaml, and mptcp_pm.h, because these files have
+  been added later by commit bc8aeb2045e2 ("Documentation: netlink: add
+  a YAML spec for mptcp"), and commit 9d1ed17f93ce ("uapi: mptcp: use
+  header file generated from YAML spec"), which are not in this version.
+  Applying the same modifications, but only in mptcp.h.
+  Conflict in pm_netlink.c, because of a difference in the context,
+  introduced by commit b9f4554356f6 ("mptcp: annotate lockless access
+  for token"), which is not in this version. ]
+Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ include/uapi/linux/mptcp.h |    6 ++++--
+ net/mptcp/pm_netlink.c     |    7 +++++++
+ 2 files changed, 11 insertions(+), 2 deletions(-)
+
+--- a/include/uapi/linux/mptcp.h
++++ b/include/uapi/linux/mptcp.h
+@@ -81,6 +81,8 @@ enum {
+ #define MPTCP_PM_ADDR_ATTR_MAX (__MPTCP_PM_ADDR_ATTR_MAX - 1)
++#define MPTCP_PM_EV_FLAG_DENY_JOIN_ID0                _BITUL(0)
++
+ #define MPTCP_PM_ADDR_FLAG_SIGNAL                     (1 << 0)
+ #define MPTCP_PM_ADDR_FLAG_SUBFLOW                    (1 << 1)
+ #define MPTCP_PM_ADDR_FLAG_BACKUP                     (1 << 2)
+@@ -127,13 +129,13 @@ struct mptcp_info {
+ /*
+  * MPTCP_EVENT_CREATED: token, family, saddr4 | saddr6, daddr4 | daddr6,
+- *                      sport, dport
++ *                      sport, dport, server-side, [flags]
+  * A new MPTCP connection has been created. It is the good time to allocate
+  * memory and send ADD_ADDR if needed. Depending on the traffic-patterns
+  * it can take a long time until the MPTCP_EVENT_ESTABLISHED is sent.
+  *
+  * MPTCP_EVENT_ESTABLISHED: token, family, saddr4 | saddr6, daddr4 | daddr6,
+- *                        sport, dport
++ *                        sport, dport, server-side, [flags]
+  * A MPTCP connection is established (can start new subflows).
+  *
+  * MPTCP_EVENT_CLOSED: token
+--- a/net/mptcp/pm_netlink.c
++++ b/net/mptcp/pm_netlink.c
+@@ -2242,6 +2242,7 @@ static int mptcp_event_created(struct sk
+                              const struct sock *ssk)
+ {
+       int err = nla_put_u32(skb, MPTCP_ATTR_TOKEN, msk->token);
++      u16 flags = 0;
+       if (err)
+               return err;
+@@ -2249,6 +2250,12 @@ static int mptcp_event_created(struct sk
+       if (nla_put_u8(skb, MPTCP_ATTR_SERVER_SIDE, READ_ONCE(msk->pm.server_side)))
+               return -EMSGSIZE;
++      if (READ_ONCE(msk->pm.remote_deny_join_id0))
++              flags |= MPTCP_PM_EV_FLAG_DENY_JOIN_ID0;
++
++      if (flags && nla_put_u16(skb, MPTCP_ATTR_FLAGS, flags))
++              return -EMSGSIZE;
++
+       return mptcp_event_add_subflow(skb, ssk);
+ }
diff --git a/queue-6.1/phy-broadcom-ns-usb3-fix-wvoid-pointer-to-enum-cast-warning.patch b/queue-6.1/phy-broadcom-ns-usb3-fix-wvoid-pointer-to-enum-cast-warning.patch
new file mode 100644 (file)
index 0000000..6711e08
--- /dev/null
@@ -0,0 +1,38 @@
+From stable+bounces-180375-greg=kroah.com@vger.kernel.org Wed Sep 17 17:18:46 2025
+From: Sasha Levin <sashal@kernel.org>
+Date: Wed, 17 Sep 2025 09:29:49 -0400
+Subject: phy: broadcom: ns-usb3: fix Wvoid-pointer-to-enum-cast warning
+To: stable@vger.kernel.org
+Cc: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>, Vinod Koul <vkoul@kernel.org>, Sasha Levin <sashal@kernel.org>
+Message-ID: <20250917132951.550844-1-sashal@kernel.org>
+
+From: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
+
+[ Upstream commit bd6e74a2f0a0c76dda8e44d26f9b91a797586c3b ]
+
+'family' is an enum, thus cast of pointer on 64-bit compile test with
+W=1 causes:
+
+  drivers/phy/broadcom/phy-bcm-ns-usb3.c:209:17: error: cast to smaller integer type 'enum bcm_ns_family' from 'const void *' [-Werror,-Wvoid-pointer-to-enum-cast]
+
+Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
+Link: https://lore.kernel.org/r/20230810111958.205705-2-krzysztof.kozlowski@linaro.org
+Signed-off-by: Vinod Koul <vkoul@kernel.org>
+Stable-dep-of: 64961557efa1 ("phy: ti: omap-usb2: fix device leak at unbind")
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/phy/broadcom/phy-bcm-ns-usb3.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/phy/broadcom/phy-bcm-ns-usb3.c
++++ b/drivers/phy/broadcom/phy-bcm-ns-usb3.c
+@@ -206,7 +206,7 @@ static int bcm_ns_usb3_mdio_probe(struct
+       of_id = of_match_device(bcm_ns_usb3_id_table, dev);
+       if (!of_id)
+               return -EINVAL;
+-      usb3->family = (enum bcm_ns_family)of_id->data;
++      usb3->family = (uintptr_t)of_id->data;
+       syscon_np = of_parse_phandle(dev->of_node, "usb3-dmp-syscon", 0);
+       err = of_address_to_resource(syscon_np, 0, &res);
diff --git a/queue-6.1/phy-ti-omap-usb2-fix-device-leak-at-unbind.patch b/queue-6.1/phy-ti-omap-usb2-fix-device-leak-at-unbind.patch
new file mode 100644 (file)
index 0000000..50047bb
--- /dev/null
@@ -0,0 +1,63 @@
+From stable+bounces-180377-greg=kroah.com@vger.kernel.org Wed Sep 17 15:52:12 2025
+From: Sasha Levin <sashal@kernel.org>
+Date: Wed, 17 Sep 2025 09:29:51 -0400
+Subject: phy: ti: omap-usb2: fix device leak at unbind
+To: stable@vger.kernel.org
+Cc: Johan Hovold <johan@kernel.org>, Roger Quadros <rogerq@kernel.org>, Vinod Koul <vkoul@kernel.org>, Sasha Levin <sashal@kernel.org>
+Message-ID: <20250917132951.550844-3-sashal@kernel.org>
+
+From: Johan Hovold <johan@kernel.org>
+
+[ Upstream commit 64961557efa1b98f375c0579779e7eeda1a02c42 ]
+
+Make sure to drop the reference to the control device taken by
+of_find_device_by_node() during probe when the driver is unbound.
+
+Fixes: 478b6c7436c2 ("usb: phy: omap-usb2: Don't use omap_get_control_dev()")
+Cc: stable@vger.kernel.org     # 3.13
+Cc: Roger Quadros <rogerq@kernel.org>
+Signed-off-by: Johan Hovold <johan@kernel.org>
+Link: https://lore.kernel.org/r/20250724131206.2211-3-johan@kernel.org
+Signed-off-by: Vinod Koul <vkoul@kernel.org>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/phy/ti/phy-omap-usb2.c |   13 +++++++++++++
+ 1 file changed, 13 insertions(+)
+
+--- a/drivers/phy/ti/phy-omap-usb2.c
++++ b/drivers/phy/ti/phy-omap-usb2.c
+@@ -363,6 +363,13 @@ static void omap_usb2_init_errata(struct
+               phy->flags |= OMAP_USB2_DISABLE_CHRG_DET;
+ }
++static void omap_usb2_put_device(void *_dev)
++{
++      struct device *dev = _dev;
++
++      put_device(dev);
++}
++
+ static int omap_usb2_probe(struct platform_device *pdev)
+ {
+       struct omap_usb *phy;
+@@ -373,6 +380,7 @@ static int omap_usb2_probe(struct platfo
+       struct device_node *control_node;
+       struct platform_device *control_pdev;
+       const struct usb_phy_data *phy_data;
++      int ret;
+       phy_data = device_get_match_data(&pdev->dev);
+       if (!phy_data)
+@@ -423,6 +431,11 @@ static int omap_usb2_probe(struct platfo
+                       return -EINVAL;
+               }
+               phy->control_dev = &control_pdev->dev;
++
++              ret = devm_add_action_or_reset(&pdev->dev, omap_usb2_put_device,
++                                             phy->control_dev);
++              if (ret)
++                      return ret;
+       } else {
+               if (of_property_read_u32_index(node,
+                                              "syscon-phy-power", 1,
diff --git a/queue-6.1/phy-use-device_get_match_data.patch b/queue-6.1/phy-use-device_get_match_data.patch
new file mode 100644 (file)
index 0000000..f07c806
--- /dev/null
@@ -0,0 +1,321 @@
+From stable+bounces-180376-greg=kroah.com@vger.kernel.org Wed Sep 17 16:53:35 2025
+From: Sasha Levin <sashal@kernel.org>
+Date: Wed, 17 Sep 2025 09:29:50 -0400
+Subject: phy: Use device_get_match_data()
+To: stable@vger.kernel.org
+Cc: Rob Herring <robh@kernel.org>, Heiko Stuebner <heiko@sntech.de>, Vinod Koul <vkoul@kernel.org>, Sasha Levin <sashal@kernel.org>
+Message-ID: <20250917132951.550844-2-sashal@kernel.org>
+
+From: Rob Herring <robh@kernel.org>
+
+[ Upstream commit 21bf6fc47a1e45031ba8a7084343b7cfd09ed1d3 ]
+
+Use preferred device_get_match_data() instead of of_match_device() to
+get the driver match data. With this, adjust the includes to explicitly
+include the correct headers.
+
+Signed-off-by: Rob Herring <robh@kernel.org>
+Reviewed-by: Heiko Stuebner <heiko@sntech.de>
+Link: https://lore.kernel.org/r/20231009172923.2457844-15-robh@kernel.org
+Signed-off-by: Vinod Koul <vkoul@kernel.org>
+Stable-dep-of: 64961557efa1 ("phy: ti: omap-usb2: fix device leak at unbind")
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/phy/broadcom/phy-bcm-ns-usb3.c   |    9 +++------
+ drivers/phy/marvell/phy-berlin-usb.c     |    7 +++----
+ drivers/phy/ralink/phy-ralink-usb.c      |   10 +++-------
+ drivers/phy/rockchip/phy-rockchip-pcie.c |   11 ++++-------
+ drivers/phy/rockchip/phy-rockchip-usb.c  |   10 +++-------
+ drivers/phy/ti/phy-omap-control.c        |    9 ++-------
+ drivers/phy/ti/phy-omap-usb2.c           |   11 ++++-------
+ drivers/phy/ti/phy-ti-pipe3.c            |   14 ++++----------
+ 8 files changed, 26 insertions(+), 55 deletions(-)
+
+--- a/drivers/phy/broadcom/phy-bcm-ns-usb3.c
++++ b/drivers/phy/broadcom/phy-bcm-ns-usb3.c
+@@ -16,10 +16,11 @@
+ #include <linux/iopoll.h>
+ #include <linux/mdio.h>
+ #include <linux/module.h>
++#include <linux/of.h>
+ #include <linux/of_address.h>
+-#include <linux/of_platform.h>
+ #include <linux/platform_device.h>
+ #include <linux/phy/phy.h>
++#include <linux/property.h>
+ #include <linux/slab.h>
+ #define BCM_NS_USB3_PHY_BASE_ADDR_REG 0x1f
+@@ -189,7 +190,6 @@ static int bcm_ns_usb3_mdio_phy_write(st
+ static int bcm_ns_usb3_mdio_probe(struct mdio_device *mdiodev)
+ {
+       struct device *dev = &mdiodev->dev;
+-      const struct of_device_id *of_id;
+       struct phy_provider *phy_provider;
+       struct device_node *syscon_np;
+       struct bcm_ns_usb3 *usb3;
+@@ -203,10 +203,7 @@ static int bcm_ns_usb3_mdio_probe(struct
+       usb3->dev = dev;
+       usb3->mdiodev = mdiodev;
+-      of_id = of_match_device(bcm_ns_usb3_id_table, dev);
+-      if (!of_id)
+-              return -EINVAL;
+-      usb3->family = (uintptr_t)of_id->data;
++      usb3->family = (enum bcm_ns_family)device_get_match_data(dev);
+       syscon_np = of_parse_phandle(dev->of_node, "usb3-dmp-syscon", 0);
+       err = of_address_to_resource(syscon_np, 0, &res);
+--- a/drivers/phy/marvell/phy-berlin-usb.c
++++ b/drivers/phy/marvell/phy-berlin-usb.c
+@@ -8,9 +8,10 @@
+ #include <linux/io.h>
+ #include <linux/module.h>
+-#include <linux/of_device.h>
++#include <linux/of.h>
+ #include <linux/phy/phy.h>
+ #include <linux/platform_device.h>
++#include <linux/property.h>
+ #include <linux/reset.h>
+ #define USB_PHY_PLL           0x04
+@@ -162,8 +163,6 @@ MODULE_DEVICE_TABLE(of, phy_berlin_usb_o
+ static int phy_berlin_usb_probe(struct platform_device *pdev)
+ {
+-      const struct of_device_id *match =
+-              of_match_device(phy_berlin_usb_of_match, &pdev->dev);
+       struct phy_berlin_usb_priv *priv;
+       struct phy *phy;
+       struct phy_provider *phy_provider;
+@@ -180,7 +179,7 @@ static int phy_berlin_usb_probe(struct p
+       if (IS_ERR(priv->rst_ctrl))
+               return PTR_ERR(priv->rst_ctrl);
+-      priv->pll_divider = *((u32 *)match->data);
++      priv->pll_divider = *((u32 *)device_get_match_data(&pdev->dev));
+       phy = devm_phy_create(&pdev->dev, NULL, &phy_berlin_usb_ops);
+       if (IS_ERR(phy)) {
+--- a/drivers/phy/ralink/phy-ralink-usb.c
++++ b/drivers/phy/ralink/phy-ralink-usb.c
+@@ -13,9 +13,10 @@
+ #include <linux/mfd/syscon.h>
+ #include <linux/module.h>
+ #include <linux/mutex.h>
+-#include <linux/of_platform.h>
++#include <linux/of.h>
+ #include <linux/phy/phy.h>
+ #include <linux/platform_device.h>
++#include <linux/platform_device.h>
+ #include <linux/regmap.h>
+ #include <linux/reset.h>
+@@ -171,18 +172,13 @@ static int ralink_usb_phy_probe(struct p
+ {
+       struct device *dev = &pdev->dev;
+       struct phy_provider *phy_provider;
+-      const struct of_device_id *match;
+       struct ralink_usb_phy *phy;
+-      match = of_match_device(ralink_usb_phy_of_match, &pdev->dev);
+-      if (!match)
+-              return -ENODEV;
+-
+       phy = devm_kzalloc(dev, sizeof(*phy), GFP_KERNEL);
+       if (!phy)
+               return -ENOMEM;
+-      phy->clk = (uintptr_t)match->data;
++      phy->clk = (uintptr_t)device_get_match_data(&pdev->dev);
+       phy->base = NULL;
+       phy->sysctl = syscon_regmap_lookup_by_phandle(dev->of_node, "ralink,sysctl");
+--- a/drivers/phy/rockchip/phy-rockchip-pcie.c
++++ b/drivers/phy/rockchip/phy-rockchip-pcie.c
+@@ -12,10 +12,9 @@
+ #include <linux/mfd/syscon.h>
+ #include <linux/module.h>
+ #include <linux/of.h>
+-#include <linux/of_address.h>
+-#include <linux/of_platform.h>
+ #include <linux/phy/phy.h>
+ #include <linux/platform_device.h>
++#include <linux/property.h>
+ #include <linux/regmap.h>
+ #include <linux/reset.h>
+@@ -63,7 +62,7 @@ struct rockchip_pcie_data {
+ };
+ struct rockchip_pcie_phy {
+-      struct rockchip_pcie_data *phy_data;
++      const struct rockchip_pcie_data *phy_data;
+       struct regmap *reg_base;
+       struct phy_pcie_instance {
+               struct phy *phy;
+@@ -365,7 +364,6 @@ static int rockchip_pcie_phy_probe(struc
+       struct rockchip_pcie_phy *rk_phy;
+       struct phy_provider *phy_provider;
+       struct regmap *grf;
+-      const struct of_device_id *of_id;
+       int i;
+       u32 phy_num;
+@@ -379,11 +377,10 @@ static int rockchip_pcie_phy_probe(struc
+       if (!rk_phy)
+               return -ENOMEM;
+-      of_id = of_match_device(rockchip_pcie_phy_dt_ids, &pdev->dev);
+-      if (!of_id)
++      rk_phy->phy_data = device_get_match_data(&pdev->dev);
++      if (!rk_phy->phy_data)
+               return -EINVAL;
+-      rk_phy->phy_data = (struct rockchip_pcie_data *)of_id->data;
+       rk_phy->reg_base = grf;
+       mutex_init(&rk_phy->pcie_mutex);
+--- a/drivers/phy/rockchip/phy-rockchip-usb.c
++++ b/drivers/phy/rockchip/phy-rockchip-usb.c
+@@ -13,10 +13,9 @@
+ #include <linux/module.h>
+ #include <linux/mutex.h>
+ #include <linux/of.h>
+-#include <linux/of_address.h>
+-#include <linux/of_platform.h>
+ #include <linux/phy/phy.h>
+ #include <linux/platform_device.h>
++#include <linux/property.h>
+ #include <linux/regulator/consumer.h>
+ #include <linux/reset.h>
+ #include <linux/regmap.h>
+@@ -458,7 +457,6 @@ static int rockchip_usb_phy_probe(struct
+       struct device *dev = &pdev->dev;
+       struct rockchip_usb_phy_base *phy_base;
+       struct phy_provider *phy_provider;
+-      const struct of_device_id *match;
+       struct device_node *child;
+       int err;
+@@ -466,14 +464,12 @@ static int rockchip_usb_phy_probe(struct
+       if (!phy_base)
+               return -ENOMEM;
+-      match = of_match_device(dev->driver->of_match_table, dev);
+-      if (!match || !match->data) {
++      phy_base->pdata = device_get_match_data(dev);
++      if (!phy_base->pdata) {
+               dev_err(dev, "missing phy data\n");
+               return -EINVAL;
+       }
+-      phy_base->pdata = match->data;
+-
+       phy_base->dev = dev;
+       phy_base->reg_base = ERR_PTR(-ENODEV);
+       if (dev->parent && dev->parent->of_node)
+--- a/drivers/phy/ti/phy-omap-control.c
++++ b/drivers/phy/ti/phy-omap-control.c
+@@ -8,9 +8,9 @@
+ #include <linux/module.h>
+ #include <linux/platform_device.h>
++#include <linux/property.h>
+ #include <linux/slab.h>
+ #include <linux/of.h>
+-#include <linux/of_device.h>
+ #include <linux/err.h>
+ #include <linux/io.h>
+ #include <linux/clk.h>
+@@ -268,20 +268,15 @@ MODULE_DEVICE_TABLE(of, omap_control_phy
+ static int omap_control_phy_probe(struct platform_device *pdev)
+ {
+-      const struct of_device_id *of_id;
+       struct omap_control_phy *control_phy;
+-      of_id = of_match_device(omap_control_phy_id_table, &pdev->dev);
+-      if (!of_id)
+-              return -EINVAL;
+-
+       control_phy = devm_kzalloc(&pdev->dev, sizeof(*control_phy),
+               GFP_KERNEL);
+       if (!control_phy)
+               return -ENOMEM;
+       control_phy->dev = &pdev->dev;
+-      control_phy->type = *(enum omap_control_phy_type *)of_id->data;
++      control_phy->type = *(enum omap_control_phy_type *)device_get_match_data(&pdev->dev);
+       if (control_phy->type == OMAP_CTRL_TYPE_OTGHS) {
+               control_phy->otghs_control =
+--- a/drivers/phy/ti/phy-omap-usb2.c
++++ b/drivers/phy/ti/phy-omap-usb2.c
+@@ -19,6 +19,7 @@
+ #include <linux/phy/phy.h>
+ #include <linux/platform_device.h>
+ #include <linux/pm_runtime.h>
++#include <linux/property.h>
+ #include <linux/regmap.h>
+ #include <linux/slab.h>
+ #include <linux/sys_soc.h>
+@@ -371,16 +372,12 @@ static int omap_usb2_probe(struct platfo
+       struct device_node *node = pdev->dev.of_node;
+       struct device_node *control_node;
+       struct platform_device *control_pdev;
+-      const struct of_device_id *of_id;
+-      struct usb_phy_data *phy_data;
++      const struct usb_phy_data *phy_data;
+-      of_id = of_match_device(omap_usb2_id_table, &pdev->dev);
+-
+-      if (!of_id)
++      phy_data = device_get_match_data(&pdev->dev);
++      if (!phy_data)
+               return -EINVAL;
+-      phy_data = (struct usb_phy_data *)of_id->data;
+-
+       phy = devm_kzalloc(&pdev->dev, sizeof(*phy), GFP_KERNEL);
+       if (!phy)
+               return -ENOMEM;
+--- a/drivers/phy/ti/phy-ti-pipe3.c
++++ b/drivers/phy/ti/phy-ti-pipe3.c
+@@ -8,6 +8,7 @@
+ #include <linux/module.h>
+ #include <linux/platform_device.h>
++#include <linux/property.h>
+ #include <linux/slab.h>
+ #include <linux/phy/phy.h>
+ #include <linux/of.h>
+@@ -791,23 +792,16 @@ static int ti_pipe3_probe(struct platfor
+       struct phy_provider *phy_provider;
+       struct device *dev = &pdev->dev;
+       int ret;
+-      const struct of_device_id *match;
+-      struct pipe3_data *data;
++      const struct pipe3_data *data;
+       phy = devm_kzalloc(dev, sizeof(*phy), GFP_KERNEL);
+       if (!phy)
+               return -ENOMEM;
+-      match = of_match_device(ti_pipe3_id_table, dev);
+-      if (!match)
++      data = device_get_match_data(dev);
++      if (!data)
+               return -EINVAL;
+-      data = (struct pipe3_data *)match->data;
+-      if (!data) {
+-              dev_err(dev, "no driver data\n");
+-              return -EINVAL;
+-      }
+-
+       phy->dev = dev;
+       phy->mode = data->mode;
+       phy->dpll_map = data->dpll_map;
diff --git a/queue-6.1/selftests-mptcp-userspace-pm-validate-deny-join-id0-flag.patch b/queue-6.1/selftests-mptcp-userspace-pm-validate-deny-join-id0-flag.patch
new file mode 100644 (file)
index 0000000..d9d7379
--- /dev/null
@@ -0,0 +1,104 @@
+From stable+bounces-180716-greg=kroah.com@vger.kernel.org Sat Sep 20 00:52:39 2025
+From: "Matthieu Baerts (NGI0)" <matttbe@kernel.org>
+Date: Sat, 20 Sep 2025 00:51:21 +0200
+Subject: selftests: mptcp: userspace pm: validate deny-join-id0 flag
+To: mptcp@lists.linux.dev, stable@vger.kernel.org, gregkh@linuxfoundation.org
+Cc: "Matthieu Baerts (NGI0)" <matttbe@kernel.org>, sashal@kernel.org, Mat Martineau <martineau@kernel.org>, Jakub Kicinski <kuba@kernel.org>
+Message-ID: <20250919225118.3781035-6-matttbe@kernel.org>
+
+From: "Matthieu Baerts (NGI0)" <matttbe@kernel.org>
+
+commit 24733e193a0d68f20d220e86da0362460c9aa812 upstream.
+
+The previous commit adds the MPTCP_PM_EV_FLAG_DENY_JOIN_ID0 flag. Make
+sure it is correctly announced by the other peer when it has been
+received.
+
+pm_nl_ctl will now display 'deny_join_id0:1' when monitoring the events,
+and when this flag was set by the other peer.
+
+The 'Fixes' tag here below is the same as the one from the previous
+commit: this patch here is not fixing anything wrong in the selftests,
+but it validates the previous fix for an issue introduced by this commit
+ID.
+
+Fixes: 702c2f646d42 ("mptcp: netlink: allow userspace-driven subflow establishment")
+Reviewed-by: Mat Martineau <martineau@kernel.org>
+Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
+Link: https://patch.msgid.link/20250912-net-mptcp-pm-uspace-deny_join_id0-v1-3-40171884ade8@kernel.org
+Signed-off-by: Jakub Kicinski <kuba@kernel.org>
+[ Conflict in userspace_pm.sh, because of a difference in the context,
+  introduced by commit c66fb480a330 ("selftests: userspace pm: avoid
+  relaunching pm events"), which is not in this version. The same lines
+  can still be added at the same place.
+  Conflicts in userspace_pm.sh, because of different refactoring, like
+  with commit ae1fa39da991 ("selftests: mptcp: add evts_get_info
+  helper"), and commit e198ad759273 ("selftests: mptcp: userspace_pm:
+  uniform results printing"). The modifications have been adapted to the
+  old version, without the new helpers. ]
+Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ tools/testing/selftests/net/mptcp/pm_nl_ctl.c     |    7 +++++++
+ tools/testing/selftests/net/mptcp/userspace_pm.sh |   14 ++++++++++++--
+ 2 files changed, 19 insertions(+), 2 deletions(-)
+
+--- a/tools/testing/selftests/net/mptcp/pm_nl_ctl.c
++++ b/tools/testing/selftests/net/mptcp/pm_nl_ctl.c
+@@ -188,6 +188,13 @@ static int capture_events(int fd, int ev
+                                       fprintf(stderr, ",error:%u", *(__u8 *)RTA_DATA(attrs));
+                               else if (attrs->rta_type == MPTCP_ATTR_SERVER_SIDE)
+                                       fprintf(stderr, ",server_side:%u", *(__u8 *)RTA_DATA(attrs));
++                              else if (attrs->rta_type == MPTCP_ATTR_FLAGS) {
++                                      __u16 flags = *(__u16 *)RTA_DATA(attrs);
++
++                                      /* only print when present, easier */
++                                      if (flags & MPTCP_PM_EV_FLAG_DENY_JOIN_ID0)
++                                              fprintf(stderr, ",deny_join_id0:1");
++                              }
+                               attrs = RTA_NEXT(attrs, msg_len);
+                       }
+--- a/tools/testing/selftests/net/mptcp/userspace_pm.sh
++++ b/tools/testing/selftests/net/mptcp/userspace_pm.sh
+@@ -139,6 +139,9 @@ make_connection()
+               is_v6="v4"
+       fi
++      # set this on the client side only: will not affect the rest
++      ip netns exec "$ns2" sysctl -q net.mptcp.allow_join_initial_addr_port=0
++
+       # Capture netlink events over the two network namespaces running
+       # the MPTCP client and server
+       local client_evts
+@@ -173,21 +176,28 @@ make_connection()
+       local client_token
+       local client_port
+       local client_serverside
++      local client_nojoin
+       local server_token
+       local server_serverside
++      local server_nojoin
+       client_token=$(sed --unbuffered -n 's/.*\(token:\)\([[:digit:]]*\).*$/\2/p;q' "$client_evts")
+       client_port=$(sed --unbuffered -n 's/.*\(sport:\)\([[:digit:]]*\).*$/\2/p;q' "$client_evts")
+       client_serverside=$(sed --unbuffered -n 's/.*\(server_side:\)\([[:digit:]]*\).*$/\2/p;q'\
+                                     "$client_evts")
++      client_nojoin=$(sed --unbuffered -n 's/.*\(deny_join_id0:\)\([[:digit:]]*\).*$/\2/p;q'\
++                                    "$client_evts")
+       kill_wait $server_evts_pid
+       server_token=$(sed --unbuffered -n 's/.*\(token:\)\([[:digit:]]*\).*$/\2/p;q' "$server_evts")
+       server_serverside=$(sed --unbuffered -n 's/.*\(server_side:\)\([[:digit:]]*\).*$/\2/p;q'\
+                                     "$server_evts")
++      server_nojoin=$(sed --unbuffered -n 's/.*\(deny_join_id0:\)\([[:digit:]]*\).*$/\2/p;q'\
++                                    "$server_evts")
+       rm -f "$client_evts" "$server_evts" "$file"
+-      if [ "$client_token" != "" ] && [ "$server_token" != "" ] && [ "$client_serverside" = 0 ] &&
+-                 [ "$server_serverside" = 1 ]
++      if [ "${client_token}" != "" ] && [ "${server_token}" != "" ] &&
++         [ "${client_serverside}" = 0 ] && [ "${server_serverside}" = 1 ] &&
++         [ "${client_nojoin:-0}" = 0 ] && [ "${server_nojoin:-0}" = 1 ]
+       then
+               stdbuf -o0 -e0 printf "Established IP%s MPTCP Connection ns2 => ns1    \t\t[OK]\n" $is_v6
+       else
index 31022c270bfb05869e94881f055fe352985b0f7c..5cb586ec3e265d16cf1cec964ba64e4225b238ef 100644 (file)
@@ -43,3 +43,10 @@ drm-bridge-cdns-mhdp8546-fix-missing-mutex-unlock-on.patch
 crypto-af_alg-indent-the-loop-in-af_alg_sendmsg.patch
 crypto-af_alg-set-merge-to-zero-early-in-af_alg_send.patch
 smb-client-fix-smbdirect_recv_io-leak-in-smbd_negoti.patch
+mptcp-pm-nl-announce-deny-join-id0-flag.patch
+selftests-mptcp-userspace-pm-validate-deny-join-id0-flag.patch
+phy-broadcom-ns-usb3-fix-wvoid-pointer-to-enum-cast-warning.patch
+phy-use-device_get_match_data.patch
+phy-ti-omap-usb2-fix-device-leak-at-unbind.patch
+xhci-dbc-decouple-endpoint-allocation-from-initialization.patch
+xhci-dbc-fix-full-dbc-transfer-ring-after-several-reconnects.patch
diff --git a/queue-6.1/xhci-dbc-decouple-endpoint-allocation-from-initialization.patch b/queue-6.1/xhci-dbc-decouple-endpoint-allocation-from-initialization.patch
new file mode 100644 (file)
index 0000000..6580e31
--- /dev/null
@@ -0,0 +1,140 @@
+From sashal@kernel.org Wed Sep 17 16:00:43 2025
+From: Sasha Levin <sashal@kernel.org>
+Date: Wed, 17 Sep 2025 10:00:39 -0400
+Subject: xhci: dbc: decouple endpoint allocation from initialization
+To: stable@vger.kernel.org
+Cc: Mathias Nyman <mathias.nyman@linux.intel.com>, Greg Kroah-Hartman <gregkh@linuxfoundation.org>, Sasha Levin <sashal@kernel.org>
+Message-ID: <20250917140040.569374-1-sashal@kernel.org>
+
+From: Mathias Nyman <mathias.nyman@linux.intel.com>
+
+[ Upstream commit 220a0ffde02f962c13bc752b01aa570b8c65a37b ]
+
+Decouple allocation of endpoint ring buffer from initialization
+of the buffer, and initialization of endpoint context parts from
+from the rest of the contexts.
+
+It allows driver to clear up and reinitialize endpoint rings
+after disconnect without reallocating everything.
+
+This is a prerequisite for the next patch that prevents the transfer
+ring from filling up with cancelled (no-op) TRBs if a debug cable is
+reconnected several times without transferring anything.
+
+Cc: stable@vger.kernel.org
+Fixes: dfba2174dc42 ("usb: xhci: Add DbC support in xHCI driver")
+Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
+Link: https://lore.kernel.org/r/20250902105306.877476-2-mathias.nyman@linux.intel.com
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/usb/host/xhci-dbgcap.c |   71 ++++++++++++++++++++++++++---------------
+ 1 file changed, 46 insertions(+), 25 deletions(-)
+
+--- a/drivers/usb/host/xhci-dbgcap.c
++++ b/drivers/usb/host/xhci-dbgcap.c
+@@ -86,13 +86,34 @@ static u32 xhci_dbc_populate_strings(str
+       return string_length;
+ }
++static void xhci_dbc_init_ep_contexts(struct xhci_dbc *dbc)
++{
++      struct xhci_ep_ctx      *ep_ctx;
++      unsigned int            max_burst;
++      dma_addr_t              deq;
++
++      max_burst               = DBC_CTRL_MAXBURST(readl(&dbc->regs->control));
++
++      /* Populate bulk out endpoint context: */
++      ep_ctx                  = dbc_bulkout_ctx(dbc);
++      deq                     = dbc_bulkout_enq(dbc);
++      ep_ctx->ep_info         = 0;
++      ep_ctx->ep_info2        = dbc_epctx_info2(BULK_OUT_EP, 1024, max_burst);
++      ep_ctx->deq             = cpu_to_le64(deq | dbc->ring_out->cycle_state);
++
++      /* Populate bulk in endpoint context: */
++      ep_ctx                  = dbc_bulkin_ctx(dbc);
++      deq                     = dbc_bulkin_enq(dbc);
++      ep_ctx->ep_info         = 0;
++      ep_ctx->ep_info2        = dbc_epctx_info2(BULK_IN_EP, 1024, max_burst);
++      ep_ctx->deq             = cpu_to_le64(deq | dbc->ring_in->cycle_state);
++}
++
+ static void xhci_dbc_init_contexts(struct xhci_dbc *dbc, u32 string_length)
+ {
+       struct dbc_info_context *info;
+-      struct xhci_ep_ctx      *ep_ctx;
+       u32                     dev_info;
+-      dma_addr_t              deq, dma;
+-      unsigned int            max_burst;
++      dma_addr_t              dma;
+       if (!dbc)
+               return;
+@@ -106,20 +127,8 @@ static void xhci_dbc_init_contexts(struc
+       info->serial            = cpu_to_le64(dma + DBC_MAX_STRING_LENGTH * 3);
+       info->length            = cpu_to_le32(string_length);
+-      /* Populate bulk out endpoint context: */
+-      ep_ctx                  = dbc_bulkout_ctx(dbc);
+-      max_burst               = DBC_CTRL_MAXBURST(readl(&dbc->regs->control));
+-      deq                     = dbc_bulkout_enq(dbc);
+-      ep_ctx->ep_info         = 0;
+-      ep_ctx->ep_info2        = dbc_epctx_info2(BULK_OUT_EP, 1024, max_burst);
+-      ep_ctx->deq             = cpu_to_le64(deq | dbc->ring_out->cycle_state);
+-
+-      /* Populate bulk in endpoint context: */
+-      ep_ctx                  = dbc_bulkin_ctx(dbc);
+-      deq                     = dbc_bulkin_enq(dbc);
+-      ep_ctx->ep_info         = 0;
+-      ep_ctx->ep_info2        = dbc_epctx_info2(BULK_IN_EP, 1024, max_burst);
+-      ep_ctx->deq             = cpu_to_le64(deq | dbc->ring_in->cycle_state);
++      /* Populate bulk in and out endpoint contexts: */
++      xhci_dbc_init_ep_contexts(dbc);
+       /* Set DbC context and info registers: */
+       lo_hi_writeq(dbc->ctx->dma, &dbc->regs->dccp);
+@@ -421,6 +430,23 @@ dbc_alloc_ctx(struct device *dev, gfp_t
+       return ctx;
+ }
++static void xhci_dbc_ring_init(struct xhci_ring *ring)
++{
++      struct xhci_segment *seg = ring->first_seg;
++
++      /* clear all trbs on ring in case of old ring */
++      memset(seg->trbs, 0, TRB_SEGMENT_SIZE);
++
++      /* Only event ring does not use link TRB */
++      if (ring->type != TYPE_EVENT) {
++              union xhci_trb *trb = &seg->trbs[TRBS_PER_SEGMENT - 1];
++
++              trb->link.segment_ptr = cpu_to_le64(ring->first_seg->dma);
++              trb->link.control = cpu_to_le32(LINK_TOGGLE | TRB_TYPE(TRB_LINK));
++      }
++      xhci_initialize_ring_info(ring, 1);
++}
++
+ static struct xhci_ring *
+ xhci_dbc_ring_alloc(struct device *dev, enum xhci_ring_type type, gfp_t flags)
+ {
+@@ -449,15 +475,10 @@ xhci_dbc_ring_alloc(struct device *dev,
+       seg->dma = dma;
+-      /* Only event ring does not use link TRB */
+-      if (type != TYPE_EVENT) {
+-              union xhci_trb *trb = &seg->trbs[TRBS_PER_SEGMENT - 1];
+-
+-              trb->link.segment_ptr = cpu_to_le64(dma);
+-              trb->link.control = cpu_to_le32(LINK_TOGGLE | TRB_TYPE(TRB_LINK));
+-      }
+       INIT_LIST_HEAD(&ring->td_list);
+-      xhci_initialize_ring_info(ring, 1);
++
++      xhci_dbc_ring_init(ring);
++
+       return ring;
+ dma_fail:
+       kfree(seg);
diff --git a/queue-6.1/xhci-dbc-fix-full-dbc-transfer-ring-after-several-reconnects.patch b/queue-6.1/xhci-dbc-fix-full-dbc-transfer-ring-after-several-reconnects.patch
new file mode 100644 (file)
index 0000000..7718abf
--- /dev/null
@@ -0,0 +1,91 @@
+From sashal@kernel.org Wed Sep 17 16:00:44 2025
+From: Sasha Levin <sashal@kernel.org>
+Date: Wed, 17 Sep 2025 10:00:40 -0400
+Subject: xhci: dbc: Fix full DbC transfer ring after several reconnects
+To: stable@vger.kernel.org
+Cc: Mathias Nyman <mathias.nyman@linux.intel.com>, Greg Kroah-Hartman <gregkh@linuxfoundation.org>, Sasha Levin <sashal@kernel.org>
+Message-ID: <20250917140040.569374-2-sashal@kernel.org>
+
+From: Mathias Nyman <mathias.nyman@linux.intel.com>
+
+[ Upstream commit a5c98e8b1398534ae1feb6e95e2d3ee5215538ed ]
+
+Pending requests will be flushed on disconnect, and the corresponding
+TRBs will be turned into No-op TRBs, which are ignored by the xHC
+controller once it starts processing the ring.
+
+If the USB debug cable repeatedly disconnects before ring is started
+then the ring will eventually be filled with No-op TRBs.
+No new transfers can be queued when the ring is full, and driver will
+print the following error message:
+
+    "xhci_hcd 0000:00:14.0: failed to queue trbs"
+
+This is a normal case for 'in' transfers where TRBs are always enqueued
+in advance, ready to take on incoming data. If no data arrives, and
+device is disconnected, then ring dequeue will remain at beginning of
+the ring while enqueue points to first free TRB after last cancelled
+No-op TRB.
+s
+Solve this by reinitializing the rings when the debug cable disconnects
+and DbC is leaving the configured state.
+Clear the whole ring buffer and set enqueue and dequeue to the beginning
+of ring, and set cycle bit to its initial state.
+
+Cc: stable@vger.kernel.org
+Fixes: dfba2174dc42 ("usb: xhci: Add DbC support in xHCI driver")
+Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
+Link: https://lore.kernel.org/r/20250902105306.877476-3-mathias.nyman@linux.intel.com
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/usb/host/xhci-dbgcap.c |   23 +++++++++++++++++++++--
+ 1 file changed, 21 insertions(+), 2 deletions(-)
+
+--- a/drivers/usb/host/xhci-dbgcap.c
++++ b/drivers/usb/host/xhci-dbgcap.c
+@@ -447,6 +447,25 @@ static void xhci_dbc_ring_init(struct xh
+       xhci_initialize_ring_info(ring, 1);
+ }
++static int xhci_dbc_reinit_ep_rings(struct xhci_dbc *dbc)
++{
++      struct xhci_ring *in_ring = dbc->eps[BULK_IN].ring;
++      struct xhci_ring *out_ring = dbc->eps[BULK_OUT].ring;
++
++      if (!in_ring || !out_ring || !dbc->ctx) {
++              dev_warn(dbc->dev, "Can't re-init unallocated endpoints\n");
++              return -ENODEV;
++      }
++
++      xhci_dbc_ring_init(in_ring);
++      xhci_dbc_ring_init(out_ring);
++
++      /* set ep context enqueue, dequeue, and cycle to initial values */
++      xhci_dbc_init_ep_contexts(dbc);
++
++      return 0;
++}
++
+ static struct xhci_ring *
+ xhci_dbc_ring_alloc(struct device *dev, enum xhci_ring_type type, gfp_t flags)
+ {
+@@ -871,7 +890,7 @@ static enum evtreturn xhci_dbc_do_handle
+                       dev_info(dbc->dev, "DbC cable unplugged\n");
+                       dbc->state = DS_ENABLED;
+                       xhci_dbc_flush_requests(dbc);
+-
++                      xhci_dbc_reinit_ep_rings(dbc);
+                       return EVT_DISC;
+               }
+@@ -881,7 +900,7 @@ static enum evtreturn xhci_dbc_do_handle
+                       writel(portsc, &dbc->regs->portsc);
+                       dbc->state = DS_ENABLED;
+                       xhci_dbc_flush_requests(dbc);
+-
++                      xhci_dbc_reinit_ep_rings(dbc);
+                       return EVT_DISC;
+               }