Re: [PATCH v2 2/7] thunderbolt: Move ICM mailbox functions to icm.c and internalize interrupt work

From: Chunfeng Yun (云春峰)

Date: Tue Nov 10 2026 - 21:38:37 EST


On 二, 2026-11-10 at 15:24 +0100, Mika Westerberg wrote:
>
> >
> > --- a/drivers/thunderbolt/nhi.c
> > +++ b/drivers/thunderbolt/nhi.c
> > @@ -35,8 +35,6 @@
> >   */
> >  #define RING_E2E_RESERVED_HOPID RING_FIRST_USABLE_HOPID
> >  
> > -#define NHI_MAILBOX_TIMEOUT 500 /* ms */
> > -
> >  static bool host_reset = true;
> >  module_param(host_reset, bool, 0444);
> >  MODULE_PARM_DESC(host_reset, "reset USB4 host router (default:
> > true)");
> > @@ -964,65 +962,7 @@ int tb_ring_throttling(struct tb_ring *ring,
> > unsigned int interval_nsec)
> >  }
> >  EXPORT_SYMBOL_GPL(tb_ring_throttling);
> >  ...
> > -
> > -void nhi_interrupt_work(struct work_struct *work)
> > +static void nhi_interrupt_work(struct work_struct *work)
> >  {
> >   struct tb_nhi *nhi = container_of(work, typeof(*nhi),
> > interrupt_work);
> >   int value = 0; /* Suppress uninitialized usage warning. */
> > @@ -1331,6 +1271,8 @@ int tb_nhi_probe(struct tb_nhi *nhi)
> >   if (!nhi->tx_rings || !nhi->rx_rings || !nhi-
> > >interrupt_mask)
> >   return -ENOMEM;
> >  
> > +    INIT_WORK(&nhi->interrupt_work, nhi_interrupt_work);
> > +
>
> This has weird indent.
will fix it, thanks

>
> >   nhi_reset(nhi);
> >  
> >   /* In case someone left them on. */
> > diff --git a/drivers/thunderbolt/nhi.h b/drivers/thunderbolt/nhi.h
> > index a36c62c49a5c..3dd6ace6150d 100644
> >