summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/chelsio/cxgb3/adapter.h
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2020-09-29 23:25:15 +0300
committerDavid S. Miller <davem@davemloft.net>2020-09-30 00:02:53 +0300
commita17409e73bc559e9619d478fab92c8a160b77ff9 (patch)
tree7f14648b8f0c480bf71f8603dfeb0ee57c2ad9b9 /drivers/net/ethernet/chelsio/cxgb3/adapter.h
parent453590a8b61034bb08f9bfb0543a6b2244d66a3e (diff)
downloadlinux-a17409e73bc559e9619d478fab92c8a160b77ff9.tar.xz
net: cxgb3: Cleanup in_interrupt() usage
t3_sge_stop() is called from task context and from error handlers in interrupt context. It relies on in_interrupt() to differentiate the contexts. in_interrupt() is deprecated as it is ill defined and does not provide what it suggests. Instead of replacing it with some other construct, simply split the function into t3_sge_stop_dma(), which can be called from any context, and t3_sge_stop() which can be only called from task context. This has the advantage that any bogus invocation of t3_sge_stop() from wrong contexts can be caught by debug kernels instead of being papered over by the conditional. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/chelsio/cxgb3/adapter.h')
-rw-r--r--drivers/net/ethernet/chelsio/cxgb3/adapter.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/ethernet/chelsio/cxgb3/adapter.h b/drivers/net/ethernet/chelsio/cxgb3/adapter.h
index 087ff0ffb597..f80fbd81b609 100644
--- a/drivers/net/ethernet/chelsio/cxgb3/adapter.h
+++ b/drivers/net/ethernet/chelsio/cxgb3/adapter.h
@@ -313,6 +313,7 @@ void t3_os_link_fault(struct adapter *adapter, int port_id, int state);
void t3_os_link_fault_handler(struct adapter *adapter, int port_id);
void t3_sge_start(struct adapter *adap);
+void t3_sge_stop_dma(struct adapter *adap);
void t3_sge_stop(struct adapter *adap);
void t3_start_sge_timers(struct adapter *adap);
void t3_stop_sge_timers(struct adapter *adap);