Skip to contentSkip to conversation

myri10ge: disable NAPI on failure to setup the interface

PATCH Applied Brice Goglin 2 participants 2 messages Oct 20, 2008 – Oct 21, 2008

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 myri10ge: disable NAPI on failure to setup the interface

Disable NAPI if a failure occurs when setting up the interface. Leaving it enabled could cause a BUG the next time an ifconfig up is issued.

drivers/net/myri10ge/myri10ge.c +5 -1
@@ -75,7 +75,7 @@
 #include "myri10ge_mcp.h"
 #include "myri10ge_mcp_gen_header.h"
 
-#define MYRI10GE_VERSION_STR "1.4.3-1.369"
+#define MYRI10GE_VERSION_STR "1.4.3-1.371"
 
 MODULE_DESCRIPTION("Myricom 10G driver (10GbE)");
 MODULE_AUTHOR("Maintainer: [email protected]");
@@ -2497,6 +2497,10 @@ static int myri10ge_open(struct net_devi
 	return 0;
 
 abort_with_rings:
+	while (slice) {
+		slice--;
+		napi_disable(&mgp->ss[slice].napi);
+	}
 	for (i = 0; i < mgp->num_slices; i++)
 		myri10ge_free_rings(&mgp->ss[i]);
 
Applied
#1 lore raw
Quoted 17 lines · Brice Goglin

Disable NAPI if a failure occurs when setting up the interface. Leaving it enabled could cause a BUG the next time an ifconfig up is issued.

drivers/net/myri10ge/myri10ge.c +1 -1
@@ -75,7 +75,7 @@
 #include "myri10ge_mcp.h"
 #include "myri10ge_mcp_gen_header.h"
 
-#define MYRI10GE_VERSION_STR "1.4.3-1.369"
+#define MYRI10GE_VERSION_STR "1.4.3-1.371"
 
 MODULE_DESCRIPTION("Myricom 10G driver (10GbE)");
 MODULE_AUTHOR("Maintainer: [email protected]");

drivers/net/myri10ge/myri10ge.c static int myri10ge_open(struct net_devi · line 2503

Quoted 7 lines
drivers/net/myri10ge/myri10ge.c +4 -0
@@ -2497,6 +2497,10 @@ static int myri10ge_open(struct net_devi
 	return 0;
 
 abort_with_rings:
+	while (slice) {
+		slice--;
+		napi_disable(&mgp->ss[slice].napi);
+	}

applied