summaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
authorEilon Greenstein <eilong@broadcom.com>2009-01-08 20:21:43 +0100
committerDavid S. Miller <davem@davemloft.net>2009-01-08 20:21:43 +0100
commit9f4c95835654f6169469af8a1de91454f7a65ac1 (patch)
treec88d815641a7542ddcb469c5796bd68088420f08 /drivers/net
parentnet: switch kaweth driver to netdevops (diff)
downloadlinux-9f4c95835654f6169469af8a1de91454f7a65ac1.tar.xz
linux-9f4c95835654f6169469af8a1de91454f7a65ac1.zip
bnx2x: Prevent eeprom set when driver is down
Signed-off-by: Eilon Greenstein <eilong@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/bnx2x_main.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/net/bnx2x_main.c b/drivers/net/bnx2x_main.c
index ef8103b3523e..4be05847f86f 100644
--- a/drivers/net/bnx2x_main.c
+++ b/drivers/net/bnx2x_main.c
@@ -8243,6 +8243,9 @@ static int bnx2x_set_eeprom(struct net_device *dev,
struct bnx2x *bp = netdev_priv(dev);
int rc;
+ if (!netif_running(dev))
+ return -EAGAIN;
+
DP(BNX2X_MSG_NVM, "ethtool_eeprom: cmd %d\n"
DP_LEVEL " magic 0x%x offset 0x%x (%d) len 0x%x (%d)\n",
eeprom->cmd, eeprom->magic, eeprom->offset, eeprom->offset,