aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjpinto2017-01-20 16:00:26 +0000
committerDavid S. Miller2017-01-22 16:47:36 -0500
commitf4ec60644a7f9f8bd9571c30c573ce54c4b0ad97 (patch)
tree08d4d6fe2594cd9ab03cd94d4cf9893b417da319
parent3704eb6f6fd09023e2c94e8ead687b908ab02135 (diff)
net: stmicro: fix LS field mask in EEE configuration
This patch fixes the LS mask when setting EEE timer. LS field is 10 bits long and not 11 as currently. Signed-off-by: Joao Pinto <jpinto@synopsys.com> Reported-By: Rayagond Kokatanur <rayagond@vayavyalabs.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--drivers/net/ethernet/stmicro/stmmac/dwmac4_core.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac4_core.c b/drivers/net/ethernet/stmicro/stmmac/dwmac4_core.c
index 834f40f08208..202216cd6789 100644
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac4_core.c
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac4_core.c
@@ -184,7 +184,7 @@ static void dwmac4_set_eee_pls(struct mac_device_info *hw, int link)
static void dwmac4_set_eee_timer(struct mac_device_info *hw, int ls, int tw)
{
void __iomem *ioaddr = hw->pcsr;
- int value = ((tw & 0xffff)) | ((ls & 0x7ff) << 16);
+ int value = ((tw & 0xffff)) | ((ls & 0x3ff) << 16);
/* Program the timers in the LPI timer control register:
* LS: minimum time (ms) for which the link