summaryrefslogtreecommitdiff
path: root/drivers/net/can/m_can/m_can.h
diff options
context:
space:
mode:
authorTorin Cooper-Bennun <torin@maxiluxsystems.com>2021-03-08 10:24:28 +0000
committerMarc Kleine-Budde <mkl@pengutronix.de>2021-03-30 11:14:48 +0200
commit1be37d3b0414e3db47f6fcba6c16286bbae0cb65 (patch)
tree59b324da8bac464bce50b894b6c2884540b8072c /drivers/net/can/m_can/m_can.h
parentdf06fd678260bca919ea894281ec54ce10e45ce6 (diff)
can: m_can: fix periph RX path: use rx-offload to ensure skbs are sent from softirq context
For peripheral devices, m_can sent skbs directly from a threaded irq instead of from a softirq context, breaking the tcan4x5x peripheral driver completely. This patch transitions the driver to use the rx-offload helper for peripherals, ensuring the skbs are sent from the correct context, with h/w timestamping to ensure correct ordering. Link: https://lore.kernel.org/r/20210308102427.63916-4-torin@maxiluxsystems.com Signed-off-by: Torin Cooper-Bennun <torin@maxiluxsystems.com> [mkl: m_can_class_register(): update error handling] Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Diffstat (limited to 'drivers/net/can/m_can/m_can.h')
-rw-r--r--drivers/net/can/m_can/m_can.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/net/can/m_can/m_can.h b/drivers/net/can/m_can/m_can.h
index 3fda84cef351..ace071c3e58c 100644
--- a/drivers/net/can/m_can/m_can.h
+++ b/drivers/net/can/m_can/m_can.h
@@ -8,6 +8,7 @@
#include <linux/can/core.h>
#include <linux/can/led.h>
+#include <linux/can/rx-offload.h>
#include <linux/completion.h>
#include <linux/device.h>
#include <linux/dma-mapping.h>
@@ -71,6 +72,7 @@ struct m_can_ops {
struct m_can_classdev {
struct can_priv can;
+ struct can_rx_offload offload;
struct napi_struct napi;
struct net_device *net;
struct device *dev;