aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/spider_net.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/spider_net.c')
-rw-r--r--drivers/net/spider_net.c20
1 files changed, 11 insertions, 9 deletions
diff --git a/drivers/net/spider_net.c b/drivers/net/spider_net.c
index f5ede5f6073c..0e79bacd7870 100644
--- a/drivers/net/spider_net.c
+++ b/drivers/net/spider_net.c
@@ -1172,7 +1172,7 @@ spider_net_decode_one_descr(struct spider_net_card *card)
1172 goto bad_desc; 1172 goto bad_desc;
1173 } 1173 }
1174 1174
1175 if (hwdescr->dmac_cmd_status & 0xfefe) { 1175 if (hwdescr->dmac_cmd_status & 0xfcf4) {
1176 pr_err("%s: bad status, cmd_status=x%08x\n", 1176 pr_err("%s: bad status, cmd_status=x%08x\n",
1177 card->netdev->name, 1177 card->netdev->name,
1178 hwdescr->dmac_cmd_status); 1178 hwdescr->dmac_cmd_status);
@@ -1251,6 +1251,7 @@ spider_net_poll(struct net_device *netdev, int *budget)
1251 if (no_more_packets) { 1251 if (no_more_packets) {
1252 netif_rx_complete(netdev); 1252 netif_rx_complete(netdev);
1253 spider_net_rx_irq_on(card); 1253 spider_net_rx_irq_on(card);
1254 card->ignore_rx_ramfull = 0;
1254 return 0; 1255 return 0;
1255 } 1256 }
1256 1257
@@ -1484,15 +1485,15 @@ spider_net_handle_error_irq(struct spider_net_card *card, u32 status_reg)
1484 case SPIDER_NET_GRFBFLLINT: /* fallthrough */ 1485 case SPIDER_NET_GRFBFLLINT: /* fallthrough */
1485 case SPIDER_NET_GRFAFLLINT: /* fallthrough */ 1486 case SPIDER_NET_GRFAFLLINT: /* fallthrough */
1486 case SPIDER_NET_GRMFLLINT: 1487 case SPIDER_NET_GRMFLLINT:
1487 if (netif_msg_intr(card) && net_ratelimit())
1488 pr_err("Spider RX RAM full, incoming packets "
1489 "might be discarded!\n");
1490 /* Could happen when rx chain is full */ 1488 /* Could happen when rx chain is full */
1491 spider_net_resync_head_ptr(card); 1489 if (card->ignore_rx_ramfull == 0) {
1492 spider_net_refill_rx_chain(card); 1490 card->ignore_rx_ramfull = 1;
1493 spider_net_enable_rxdmac(card); 1491 spider_net_resync_head_ptr(card);
1494 card->num_rx_ints ++; 1492 spider_net_refill_rx_chain(card);
1495 netif_rx_schedule(card->netdev); 1493 spider_net_enable_rxdmac(card);
1494 card->num_rx_ints ++;
1495 netif_rx_schedule(card->netdev);
1496 }
1496 show_error = 0; 1497 show_error = 0;
1497 break; 1498 break;
1498 1499
@@ -2265,6 +2266,7 @@ spider_net_setup_netdev(struct spider_net_card *card)
2265 2266
2266 netdev->irq = card->pdev->irq; 2267 netdev->irq = card->pdev->irq;
2267 card->num_rx_ints = 0; 2268 card->num_rx_ints = 0;
2269 card->ignore_rx_ramfull = 0;
2268 2270
2269 dn = pci_device_to_OF_node(card->pdev); 2271 dn = pci_device_to_OF_node(card->pdev);
2270 if (!dn) 2272 if (!dn)