net: bcmgenet: cleanup for dmadesc_set()
authorPetri Gynther <pgynther@google.com>
Tue, 5 Apr 2016 21:00:01 +0000 (14:00 -0700)
committerDavid S. Miller <davem@davemloft.net>
Tue, 5 Apr 2016 23:33:52 +0000 (19:33 -0400)
commit7ee4062562bae8f248f0aa72dfb3023ddea65942
tree4ec3338f6e525d7f047c33656c96fb81e8eea2a4
parent824ba603573d910e32df75fe6a5e7d7ec2a0a6a7
net: bcmgenet: cleanup for dmadesc_set()

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.

The reason this is a cleanup rather than a fix is that the hardware
won't transmit anything from a Tx ring until the TDMA producer index
has been incremented. As long as the dmadesc_set() writes complete
before the TDMA producer index write, life is good.

Signed-off-by: Petri Gynther <pgynther@google.com>
Acked-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/broadcom/genet/bcmgenet.c