Hi,

> Von: "Shuyu Wei" <wsy2...@gmail.com>
> @@ -685,13 +684,15 @@ static int arc_emac_tx(struct sk_buff *skb, struct 
> net_device *ndev)
>       wmb();
>  
>       skb_tx_timestamp(skb);
> +     priv->tx_buff[*txbd_curr].skb = skb;
> +
> +     dma_wmb();
>  
>       *info = cpu_to_le32(FOR_EMAC | FIRST_OR_LAST_MASK | len);
>  
>       /* Make sure info word is set */
>       wmb();
>  
> -     priv->tx_buff[*txbd_curr].skb = skb;
>  
>       /* Increment index to point to the next BD */
>       *txbd_curr = (*txbd_curr + 1) % TX_BD_NUM;
> 

I wonder if this is correct. AFAIK a dma_wmb() only guarantees ordering of 
writes to DMA memory.
The assignment of the skb however is to RAM not to DMA.


Regards,
Lino

Reply via email to