diff options
author | Eilon Greenstein <eilong@broadcom.com> | 2009-01-14 01:44:07 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-01-19 19:20:10 -0500 |
commit | 2add3acb11a26cc14b54669433ae6ace6406cbf2 (patch) | |
tree | b703441fec9c0024bc656554000aee6ab4e2b73d /drivers/net/bnx2x_main.c | |
parent | 5a40e08e666e8caa1227333de41fd1e2cd84d4f5 (diff) |
bnx2x: Block nvram access when the device is inactive
Don't dump eeprom when bnx2x adapter is down. Running ethtool -e causes an eeh
without it when the device is down
Signed-off-by: Paul Larson <pl@linux.vnet.ibm.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/bnx2x_main.c')
-rw-r--r-- | drivers/net/bnx2x_main.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/net/bnx2x_main.c b/drivers/net/bnx2x_main.c index 7ee6a211f9ba..ca5090c3341e 100644 --- a/drivers/net/bnx2x_main.c +++ b/drivers/net/bnx2x_main.c | |||
@@ -8107,6 +8107,9 @@ static int bnx2x_get_eeprom(struct net_device *dev, | |||
8107 | struct bnx2x *bp = netdev_priv(dev); | 8107 | struct bnx2x *bp = netdev_priv(dev); |
8108 | int rc; | 8108 | int rc; |
8109 | 8109 | ||
8110 | if (!netif_running(dev)) | ||
8111 | return -EAGAIN; | ||
8112 | |||
8110 | DP(BNX2X_MSG_NVM, "ethtool_eeprom: cmd %d\n" | 8113 | DP(BNX2X_MSG_NVM, "ethtool_eeprom: cmd %d\n" |
8111 | DP_LEVEL " magic 0x%x offset 0x%x (%d) len 0x%x (%d)\n", | 8114 | DP_LEVEL " magic 0x%x offset 0x%x (%d) len 0x%x (%d)\n", |
8112 | eeprom->cmd, eeprom->magic, eeprom->offset, eeprom->offset, | 8115 | eeprom->cmd, eeprom->magic, eeprom->offset, eeprom->offset, |