From: Michael Chan <michael.c...@broadcom.com> Date: Thu, 3 Sep 2020 14:28:54 -0400
> If tg3_reset_task() fails, the device state is left in an inconsistent > state with IFF_RUNNING still set but NAPI state not enabled. A > subsequent operation, such as ifdown or AER error can cause it to > soft lock up when it tries to disable NAPI state. > > Fix it by bringing down the device to !IFF_RUNNING state when > tg3_reset_task() fails. tg3_reset_task() running from workqueue > will now call tg3_close() when the reset fails. We need to > modify tg3_reset_task_cancel() slightly to avoid tg3_close() > calling cancel_work_sync() to cancel tg3_reset_task(). Otherwise > cancel_work_sync() will wait forever for tg3_reset_task() to > finish. > > Reported-by: David Christensen <d...@linux.vnet.ibm.com> > Reported-by: Baptiste Covolato <bapti...@arista.com> > Fixes: db2199737990 ("tg3: Schedule at most one tg3_reset_task run") > Signed-off-by: Michael Chan <michael.c...@broadcom.com> Applied and queued up for -stable, thanks.