• Petri Gynther's avatar
    net: bcmgenet: cleanup for dmadesc_set() · 7ee40625
    Petri Gynther authored
    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: default avatarPetri Gynther <pgynther@google.com>
    Acked-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    7ee40625
bcmgenet.c 94.9 KB