vxge: Fix a receive stall due to driver being out of synch with chip.
authorSreenivasa Honnur <Sreenivasa.Honnur@neterion.com>
Sun, 28 Mar 2010 22:07:34 +0000 (22:07 +0000)
committerDavid S. Miller <davem@davemloft.net>
Mon, 29 Mar 2010 23:57:20 +0000 (16:57 -0700)
commit18dec74c16abaa92d663dfef64ee6503e085be89
tree88c03fb3ec663cb4b1c2d2ed4ae7d6ac180ae32b
parent7905e357ebe67a26d9dc8caa1a0b8346431b5f0d
vxge: Fix a receive stall due to driver being out of synch with chip.

- Fix a receive stall due to driver being out of synch with chip. In a corner
case scenario the adapter's ring controller may return a RxD with transfer code
of 0xC, while the host ownership bit is still set to the adapter. The driver
needs to assume that this case where (host_ownership == 1 or adapter) and
(transfer_code == 0xC) is valid, that is, this RxD has been returned by the
receive ring controller but no frame data is associated with the rxd.

- Restore the transfer code field of each newly replenished RxD to 0x0.

- Code cleanup. Removed usage of magic numbers.

Signed-off-by: Sreenivasa Honnur <sreenivasa.honnur@neterion.com>
Signed-off-by: Ramkrishna Vepa <ram.vepa@neterion.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/vxge/vxge-traffic.c
drivers/net/vxge/vxge-traffic.h