net: sh_eth: fix the condition to fix the cur_tx/dirty_rx
commita18e08bdcf845efb7344cea146e683df746bbfb4
authorYoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Wed, 20 Jun 2012 15:26:34 +0000 (20 15:26 +0000)
committerDavid S. Miller <davem@davemloft.net>
Sat, 23 Jun 2012 04:50:37 +0000 (22 21:50 -0700)
treee539d0faac592762c2c196436fa516a395e5094f
parenteb2dc35d99028b698cdedba4f5522bc43e576bd2
net: sh_eth: fix the condition to fix the cur_tx/dirty_rx

The following commit couldn't work if the RMCR is not set to 1.

"net: sh_eth: fix the rxdesc pointer when rx descriptor empty happens"
commit id 79fba9f51755c704c0a7d7b7f0df10874dc0a744

If RMCR is not set, the controller will clear the EDRRR after it received
a frame. In this case, the driver doesn't need to fix the value of
cur_rx/dirty_rx. The driver only needs it when the controll detects
receive descriptors are empty.

Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Tested-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/renesas/sh_eth.c