drivers/net/kgdb_eth.c |   17 +++++++++++++----
 1 files changed, 13 insertions(+), 4 deletions(-)

diff -puN drivers/net/kgdb_eth.c~kgdb-eth-reattach drivers/net/kgdb_eth.c
--- 25/drivers/net/kgdb_eth.c~kgdb-eth-reattach	2003-09-06 19:47:08.000000000 -0700
+++ 25-akpm/drivers/net/kgdb_eth.c	2003-09-06 19:47:08.000000000 -0700
@@ -326,8 +326,9 @@ kgdb_net_interrupt(struct sk_buff *skb)
 	    (be16_to_cpu(udph->dest) == kgdb_listenport)) {
 		kgdb_sendport = be16_to_cpu(udph->source);
 
-		while(kgdb_eth_is_initializing);
-		if(!kgdb_netdevice)
+		while (kgdb_eth_is_initializing)
+			;
+		if (!kgdb_netdevice)
 			kgdb_eth_hook();
 		if (!kgdb_netdevice) {
 			/* Lets not even try again. */
@@ -354,7 +355,7 @@ kgdb_net_interrupt(struct sk_buff *skb)
 	       (sizeof(struct udphdr) + sizeof(struct iphdr)));
 
 	for (i = 0; i < len; i++) {
-		chr = *data++;
+		chr = data[i];
 		if (chr == 3) {
 			kgdb_eth_need_breakpoint[smp_processor_id()] = 1;
 			continue;
@@ -368,9 +369,17 @@ kgdb_net_interrupt(struct sk_buff *skb)
 		}
 		kgdb_buf[kgdb_buf_in_inx++] = chr;
 		kgdb_buf_in_inx &= (GDB_BUF_SIZE - 1);
-		atomic_inc(&kgdb_buf_in_cnt) ;
+		atomic_inc(&kgdb_buf_in_cnt);
 	}
 
+	if (!kgdb_netdevice->kgdb_is_trapped) {
+		/*
+		 * If a new gdb instance is trying to attach, we need to
+		 * break here.
+		 */
+		if (!strncmp(data, "$Hc-1#09", 8))
+			kgdb_eth_need_breakpoint[smp_processor_id()] = 1;
+	}
 	return 1;
 }
 EXPORT_SYMBOL(kgdb_net_interrupt);

_