netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Petri Gynther <pgynther@google.com>
To: netdev@vger.kernel.org
Cc: davem@davemloft.net, f.fainelli@gmail.com, jaedon.shin@gmail.com,
	Petri Gynther <pgynther@google.com>
Subject: [PATCH net-next 3/3] net: bcmgenet: fix dmadesc_set()
Date: Mon,  4 Apr 2016 17:10:01 -0700	[thread overview]
Message-ID: <1459815001-91703-3-git-send-email-pgynther@google.com> (raw)
In-Reply-To: <1459815001-91703-1-git-send-email-pgynther@google.com>

dmadesc_set() is used for setting the Tx buffer DMA address, length,
and status bits on a Tx ring descriptor when a frame is being Tx'ed.

Always set the Tx buffer DMA address first, before updating the length
and status bits, i.e. giving the Tx descriptor to the hardware.

Signed-off-by: Petri Gynther <pgynther@google.com>
---
 drivers/net/ethernet/broadcom/genet/bcmgenet.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/broadcom/genet/bcmgenet.c b/drivers/net/ethernet/broadcom/genet/bcmgenet.c
index d77cd6d..f7b42b9 100644
--- a/drivers/net/ethernet/broadcom/genet/bcmgenet.c
+++ b/drivers/net/ethernet/broadcom/genet/bcmgenet.c
@@ -104,8 +104,8 @@ static inline void dmadesc_set_addr(struct bcmgenet_priv *priv,
 static inline void dmadesc_set(struct bcmgenet_priv *priv,
 			       void __iomem *d, dma_addr_t addr, u32 val)
 {
-	dmadesc_set_length_status(priv, d, val);
 	dmadesc_set_addr(priv, d, addr);
+	dmadesc_set_length_status(priv, d, val);
 }
 
 static inline dma_addr_t dmadesc_get_addr(struct bcmgenet_priv *priv,
-- 
2.8.0.rc3.226.g39d4020

  parent reply	other threads:[~2016-04-05  0:10 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-05  0:09 [PATCH net-next 1/3] net: bcmgenet: cleanup for bcmgenet_xmit() Petri Gynther
2016-04-05  0:10 ` [PATCH net-next 2/3] net: bcmgenet: cleanup for bcmgenet_xmit_frag() Petri Gynther
2016-04-05  1:00   ` Florian Fainelli
2016-04-06 20:09   ` David Miller
2016-04-05  0:10 ` Petri Gynther [this message]
2016-04-05  0:58   ` [PATCH net-next 3/3] net: bcmgenet: fix dmadesc_set() Florian Fainelli
2016-04-05  1:11     ` Petri Gynther
2016-04-05  1:27       ` Florian Fainelli
2016-04-06 20:09   ` David Miller
2016-04-05  0:58 ` [PATCH net-next 1/3] net: bcmgenet: cleanup for bcmgenet_xmit() Florian Fainelli
2016-04-06  8:57 ` David Laight
2016-04-06 19:09   ` Petri Gynther
2016-04-06 20:09 ` David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1459815001-91703-3-git-send-email-pgynther@google.com \
    --to=pgynther@google.com \
    --cc=davem@davemloft.net \
    --cc=f.fainelli@gmail.com \
    --cc=jaedon.shin@gmail.com \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).