netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] bnx2x: Prevent eeprom set when driver is down
@ 2009-01-08 15:40 Eilon Greenstein
  2009-01-08 19:21 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Eilon Greenstein @ 2009-01-08 15:40 UTC (permalink / raw)
  To: David Miller, Paul Larson; +Cc: netdev

Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
---
 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 600210d..425cbae 100644
--- a/drivers/net/bnx2x_main.c
+++ b/drivers/net/bnx2x_main.c
@@ -8246,6 +8246,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,
-- 
1.5.4.3





^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-01-08 19:21 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-01-08 15:40 [PATCH] bnx2x: Prevent eeprom set when driver is down Eilon Greenstein
2009-01-08 19:21 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).