diff options
| author | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2017-04-09 21:15:22 -0400 |
|---|---|---|
| committer | David S. Miller <davem@davemloft.net> | 2017-04-10 16:03:57 -0400 |
| commit | 4a2712b2f0b6895f37c657e099936679d2bc7b6e (patch) | |
| tree | 30a80c6b2dea7ed97f22d079acc95b973335e845 /drivers/net/ethernet/faraday | |
| parent | 6ad3d7edcbdae233a24f67a6713f461b2325e5cc (diff) | |
ftgmac100: Move the barrier out of ftgmac100_txdes_set_dma_own()
We'll use variants of this accessor without barriers when
building series of descriptors for fragmented sends
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/faraday')
| -rw-r--r-- | drivers/net/ethernet/faraday/ftgmac100.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/drivers/net/ethernet/faraday/ftgmac100.c b/drivers/net/ethernet/faraday/ftgmac100.c index add7462bf67d..60f285e444f8 100644 --- a/drivers/net/ethernet/faraday/ftgmac100.c +++ b/drivers/net/ethernet/faraday/ftgmac100.c | |||
| @@ -485,11 +485,6 @@ static bool ftgmac100_txdes_owned_by_dma(struct ftgmac100_txdes *txdes) | |||
| 485 | 485 | ||
| 486 | static void ftgmac100_txdes_set_dma_own(struct ftgmac100_txdes *txdes) | 486 | static void ftgmac100_txdes_set_dma_own(struct ftgmac100_txdes *txdes) |
| 487 | { | 487 | { |
| 488 | /* | ||
| 489 | * Make sure dma own bit will not be set before any other | ||
| 490 | * descriptor fields. | ||
| 491 | */ | ||
| 492 | wmb(); | ||
| 493 | txdes->txdes0 |= cpu_to_le32(FTGMAC100_TXDES0_TXDMA_OWN); | 488 | txdes->txdes0 |= cpu_to_le32(FTGMAC100_TXDES0_TXDMA_OWN); |
| 494 | } | 489 | } |
| 495 | 490 | ||
| @@ -679,6 +674,10 @@ static int ftgmac100_hard_start_xmit(struct sk_buff *skb, | |||
| 679 | } | 674 | } |
| 680 | } | 675 | } |
| 681 | 676 | ||
| 677 | /* Order the previous packet and descriptor udpates | ||
| 678 | * before setting the OWN bit. | ||
| 679 | */ | ||
| 680 | dma_wmb(); | ||
| 682 | ftgmac100_txdes_set_dma_own(txdes); | 681 | ftgmac100_txdes_set_dma_own(txdes); |
| 683 | 682 | ||
| 684 | /* Update next TX pointer */ | 683 | /* Update next TX pointer */ |
