be2net: Fix to prevent flooding of TX queue
authorPadmanabh Ratnakar <padmanabh.ratnakar@emulex.com>
Tue, 10 May 2011 05:13:57 +0000 (05:13 +0000)
committerDavid S. Miller <davem@davemloft.net>
Wed, 11 May 2011 23:10:03 +0000 (19:10 -0400)
commit4d586b823acc46c55c889ae1798de236c9d403da
tree32efa3d399b50b30c0850cc58c00369ee8c30a0f
parentecd0bf0f7b280bac3ac7419ed3aac84cd92878e9
be2net: Fix to prevent flooding of TX queue

Start/stop TX queue is controlled by TX queue "used" counter.
It is incremented while WRBs are posted to TX queue and
decremented when TX completions are received. This counter was
getting decremented before HW is informed about processing of TX
completions. As used counter is decremented, transmit function
posts new WRBs and creates completion queue full scenario in HW.

Signed-off-by: Padmanabh Ratnakar <padmanabh.ratnakar@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/benet/be_main.c