]> 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)
commit8e2ff131151c886b187f94bc37c42a5429eb0876
tree4ec3338f6e525d7f047c33656c96fb81e8eea2a4
parentf0fdd5fdaa7981791bdb12542f0a9ab36ba53305
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