Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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.

Cc: stable@vger.kernel.org # v5.8+
Fixes: c99993376f72 ("usb: dwc3: Add Amlogic G12A DWC3 glue")
Signed-off-by: Luke Lu <luke.lu@libre.computer>
Acked-by: Neil Armstrong <neil.armstrong@linaro.org>
Link: https://lore.kernel.org/r/20230809212911.18903-1-luke.lu@libre.computer
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Luke Lu and committed by
Greg Kroah-Hartman
1fa206bb 26f4f835

+6
+6
drivers/usb/dwc3/dwc3-meson-g12a.c
··· 926 926 return ret; 927 927 } 928 928 929 + if (priv->drvdata->usb_post_init) { 930 + ret = priv->drvdata->usb_post_init(priv); 931 + if (ret) 932 + return ret; 933 + } 934 + 929 935 return 0; 930 936 } 931 937