aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/emulex
diff options
context:
space:
mode:
authorSathya Perla <sathya.perla@emulex.com>2013-05-07 22:05:49 -0400
committerDavid S. Miller <davem@davemloft.net>2013-05-08 14:59:48 -0400
commit3f5dffe61a2ed3bd5e02bce16488937d4a5e7c27 (patch)
treeb8921ec16c01c4c76dd73d775d9fc05fd8f41ddb /drivers/net/ethernet/emulex
parentbf591f51a53a589ee97b862881f4f07ed819fcbd (diff)
be2net: fix EQ from getting full while cleaning RX CQ
While cleaning RX queues, the CQ DB may be rung several times (with rearm) while waiting for the flush compl. Each CQ-notify with rearm can result in an event. The EQ may get full resulting in a HW error. Fix this by not re-arming the CQ while notifying a valid completion. Also, there's no need to wait for 1ms after destroying RXQ, as the code in be_rx_cq_clean() waits for the flush compl to arrive. Signed-off-by: Sathya Perla <sathya.perla@emulex.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/emulex')
-rw-r--r--drivers/net/ethernet/emulex/benet/be_main.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/drivers/net/ethernet/emulex/benet/be_main.c b/drivers/net/ethernet/emulex/benet/be_main.c
index b304b837f5bd..792d8383e8d6 100644
--- a/drivers/net/ethernet/emulex/benet/be_main.c
+++ b/drivers/net/ethernet/emulex/benet/be_main.c
@@ -1827,7 +1827,7 @@ static void be_rx_cq_clean(struct be_rx_obj *rxo)
1827 mdelay(1); 1827 mdelay(1);
1828 } else { 1828 } else {
1829 be_rx_compl_discard(rxo, rxcp); 1829 be_rx_compl_discard(rxo, rxcp);
1830 be_cq_notify(adapter, rx_cq->id, true, 1); 1830 be_cq_notify(adapter, rx_cq->id, false, 1);
1831 if (rxcp->num_rcvd == 0) 1831 if (rxcp->num_rcvd == 0)
1832 break; 1832 break;
1833 } 1833 }
@@ -2533,11 +2533,6 @@ static void be_rx_qs_destroy(struct be_adapter *adapter)
2533 q = &rxo->q; 2533 q = &rxo->q;
2534 if (q->created) { 2534 if (q->created) {
2535 be_cmd_rxq_destroy(adapter, q); 2535 be_cmd_rxq_destroy(adapter, q);
2536 /* After the rxq is invalidated, wait for a grace time
2537 * of 1ms for all dma to end and the flush compl to
2538 * arrive
2539 */
2540 mdelay(1);
2541 be_rx_cq_clean(rxo); 2536 be_rx_cq_clean(rxo);
2542 } 2537 }
2543 be_queue_free(adapter, q); 2538 be_queue_free(adapter, q);