]> git.baikalelectronics.ru Git - kernel.git/commit
chelsio: cxgb: Disable the card on error in threaded interrupt
authorSebastian Andrzej Siewior <bigeasy@linutronix.de>
Tue, 2 Feb 2021 17:01:04 +0000 (18:01 +0100)
committerJakub Kicinski <kuba@kernel.org>
Thu, 4 Feb 2021 01:41:01 +0000 (17:41 -0800)
commitc7b906e4a2e0ce94a68e1e6ddd99f707a5e03f63
tree872990bf37de855ed65179fae26f7510aee2b782
parentfc35af953da782d463229d3b6d21736526bf3a7f
chelsio: cxgb: Disable the card on error in threaded interrupt

t1_fatal_err() is invoked from the interrupt handler. The bad part is
that it invokes (via t1_sge_stop()) del_timer_sync() and tasklet_kill().
Both functions must not be called from an interrupt because it is
possible that it will wait for the completion of the timer/tasklet it
just interrupted.

In case of a fatal error, use t1_interrupts_disable() to disable all
interrupt sources and then wake the interrupt thread with
F_PL_INTR_SGE_ERR as pending flag. The threaded-interrupt will stop the
card via t1_sge_stop() and not re-enable the interrupts again.

Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/chelsio/cxgb/common.h
drivers/net/ethernet/chelsio/cxgb/cxgb2.c
drivers/net/ethernet/chelsio/cxgb/sge.c
drivers/net/ethernet/chelsio/cxgb/sge.h
drivers/net/ethernet/chelsio/cxgb/subr.c