On 11/21/2012 04:25 PM, Michael Pellegrini wrote: > Michael Pellegrini gmail.com> writes: > >> This driver is working very well so far. ifconfig shows that I am sending and >> receiving CAN messages successfully. This is confirmed externally by the CAN >> Monitor system. >> >> I will start a more intensive test now and report the results. > > I shouldn't have spoken so soon. Running my application on the PCH-System > caused the original problem within minutes. Message transmission stopped > and and my application started printing the error "No buffer space available". > The only way to recover was to reset the interface. Can you try this patch (ontop of Wolfgang's)? Marc diff --git a/drivers/net/can/c_can/c_can.c b/drivers/net/can/c_can/c_can.c index 5233b8f..2849224 100644 --- a/drivers/net/can/c_can/c_can.c +++ b/drivers/net/can/c_can/c_can.c @@ -543,8 +543,6 @@ static netdev_tx_t c_can_start_xmit(struct sk_buff *skb, msg_obj_no = get_tx_next_msg_obj(priv); - /* prepare message object for transmission */ - c_can_write_msg_object(dev, 0, frame, msg_obj_no); can_put_echo_skb(skb, dev, msg_obj_no - C_CAN_MSG_OBJ_TX_FIRST); /* @@ -556,6 +554,9 @@ static netdev_tx_t c_can_start_xmit(struct sk_buff *skb, (priv->tx_next & C_CAN_NEXT_MSG_OBJ_MASK) == 0) netif_stop_queue(dev); + /* prepare message object for transmission */ + c_can_write_msg_object(dev, 0, frame, msg_obj_no); + return NETDEV_TX_OK; } -- Pengutronix e.K. | Marc Kleine-Budde | Industrial Linux Solutions | Phone: +49-231-2826-924 | Vertretung West/Dortmund | Fax: +49-5121-206917-5555 | Amtsgericht Hildesheim, HRA 2686 | http://www.pengutronix.de |