Commit 3a059fa3 authored by Viktor Babrian's avatar Viktor Babrian Committed by Kamal Mostafa

can: c_can: end pending transmission on network stop (ifdown)

commit 7ffd7b4e 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: default avatarViktor Babrian <babrian.viktor@renyi.mta.hu>
Signed-off-by: default avatarMarc Kleine-Budde <mkl@pengutronix.de>
[ kamal: backport to 3.13-stable: context ]
Signed-off-by: default avatarKamal Mostafa <kamal@canonical.com>
parent aa5feb1c
......@@ -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;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment