• N
    net: stmmac: use correct barrier between coherent memory and MMIO · 95eb930a
    Niklas Cassel 提交于
    The last memory barrier in stmmac_xmit()/stmmac_tso_xmit() is placed
    between a coherent memory write and a MMIO write:
    
    The own bit is written in First Desc (TSO: MSS desc or First Desc).
    <barrier>
    The DMA engine is started by a write to the tx desc tail pointer/
    enable dma transmission register, i.e. a MMIO write.
    
    This barrier cannot be a simple dma_wmb(), since a dma_wmb() is only
    used to guarantee the ordering, with respect to other writes,
    to cache coherent DMA memory.
    
    To guarantee that the cache coherent memory writes have completed
    before we attempt to write to the cache incoherent MMIO region,
    we need to use the more heavyweight barrier wmb().
    Signed-off-by: NNiklas Cassel <niklas.cassel@axis.com>
    Signed-off-by: NDavid S. Miller <davem@davemloft.net>
    95eb930a
stmmac_main.c 126.1 KB