[Cbe-oss-dev] [PATCH 9/18] spidernet: reset the card when an rxramfull is seen

Linas Vepstas linas at austin.ibm.com
Fri Jun 8 05:39:46 EST 2007


Some versions of the spider have a firmware bug, where the
RX ring sequencer goes crazy when the RX RAM on the device
fills up. Appearently the only viable wrkaround is a soft
reset of the card.

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

----
 drivers/net/spider_net.c |   15 +++++++++++----
 1 file changed, 11 insertions(+), 4 deletions(-)

Index: linux-2.6.22-rc1/drivers/net/spider_net.c
===================================================================
--- linux-2.6.22-rc1.orig/drivers/net/spider_net.c	2007-06-07 11:52:12.000000000 -0500
+++ linux-2.6.22-rc1/drivers/net/spider_net.c	2007-06-07 11:52:17.000000000 -0500
@@ -1518,11 +1518,16 @@ spider_net_handle_error_irq(struct spide
 	case SPIDER_NET_GRFBFLLINT: /* fallthrough */
 	case SPIDER_NET_GRFAFLLINT: /* fallthrough */
 	case SPIDER_NET_GRMFLLINT:
-		if (netif_msg_intr(card) && net_ratelimit())
-			dev_err(&card->netdev->dev, "Spider RX RAM full, incoming packets "
-			       "might be discarded!\n");
+		if (netif_msg_intr(card) && net_ratelimit()) {
+			dev_err(&card->netdev->dev, "Spider RX RAM full, "
+			        "incoming packets might be discarded!\n");
+			show_rx_chain(card);
+		}
 		spider_net_rx_irq_off(card);
-		netif_rx_schedule(card->netdev);
+
+		/* If the card is spewing rxramfulls, then reset */
+		atomic_inc(&card->tx_timeout_task_counter);
+		schedule_work(&card->tx_timeout_task);
 		show_error = 0;
 		break;
 
@@ -2100,6 +2105,8 @@ spider_net_workaround_rxramfull(struct s
 {
 	int i, sequencer = 0;
 
+	dev_info(&card->pdev->dev, "calling rxramfull workaround\n");
+
 	/* cancel reset */
 	spider_net_write_reg(card, SPIDER_NET_CKRCTRL,
 			     SPIDER_NET_CKRCTRL_RUN_VALUE);



More information about the cbe-oss-dev mailing list