[PATCH 2/10] spidernet: beautify error messages
Linas Vepstas
linas at austin.ibm.com
Wed May 23 09:13:54 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: netdev-2.6/drivers/net/spider_net.c
===================================================================
--- netdev-2.6.orig/drivers/net/spider_net.c 2007-05-22 18:03:16.000000000 -0500
+++ netdev-2.6/drivers/net/spider_net.c 2007-05-22 18:03:24.000000000 -0500
@@ -434,7 +434,8 @@ spider_net_prepare_rx_descr(struct spide
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;
}
@@ -455,7 +456,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 {
@@ -1455,8 +1457,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: netdev-2.6/drivers/net/spider_net.h
===================================================================
--- netdev-2.6.orig/drivers/net/spider_net.h 2007-05-21 17:40:49.000000000 -0500
+++ netdev-2.6/drivers/net/spider_net.h 2007-05-22 18:03:24.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 Linuxppc-dev
mailing list