Commit 01e53298 authored by Naohiro Ooiwa's avatar Naohiro Ooiwa Committed by David S. Miller

bnx2x: Fix the behavior of ethtool when ONBOOT=no

This is the same fix as commit
7959ea25 ("bnx2: Fix the behavior of
ethtool when ONBOOT=no"), but for bnx2x:

--------------------
    When configure in ifcfg-eth* is ONBOOT=no,
    the behavior of ethtool command is wrong.
    
        # grep ONBOOT /etc/sysconfig/network-scripts/ifcfg-eth2
        ONBOOT=no
        # ethtool eth2 | tail -n1
                Link detected: yes
    
    I think "Link detected" should be "no".
--------------------
Signed-off-by: default avatarNaohiro Ooiwa <nooiwa@miraclelinux.com>
Acked-by: default avatarEilon Greenstein <eilong@broadcom.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent ff0ac74a
...@@ -8637,6 +8637,14 @@ static int bnx2x_nway_reset(struct net_device *dev) ...@@ -8637,6 +8637,14 @@ static int bnx2x_nway_reset(struct net_device *dev)
return 0; return 0;
} }
static u32
bnx2x_get_link(struct net_device *dev)
{
struct bnx2x *bp = netdev_priv(dev);
return bp->link_vars.link_up;
}
static int bnx2x_get_eeprom_len(struct net_device *dev) static int bnx2x_get_eeprom_len(struct net_device *dev)
{ {
struct bnx2x *bp = netdev_priv(dev); struct bnx2x *bp = netdev_priv(dev);
...@@ -10034,7 +10042,7 @@ static struct ethtool_ops bnx2x_ethtool_ops = { ...@@ -10034,7 +10042,7 @@ static struct ethtool_ops bnx2x_ethtool_ops = {
.get_msglevel = bnx2x_get_msglevel, .get_msglevel = bnx2x_get_msglevel,
.set_msglevel = bnx2x_set_msglevel, .set_msglevel = bnx2x_set_msglevel,
.nway_reset = bnx2x_nway_reset, .nway_reset = bnx2x_nway_reset,
.get_link = ethtool_op_get_link, .get_link = bnx2x_get_link,
.get_eeprom_len = bnx2x_get_eeprom_len, .get_eeprom_len = bnx2x_get_eeprom_len,
.get_eeprom = bnx2x_get_eeprom, .get_eeprom = bnx2x_get_eeprom,
.set_eeprom = bnx2x_set_eeprom, .set_eeprom = bnx2x_set_eeprom,
......
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