chelsio: cxgb: Replace the workqueue with threaded interrupt
authorSebastian Andrzej Siewior <bigeasy@linutronix.de>
Tue, 2 Feb 2021 17:01:03 +0000 (18:01 +0100)
committerJakub Kicinski <kuba@kernel.org>
Thu, 4 Feb 2021 01:41:01 +0000 (17:41 -0800)
commitfec7fa0a750c2127b01adb626e4945509da96462
tree5d16d9c956cdc8c5a4219998e4074199a89381ce
parent462e99a18b22609ed40ee0c096775169c2859b21
chelsio: cxgb: Replace the workqueue with threaded interrupt

The external interrupt (F_PL_INTR_EXT) needs to be handled in a process
context and this is accomplished by utilizing a workqueue.

The process context can also be provided by a threaded interrupt instead
of a workqueue. The threaded interrupt can be used later for other
interrupt related processing which require non-atomic context without
using yet another workqueue. free_irq() also ensures that the thread is
done which is currently missing (the worker could continue after the
module has been removed).

Save pending flags in pending_thread_intr. Use the same mechanism
to disable F_PL_INTR_EXT as interrupt source like it is used before the
worker is scheduled. Enable the interrupt again once
t1_elmer0_ext_intr_handler() is done.

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