[PATCH 2/14] Spidernet add net_ratelimit to suppress long output

2006-12-13 Thread Linas Vepstas

This patch adds net_ratelimit to many of the printks in order to
limit extraneous warning messages (created in response to Bug 28554).
This patch supercedes all previous ratelimit patches.
This has been tested, please apply.

From: James K Lewis [EMAIL PROTECTED]
Signed-off-by: James K Lewis [EMAIL PROTECTED]
Signed-off-by: Linas Vepstas [EMAIL PROTECTED]


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

Index: linux-2.6.19-git7/drivers/net/spider_net.c
===
--- linux-2.6.19-git7.orig/drivers/net/spider_net.c 2006-12-13 
13:04:04.0 -0600
+++ linux-2.6.19-git7/drivers/net/spider_net.c  2006-12-13 13:19:59.0 
-0600
@@ -1038,11 +1038,10 @@ spider_net_decode_one_descr(struct spide
 
if ( (status != SPIDER_NET_DESCR_COMPLETE) 
 (status != SPIDER_NET_DESCR_FRAME_END) ) {
-   if (netif_msg_rx_err(card)) {
+   if (netif_msg_rx_err(card))
pr_err(%s: RX descriptor with state %d\n,
   card-netdev-name, status);
-   card-spider_stats.rx_desc_unk_state++;
-   }
+   card-spider_stats.rx_desc_unk_state++;
goto refill;
}
 
@@ -1361,7 +1360,7 @@ spider_net_handle_error_irq(struct spide
case SPIDER_NET_GRFAFLLINT: /* fallthrough */
case SPIDER_NET_GRMFLLINT:
if (netif_msg_intr(card)  net_ratelimit())
-   pr_debug(Spider RX RAM full, incoming packets 
+   pr_err(Spider RX RAM full, incoming packets 
   might be discarded!\n);
spider_net_rx_irq_off(card);
tasklet_schedule(card-rxram_full_tl);
@@ -1379,7 +1378,7 @@ spider_net_handle_error_irq(struct spide
case SPIDER_NET_GDCDCEINT: /* fallthrough */
case SPIDER_NET_GDBDCEINT: /* fallthrough */
case SPIDER_NET_GDADCEINT:
-   if (netif_msg_intr(card))
+   if (netif_msg_intr(card)  net_ratelimit())
pr_err(got descriptor chain end interrupt, 
   restarting DMAC %c.\n,
   'D'-(i-SPIDER_NET_GDDDCEINT)/3);
@@ -1450,7 +1449,7 @@ spider_net_handle_error_irq(struct spide
break;
}
 
-   if ((show_error)  (netif_msg_intr(card)))
+   if ((show_error)  (netif_msg_intr(card))  net_ratelimit())
pr_err(Got error interrupt on %s, GHIINT0STS = 0x%08x, 
   GHIINT1STS = 0x%08x, GHIINT2STS = 0x%08x\n,
   card-netdev-name,
Index: linux-2.6.19-git7/drivers/net/spider_net.h
===
--- linux-2.6.19-git7.orig/drivers/net/spider_net.h 2006-12-13 
12:04:02.0 -0600
+++ linux-2.6.19-git7/drivers/net/spider_net.h  2006-12-13 13:19:59.0 
-0600
@@ -24,7 +24,7 @@
 #ifndef _SPIDER_NET_H
 #define _SPIDER_NET_H
 
-#define VERSION 1.6 A
+#define VERSION 1.6 B
 
 #include sungem_phy.h
 
-
To unsubscribe from this list: send the line unsubscribe netdev in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 2/14] Spidernet add net_ratelimit to suppress long output

2006-12-13 Thread Michael Ellerman
On Wed, 2006-12-13 at 15:08 -0600, Linas Vepstas wrote:
 This patch adds net_ratelimit to many of the printks in order to
 limit extraneous warning messages (created in response to Bug 28554).

Bug 28554 in which bug tracking system? I can't find it in LTC or
kernel.org bugzilla.

cheers

-- 
Michael Ellerman
OzLabs, IBM Australia Development Lab

wwweb: http://michael.ellerman.id.au
phone: +61 2 6212 1183 (tie line 70 21183)

We do not inherit the earth from our ancestors,
we borrow it from our children. - S.M.A.R.T Person


signature.asc
Description: This is a digitally signed message part


Re: [PATCH 2/14] Spidernet add net_ratelimit to suppress long output

2006-12-13 Thread Jim Lewis

 It is in the LTC Bugzilla. I just checked and it is still there :)

Jim


On Thu, 2006-12-14 at 10:31 +1100, Michael Ellerman wrote:
 On Wed, 2006-12-13 at 15:08 -0600, Linas Vepstas wrote:
  This patch adds net_ratelimit to many of the printks in order to
  limit extraneous warning messages (created in response to Bug 28554).
 
 Bug 28554 in which bug tracking system? I can't find it in LTC or
 kernel.org bugzilla.
 
 cheers
 

-
To unsubscribe from this list: send the line unsubscribe netdev in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html