> Date: Tue, 8 Feb 2022 14:21:52 +0100
> From: Stefan Sperling <[email protected]>
> 
> On Tue, Jan 25, 2022 at 11:22:45AM +0100, Mark Kettenis wrote:
> > > The KASSERT triggers but for the wrong reason: We don't have outstanding
> > > tasks, we have a bad reference counter. Only setting the ref counter to 1 
> > > if
> > > we are about to launch a task during resume should fix it, and this 
> > > matches
> > > what iwx(4) is doing:
> > 
> > Running this now.  May take some time to reproduce the issue though.
> 
> Any news?  I would like to commit this patch.

Been running a kernel with this since January 25th without triggering
the issue that made me want to ifconfig down/up the interface.

The diff looks good to me though.  I think you should just commit it.

ok kettenis@

> > > diff d26399562c831a7212cebc57463cc9931ff8aff2 /usr/src
> > > blob - 937f2cc28f6c85502031e4c9efa0a02c75fd1a6d
> > > file + sys/dev/pci/if_iwm.c
> > > --- sys/dev/pci/if_iwm.c
> > > +++ sys/dev/pci/if_iwm.c
> > > @@ -11719,8 +11719,6 @@ iwm_wakeup(struct iwm_softc *sc)
> > >   struct ifnet *ifp = &sc->sc_ic.ic_if;
> > >   int err;
> > >  
> > > - refcnt_init(&sc->task_refs);
> > > -
> > >   err = iwm_start_hw(sc);
> > >   if (err)
> > >           return err;
> > > @@ -11729,6 +11727,7 @@ iwm_wakeup(struct iwm_softc *sc)
> > >   if (err)
> > >           return err;
> > >  
> > > + refcnt_init(&sc->task_refs);
> > >   ifq_clr_oactive(&ifp->if_snd);
> > >   ifp->if_flags |= IFF_RUNNING;
> > >  
> > > 
> > 
> 

Reply via email to