From patchwork Tue Nov 3 19:20:05 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sergei Shtylyov X-Patchwork-Id: 7546441 Return-Path: X-Original-To: patchwork-linux-sh@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id AFC079F399 for ; Tue, 3 Nov 2015 19:20:17 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id C6DAB206F1 for ; Tue, 3 Nov 2015 19:20:16 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id C07B8204E4 for ; Tue, 3 Nov 2015 19:20:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932223AbbKCTUM (ORCPT ); Tue, 3 Nov 2015 14:20:12 -0500 Received: from mail-lf0-f43.google.com ([209.85.215.43]:32963 "EHLO mail-lf0-f43.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755957AbbKCTUJ (ORCPT ); Tue, 3 Nov 2015 14:20:09 -0500 Received: by lfbf136 with SMTP id f136so29867918lfb.0 for ; Tue, 03 Nov 2015 11:20:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cogentembedded_com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:organization:user-agent :mime-version:content-transfer-encoding:content-type; bh=aISEP2zvwP9Ta5XQUmrwFJhcbVGaNyXjuARkzREcelQ=; b=i27W0hkLEnRNBM//d5UsmR70am944GrXK2cIIsAXDLTusXRuDdTko/sPBg9fcZPzGD OGqDtkfrotefg+MCgl4cij6mHGPCnUsLblwXlB+ryE+ohoK7b5K5UzdO8hOUluj8lU0C H6RLEnIMzBTqKC0YfsZ7wxDWAzpp1jMPV72utP5fX/nKol0PciibHyvgl2B2WF7W5GlH nsp2jPNAn0HC/GzMGtjYaaZdacSwLLADyosYPirT+2X8DqhL4qQj1/xT8/17X5zO26kp Oi+NufICZS4nXpptPw8Ox1+JQb82TSbzZk2bnCA4K1/D9LAQKi93/d5YS35LPjZbWVHO Bfgg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:organization :user-agent:mime-version:content-transfer-encoding:content-type; bh=aISEP2zvwP9Ta5XQUmrwFJhcbVGaNyXjuARkzREcelQ=; b=PyGhmRg37Xltm8bS7dHD1iq/J0NLtT733g2pmevweyVMi7a0krJuxfStRiQn4hn28Y rRwxXaELowcrZBQ2qoTQ7LUxJuoMVBiSaWMD/zwLOQlwxPNrde3eLzTZja7Do3tR3upY nC/gvpE1499Ocj/rcCYsHkp+0eQwjdLijGfmeqNckq50cQEZUug1aThWc8ZmqS7hwqHb sVi7UUmyoTpP9ErsrQ1IKyBsj5DY+Bp1DJnMisplyGnwrunu5y6S/wyHvLtNOoztFcq3 Jwqz+rRlidD3lz+2py9NWUJY39ZTfh9X22xCZFBacu5J/AblaG1R+fa0vMXbJF3lrDKs CYIg== X-Gm-Message-State: ALoCoQmKHvFVq8Qmy/86RlgKkE41pCHzksJsRDySCPou/0QnTGseab680jmcQ/yq3WML5w84k0Zz X-Received: by 10.25.23.69 with SMTP id n66mr9388776lfi.52.1446578408052; Tue, 03 Nov 2015 11:20:08 -0800 (PST) Received: from wasted.cogentembedded.com ([31.173.80.192]) by smtp.gmail.com with ESMTPSA id ba9sm5024544lbc.12.2015.11.03.11.20.06 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 03 Nov 2015 11:20:07 -0800 (PST) From: Sergei Shtylyov To: netdev@vger.kernel.org Cc: linux-sh@vger.kernel.org Subject: [PATCH] sh_eth: fix typo in RX descriptor bit name Date: Tue, 03 Nov 2015 22:20:05 +0300 Message-ID: <2178116.o4gdOMzEUc@wasted.cogentembedded.com> Organization: Cogent Embedded Inc. User-Agent: KMail/4.14.9 (Linux/4.2.3-200.fc22.x86_64; KDE/4.14.11; x86_64; ; ) MIME-Version: 1.0 Sender: linux-sh-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sh@vger.kernel.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID,T_RP_MATCHES_RCVD,UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Commit 7d7355f58ba4 ("sh_eth: Ensure proper ordering of descriptor active bit write/read") did the right thing but used too "heavy" barriers while there were already "lighter" DMA barriers exactly for this case... Signed-off-by: Sergei Shtylyov --- The patch is against DaveM's 'net-next.git' repo. drivers/net/ethernet/renesas/sh_eth.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe linux-sh" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Index: net-next/drivers/net/ethernet/renesas/sh_eth.c =================================================================== --- net-next.orig/drivers/net/ethernet/renesas/sh_eth.c +++ net-next/drivers/net/ethernet/renesas/sh_eth.c @@ -1416,7 +1416,7 @@ static int sh_eth_txfree(struct net_devi if (txdesc->status & cpu_to_edmac(mdp, TD_TACT)) break; /* TACT bit must be checked before all the following reads */ - rmb(); + dma_rmb(); netif_info(mdp, tx_done, ndev, "tx entry %d status 0x%08x\n", entry, edmac_to_cpu(mdp, txdesc->status)); @@ -1458,7 +1458,7 @@ static int sh_eth_rx(struct net_device * rxdesc = &mdp->rx_ring[entry]; while (!(rxdesc->status & cpu_to_edmac(mdp, RD_RACT))) { /* RACT bit must be checked before all the following reads */ - rmb(); + dma_rmb(); desc_status = edmac_to_cpu(mdp, rxdesc->status); pkt_len = rxdesc->frame_length; @@ -1544,7 +1544,7 @@ static int sh_eth_rx(struct net_device * skb_checksum_none_assert(skb); rxdesc->addr = dma_addr; } - wmb(); /* RACT bit must be set after all the above writes */ + dma_wmb(); /* RACT bit must be set after all the above writes */ if (entry >= mdp->num_rx_ring - 1) rxdesc->status |= cpu_to_edmac(mdp, RD_RACT | RD_RFP | RD_RDLE); @@ -2403,7 +2403,7 @@ static int sh_eth_start_xmit(struct sk_b } txdesc->buffer_length = skb->len; - wmb(); /* TACT bit must be set after all the above writes */ + dma_wmb(); /* TACT bit must be set after all the above writes */ if (entry >= mdp->num_tx_ring - 1) txdesc->status |= cpu_to_edmac(mdp, TD_TACT | TD_TDLE); else