From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Date: Thu, 26 Feb 2009 02:03:18 -0800 (PST) Message-Id: <20090226.020318.50178027.davem@davemloft.net> To: rini@arvoo.nl Subject: Re: [PATCH net] gianfar : Do right check on num_txbdfree From: David Miller In-Reply-To: <49A6595A.9000405@arvoo.nl> References: <49A6595A.9000405@arvoo.nl> Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Cc: Linuxppc-dev@ozlabs.org, afleming@freescale.com, netdev@vger.kernel.org List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Rini van Zetten Date: Thu, 26 Feb 2009 09:56:58 +0100 > This patch fixes a wrong check on num_txbdfree. It could lead to > num_txbdfree become nagative. Result was that the gianfar stops > sending data. > > Signed-off-by: Rini van Zetten - if (nr_frags > priv->num_txbdfree) { > + if ( (nr_frags+1) > priv->num_txbdfree) { Please don't put a space between the parens there "( (", like that.