linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: linas@austin.ibm.com (Linas Vepstas)
To: Jeff Garzik <jgarzik@pobox.com>, Andrew Morton <akpm@osdl.org>
Cc: netdev@vger.kernel.org, Florin Malita <fmalita@gmail.com>,
	cbe-oss-dev@ozlabs.org, linuxppc-dev@ozlabs.org
Subject: [PATCH 2/10] spidernet: beautify error messages
Date: Tue, 22 May 2007 18:13:54 -0500	[thread overview]
Message-ID: <20070522231354.GA2147@austin.ibm.com> (raw)
In-Reply-To: <20070522230942.GT5921@austin.ibm.com>


Make error messages print which interface they apply to.

Signed-off-by: Linas Vepstas <linas@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"
 

  reply	other threads:[~2007-05-22 23:13 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-05-22 23:09 [PATCH 1/10] spidernet: skb used after netif_receive_skb Linas Vepstas
2007-05-22 23:13 ` Linas Vepstas [this message]
2007-05-24 21:27   ` [PATCH 2/10] spidernet: beautify error messages Jeff Garzik
2007-05-22 23:21 ` [PATCH 3/10] spidernet: move a block of code around Linas Vepstas
2007-05-22 23:36 ` [PATCH 4/10] spidernet: zero out a pointer Linas Vepstas
2007-05-22 23:39 ` [PATCH 5/10] spidernet: null out skb pointer after its been used Linas Vepstas
2007-05-22 23:40 ` [PATCH 6/10] spidernet: Don't terminate the RX ring Linas Vepstas
2007-05-22 23:42 ` [PATCH 7/10] spidernet: enhance the dump routine Linas Vepstas
2007-05-22 23:45 ` [PATCH 8/10] spidernet: reset the card when an rxramfull is seen Linas Vepstas
2007-05-22 23:47 ` [PATCH 9/10] spidernet: service TX later Linas Vepstas
2007-05-22 23:52 ` [PATCH 10/10] spidernet: increase the NAPI weight Linas Vepstas
2007-05-24 21:25 ` [PATCH 1/10] spidernet: skb used after netif_receive_skb Jeff Garzik

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20070522231354.GA2147@austin.ibm.com \
    --to=linas@austin.ibm.com \
    --cc=akpm@osdl.org \
    --cc=cbe-oss-dev@ozlabs.org \
    --cc=fmalita@gmail.com \
    --cc=jgarzik@pobox.com \
    --cc=linuxppc-dev@ozlabs.org \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).