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

    can: flexcan: fix shutdown: first disable chip, then all interrupts

to the 3.13-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-fix-shutdown-first-disable-chip-then-all-interrupts.patch
and it can be found in the queue-3.13 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <[email protected]> know about it.


>From 5be93bdda64e85450598c6e97f79fb8f6acf30e0 Mon Sep 17 00:00:00 2001
From: Marc Kleine-Budde <[email protected]>
Date: Wed, 19 Feb 2014 12:00:51 +0100
Subject: can: flexcan: fix shutdown: first disable chip, then all interrupts

From: Marc Kleine-Budde <[email protected]>

commit 5be93bdda64e85450598c6e97f79fb8f6acf30e0 upstream.

When shutting down the CAN interface (ifconfig canX down) during high CAN bus
loads, the CAN core might hang and freeze the whole CPU.

This patch fixes the shutdown sequence by first disabling the CAN core then
disabling all interrupts.

Signed-off-by: Marc Kleine-Budde <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>

---
 drivers/net/can/flexcan.c |    8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

--- a/drivers/net/can/flexcan.c
+++ b/drivers/net/can/flexcan.c
@@ -824,14 +824,16 @@ static void flexcan_chip_stop(struct net
        struct flexcan_regs __iomem *regs = priv->base;
        u32 reg;
 
-       /* Disable all interrupts */
-       flexcan_write(0, &regs->imask1);
-
        /* Disable + halt module */
        reg = flexcan_read(&regs->mcr);
        reg |= FLEXCAN_MCR_MDIS | FLEXCAN_MCR_HALT;
        flexcan_write(reg, &regs->mcr);
 
+       /* Disable all interrupts */
+       flexcan_write(0, &regs->imask1);
+       flexcan_write(priv->reg_ctrl_default & ~FLEXCAN_CTRL_ERR_ALL,
+                     &regs->ctrl);
+
        if (priv->reg_xceiver)
                regulator_disable(priv->reg_xceiver);
        priv->can.state = CAN_STATE_STOPPED;


Patches currently in stable-queue which might be from [email protected] are

queue-3.13/can-flexcan-fix-transition-from-and-to-low-power-mode-in-chip_-en-dis-able.patch
queue-3.13/can-flexcan-fix-shutdown-first-disable-chip-then-all-interrupts.patch
queue-3.13/can-flexcan-flexcan_remove-add-missing-netif_napi_del.patch
queue-3.13/can-flexcan-factor-out-transceiver-en-dis-able-into-seperate-functions.patch
queue-3.13/can-flexcan-flexcan_open-fix-error-path-if-flexcan_chip_start-fails.patch
--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to