Patch "can: flexcan: handle tx-complete CAN frames via rx-offload infrastructure" has been added to the 4.14-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    can: flexcan: handle tx-complete CAN frames via rx-offload infrastructure

to the 4.14-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     can-flexcan-handle-tx-complete-can-frames-via-rx-offload-infrastructure.patch
and it can be found in the queue-4.14 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.


>From ed72bc8bcb9277061e753faf300b20f97323761c Mon Sep 17 00:00:00 2001
From: Oleksij Rempel <o.rempel@xxxxxxxxxxxxxx>
Date: Tue, 18 Sep 2018 11:40:39 +0200
Subject: can: flexcan: handle tx-complete CAN frames via rx-offload infrastructure

From: Oleksij Rempel <o.rempel@xxxxxxxxxxxxxx>

commit ed72bc8bcb9277061e753faf300b20f97323761c upstream.

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.

Signed-off-by: Oleksij Rempel <o.rempel@xxxxxxxxxxxxxx>
Cc: linux-stable <stable@xxxxxxxxxxxxxxx>
Signed-off-by: Marc Kleine-Budde <mkl@xxxxxxxxxxxxxx>
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>

---
 drivers/net/can/flexcan.c |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

--- a/drivers/net/can/flexcan.c
+++ b/drivers/net/can/flexcan.c
@@ -775,8 +775,11 @@ static irqreturn_t flexcan_irq(int irq,
 
 	/* transmission complete interrupt */
 	if (reg_iflag1 & FLEXCAN_IFLAG_MB(priv->tx_mb_idx)) {
+		u32 reg_ctrl = priv->read(&regs->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);
 


Patches currently in stable-queue which might be from o.rempel@xxxxxxxxxxxxxx are

queue-4.14/can-flexcan-use-can_rx_offload_queue_sorted-for-flexcan_irq_bus_.patch
queue-4.14/can-rx-offload-introduce-can_rx_offload_get_echo_skb-and-can_rx_offload_queue_sorted-functions.patch
queue-4.14/can-rx-offload-rename-can_rx_offload_irq_queue_err_skb-to-can_rx_offload_queue_tail.patch
queue-4.14/can-flexcan-handle-tx-complete-can-frames-via-rx-offload-infrastructure.patch



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux