Skip to content

Commit

Permalink
net: stmicro: fix LS field mask in EEE configuration
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
jpinto authored and David S. Miller committed Jan 22, 2017
1 parent 3704eb6 commit f4ec606
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/ethernet/stmicro/stmmac/dwmac4_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit f4ec606

Please sign in to comment.