summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2015-04-16 13:58:43 -0400
committerDavid S. Miller <davem@davemloft.net>2015-04-16 13:58:43 -0400
commit51b5df886874816ff986fe66fe0d7b7eca9f6cd1 (patch)
treed9bc05f136558819d3ca4ca67f2ef74798cdd743 /drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c
parente743471f8d9c6ad00eb10a6d1e05803231e1de83 (diff)
parentf88203a229cca0b3634738b7dae47419d1da6dc8 (diff)
downloadop-kernel-dev-51b5df886874816ff986fe66fe0d7b7eca9f6cd1.zip
op-kernel-dev-51b5df886874816ff986fe66fe0d7b7eca9f6cd1.tar.gz
Merge branch 'stmmac-flow-control'
Vince Bridgers says: ==================== stmmac: Correct flow control configuration This series of patches corrects flow control configuration for the Synopsys GMAC driver. Flow control is configured based on a configurable receive fifo size. If less than 4Kbytes flow control is left disabled and a warning is presented. If a receive fifo size is not specified, flow control is left disabled to maintain current behavior. Unicast pause detection was disabled, but is now enabled. The pause time was modified to be maximum time per a XON/XOFF flow control mode of operation. This patch was tested on an Altera Cyclone 5 and an Altera Arria 10 devkit, and verified that flow control operates as expected when enabled. Please consider this series for inclusion so that flow control will function as expected for the Synopsys GMAC controller. ==================== Acked-by: Giuseppe Cavallaro <peppe.cavallaro@st.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c')
-rw-r--r--drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c
index f9b42f1..705bbdf 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c
@@ -181,6 +181,10 @@ static int stmmac_probe_config_dt(struct platform_device *pdev,
sizeof(struct stmmac_mdio_bus_data),
GFP_KERNEL);
+ of_property_read_u32(np, "tx-fifo-depth", &plat->tx_fifo_size);
+
+ of_property_read_u32(np, "rx-fifo-depth", &plat->rx_fifo_size);
+
plat->force_sf_dma_mode =
of_property_read_bool(np, "snps,force_sf_dma_mode");
OpenPOWER on IntegriCloud