diff options
author | Florian Fainelli <f.fainelli@gmail.com> | 2016-01-13 16:59:31 +0300 |
---|---|---|
committer | Joe Hershberger <joe.hershberger@ni.com> | 2016-01-28 12:31:30 -0600 |
commit | bbdcaff12ad8c32100b5e1fdf9b9ae6931c3ba0d (patch) | |
tree | 8a75d5cd1a92cc571c54f351bdfec4bac2a94118 /include/phy.h | |
parent | afe6462da9f68e872a9aeae1dc5389184819c1cf (diff) | |
download | u-boot-imx-bbdcaff12ad8c32100b5e1fdf9b9ae6931c3ba0d.zip u-boot-imx-bbdcaff12ad8c32100b5e1fdf9b9ae6931c3ba0d.tar.gz u-boot-imx-bbdcaff12ad8c32100b5e1fdf9b9ae6931c3ba0d.tar.bz2 |
net: phy: ensure Gigabit features are masked off if requested
When a Gigabit PHY device is connected to a 10/100Mbits capable Ethernet
MAC, the driver will restrict the phydev->supported modes to mask off
Gigabit. If the Gigabit PHY comes out of reset with the Gigabit features
set by default in MII_CTRL1000, it will keep advertising these feature,
so by the time we call genphy_config_advert(), the condition on
phydev->supported having the Gigabit features on is false, and we do not
update MII_CTRL1000 with updated values, and we keep advertising Gigabit
features, eventually configuring the PHY for Gigabit whilst the Ethernet
MAC does not support that.
This patches fixes the problem by ensuring that the Gigabit feature bits
are always cleared in MII_CTRL1000, if the PHY happens to be a Gigabit
PHY, and then, if Gigabit features are supported, setting those and
updating MII_CTRL1000 accordingly.
This is a copy of patch from Linux kernel, see
http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=5273e3a5ca94fbeb8e07d31203069220d5e682aa
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
Cc: Joe Hershberger <joe.hershberger@ni.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
Diffstat (limited to 'include/phy.h')
0 files changed, 0 insertions, 0 deletions