[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1426804568-2907-33-git-send-email-kamal@canonical.com>
Date: Thu, 19 Mar 2015 15:35:20 -0700
From: Kamal Mostafa <kamal@...onical.com>
To: linux-kernel@...r.kernel.org, stable@...r.kernel.org,
kernel-team@...ts.ubuntu.com
Cc: Viktor Babrian <babrian.viktor@...yi.mta.hu>,
Marc Kleine-Budde <mkl@...gutronix.de>,
Kamal Mostafa <kamal@...onical.com>
Subject: [PATCH 3.13.y-ckt 32/80] can: c_can: end pending transmission on network stop (ifdown)
3.13.11-ckt17 -stable review patch. If anyone has any objections, please let me know.
------------------
From: Viktor Babrian <babrian.viktor@...yi.mta.hu>
commit 7ffd7b4e169d619e66928fe5d997723f2c6f1056 upstream.
Put controller into init mode in network stop to end pending transmissions. The
issue is observed in cases when transmitted frame is not acked.
Signed-off-by: Viktor Babrian <babrian.viktor@...yi.mta.hu>
Signed-off-by: Marc Kleine-Budde <mkl@...gutronix.de>
[ kamal: backport to 3.13-stable: context ]
Signed-off-by: Kamal Mostafa <kamal@...onical.com>
---
drivers/net/can/c_can/c_can.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/net/can/c_can/c_can.c b/drivers/net/can/c_can/c_can.c
index 77061ee..4b17cd6 100644
--- a/drivers/net/can/c_can/c_can.c
+++ b/drivers/net/can/c_can/c_can.c
@@ -694,6 +694,9 @@ static void c_can_stop(struct net_device *dev)
/* disable all interrupts */
c_can_enable_all_interrupts(priv, DISABLE_ALL_INTERRUPTS);
+ /* put ctrl to init on stop to end ongoing transmission */
+ priv->write_reg(priv, C_CAN_CTRL_REG, CONTROL_INIT);
+
/* set the state as STOPPED */
priv->can.state = CAN_STATE_STOPPED;
}
--
1.9.1
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists