]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit689352a01d881d39394dece225c372365b3b6a36
tree4ec3338f6e525d7f047c33656c96fb81e8eea2a4
parentc03dfa435f3e6d0d57207eee7468f6caf735c22d
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