aboutsummaryrefslogtreecommitdiff
path: root/drivers/net
diff options
context:
space:
mode:
authorAlexey Brodkin2016-01-13 16:59:36 +0300
committerJoe Hershberger2016-01-28 12:32:43 -0600
commitb884c3fe6392cd1f578db9350eb7c49eda94ff53 (patch)
treecf6447f21f7b5d5276b9d56bd89e153495734545 /drivers/net
parentf74264d6614a0c093a7c32e996f2b26058eead5d (diff)
net/designware: do explicit port selection for 1Gb mode
Current implementation only sets "port select" bit for non-1Gb mode. That works fine if GMAC has just exited reset state but we may as well change connection mode in runtime. Then we'll need to reprogram GMAC for that new mode of operation and if previous mode was 10 or 100 Mb and new one is 1 Gb we'll need to reset port mode bit. Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com> Cc: Bin Meng <bmeng.cn@gmail.com> Cc: Joe Hershberger <joe.hershberger@ni.com> Cc: Sonic Zhang <sonic.zhang@analog.com> cc: Simon Glass <sjg@chromium.org> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/designware.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/net/designware.c b/drivers/net/designware.c
index 0fccbc0040a..f28e825bfc3 100644
--- a/drivers/net/designware.c
+++ b/drivers/net/designware.c
@@ -196,6 +196,8 @@ static void dw_adjust_link(struct eth_mac_regs *mac_p,
if (phydev->speed != 1000)
conf |= MII_PORTSELECT;
+ else
+ conf &= ~MII_PORTSELECT;
if (phydev->speed == 100)
conf |= FES_100;