summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/stackcollapse.py
diff options
context:
space:
mode:
authorJacob Riff <jacob@riff.dk>2026-10-30 20:24:00 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2026-11-04 13:15:14 -0500
commitb8320a8b5650096873ae8c0377b8fa1226b15fe0 (patch)
tree4ee91f1244dbb9b8488f19ca3da317829888ae4e /tools/perf/scripts/python/stackcollapse.py
parente971f4f365bad51d01bc90db55b56fdb3124f963 (diff)
usb: typec: ucsi: retry init only while the PPM is not ready
Commit 254261381538 ("usb: typec: ucsi: retry init when the PPM answers early commands incorrectly") makes ucsi_init_work() retry ucsi_init() on -ENODEV and -EINVAL, a hundred times over ten seconds, to cover a PPM that is not ready to answer commands correctly for a short window during boot. It catches more than that. ucsi_register_port() also fails with -ENODEV when no USB role switch is available, and logs that at error level, so every retry runs it again and logs it again. Where a machine without a usable role switch used to log ucsi_acpi USBC000:00: error -ENODEV: con1: failed to get usb role switch ucsi_acpi USBC000:00: error -ENODEV: PPM init failed it now logs a hundred and one copies of the first line, followed by "PPM init failed, stop trying", on every boot, and the retries can never succeed there. Have ucsi_init() report the two not-ready cases as -EAGAIN instead: GET_CAPABILITY reporting zero connectors, and the PPM rejecting a standard command (-EINVAL from ucsi_read_error(), the only -EINVAL expected once the PPM reset has succeeded). Retry only -EAGAIN and, as before that commit, -EPROBE_DEFER. Every other error is reported once and init stops, as it did before. Also give -EAGAIN its own budget. The hundred retries over ten seconds belong to the USB role switch wait. On the machine the retry was written for, every observed failure recovered on the first or second retry, so ten retries over one second is plenty. A PPM that permanently rejects a command now logs "possible UCSI driver bug" up to eleven times in that second, on hardware where init already failed before. Fixes: 254261381538 ("usb: typec: ucsi: retry init when the PPM answers early commands incorrectly") Reported-by: Linus Torvalds <torvalds@linux-foundation.org> Closes: https://lore.kernel.org/r/CAHk-=wjGk9rBTphk1OAwcqGAE1__KJgMr3B-8X4hKFPX8Wm=BQ@mail.gmail.com Signed-off-by: Jacob Riff <jacob@riff.dk> Link: https://patch.msgid.link/20261031032400.38349-1-jacob@riff.dk Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'tools/perf/scripts/python/stackcollapse.py')
0 files changed, 0 insertions, 0 deletions