Thread (5 messages) flat view 5 messages, 2 authors, 11d ago
COOLING11d

[PATCH 2/3] usb: ohci-platform: Disable controller wakeup on removal

From: Myeonghun Pak <hidden>
Date: 2026-09-13 22:37:53
Also in: lkml
Subsystem: the rest, usb ohci driver, usb subsystem · Maintainers: Linus Torvalds, Alan Stern, Greg Kroah-Hartman

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 <redacted>
Signed-off-by: Ijae Kim <redacted>
Signed-off-by: Myeonghun Pak <redacted>
---
 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);
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help