aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/spider_net.c
diff options
context:
space:
mode:
authorLinas Vepstas <linas@austin.ibm.com>2006-12-13 16:08:25 -0500
committerJeff Garzik <jeff@garzik.org>2007-02-05 16:58:44 -0500
commit5a028877d2a350ebba3cda924cbf7f3bd2eb2135 (patch)
treef03baf91325b7cd66a91cb43911a56f00576123d /drivers/net/spider_net.c
parentd4ed8f8d1fb7d59eb63d2eada9a32c2f8c3795e2 (diff)
Spidernet add net_ratelimit to suppress long output
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 <jklewis@us.ibm.com> Signed-off-by: James K Lewis <jklewis@us.ibm.com> Signed-off-by: Linas Vepstas <jlinas@austin.ibm.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/net/spider_net.c')
-rw-r--r--drivers/net/spider_net.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/drivers/net/spider_net.c b/drivers/net/spider_net.c
index 8c8381cbce0a..ce27e8d318df 100644
--- a/drivers/net/spider_net.c
+++ b/drivers/net/spider_net.c
@@ -1038,11 +1038,10 @@ spider_net_decode_one_descr(struct spider_net_card *card, int napi)
1038 1038
1039 if ( (status != SPIDER_NET_DESCR_COMPLETE) && 1039 if ( (status != SPIDER_NET_DESCR_COMPLETE) &&
1040 (status != SPIDER_NET_DESCR_FRAME_END) ) { 1040 (status != SPIDER_NET_DESCR_FRAME_END) ) {
1041 if (netif_msg_rx_err(card)) { 1041 if (netif_msg_rx_err(card))
1042 pr_err("%s: RX descriptor with state %d\n", 1042 pr_err("%s: RX descriptor with state %d\n",
1043 card->netdev->name, status); 1043 card->netdev->name, status);
1044 card->spider_stats.rx_desc_unk_state++; 1044 card->spider_stats.rx_desc_unk_state++;
1045 }
1046 goto refill; 1045 goto refill;
1047 } 1046 }
1048 1047
@@ -1361,7 +1360,7 @@ spider_net_handle_error_irq(struct spider_net_card *card, u32 status_reg)
1361 case SPIDER_NET_GRFAFLLINT: /* fallthrough */ 1360 case SPIDER_NET_GRFAFLLINT: /* fallthrough */
1362 case SPIDER_NET_GRMFLLINT: 1361 case SPIDER_NET_GRMFLLINT:
1363 if (netif_msg_intr(card) && net_ratelimit()) 1362 if (netif_msg_intr(card) && net_ratelimit())
1364 pr_debug("Spider RX RAM full, incoming packets " 1363 pr_err("Spider RX RAM full, incoming packets "
1365 "might be discarded!\n"); 1364 "might be discarded!\n");
1366 spider_net_rx_irq_off(card); 1365 spider_net_rx_irq_off(card);
1367 tasklet_schedule(&card->rxram_full_tl); 1366 tasklet_schedule(&card->rxram_full_tl);
@@ -1379,7 +1378,7 @@ spider_net_handle_error_irq(struct spider_net_card *card, u32 status_reg)
1379 case SPIDER_NET_GDCDCEINT: /* fallthrough */ 1378 case SPIDER_NET_GDCDCEINT: /* fallthrough */
1380 case SPIDER_NET_GDBDCEINT: /* fallthrough */ 1379 case SPIDER_NET_GDBDCEINT: /* fallthrough */
1381 case SPIDER_NET_GDADCEINT: 1380 case SPIDER_NET_GDADCEINT:
1382 if (netif_msg_intr(card)) 1381 if (netif_msg_intr(card) && net_ratelimit())
1383 pr_err("got descriptor chain end interrupt, " 1382 pr_err("got descriptor chain end interrupt, "
1384 "restarting DMAC %c.\n", 1383 "restarting DMAC %c.\n",
1385 'D'-(i-SPIDER_NET_GDDDCEINT)/3); 1384 'D'-(i-SPIDER_NET_GDDDCEINT)/3);
@@ -1450,7 +1449,7 @@ spider_net_handle_error_irq(struct spider_net_card *card, u32 status_reg)
1450 break; 1449 break;
1451 } 1450 }
1452 1451
1453 if ((show_error) && (netif_msg_intr(card))) 1452 if ((show_error) && (netif_msg_intr(card)) && net_ratelimit())
1454 pr_err("Got error interrupt on %s, GHIINT0STS = 0x%08x, " 1453 pr_err("Got error interrupt on %s, GHIINT0STS = 0x%08x, "
1455 "GHIINT1STS = 0x%08x, GHIINT2STS = 0x%08x\n", 1454 "GHIINT1STS = 0x%08x, GHIINT2STS = 0x%08x\n",
1456 card->netdev->name, 1455 card->netdev->name,