Skip to content

Commit

Permalink
net: stmmac: Enable OSP for GMAC4
Browse files Browse the repository at this point in the history
This enables OSP (Operate on Second Packet) for GMAC4. The feature
allows DMA to fetch second descriptor while its still processing the
first one.

Running iperf, the performance gain is +/- 38%.

Signed-off-by: Jose Abreu <joabreu@synopsys.com>
Cc: David S. Miller <davem@davemloft.net>
Cc: Joao Pinto <jpinto@synopsys.com>
Cc: Vitor Soares <soares@synopsys.com>
Cc: Giuseppe Cavallaro <peppe.cavallaro@st.com>
Cc: Alexandre Torgue <alexandre.torgue@st.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Jose Abreu authored and David S. Miller committed May 18, 2018
1 parent 538e2de commit 67e1c40
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions drivers/net/ethernet/stmicro/stmmac/dwmac4_dma.c
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,10 @@ static void dwmac4_dma_init_tx_chan(void __iomem *ioaddr,

value = readl(ioaddr + DMA_CHAN_TX_CONTROL(chan));
value = value | (txpbl << DMA_BUS_MODE_PBL_SHIFT);

/* Enable OSP to get best performance */
value |= DMA_CONTROL_OSP;

writel(value, ioaddr + DMA_CHAN_TX_CONTROL(chan));

writel(dma_tx_phy, ioaddr + DMA_CHAN_TX_BASE_ADDR(chan));
Expand Down

0 comments on commit 67e1c40

Please sign in to comment.