From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.dvmed.net (srv5.dvmed.net [207.36.208.214]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTP id 2ABBDDDF54 for ; Fri, 18 May 2007 10:45:55 +1000 (EST) Message-ID: <464CF73D.9050505@garzik.org> Date: Thu, 17 May 2007 20:45:49 -0400 From: Jeff Garzik MIME-Version: 1.0 To: Scott Wood Subject: Re: [PATCH] gianfar: Add I/O barriers when touching buffer descriptor ownership. References: <20070516200659.GA23548@ld0162-tx32.am.freescale.net> In-Reply-To: <20070516200659.GA23548@ld0162-tx32.am.freescale.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Cc: netdev@vger.kernel.org, linuxppc-dev@ozlabs.org List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Scott Wood wrote: > The hardware must not see that is given ownership of a buffer until it is > completely written, and when the driver receives ownership of a buffer, > it must ensure that any other reads to the buffer reflect its final > state. Thus, I/O barriers are added where required. > > Without this patch, I have observed GCC reordering the setting of > bdp->length and bdp->status in gfar_new_skb. Hardware reordering > was also theoretically possible. > > Signed-off-by: Scott Wood > --- > I've added the requested comments to the source code about > the use of eieio(). Jeff, please consider for 2.6.22, as it > fixes a bug that has been observed. > > drivers/net/gianfar.c | 11 +++++++++++ > 1 files changed, 11 insertions(+), 0 deletions(-) applied