From 9f2654fde1738e7e50ee0c0cb9442595815d0a97 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Tue, 8 Jul 2025 12:49:13 +0200 Subject: [PATCH] drop dwc3 patch --- queue-5.15/series | 1 - ...t-suspend-on-soft-disconnect-failure.patch | 100 ------------------ queue-6.1/series | 1 - ...t-suspend-on-soft-disconnect-failure.patch | 100 ------------------ queue-6.6/series | 1 - ...t-suspend-on-soft-disconnect-failure.patch | 100 ------------------ 6 files changed, 303 deletions(-) delete mode 100644 queue-5.15/usb-dwc3-abort-suspend-on-soft-disconnect-failure.patch delete mode 100644 queue-6.1/usb-dwc3-abort-suspend-on-soft-disconnect-failure.patch delete mode 100644 queue-6.6/usb-dwc3-abort-suspend-on-soft-disconnect-failure.patch diff --git a/queue-5.15/series b/queue-5.15/series index 5fc0f8e69c..f1467b2ff6 100644 --- a/queue-5.15/series +++ b/queue-5.15/series @@ -154,4 +154,3 @@ platform-x86-dell-wmi-sysman-fix-class-device-unregi.patch xhci-dbctty-disable-echo-flag-by-default.patch xhci-dbc-flush-queued-requests-before-stopping-dbc.patch usb-cdnsp-do-not-disable-slot-for-disabled-slot.patch -usb-dwc3-abort-suspend-on-soft-disconnect-failure.patch diff --git a/queue-5.15/usb-dwc3-abort-suspend-on-soft-disconnect-failure.patch b/queue-5.15/usb-dwc3-abort-suspend-on-soft-disconnect-failure.patch deleted file mode 100644 index e81e5e78f7..0000000000 --- a/queue-5.15/usb-dwc3-abort-suspend-on-soft-disconnect-failure.patch +++ /dev/null @@ -1,100 +0,0 @@ -From 630a1dec3b0eba2a695b9063f1c205d585cbfec9 Mon Sep 17 00:00:00 2001 -From: Kuen-Han Tsai -Date: Wed, 28 May 2025 18:03:11 +0800 -Subject: usb: dwc3: Abort suspend on soft disconnect failure - -From: Kuen-Han Tsai - -commit 630a1dec3b0eba2a695b9063f1c205d585cbfec9 upstream. - -When dwc3_gadget_soft_disconnect() fails, dwc3_suspend_common() keeps -going with the suspend, resulting in a period where the power domain is -off, but the gadget driver remains connected. Within this time frame, -invoking vbus_event_work() will cause an error as it attempts to access -DWC3 registers for endpoint disabling after the power domain has been -completely shut down. - -Abort the suspend sequence when dwc3_gadget_suspend() cannot halt the -controller and proceeds with a soft connect. - -Fixes: 9f8a67b65a49 ("usb: dwc3: gadget: fix gadget suspend/resume") -Cc: stable -Acked-by: Thinh Nguyen -Signed-off-by: Kuen-Han Tsai -Link: https://lore.kernel.org/r/20250528100315.2162699-1-khtsai@google.com -Signed-off-by: Greg Kroah-Hartman ---- - drivers/usb/dwc3/core.c | 9 +++++++-- - drivers/usb/dwc3/gadget.c | 22 +++++++++------------- - 2 files changed, 16 insertions(+), 15 deletions(-) - ---- a/drivers/usb/dwc3/core.c -+++ b/drivers/usb/dwc3/core.c -@@ -880,6 +880,7 @@ static void dwc3_set_incr_burst_type(str - int ntype; - int ret; - int i; -+ int ret; - - cfg = dwc3_readl(dwc->regs, DWC3_GSBUSCFG0); - -@@ -1836,7 +1837,9 @@ static int dwc3_suspend_common(struct dw - case DWC3_GCTL_PRTCAP_DEVICE: - if (pm_runtime_suspended(dwc->dev)) - break; -- dwc3_gadget_suspend(dwc); -+ ret = dwc3_gadget_suspend(dwc); -+ if (ret) -+ return ret; - synchronize_irq(dwc->irq_gadget); - dwc3_core_exit(dwc); - break; -@@ -1867,7 +1870,9 @@ static int dwc3_suspend_common(struct dw - break; - - if (dwc->current_otg_role == DWC3_OTG_ROLE_DEVICE) { -- dwc3_gadget_suspend(dwc); -+ ret = dwc3_gadget_suspend(dwc); -+ if (ret) -+ return ret; - synchronize_irq(dwc->irq_gadget); - } - ---- a/drivers/usb/dwc3/gadget.c -+++ b/drivers/usb/dwc3/gadget.c -@@ -4580,26 +4580,22 @@ int dwc3_gadget_suspend(struct dwc3 *dwc - int ret; - - ret = dwc3_gadget_soft_disconnect(dwc); -- if (ret) -- goto err; -- -- spin_lock_irqsave(&dwc->lock, flags); -- if (dwc->gadget_driver) -- dwc3_disconnect_gadget(dwc); -- spin_unlock_irqrestore(&dwc->lock, flags); -- -- return 0; -- --err: - /* - * Attempt to reset the controller's state. Likely no - * communication can be established until the host - * performs a port reset. - */ -- if (dwc->softconnect) -+ if (ret && dwc->softconnect) { - dwc3_gadget_soft_connect(dwc); -+ return -EAGAIN; -+ } - -- return ret; -+ spin_lock_irqsave(&dwc->lock, flags); -+ if (dwc->gadget_driver) -+ dwc3_disconnect_gadget(dwc); -+ spin_unlock_irqrestore(&dwc->lock, flags); -+ -+ return 0; - } - - int dwc3_gadget_resume(struct dwc3 *dwc) diff --git a/queue-6.1/series b/queue-6.1/series index b194eceb25..e6571d69ab 100644 --- a/queue-6.1/series +++ b/queue-6.1/series @@ -69,4 +69,3 @@ xhci-dbctty-disable-echo-flag-by-default.patch xhci-dbc-flush-queued-requests-before-stopping-dbc.patch xhci-disable-stream-for-xhc-controller-with-xhci_broken_streams.patch usb-cdnsp-do-not-disable-slot-for-disabled-slot.patch -usb-dwc3-abort-suspend-on-soft-disconnect-failure.patch diff --git a/queue-6.1/usb-dwc3-abort-suspend-on-soft-disconnect-failure.patch b/queue-6.1/usb-dwc3-abort-suspend-on-soft-disconnect-failure.patch deleted file mode 100644 index 02059b138e..0000000000 --- a/queue-6.1/usb-dwc3-abort-suspend-on-soft-disconnect-failure.patch +++ /dev/null @@ -1,100 +0,0 @@ -From 630a1dec3b0eba2a695b9063f1c205d585cbfec9 Mon Sep 17 00:00:00 2001 -From: Kuen-Han Tsai -Date: Wed, 28 May 2025 18:03:11 +0800 -Subject: usb: dwc3: Abort suspend on soft disconnect failure - -From: Kuen-Han Tsai - -commit 630a1dec3b0eba2a695b9063f1c205d585cbfec9 upstream. - -When dwc3_gadget_soft_disconnect() fails, dwc3_suspend_common() keeps -going with the suspend, resulting in a period where the power domain is -off, but the gadget driver remains connected. Within this time frame, -invoking vbus_event_work() will cause an error as it attempts to access -DWC3 registers for endpoint disabling after the power domain has been -completely shut down. - -Abort the suspend sequence when dwc3_gadget_suspend() cannot halt the -controller and proceeds with a soft connect. - -Fixes: 9f8a67b65a49 ("usb: dwc3: gadget: fix gadget suspend/resume") -Cc: stable -Acked-by: Thinh Nguyen -Signed-off-by: Kuen-Han Tsai -Link: https://lore.kernel.org/r/20250528100315.2162699-1-khtsai@google.com -Signed-off-by: Greg Kroah-Hartman ---- - drivers/usb/dwc3/core.c | 9 +++++++-- - drivers/usb/dwc3/gadget.c | 22 +++++++++------------- - 2 files changed, 16 insertions(+), 15 deletions(-) - ---- a/drivers/usb/dwc3/core.c -+++ b/drivers/usb/dwc3/core.c -@@ -1007,6 +1007,7 @@ static void dwc3_set_incr_burst_type(str - int ntype; - int ret; - int i; -+ int ret; - - cfg = dwc3_readl(dwc->regs, DWC3_GSBUSCFG0); - -@@ -2171,7 +2172,9 @@ static int dwc3_suspend_common(struct dw - case DWC3_GCTL_PRTCAP_DEVICE: - if (pm_runtime_suspended(dwc->dev)) - break; -- dwc3_gadget_suspend(dwc); -+ ret = dwc3_gadget_suspend(dwc); -+ if (ret) -+ return ret; - synchronize_irq(dwc->irq_gadget); - dwc3_core_exit(dwc); - break; -@@ -2202,7 +2205,9 @@ static int dwc3_suspend_common(struct dw - break; - - if (dwc->current_otg_role == DWC3_OTG_ROLE_DEVICE) { -- dwc3_gadget_suspend(dwc); -+ ret = dwc3_gadget_suspend(dwc); -+ if (ret) -+ return ret; - synchronize_irq(dwc->irq_gadget); - } - ---- a/drivers/usb/dwc3/gadget.c -+++ b/drivers/usb/dwc3/gadget.c -@@ -4641,26 +4641,22 @@ int dwc3_gadget_suspend(struct dwc3 *dwc - int ret; - - ret = dwc3_gadget_soft_disconnect(dwc); -- if (ret) -- goto err; -- -- spin_lock_irqsave(&dwc->lock, flags); -- if (dwc->gadget_driver) -- dwc3_disconnect_gadget(dwc); -- spin_unlock_irqrestore(&dwc->lock, flags); -- -- return 0; -- --err: - /* - * Attempt to reset the controller's state. Likely no - * communication can be established until the host - * performs a port reset. - */ -- if (dwc->softconnect) -+ if (ret && dwc->softconnect) { - dwc3_gadget_soft_connect(dwc); -+ return -EAGAIN; -+ } - -- return ret; -+ spin_lock_irqsave(&dwc->lock, flags); -+ if (dwc->gadget_driver) -+ dwc3_disconnect_gadget(dwc); -+ spin_unlock_irqrestore(&dwc->lock, flags); -+ -+ return 0; - } - - int dwc3_gadget_resume(struct dwc3 *dwc) diff --git a/queue-6.6/series b/queue-6.6/series index 2a9f98fd22..19e5a7ed3a 100644 --- a/queue-6.6/series +++ b/queue-6.6/series @@ -113,5 +113,4 @@ xhci-disable-stream-for-xhc-controller-with-xhci_broken_streams.patch input-xpad-support-acer-ngr-200-controller.patch input-iqs7222-explicitly-define-number-of-external-channels.patch usb-cdnsp-do-not-disable-slot-for-disabled-slot.patch -usb-dwc3-abort-suspend-on-soft-disconnect-failure.patch usb-chipidea-udc-disconnect-reconnect-from-host-when-do-suspend-resume.patch diff --git a/queue-6.6/usb-dwc3-abort-suspend-on-soft-disconnect-failure.patch b/queue-6.6/usb-dwc3-abort-suspend-on-soft-disconnect-failure.patch deleted file mode 100644 index bcda1e6557..0000000000 --- a/queue-6.6/usb-dwc3-abort-suspend-on-soft-disconnect-failure.patch +++ /dev/null @@ -1,100 +0,0 @@ -From 630a1dec3b0eba2a695b9063f1c205d585cbfec9 Mon Sep 17 00:00:00 2001 -From: Kuen-Han Tsai -Date: Wed, 28 May 2025 18:03:11 +0800 -Subject: usb: dwc3: Abort suspend on soft disconnect failure - -From: Kuen-Han Tsai - -commit 630a1dec3b0eba2a695b9063f1c205d585cbfec9 upstream. - -When dwc3_gadget_soft_disconnect() fails, dwc3_suspend_common() keeps -going with the suspend, resulting in a period where the power domain is -off, but the gadget driver remains connected. Within this time frame, -invoking vbus_event_work() will cause an error as it attempts to access -DWC3 registers for endpoint disabling after the power domain has been -completely shut down. - -Abort the suspend sequence when dwc3_gadget_suspend() cannot halt the -controller and proceeds with a soft connect. - -Fixes: 9f8a67b65a49 ("usb: dwc3: gadget: fix gadget suspend/resume") -Cc: stable -Acked-by: Thinh Nguyen -Signed-off-by: Kuen-Han Tsai -Link: https://lore.kernel.org/r/20250528100315.2162699-1-khtsai@google.com -Signed-off-by: Greg Kroah-Hartman ---- - drivers/usb/dwc3/core.c | 9 +++++++-- - drivers/usb/dwc3/gadget.c | 22 +++++++++------------- - 2 files changed, 16 insertions(+), 15 deletions(-) - ---- a/drivers/usb/dwc3/core.c -+++ b/drivers/usb/dwc3/core.c -@@ -1008,6 +1008,7 @@ static void dwc3_set_incr_burst_type(str - int ntype; - int ret; - int i; -+ int ret; - - cfg = dwc3_readl(dwc->regs, DWC3_GSBUSCFG0); - -@@ -2146,7 +2147,9 @@ static int dwc3_suspend_common(struct dw - case DWC3_GCTL_PRTCAP_DEVICE: - if (pm_runtime_suspended(dwc->dev)) - break; -- dwc3_gadget_suspend(dwc); -+ ret = dwc3_gadget_suspend(dwc); -+ if (ret) -+ return ret; - synchronize_irq(dwc->irq_gadget); - dwc3_core_exit(dwc); - break; -@@ -2177,7 +2180,9 @@ static int dwc3_suspend_common(struct dw - break; - - if (dwc->current_otg_role == DWC3_OTG_ROLE_DEVICE) { -- dwc3_gadget_suspend(dwc); -+ ret = dwc3_gadget_suspend(dwc); -+ if (ret) -+ return ret; - synchronize_irq(dwc->irq_gadget); - } - ---- a/drivers/usb/dwc3/gadget.c -+++ b/drivers/usb/dwc3/gadget.c -@@ -4802,26 +4802,22 @@ int dwc3_gadget_suspend(struct dwc3 *dwc - int ret; - - ret = dwc3_gadget_soft_disconnect(dwc); -- if (ret) -- goto err; -- -- spin_lock_irqsave(&dwc->lock, flags); -- if (dwc->gadget_driver) -- dwc3_disconnect_gadget(dwc); -- spin_unlock_irqrestore(&dwc->lock, flags); -- -- return 0; -- --err: - /* - * Attempt to reset the controller's state. Likely no - * communication can be established until the host - * performs a port reset. - */ -- if (dwc->softconnect) -+ if (ret && dwc->softconnect) { - dwc3_gadget_soft_connect(dwc); -+ return -EAGAIN; -+ } - -- return ret; -+ spin_lock_irqsave(&dwc->lock, flags); -+ if (dwc->gadget_driver) -+ dwc3_disconnect_gadget(dwc); -+ spin_unlock_irqrestore(&dwc->lock, flags); -+ -+ return 0; - } - - int dwc3_gadget_resume(struct dwc3 *dwc) -- 2.47.2