diff options
author | Duan Fugang-B38611 <B38611@freescale.com> | 2013-09-03 10:41:18 +0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-09-04 14:14:54 -0400 |
commit | 36e24e2ee29e25480b4be4a9ea467f4739be22fb (patch) | |
tree | 27b6cfe1502229c2fb46291aee0b383de229ee3e /drivers/video/gbefb.c | |
parent | 639739b5e609a5074839bb22fc061b37baa06269 (diff) |
net: fec: fix the error to get the previous BD entry
Bug: error to get the previous BD entry. When the current BD
is the first BD, the previous BD entry must be the last BD,
not "bdp - 1" in current logic.
V4:
* Optimize fec_enet_get_nextdesc() for code clean.
Replace "ex_new_bd - ring_size" with "ex_base".
Replace "new_bd - ring_size" with "base".
V3:
* Restore the API name because David suggest to use fec_enet_
prefix for all function in fec driver.
So, change next_bd() -> fec_enet_get_nextdesc()
change pre_bd() -> fec_enet_get_prevdesc()
* Reduce the two APIs parameters for easy to call.
V2:
* Add tx_ring_size and rx_ring_size to struct fec_enet_private.
* Replace api fec_enet_get_nextdesc() with next_bd().
Replace api fec_enet_get_prevdesc() with pre_bd().
* Move all ring size check logic to next_bd() and pre_bd(), which
simplifies the code redundancy.
V1:
* Add BD ring size check to get the previous BD entry in correctly.
Reviewed-by: Li Frank <B20596@freescale.com>
Signed-off-by: Fugang Duan <B38611@freescale.com>
Acked-by: Frank Li <frank.li@freescale.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/video/gbefb.c')
0 files changed, 0 insertions, 0 deletions