Re: [PATCH v1] usb: typec: ucsi: allow retries of ucsi_resume_work
From: Marco Crivellari
Date: Fri Aug 28 2026 - 06:01:56 EST
Hi,
>+ if (++ucsi->resume_retries < 5) {
>+ queue_delayed_work(system_long_wq, &ucsi->resume_work,
>+ msecs_to_jiffies(500));
>+ return;
>+ }
Just one thing about this (same applies to the other queue_delayed_work() calls).
queue_delayed_work() calls:
queue_delayed_work_on(WORK_CPU_UNBOUND,...)
__queue_delayed_work(cpu, wq, dwork, delay)
__queue_delayed_work(cpu,...)
That perform this check:
if (likely(cpu == WORK_CPU_UNBOUND))
add_timer_global(timer);
else
...
It means the timer used is global / unbound: when it fires it will enqueue
the work on the CPU where the timer is executed. The workqueue you're
using is per-CPU.
I guess locality is not needed for correctness here, because of that, so
you can replace that workqueue with system_dfl_long_wq. This is the
unbound version.
system_long_wq is scheduled for removal.
Thanks,
--
Marco Crivellari
SUSE Labs