Deleted Added
full compact
31c31
< __FBSDID("$FreeBSD: head/sys/dev/cxgb/cxgb_sge.c 206109 2010-04-02 17:50:52Z np $");
---
> __FBSDID("$FreeBSD: head/sys/dev/cxgb/cxgb_sge.c 207688 2010-05-05 22:52:06Z np $");
699c699
< int err, count = 0;
---
> int err;
757c757
< count++;
---
> q->db_pending++;
761c761,762
< if (count)
---
> if (q->db_pending >= 32) {
> q->db_pending = 0;
762a764
> }
813,814c815,818
< if ((fl->size - fl->credits) < max)
< refill_fl(adap, fl, min(max, fl->size - fl->credits));
---
> uint32_t reclaimable = fl->size - fl->credits;
>
> if (reclaimable > 0)
> refill_fl(adap, fl, min(max, reclaimable));
1264c1268
< check_ring_tx_db(adapter_t *adap, struct sge_txq *q)
---
> check_ring_tx_db(adapter_t *adap, struct sge_txq *q, int mustring)
1278,1280c1282,1287
< wmb(); /* write descriptors before telling HW */
< t3_write_reg(adap, A_SG_KDOORBELL,
< F_SELEGRCNTX | V_EGRCNTX(q->cntxt_id));
---
> if (mustring || ++q->db_pending >= 32) {
> wmb(); /* write descriptors before telling HW */
> t3_write_reg(adap, A_SG_KDOORBELL,
> F_SELEGRCNTX | V_EGRCNTX(q->cntxt_id));
> q->db_pending = 0;
> }
1483c1490
< check_ring_tx_db(sc, txq);
---
> check_ring_tx_db(sc, txq, 0);
1546c1553
< check_ring_tx_db(sc, txq);
---
> check_ring_tx_db(sc, txq, 0);
1577c1584
< check_ring_tx_db(sc, txq);
---
> check_ring_tx_db(sc, txq, 0);
1596c1603
< check_ring_tx_db(sc, txq);
---
> check_ring_tx_db(sc, txq, 0);
1646d1652
< int in_use_init = txq->in_use;
1658,1659c1664
< while ((txq->in_use - in_use_init < TX_START_MAX_DESC) &&
< !TXQ_RING_EMPTY(qs) && (ifp->if_drv_flags & IFF_DRV_RUNNING) &&
---
> while (!TXQ_RING_EMPTY(qs) && (ifp->if_drv_flags & IFF_DRV_RUNNING) &&
1676a1682,1685
>
> if (txq->db_pending)
> check_ring_tx_db(pi->adapter, txq, 1);
>
1709a1719,1721
> if (txq->db_pending)
> check_ring_tx_db(pi->adapter, txq, 1);
>
2357c2369
< check_ring_tx_db(adap, q);
---
> check_ring_tx_db(adap, q, 1);
3036c3048
< if (++rspq->credits >= (rspq->size / 4)) {
---
> if (++rspq->credits >= 64) {