[Cbe-oss-dev] [PATCH 2/10] spidernet: beautify error messages

Linas Vepstas linas at austin.ibm.com
Thu May 17 08:00:12 EST 2007


Make error messages print which interface they apply to.

Signed-off-by: Linas Vepstas <linas at austin.ibm.com>

----
 drivers/net/spider_net.c |   10 ++++++----
 drivers/net/spider_net.h |    2 +-
 2 files changed, 7 insertions(+), 5 deletions(-)

Index: linux-2.6.22-rc1/drivers/net/spider_net.c
===================================================================
--- linux-2.6.22-rc1.orig/drivers/net/spider_net.c	2007-05-14 17:05:03.000000000 -0500
+++ linux-2.6.22-rc1/drivers/net/spider_net.c	2007-05-15 14:47:38.000000000 -0500
@@ -433,7 +433,8 @@ spider_net_prepare_rx_descr(struct spide
 	descr->skb = dev_alloc_skb(bufsize + SPIDER_NET_RXBUF_ALIGN - 1);
 	if (!descr->skb) {
 		if (netif_msg_rx_err(card) && net_ratelimit())
-			pr_err("Not enough memory to allocate rx buffer\n");
+			pr_err("%s: Not enough memory to allocate rx buffer\n",
+			    card->netdev->name);
 		card->spider_stats.alloc_rx_skb_error++;
 		return -ENOMEM;
 	}
@@ -454,7 +455,8 @@ spider_net_prepare_rx_descr(struct spide
 		dev_kfree_skb_any(descr->skb);
 		descr->skb = NULL;
 		if (netif_msg_rx_err(card) && net_ratelimit())
-			pr_err("Could not iommu-map rx buffer\n");
+			pr_err("%s: Could not iommu-map rx buffer\n",
+			      card->netdev->name);
 		card->spider_stats.rx_iommu_map_error++;
 		hwdescr->dmac_cmd_status = SPIDER_NET_DESCR_NOT_IN_USE;
 	} else {
@@ -1454,8 +1456,8 @@ spider_net_handle_error_irq(struct spide
 	case SPIDER_NET_GRFAFLLINT: /* fallthrough */
 	case SPIDER_NET_GRMFLLINT:
 		if (netif_msg_intr(card) && net_ratelimit())
-			pr_err("Spider RX RAM full, incoming packets "
-			       "might be discarded!\n");
+			pr_err("%s: Spider RX RAM full, incoming packets "
+			       "might be discarded!\n", card->netdev->name);
 		spider_net_rx_irq_off(card);
 		netif_rx_schedule(card->netdev);
 		show_error = 0;
Index: linux-2.6.22-rc1/drivers/net/spider_net.h
===================================================================
--- linux-2.6.22-rc1.orig/drivers/net/spider_net.h	2007-05-15 14:47:33.000000000 -0500
+++ linux-2.6.22-rc1/drivers/net/spider_net.h	2007-05-15 14:47:58.000000000 -0500
@@ -25,7 +25,7 @@
 #ifndef _SPIDER_NET_H
 #define _SPIDER_NET_H
 
-#define VERSION "2.0 A"
+#define VERSION "2.0 B"
 
 #include "sungem_phy.h"
 



More information about the cbe-oss-dev mailing list