bnx2: Fix bug in bnx2_free_tx_skbs().
authorMichael Chan <mchan@broadcom.com>
Tue, 10 Jul 2012 10:04:40 +0000 (10:04 +0000)
committerBen Hutchings <ben@decadent.org.uk>
Sun, 19 Aug 2012 17:15:21 +0000 (18:15 +0100)
commit6ccc95984ccfb8fa3cac0fee166e6290939587bf
treee7596d755cbc88095be4045f250e7d236fbf9624
parent8524c7870680e93cb3d8f1d3f90f927c3c0686b6
bnx2: Fix bug in bnx2_free_tx_skbs().

[ Upstream commit c1f5163de417dab01fa9daaf09a74bbb19303f3c ]

In rare cases, bnx2x_free_tx_skbs() can unmap the wrong DMA address
when it gets to the last entry of the tx ring.  We were not using
the proper macro to skip the last entry when advancing the tx index.

Reported-by: Zongyun Lai <zlai@vmware.com>
Reviewed-by: Jeffrey Huang <huangjw@broadcom.com>
Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
drivers/net/ethernet/broadcom/bnx2.c