Skip to content

Commit

Permalink
can: c_can: end pending transmission on network stop (ifdown)
Browse files Browse the repository at this point in the history
commit 7ffd7b4 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@renyi.mta.hu>
Cc: linux-stable <stable@vger.kernel.org>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Viktor Babrian authored and Greg Kroah-Hartman committed Feb 6, 2015
1 parent 427a574 commit 793332a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions drivers/net/can/c_can/c_can.c
Original file line number Diff line number Diff line change
Expand Up @@ -611,6 +611,10 @@ static void c_can_stop(struct net_device *dev)
struct c_can_priv *priv = netdev_priv(dev);

c_can_irq_control(priv, false);

/* put ctrl to init on stop to end ongoing transmission */
priv->write_reg(priv, C_CAN_CTRL_REG, CONTROL_INIT);

priv->can.state = CAN_STATE_STOPPED;
}

Expand Down

0 comments on commit 793332a

Please sign in to comment.