> On Fri, Apr 12, 2019 at 02:27:16PM +0200, Lorenzo Bianconi wrote: > > Disable mt76u_tx_tasklet at the end of mt76u_stop_queues in order to > > properly deallocate all pending skbs during suspend/resume phase > > On suspend/resume tx skb's are processed after tasklet_enable() > in resume callback. There is issue with device removal though > (during suspend or otherwise).
Hi Stanislaw,
I guess the right moment to deallocate the skbs is during suspend since resume
can happen in very far future
>
> > Fixes: b40b15e1521f ("mt76: add usb support to mt76 layer")
> > Signed-off-by: Lorenzo Bianconi <[email protected]>
> > ---
> > drivers/net/wireless/mediatek/mt76/usb.c | 4 ++--
> > 1 file changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/drivers/net/wireless/mediatek/mt76/usb.c
> > b/drivers/net/wireless/mediatek/mt76/usb.c
> > index a3acc070063a..575207133775 100644
> > --- a/drivers/net/wireless/mediatek/mt76/usb.c
> > +++ b/drivers/net/wireless/mediatek/mt76/usb.c
> > @@ -842,10 +842,10 @@ static void mt76u_stop_tx(struct mt76_dev *dev)
> > void mt76u_stop_queues(struct mt76_dev *dev)
> > {
> > tasklet_disable(&dev->usb.rx_tasklet);
> > - tasklet_disable(&dev->usb.tx_tasklet);
> > -
> > mt76u_stop_rx(dev);
> > +
> > mt76u_stop_tx(dev);
> > + tasklet_disable(&dev->usb.tx_tasklet);
>
> If tasklet is scheduled and we disable it and never enable, we end up
> with infinite loop in tasklet_action_common(). This patch make the
> problem less reproducible since tasklet_disable() is moved after
> usb_kill_urb() -> tasklet_schedule(), but it is still possible.
I can see the point here. Maybe we can just run tasklet_kill instead of
tasklet_disable here (at least for tx one)
Regards,
Lorenzo
>
> I comprehansive have fix for that, but giving it more testing.
> Please drop this patch.
>
> Stanislaw
signature.asc
Description: PGP signature
