summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/qualcomm/emac/emac.c
diff options
context:
space:
mode:
authorTimur Tabi <timur@codeaurora.org>2017-09-20 15:32:53 -0500
committerDavid S. Miller <davem@davemloft.net>2017-09-21 15:19:30 -0700
commit4a7a3860caac1a8779e8c459d8abe21b111798d6 (patch)
tree68e429f47ac1b4701cef27857e092511c34d1ecc /drivers/net/ethernet/qualcomm/emac/emac.c
parent0ab09befdbb7ca9b969d6206108629ddff43876e (diff)
downloadblackbird-obmc-linux-4a7a3860caac1a8779e8c459d8abe21b111798d6.tar.gz
blackbird-obmc-linux-4a7a3860caac1a8779e8c459d8abe21b111798d6.zip
net: qcom/emac: add software control for pause frame mode
The EMAC has the option of sending only a single pause frame when flow control is enabled and the RX queue is full. Although sending only one pause frame has little value, this would allow admins to enable automatic flow control without having to worry about the EMAC flooding nearby switches with pause frames if the kernel hangs. The option is enabled by using the single-pause-mode private flag. Signed-off-by: Timur Tabi <timur@codeaurora.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/qualcomm/emac/emac.c')
-rw-r--r--drivers/net/ethernet/qualcomm/emac/emac.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/net/ethernet/qualcomm/emac/emac.c b/drivers/net/ethernet/qualcomm/emac/emac.c
index 60850bfa3d32..759543512117 100644
--- a/drivers/net/ethernet/qualcomm/emac/emac.c
+++ b/drivers/net/ethernet/qualcomm/emac/emac.c
@@ -443,6 +443,9 @@ static void emac_init_adapter(struct emac_adapter *adpt)
/* default to automatic flow control */
adpt->automatic = true;
+
+ /* Disable single-pause-frame mode by default */
+ adpt->single_pause_mode = false;
}
/* Get the clock */
OpenPOWER on IntegriCloud