* [PATCH 0/3] usb: host: Disable controller wakeup on removal
@ 2026-09-13 22:37 Myeonghun Pak
2026-09-13 22:37 ` [PATCH 1/3] usb: ehci-platform: " Myeonghun Pak
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Myeonghun Pak @ 2026-09-13 22:37 UTC (permalink / raw)
To: stern, gregkh
Cc: linux-usb, linux-kernel, krzk, peter.griffin, alim.akhtar,
linux-arm-kernel, linux-samsung-soc
These three independent patches balance the controller wakeup enable in
the generic EHCI, generic OHCI and Exynos OHCI drivers. Each disables
controller wakeup after usb_remove_hcd(), before releasing the remaining
driver-owned resources. No shared USB core behavior is changed.
For generic EHCI, a wakeup-capable ACPI companion provides the capability
setting through acpi_bind_one(). For the two OHCI drivers, ohci_run() sets
controller capability when OHCI_CTRL_RWC is present. If probe successfully
enables wakeup, the attached source otherwise survives ordinary driver
unbind because the controller device itself remains registered.
This issue was identified during our ongoing static-analysis research while
reviewing kernel code. The patches and explanations were prepared with LLM
assistance.
Compile-tested only; no hardware runtime testing was performed.
Myeonghun Pak (3):
usb: ehci-platform: Disable controller wakeup on removal
usb: ohci-platform: Disable controller wakeup on removal
usb: ohci-exynos: Disable controller wakeup on removal
drivers/usb/host/ehci-platform.c | 1 +
drivers/usb/host/ohci-exynos.c | 1 +
drivers/usb/host/ohci-platform.c | 1 +
3 files changed, 3 insertions(+)
base-commit: fd73f4a6659897191fa0d40695fe370925dd3780
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH 1/3] usb: ehci-platform: Disable controller wakeup on removal
2026-09-13 22:37 [PATCH 0/3] usb: host: Disable controller wakeup on removal Myeonghun Pak
@ 2026-09-13 22:37 ` Myeonghun Pak
2026-09-14 16:07 ` Alan Stern
2026-09-13 22:37 ` [PATCH 2/3] usb: ohci-platform: " Myeonghun Pak
2026-09-13 22:37 ` [PATCH 3/3] usb: ohci-exynos: " Myeonghun Pak
2 siblings, 1 reply; 5+ messages in thread
From: Myeonghun Pak @ 2026-09-13 22:37 UTC (permalink / raw)
To: stern; +Cc: gregkh, linux-usb, linux-kernel
On wakeup-capable ACPI controllers, a successful probe-time wakeup enable
leaves a source attached after driver unbind: usb_remove_hcd() does not
disable controller wakeup.
Disable it after usb_remove_hcd() to balance the enable.
This issue was identified during our ongoing static-analysis research while
reviewing kernel code.
Fixes: 776c15d0ad0c ("USB: ehci-platform: Add ACPI bindings for the EHCI platform driver.")
Assisted-by: OpenAI:GPT-5.6
Co-developed-by: Ijae Kim <ae878000@gmail.com>
Signed-off-by: Ijae Kim <ae878000@gmail.com>
Signed-off-by: Myeonghun Pak <mhun512@gmail.com>
---
drivers/usb/host/ehci-platform.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/usb/host/ehci-platform.c b/drivers/usb/host/ehci-platform.c
index f61f095..b749de0 100644
--- a/drivers/usb/host/ehci-platform.c
+++ b/drivers/usb/host/ehci-platform.c
@@ -420,6 +420,7 @@ static void ehci_platform_remove(struct platform_device *dev)
quirk_poll_end(priv);
usb_remove_hcd(hcd);
+ device_wakeup_disable(hcd->self.controller);
if (pdata->power_off)
pdata->power_off(dev);
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH 2/3] usb: ohci-platform: Disable controller wakeup on removal
2026-09-13 22:37 [PATCH 0/3] usb: host: Disable controller wakeup on removal Myeonghun Pak
2026-09-13 22:37 ` [PATCH 1/3] usb: ehci-platform: " Myeonghun Pak
@ 2026-09-13 22:37 ` Myeonghun Pak
2026-09-13 22:37 ` [PATCH 3/3] usb: ohci-exynos: " Myeonghun Pak
2 siblings, 0 replies; 5+ messages in thread
From: Myeonghun Pak @ 2026-09-13 22:37 UTC (permalink / raw)
To: stern; +Cc: gregkh, linux-usb, linux-kernel
When OHCI reports remote-wakeup capability, a successful wakeup enable
leaves a source attached after driver unbind: usb_remove_hcd() does not
disable controller wakeup.
Disable it after usb_remove_hcd() to balance the enable.
This issue was identified during our ongoing static-analysis research while
reviewing kernel code.
Fixes: fa3364b5a2d7 ("USB: OHCI: Add a generic platform device driver")
Assisted-by: OpenAI:GPT-5.6
Co-developed-by: Ijae Kim <ae878000@gmail.com>
Signed-off-by: Ijae Kim <ae878000@gmail.com>
Signed-off-by: Myeonghun Pak <mhun512@gmail.com>
---
drivers/usb/host/ohci-platform.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/usb/host/ohci-platform.c b/drivers/usb/host/ohci-platform.c
index c801527..c2a90a4 100644
--- a/drivers/usb/host/ohci-platform.c
+++ b/drivers/usb/host/ohci-platform.c
@@ -246,6 +246,7 @@ static void ohci_platform_remove(struct platform_device *dev)
pm_runtime_get_sync(&dev->dev);
usb_remove_hcd(hcd);
+ device_wakeup_disable(&dev->dev);
if (pdata->power_off)
pdata->power_off(dev);
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH 3/3] usb: ohci-exynos: Disable controller wakeup on removal
2026-09-13 22:37 [PATCH 0/3] usb: host: Disable controller wakeup on removal Myeonghun Pak
2026-09-13 22:37 ` [PATCH 1/3] usb: ehci-platform: " Myeonghun Pak
2026-09-13 22:37 ` [PATCH 2/3] usb: ohci-platform: " Myeonghun Pak
@ 2026-09-13 22:37 ` Myeonghun Pak
2 siblings, 0 replies; 5+ messages in thread
From: Myeonghun Pak @ 2026-09-13 22:37 UTC (permalink / raw)
To: stern
Cc: gregkh, linux-usb, linux-kernel, krzk, peter.griffin,
alim.akhtar, linux-arm-kernel, linux-samsung-soc
When OHCI reports remote-wakeup capability, a successful wakeup enable
leaves a source attached after driver unbind: usb_remove_hcd() does not
disable controller wakeup.
Disable it after usb_remove_hcd() to balance the enable.
This issue was identified during our ongoing static-analysis research while
reviewing kernel code.
Fixes: 62194244cf87 ("USB: Add Samsung Exynos OHCI diver")
Assisted-by: OpenAI:GPT-5.6
Co-developed-by: Ijae Kim <ae878000@gmail.com>
Signed-off-by: Ijae Kim <ae878000@gmail.com>
Signed-off-by: Myeonghun Pak <mhun512@gmail.com>
---
drivers/usb/host/ohci-exynos.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/usb/host/ohci-exynos.c b/drivers/usb/host/ohci-exynos.c
index cc5cb09..86ff7a0 100644
--- a/drivers/usb/host/ohci-exynos.c
+++ b/drivers/usb/host/ohci-exynos.c
@@ -194,6 +194,7 @@ static void exynos_ohci_remove(struct platform_device *pdev)
pdev->dev.of_node = exynos_ohci->of_node;
usb_remove_hcd(hcd);
+ device_wakeup_disable(hcd->self.controller);
exynos_ohci_phy_disable(&pdev->dev);
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 1/3] usb: ehci-platform: Disable controller wakeup on removal
2026-09-13 22:37 ` [PATCH 1/3] usb: ehci-platform: " Myeonghun Pak
@ 2026-09-14 16:07 ` Alan Stern
0 siblings, 0 replies; 5+ messages in thread
From: Alan Stern @ 2026-09-14 16:07 UTC (permalink / raw)
To: Myeonghun Pak; +Cc: gregkh, linux-usb, linux-kernel
On Sun, Sep 13, 2026 at 06:37:30PM -0400, Myeonghun Pak wrote:
> On wakeup-capable ACPI controllers, a successful probe-time wakeup enable
> leaves a source attached after driver unbind: usb_remove_hcd() does not
> disable controller wakeup.
>
> Disable it after usb_remove_hcd() to balance the enable.
>
> This issue was identified during our ongoing static-analysis research while
> reviewing kernel code.
>
> Fixes: 776c15d0ad0c ("USB: ehci-platform: Add ACPI bindings for the EHCI platform driver.")
> Assisted-by: OpenAI:GPT-5.6
> Co-developed-by: Ijae Kim <ae878000@gmail.com>
> Signed-off-by: Ijae Kim <ae878000@gmail.com>
> Signed-off-by: Myeonghun Pak <mhun512@gmail.com>
> ---
For all three patches:
Acked-by: Alan Stern <stern@rowland.harvard.edu>
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2026-09-14 16:07 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-13 22:37 [PATCH 0/3] usb: host: Disable controller wakeup on removal Myeonghun Pak
2026-09-13 22:37 ` [PATCH 1/3] usb: ehci-platform: " Myeonghun Pak
2026-09-14 16:07 ` Alan Stern
2026-09-13 22:37 ` [PATCH 2/3] usb: ohci-platform: " Myeonghun Pak
2026-09-13 22:37 ` [PATCH 3/3] usb: ohci-exynos: " Myeonghun Pak
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®