]> git.baikalelectronics.ru Git - kernel.git/commit
bnx2: Fix bug in bnx2_free_tx_skbs().
authorMichael Chan <mchan@broadcom.com>
Tue, 10 Jul 2012 10:04:40 +0000 (10:04 +0000)
committerDavid S. Miller <davem@davemloft.net>
Wed, 11 Jul 2012 06:33:47 +0000 (23:33 -0700)
commit59efa3b8510d2e23e3423222b92a8095a2bcd460
tree7606bdf368609cd6a2f8576f13346413b6365dc0
parentade4a4c8f405441454db8f3fb1ce82a382f7a3c9
bnx2: Fix bug in bnx2_free_tx_skbs().

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>
drivers/net/ethernet/broadcom/bnx2.c