Commit f7d1af3
usb: hub: Fix flushing and scheduling of delayed work that tunes runtime pm
commit a49e1e2 upstream.
Delayed work to prevent USB3 hubs from runtime-suspending immediately
after resume was added in commit 8f5b7e2 ("usb: hub: fix detection
of high tier USB3 devices behind suspended hubs").
This delayed work needs be flushed if system suspends, or hub needs to
be quiesced for other reasons right after resume. Not flushing it
triggered issues on QC SC8280XP CRD board during suspend/resume testing.
Fix it by flushing the delayed resume work in hub_quiesce()
The delayed work item that allow hub runtime suspend is also scheduled
just before calling autopm get. Alan pointed out there is a small risk
that work is run before autopm get, which would call autopm put before
get, and mess up the runtime pm usage order.
Swap the order of work sheduling and calling autopm get to solve this.
Cc: stable <[email protected]>
Fixes: 8f5b7e2 ("usb: hub: fix detection of high tier USB3 devices behind suspended hubs")
Reported-by: Konrad Dybcio <[email protected]>
Closes: https://lore.kernel.org/linux-usb/[email protected]
Reported-by: Alan Stern <[email protected]>
Closes: https://lore.kernel.org/linux-usb/[email protected]
Signed-off-by: Mathias Nyman <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected]>1 parent 16840c4 commit f7d1af3
1 file changed
+4
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1359 | 1359 | | |
1360 | 1360 | | |
1361 | 1361 | | |
| 1362 | + | |
| 1363 | + | |
| 1364 | + | |
1362 | 1365 | | |
1363 | 1366 | | |
1364 | 1367 | | |
1365 | | - | |
1366 | | - | |
1367 | 1368 | | |
1368 | 1369 | | |
1369 | 1370 | | |
| |||
1417 | 1418 | | |
1418 | 1419 | | |
1419 | 1420 | | |
| 1421 | + | |
1420 | 1422 | | |
1421 | 1423 | | |
1422 | 1424 | | |
| |||
0 commit comments