Commit b16a002e authored by Bruce Allan's avatar Bruce Allan Committed by David S. Miller
Browse files

e1000e: Incorrect MII Link beat reporting.

The driver was only updating MII stats when an LSC up was detected and
the interface had not already been reported up to netdev. This meant
MII stats returned in response to an SIOCGMIIREG ioctl would always
show a link up if it had ever been up. This was misleading the networking
daemon guessnet, which uses this ioctl, into making improper network port
This fix adds a call to e1000_phy_read_status() to actively read the
mii stats before responding to the SIOCGMIIREG ioctl.
Signed-off-by: default avatarBruce Allan <>
Signed-off-by: default avatarJeff Kirsher <>
Signed-off-by: default avatarDavid S. Miller <>
parent bb436b20
......@@ -4320,6 +4320,8 @@ static int e1000_mii_ioctl(struct net_device *netdev, struct ifreq *ifr,
data->phy_id = adapter->hw.phy.addr;
switch (data->reg_num & 0x1F) {
case MII_BMCR:
data->val_out = adapter->phy_regs.bmcr;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment