linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] usb: dwc3: meson-g12a: do post init to fix broken usb after resumption
@ 2023-08-08  3:25 Luke Lu
  2023-08-08  4:56 ` Greg Kroah-Hartman
  0 siblings, 1 reply; 6+ messages in thread
From: Luke Lu @ 2023-08-08  3:25 UTC (permalink / raw)
  To: Neil Armstrong, linux-usb, linux-amlogic
  Cc: Thinh Nguyen, Greg Kroah-Hartman, Kevin Hilman, Jerome Brunet,
	Martin Blumenstingl, Da Xue, linux-arm-kernel, linux-kernel,
	Luke Lu

Device connected to usb otg port of GXL-based boards can not be
recognised after resumption, doesn't recover even if disconnect and
reconnect the device. dmesg shows it disconnects during resumption.

[   41.492911] usb 1-2: USB disconnect, device number 3
[   41.499346] usb 1-2: unregistering device
[   41.511939] usb 1-2: unregistering interface 1-2:1.0

Calling usb_post_init() will fix this issue, and it's tested and
verified on libretech's aml-s905x-cc board.

Signed-off-by: Luke Lu <luke.lu@libre.computer>
---
 drivers/usb/dwc3/dwc3-meson-g12a.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/usb/dwc3/dwc3-meson-g12a.c b/drivers/usb/dwc3/dwc3-meson-g12a.c
index e99c7489dba0..2c07c038b584 100644
--- a/drivers/usb/dwc3/dwc3-meson-g12a.c
+++ b/drivers/usb/dwc3/dwc3-meson-g12a.c
@@ -926,6 +926,12 @@ static int __maybe_unused dwc3_meson_g12a_resume(struct device *dev)
 			return ret;
 	}
 
+	if (priv->drvdata->usb_post_init) {
+		ret = priv->drvdata->usb_post_init(priv);
+		if (ret)
+			return ret;
+	}
+
 	return 0;
 }
 
-- 
2.40.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2023-08-08  8:17 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-08-08  3:25 [PATCH] usb: dwc3: meson-g12a: do post init to fix broken usb after resumption Luke Lu
2023-08-08  4:56 ` Greg Kroah-Hartman
2023-08-08  5:33   ` Da Xue
2023-08-08  6:10     ` Greg Kroah-Hartman
2023-08-08  6:09   ` Luke Lu
2023-08-08  8:17     ` Greg Kroah-Hartman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).