[lkml]   [2009]   [Jan]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Patch in this message
Subject[patch 25/43] bnx2x: Block nvram access when the device is inactive
2.6.28-stable review patch.  If anyone has any objections, please let us know.


From: Eilon Greenstein <>

commit 2add3acb11a26cc14b54669433ae6ace6406cbf2 upstream.

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 <>
Signed-off-by: Eilon Greenstein <>
Signed-off-by: David S. Miller <>
Signed-off-by: Greg Kroah-Hartman <>

drivers/net/bnx2x_main.c | 3 +++
1 file changed, 3 insertions(+)

--- a/drivers/net/bnx2x_main.c
+++ b/drivers/net/bnx2x_main.c
@@ -8079,6 +8079,9 @@ static int bnx2x_get_eeprom(struct net_d
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,

 \ /
  Last update: 2009-01-31 04:11    [W:0.110 / U:52.208 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site