[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date: Tue, 8 Aug 2023 03:25:10 +0000
From: Luke Lu <luke.lu@...re.computer>
To: Neil Armstrong <neil.armstrong@...aro.org>,
linux-usb@...r.kernel.org, linux-amlogic@...ts.infradead.org
Cc: Thinh Nguyen <Thinh.Nguyen@...opsys.com>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Kevin Hilman <khilman@...libre.com>,
Jerome Brunet <jbrunet@...libre.com>,
Martin Blumenstingl <martin.blumenstingl@...glemail.com>,
Da Xue <da@...re.computer>,
linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
Luke Lu <luke.lu@...re.computer>
Subject: [PATCH] usb: dwc3: meson-g12a: do post init to fix broken usb after resumption
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@...re.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
Powered by blists - more mailing lists