FAILED: patch "[PATCH] can: flexcan: handle tx-complete CAN frames via rx-offload" failed to apply to 4.14-stable tree
Subsystems (2)
[email protected]
maintainerThe patch below does not apply to the 4.14-stable tree.
If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to <[email protected]>.
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
Quoted 1 line
From
ed72bc8bcb9277061e753faf300b20f97323761cMon Sep 17 00:00:00 2001
From: Oleksij Rempel <[email protected]>
Date: Tue, 18 Sep 2018 11:40:39 +0200
Subject: [PATCH] can: flexcan: handle tx-complete CAN frames via rx-offload
infrastructure
Current flexcan driver will put TX-ECHO in regular unsorted way, in this case TX-ECHO can come after the response to the same TXed message. In some cases, for example for J1939 stack, things will break. This patch is using new rx-offload API to put the messages just in the right place.
drivers/net/can/flexcan.c +4 -1
@@ -787,8 +787,11 @@ static irqreturn_t flexcan_irq(int irq, void *dev_id)/* transmission complete interrupt */ if (reg_iflag2 &FLEXCAN_IFLAG_MB (FLEXCAN_TX_MB )) { +u32 reg_ctrl = priv->read (®s->mb[FLEXCAN_TX_MB ].can_ctrl); + handled =IRQ_HANDLED ; - stats->tx_bytes +=can_get_echo_skb (dev,0 ); + stats->tx_bytes +=can_rx_offload_get_echo_skb (&priv->offload, +0 , reg_ctrl <<16 ); stats->tx_packets++;can_led_event (dev,CAN_LED_EVENT_TX );