Hi Jeff,

Thanks for the review.  I agree the MHI channel remove callback is a
much better place to drain the control response work than the PCI
remove path.

Looking over the rest of the driver, I also missed two related
workqueues in my original analysis: qts_wq and ssr_wq.  Their MHI
remove callbacks currently unprepare the channels without draining
those workqueues, while the workers can still touch qdev and
channel-related state, so those paths need to be checked as well.

Rather than reworking workqueue ownership across the driver, I'd keep
the existing DRM-managed allocation and synchronize the work at each
channel's teardown.  Before sending a revision, though, there is one
ordering detail I need to sort out: qaic_dev_reset_clean_local_state()
can run ahead of MHI channel removal and releases SSR-related state, so
I want to make sure an SSR worker cannot race with that cleanup.

I'll go through the producer shutdown and teardown ordering for all
three queues and keep any follow-up narrowly scoped.  I've only
compile-tested the patch so far and don't have QAIC hardware, so I
don't want to claim hardware validation.

Thanks again for pointing this out,
Yaohan

Reply via email to