Subject: [PATCH 03/23] e100: Add debugging code for cb cleaning and csum failures.

From: "Kok, Auke" <[email-masked]>
Date: Tue, 19 Sep 2006 10:28:38 -0700

Refine cb cleaning debug printout and print out all cleaned cbs' status. Add
debug flag for EEPROM csum failures that were overridden by the user.

Signed-off-by: Jesse Brandeburg <[email-masked]>
Signed-off-by: Auke Kok <[email-masked]>
---

 drivers/net/e100.c |    9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/drivers/net/e100.c b/drivers/net/e100.c
index ab0868c..ae93c62 100644
--- a/drivers/net/e100.c
+++ b/drivers/net/e100.c
@@ -761,6 +761,8 @@ static int e100_eeprom_load(struct nic *
 		DPRINTK(PROBE, ERR, "EEPROM corrupted\n");
 		if (!eeprom_bad_csum_allow)
 			return -EAGAIN;
+		else
+			add_taint(TAINT_MACHINE_CHECK);
 	}
 
 	return 0;
@@ -1657,13 +1659,14 @@ static int e100_tx_clean(struct nic *nic
 
 	spin_lock(&nic->cb_lock);
 
-	DPRINTK(TX_DONE, DEBUG, "cb->status = 0x%04X\n",
-		nic->cb_to_clean->status);
-
 	/* Clean CBs marked complete */
 	for(cb = nic->cb_to_clean;
 	    cb->status & cpu_to_le16(cb_complete);
 	    cb = nic->cb_to_clean = cb->next) {
+		DPRINTK(TX_DONE, DEBUG, "cb[%d]->status = 0x%04X\n",
+		        (int)(((void*)cb - (void*)nic->cbs)/sizeof(struct cb)),
+		        cb->status);
+
 		if(likely(cb->skb != NULL)) {
 			nic->net_stats.tx_packets++;
 			nic->net_stats.tx_bytes += cb->skb->len;

---
Auke Kok <[email-masked]>