Skip to content

USB: dwc3: error handling fixes and cleanups

Johan Hovold linux-usb lkml stable 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest11 patches 12 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/11USB: dwc3: fix runtime pm imbalance on probe errorsdrivers/usb/dwc3/core.c+5 -91 reply
2/11USB: dwc3: fix runtime pm imbalance on unbinddrivers/usb/dwc3/core.c+1 -01 reply
3/11USB: dwc3: disable autosuspend on unbinddrivers/usb/dwc3/core.c+2 -01 reply
4/11USB: dwc3: gadget: drop dead hibernation codedrivers/usb/dwc3/gadget.c+6 -401 reply
5/11USB: dwc3: drop dead hibernation codedrivers/usb/dwc3/core.c drivers/usb/dwc3/core.h+1 -1101 reply
6/11USB: dwc3: clean up probe error labelsdrivers/usb/dwc3/core.c+22 -231 reply
7/11USB: dwc3: clean up phy init error handlingdrivers/usb/dwc3/core.c+9 -91 reply
8/11USB: dwc3: clean up core init error handlingdrivers/usb/dwc3/core.c+13 -171 reply
9/11USB: dwc3: refactor phy handlingdrivers/usb/dwc3/core.c+86 -571 reply
10/11USB: dwc3: refactor clock lookupsdrivers/usb/dwc3/core.c+61 -551 reply
11/11USB: dwc3: clean up probe declarationsdrivers/usb/dwc3/core.c+1 -31 reply

Reviews trailers per patch

All 11 patches have a Reviewed-by or Acked-by.

PatchThinh Nguyen
1/11A-b
2/11A-b
3/11A-b
4/11A-b
5/11A-b
6/11A-b
7/11A-b
8/11A-b
9/11A-b
10/11A-b
11/11A-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 00/11] USB: dwc3: error handling fixes and cleanups

When reviewing the dwc3 runtime PM implementation I noticed that the probe error handling and unbind code was broken. The first two patches addresses the corresponding imbalances.

The probe error handling has suffered from some bit rot over years and an attempt to clean it up lead to the realisation that the code dealing with the "hibernation" feature was both broken and had never been used. Rather than try to fix up something which has never been used since it was first merged ten years ago, let's get rid of this dead code until there is a mainline user (and a complete implementation).

The rest of the series clean up probe and core initialisation by using descriptive error labels and adding a few helper functions to improve readability which will hopefully help prevent similar bugs from being introduced in the future.

Johan

Johan Hovold (11):
USB: dwc3: fix runtime pm imbalance on probe errors
USB: dwc3: fix runtime pm imbalance on unbind
USB: dwc3: disable autosuspend on unbind
USB: dwc3: gadget: drop dead hibernation code
USB: dwc3: drop dead hibernation code
USB: dwc3: clean up probe error labels
USB: dwc3: clean up phy init error handling
USB: dwc3: clean up core init error handling
USB: dwc3: refactor phy handling
USB: dwc3: refactor clock lookups
USB: dwc3: clean up probe declarations

 drivers/usb/dwc3/core.c   | 426 ++++++++++++++++----------------------
 drivers/usb/dwc3/core.h   |   8 -
 drivers/usb/dwc3/gadget.c |  46 +---
 3 files changed, 182 insertions(+), 298 deletions(-)
Signature · 1 line
2.39.2