From: Luke Lu <luke.lu@libre.computer>
To: Neil Armstrong <neil.armstrong@linaro.org>,
linux-usb@vger.kernel.org, linux-amlogic@lists.infradead.org
Cc: Thinh Nguyen <Thinh.Nguyen@synopsys.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Kevin Hilman <khilman@baylibre.com>,
Jerome Brunet <jbrunet@baylibre.com>,
Martin Blumenstingl <martin.blumenstingl@googlemail.com>,
Da Xue <da@libre.computer>,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, Luke Lu <luke.lu@libre.computer>
Subject: [PATCH] usb: dwc3: meson-g12a: do post init to fix broken usb after resumption
Date: Tue, 8 Aug 2023 03:25:10 +0000 [thread overview]
Message-ID: <20230808032510.31754-1-luke.lu@libre.computer> (raw)
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-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic
WARNING: multiple messages have this Message-ID (diff)
From: Luke Lu <luke.lu@libre.computer>
To: Neil Armstrong <neil.armstrong@linaro.org>,
linux-usb@vger.kernel.org, linux-amlogic@lists.infradead.org
Cc: Thinh Nguyen <Thinh.Nguyen@synopsys.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Kevin Hilman <khilman@baylibre.com>,
Jerome Brunet <jbrunet@baylibre.com>,
Martin Blumenstingl <martin.blumenstingl@googlemail.com>,
Da Xue <da@libre.computer>,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, Luke Lu <luke.lu@libre.computer>
Subject: [PATCH] usb: dwc3: meson-g12a: do post init to fix broken usb after resumption
Date: Tue, 8 Aug 2023 03:25:10 +0000 [thread overview]
Message-ID: <20230808032510.31754-1-luke.lu@libre.computer> (raw)
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
WARNING: multiple messages have this Message-ID (diff)
From: Luke Lu <luke.lu@libre.computer>
To: Neil Armstrong <neil.armstrong@linaro.org>,
linux-usb@vger.kernel.org, linux-amlogic@lists.infradead.org
Cc: Thinh Nguyen <Thinh.Nguyen@synopsys.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Kevin Hilman <khilman@baylibre.com>,
Jerome Brunet <jbrunet@baylibre.com>,
Martin Blumenstingl <martin.blumenstingl@googlemail.com>,
Da Xue <da@libre.computer>,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, Luke Lu <luke.lu@libre.computer>
Subject: [PATCH] usb: dwc3: meson-g12a: do post init to fix broken usb after resumption
Date: Tue, 8 Aug 2023 03:25:10 +0000 [thread overview]
Message-ID: <20230808032510.31754-1-luke.lu@libre.computer> (raw)
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
next reply other threads:[~2023-08-08 3:30 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-08 3:25 Luke Lu [this message]
2023-08-08 3:25 ` [PATCH] usb: dwc3: meson-g12a: do post init to fix broken usb after resumption Luke Lu
2023-08-08 3:25 ` Luke Lu
2023-08-08 4:56 ` Greg Kroah-Hartman
2023-08-08 4:56 ` Greg Kroah-Hartman
2023-08-08 4:56 ` Greg Kroah-Hartman
2023-08-08 5:33 ` Da Xue
2023-08-08 5:33 ` Da Xue
2023-08-08 5:33 ` Da Xue
2023-08-08 6:10 ` Greg Kroah-Hartman
2023-08-08 6:10 ` Greg Kroah-Hartman
2023-08-08 6:10 ` Greg Kroah-Hartman
2023-08-08 6:09 ` Luke Lu
2023-08-08 6:09 ` Luke Lu
2023-08-08 6:09 ` Luke Lu
2023-08-08 8:17 ` Greg Kroah-Hartman
2023-08-08 8:17 ` Greg Kroah-Hartman
2023-08-08 8:17 ` Greg Kroah-Hartman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230808032510.31754-1-luke.lu@libre.computer \
--to=luke.lu@libre.computer \
--cc=Thinh.Nguyen@synopsys.com \
--cc=da@libre.computer \
--cc=gregkh@linuxfoundation.org \
--cc=jbrunet@baylibre.com \
--cc=khilman@baylibre.com \
--cc=linux-amlogic@lists.infradead.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=martin.blumenstingl@googlemail.com \
--cc=neil.armstrong@linaro.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.