]> git.baikalelectronics.ru Git - kernel.git/commit
be2net: fix wrong frag_idx reported by RX CQ
authorSathya Perla <sathya.perla@emulex.com>
Mon, 17 Dec 2012 19:38:51 +0000 (19:38 +0000)
committerDavid S. Miller <davem@davemloft.net>
Wed, 19 Dec 2012 00:18:39 +0000 (16:18 -0800)
commit31e88586e992347fb8c7c1450bc18e2eb0f742f8
tree6c2089b3af7d3d142fb83137b5490628e38a1fd0
parent1e6347b368858b6fa5184dd7076e4372dedb8e15
be2net: fix wrong frag_idx reported by RX CQ

The RX CQ can report completions with invalid frag_idx when the RXQ that
was *previously* using it, was not cleaned up properly. This hits
a BUG_ON() in be2net.

When completion coalescing is enabled on a CQ, an explicit CQ-notify
(with rearm) is needed for each compl, to flush partially coalesced CQ
entries that are pending DMA.

In be_close(), this fix now notifies CQ for each compl, waits explicitly
for the flush compl to arrive and complains if it doesn't arrive.

Also renaming be_crit_error() to be_hw_error() as it's the more
appropriate name and to convey that we don't wait for the flush compl
only when a HW error has occurred.

Signed-off-by: Sathya Perla <sathya.perla@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/emulex/benet/be.h
drivers/net/ethernet/emulex/benet/be_main.c