usb: dwc3: qcom: fix wakeup implementation
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v2 Latest9 patches 31 repliesIn review
- v18 patches 19 repliesSuperseded
Changes in v2 from the cover letter
- add review and ack tags
- fix a gadget-only build breakage (new patch)
- fix a use-after-free on wakeup from runtime suspend (new patch)
- disable wakeup completely instead of falling back to the "disconnected" host configuration when not acting as host
- disallow 'wakeup-source' in child node in the binding
Patches in v2 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/9 | usb: dwc3: fix PHY disable sequencedrivers/ | +10 | 1 reply | |
| 2/9 | Revert "usb: dwc3: qcom: Keep power domain on to retain controller status"drivers/ | +7 | 1 reply | |
| 3/9 | usb: dwc3: qcom: fix gadget-only buildsdrivers/ | +4 | 8 replies | |
| 4/9 | usb: dwc3: qcom: fix use-after-free on runtime-PM wakeupdrivers/ drivers/ | +14 | 4 replies | |
| 5/9 | usb: dwc3: qcom: fix runtime PM wakeupdrivers/ | +11 | 2 replies | |
| 6/9 | usb: dwc3: qcom: fix peripheral and OTG suspenddrivers/ | +12 | 2 replies | |
| 7/9 | dt-bindings: usb: qcom,dwc3: add wakeup-source propertyDocumentation/ | +5 | 5 replies | |
| 8/9 | usb: dwc3: qcom: fix wakeup implementationdrivers/ drivers/ | +7 | 6 replies | |
| 9/9 | usb: dwc3: qcom: clean up suspend callbacksdrivers/ | +11 | 1 reply |
Reviews trailers per patch
7 of 9 patches have a Reviewed-by or Acked-by.
| Patch | Andrew Halaney | Matthias Kaehlcke | Rob Herring | Randy Dunlap | Manivannan Sadhasivam |
|---|---|---|---|---|---|
| 1/9 | R-b | R-b | R-b | ||
| 2/9 | R-b | ||||
| 3/9 | R-b | ||||
| 4/9 | R-b | R-b | |||
| 5/9 | R-b T-b | R-b | |||
| 6/9 | |||||
| 7/9 | A-b | ||||
| 8/9 | |||||
| 9/9 | R-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 5 reviewers.
Cover letter [PATCH v2 0/9] usb: dwc3: qcom: fix wakeup implementation
This series fixes some of the fallout after the recently merged series that added wakeup support to the Qualcomm dwc3 driver:
https://lore.kernel.org/all/[email protected]/
The first patch fixes a long standing PHY power sequencing issue in dwc3 core.
The second patch reverts a power-domain hack that was added by the above series. There are other ways to implement this which doesn't violate the genpd interface, and if for some reason those are not sufficient, the genpd implementation needs to be extended, not hacked around.
The third patch fixes a build breakage caused by the same series. (new in v2)
The fourth patch fixes another long-standing bug which could lead to a use-after-free when using runtime PM. (new in v2)
The next patch fixes another issue in the Qualcomm dwc3 implementation that has been added a while back and which breaks runtime PM.
The sixt patch fixes a NULL-pointer dereference or use-after-free when suspending controllers in peripheral or OTG mode due to a hack that was added to suspend path. Unfortunately, it seems the hack needs to stay for now if we want functioning suspend on some Qualcomm platforms.
The remaining patches moves the wakeup-source property over from the core node to the glue node in the binding and instead propagates the wakeup capability to the former during probe.
Note that this incidentally also avoids adding probe-deferral hacks to the driver as was recently proposed to deal with another problem with the current implementation:
https://lore.kernel.org/all/[email protected]/
With this series I have functioning USB system suspend and wakeup as well as somewhat functioning runtime PM in host mode on sc8280xp. Note that the PHYs apparently do not not to be left enabled for wakeup on this platform.
Some issues remain such as that root-hub connect/disconnect events cannot selectively be disabled.
And of course, the suspend speed hack needs to be replaced at some point but that likely requires some more heavy lifting in the dwc3 implementation.
Johan
Changes in v2
- add review and ack tags
- fix a gadget-only build breakage (new patch)
- fix a use-after-free on wakeup from runtime suspend (new patch)
- disable wakeup completely instead of falling back to the "disconnected" host configuration when not acting as host
- disallow 'wakeup-source' in child node in the binding
Johan Hovold (9):
usb: dwc3: fix PHY disable sequence
Revert "usb: dwc3: qcom: Keep power domain on to retain controller
status"
usb: dwc3: qcom: fix gadget-only builds
usb: dwc3: qcom: fix use-after-free on runtime-PM wakeup
usb: dwc3: qcom: fix runtime PM wakeup
usb: dwc3: qcom: fix peripheral and OTG suspend
dt-bindings: usb: qcom,dwc3: add wakeup-source property
usb: dwc3: qcom: fix wakeup implementation
usb: dwc3: qcom: clean up suspend callbacks
.../devicetree/bindings/usb/qcom,dwc3.yaml | 5 + drivers/usb/dwc3/core.c | 24 ++--- drivers/usb/dwc3/dwc3-qcom.c | 96 +++++++++++-------- drivers/usb/dwc3/host.c | 1 + 4 files changed, 76 insertions(+), 50 deletions(-)
Signature · 1 line
2.35.1