Commit b3cbdf2
committed
[nrf fromtree] drivers: udc_dwc2: avoid register read on disabled controller
The VBUS bounces when the USB connector is plugged in. This can lead to
events VBUS removed and Suspended occurring in that order. With
hibernation support enabled, hibernation request, as result of the
suspend interrupt, will be delegated to the driver thread. Once the
driver thread is scheduled to process hibernation request, the
controller may be already disabled and controller/phy clocks be off. On
nRF54LM20 this leads to CPU crash and a hang.
To avoid this happening, cancel the possible hibernation request after
interrupts are disabled. Although the thread could be still waked up
because of USBSUSP interrupt raised and event posted, this is considered
to be harmless, as there would be a second check in the thread whether
the event is still valid or is cleared in between.
Signed-off-by: Johann Fischer <[email protected]>
(cherry picked from commit 0d515e7)1 parent 2e998ab commit b3cbdf2
1 file changed
+1
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2328 | 2328 | | |
2329 | 2329 | | |
2330 | 2330 | | |
| 2331 | + | |
2331 | 2332 | | |
2332 | 2333 | | |
2333 | 2334 | | |
| |||
0 commit comments