diff options
author | Sebastian Andrzej Siewior <bigeasy@linutronix.de> | 2021-02-02 20:01:04 +0300 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2021-02-04 04:41:01 +0300 |
commit | 82154580a7f72ed5b16f0b7829a6514542a6bd98 (patch) | |
tree | 872990bf37de855ed65179fae26f7510aee2b782 /drivers/net/ethernet/chelsio/cxgb/cxgb2.c | |
parent | fec7fa0a750c2127b01adb626e4945509da96462 (diff) | |
download | linux-82154580a7f72ed5b16f0b7829a6514542a6bd98.tar.xz |
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>
Diffstat (limited to 'drivers/net/ethernet/chelsio/cxgb/cxgb2.c')
-rw-r--r-- | drivers/net/ethernet/chelsio/cxgb/cxgb2.c | 10 |
1 files changed, 0 insertions, 10 deletions
diff --git a/drivers/net/ethernet/chelsio/cxgb/cxgb2.c b/drivers/net/ethernet/chelsio/cxgb/cxgb2.c index bd6f3c532d72..512da98019c6 100644 --- a/drivers/net/ethernet/chelsio/cxgb/cxgb2.c +++ b/drivers/net/ethernet/chelsio/cxgb/cxgb2.c @@ -917,16 +917,6 @@ static void mac_stats_task(struct work_struct *work) spin_unlock(&adapter->work_lock); } -void t1_fatal_err(struct adapter *adapter) -{ - if (adapter->flags & FULL_INIT_DONE) { - t1_sge_stop(adapter->sge); - t1_interrupts_disable(adapter); - } - pr_alert("%s: encountered fatal error, operation suspended\n", - adapter->name); -} - static const struct net_device_ops cxgb_netdev_ops = { .ndo_open = cxgb_open, .ndo_stop = cxgb_close, |