summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/stmicro/stmmac/common.h
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/common.h
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/common.h')
-rw-r--r--drivers/net/ethernet/stmicro/stmmac/common.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/net/ethernet/stmicro/stmmac/common.h b/drivers/net/ethernet/stmicro/stmmac/common.h
index cd77289..623c6ed 100644
--- a/drivers/net/ethernet/stmicro/stmmac/common.h
+++ b/drivers/net/ethernet/stmicro/stmmac/common.h
@@ -150,7 +150,7 @@ struct stmmac_extra_stats {
#define MAC_CSR_H_FRQ_MASK 0x20
#define HASH_TABLE_SIZE 64
-#define PAUSE_TIME 0x200
+#define PAUSE_TIME 0xffff
/* Flow Control defines */
#define FLOW_OFF 0
@@ -357,7 +357,8 @@ struct stmmac_dma_ops {
void (*dump_regs) (void __iomem *ioaddr);
/* Set tx/rx threshold in the csr6 register
* An invalid value enables the store-and-forward mode */
- void (*dma_mode) (void __iomem *ioaddr, int txmode, int rxmode);
+ void (*dma_mode)(void __iomem *ioaddr, int txmode, int rxmode,
+ int rxfifosz);
/* To track extra statistic (if supported) */
void (*dma_diagnostic_fr) (void *data, struct stmmac_extra_stats *x,
void __iomem *ioaddr);
OpenPOWER on IntegriCloud