Skip to contentSkip to conversation

minor fix to kgdboe configuration logic

PATCH Applied Matt Mackall 2 participants 2 messages Mar 21, 2004 – Mar 22, 2004 Network drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 minor fix to kgdboe configuration logic

This seems to have gotten dropped. Without it, kgdboe can get into a half-configured state.

kgdboe - fix configuration of MAC address

 tiny-mpm/drivers/net/kgdb_eth.c |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)
drivers/net/kgdb_eth.c renamed from drivers/net/kgdb_eth.c~kgdboe-mac-init +4 -3
diff -puN drivers/net/kgdb_eth.c~kgdboe-mac-init drivers/net/kgdb_eth.c
@@ -46,6 +46,7 @@ static struct netpoll np = {
 	.remote_port = 6442,
 	.remote_mac = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff},
 };
+static int configured;
 
 int eth_getDebugChar(void)
 {
@@ -101,9 +102,9 @@ static void rx_hook(struct netpoll *np, 
 	}
 }
 
-static int option_setup(char *opt)
+static void option_setup(char *opt)
 {
-	return netpoll_parse_options(&np, opt);
+        configured = !netpoll_parse_options(&np, opt);
 }
 
 __setup("kgdboe=", option_setup);
@@ -119,7 +120,7 @@ static int init_kgdboe(void)
 
 	set_debug_traps();
 
-	if(!np.remote_ip || netpoll_setup(&np))
+	if(!configured || netpoll_setup(&np))
 		return 1;
 
 	kgdboe = 1;

_

Signature · 1 line
Matt Mackall : http://www.selenic.com : Linux development and consulting
Applied
#1 lore raw
Quoted 8 lines · Matt Mackall

This seems to have gotten dropped. Without it, kgdboe can get into a half-configured state.

kgdboe - fix configuration of MAC address

 tiny-mpm/drivers/net/kgdb_eth.c |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

Thanks, applied.

Signature · 2 lines
Tom Rini
http://gate.crashing.org/~trini/