From mboxrd@z Thu Jan 1 00:00:00 1970 From: Wolfgang Grandegger Subject: Re: [PATCH] net/can/mscan: Enable interrupts when all TX buffers are occupied to get notified when they are available again Date: Mon, 28 Nov 2011 14:37:53 +0100 Message-ID: <4ED38EB1.6030806@grandegger.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Return-path: Received: from ngcobalt02.manitu.net ([217.11.48.102]:52260 "EHLO ngcobalt02.manitu.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751924Ab1K1Nh4 (ORCPT ); Mon, 28 Nov 2011 08:37:56 -0500 In-Reply-To: Sender: linux-can-owner@vger.kernel.org List-ID: To: "Mosler, Martin" Cc: "linux-can@vger.kernel.org" , "socketcan@hartkopp.net" , "lucas.demarchi@profusion.mobi" , "davem@davemloft.net" , "mkl@pengutronix.de" , "netdev@vger.kernel.org" , "linux-kernel@vger.kernel.org" On 11/28/2011 02:25 PM, Mosler, Martin wrote: > When all TX buffers of the mscan are occupied the network layer is told to stop sending further packets. However the TX interrupts are not enabled and therefore the driver has no chance to tell the network layer when it is ready to accept further packets. > > Signed-off-by: Martin Mosler > > --- linux-2.6/drivers/net/can/mscan/mscan.c.orig 2011-11-28 13:54:29.547850661 +0100 > +++ linux-2.6/drivers/net/can/mscan/mscan.c 2011-11-28 13:55:52.427849601 +0100 > @@ -214,6 +214,7 @@ static netdev_tx_t mscan_start_xmit(stru > case 0: > netif_stop_queue(dev); > dev_err(dev->dev.parent, "Tx Ring full when queue awake!\n"); > + out_8(®s->cantier, priv->tx_active); > return NETDEV_TX_BUSY; > case 1: > /* Hm, did you see the error message. Actually, it should never happen, IIRC. Wolfgang.