From patchwork Mon Feb 9 07:27:04 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Risto Suominen X-Patchwork-Id: 22663 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by ozlabs.org (Postfix) with ESMTP id 6062CDDDA5 for ; Mon, 9 Feb 2009 18:27:14 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753942AbZBIH1J (ORCPT ); Mon, 9 Feb 2009 02:27:09 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753939AbZBIH1I (ORCPT ); Mon, 9 Feb 2009 02:27:08 -0500 Received: from mail-bw0-f161.google.com ([209.85.218.161]:53370 "EHLO mail-bw0-f161.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753809AbZBIH1H (ORCPT ); Mon, 9 Feb 2009 02:27:07 -0500 Received: by bwz5 with SMTP id 5so913199bwz.13 for ; Sun, 08 Feb 2009 23:27:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type; bh=vIy+dZU5XEaCU2XkHmGiWLuHdl6hloPRJyTtejQmo+Y=; b=vh2rNoI2F/rXEPpsXq5vuzSkB4mYfE0+aZQ3a0kgNBFaWIudBWNFQ08FdBIc/U5N5I 94YbTvXjb6S5pMaNPQscIeFIF8H/6fPgNJiYYr7kx8/nfZtcRG8LgGcoxrfhd4TDhLr6 0T1mjxQysGkHg0BzpDeZE/rOvNNggJvaQcONI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=dWMugF3PpXYG6TbuPedaCGWk7MOaeu6aQgNr3g3spngCoeXCAAtFhy0IBW6EJ988SD W0LRSe49amKkdIsCk1ZWOuEYZbW11mdQB+3L19mSnEeexP8YM2P5kL8JhbSw9OlLhfBZ VCWSk0zQvSPJQrwHCJoHrgi85Egsqw4+ADc5w= MIME-Version: 1.0 Received: by 10.181.201.18 with SMTP id d18mr1718193bkq.125.1234164424831; Sun, 08 Feb 2009 23:27:04 -0800 (PST) In-Reply-To: <46e1c7760902071330u10427d33p3f49e82a2e4b1ddc@mail.gmail.com> References: <46e1c7760902071330u10427d33p3f49e82a2e4b1ddc@mail.gmail.com> Date: Mon, 9 Feb 2009 09:27:04 +0200 Message-ID: <46e1c7760902082327w38719aa9j97e7158b045bc0f9@mail.gmail.com> Subject: Fwd: [PATCH 001/002] de2104x: force correct order when writing to rx ring From: Risto Suominen To: netdev@vger.kernel.org Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org ---------- Forwarded message ---------- From: Risto Suominen Date: 2009/2/7 Subject: [PATCH 001/002] de2104x: force correct order when writing to rx ring To: Jeff Garzik , lkml DescOwn should not be set, thus allowing the chip to use the descriptor, before everything else is set up correctly. Signed-off-by: Risto Suominen --- The testing is done on kernel version 2.6.18. DescOwn should not be set, thus allowing the chip to use the descriptor, before everything else is set up correctly. Signed-off-by: Risto Suominen --- The testing is done on kernel version 2.6.18. --- drivers/net/tulip/de2104x.c.org 2006-09-20 06:42:06.000000000 +0300 +++ drivers/net/tulip/de2104x.c 2009-02-07 15:04:04.000000000 +0200 @@ -465,13 +465,14 @@ static void de_rx (struct de_private *de drop = 1; rx_next: - de->rx_ring[rx_tail].opts1 = cpu_to_le32(DescOwn); if (rx_tail == (DE_RX_RING_SIZE - 1)) de->rx_ring[rx_tail].opts2 = cpu_to_le32(RingEnd | de->rx_buf_sz); else de->rx_ring[rx_tail].opts2 = cpu_to_le32(de->rx_buf_sz); de->rx_ring[rx_tail].addr1 = cpu_to_le32(mapping); + wmb(); + de->rx_ring[rx_tail].opts1 = cpu_to_le32(DescOwn); rx_tail = NEXT_RX(rx_tail); }