diff options
author | Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> | 2016-04-24 23:45:23 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-04-26 16:07:20 -0400 |
commit | 97717edc69eabdcc8b1859af75a363790c3e9cb6 (patch) | |
tree | 9f5c06c67bcdafa86fd38f29a4e6b2284e603b8f /drivers/net/ethernet/renesas | |
parent | 3ccec4bd10c95bbd8729b1edebef887b666905bf (diff) | |
download | linux-97717edc69eabdcc8b1859af75a363790c3e9cb6.tar.gz linux-97717edc69eabdcc8b1859af75a363790c3e9cb6.tar.bz2 linux-97717edc69eabdcc8b1859af75a363790c3e9cb6.zip |
sh_eth: use EDMR_SRST_GETHER in sh_eth_check_reset()
sh_eth_check_reset() uses a bare number where EDMR_SRST_GETHER would fit,
i.e. the receive/trasmit software reset bits that comprise EDMR_SRST_GETHER
read as 1 while the corresponding reset is in progress and thus, when both
are 0, the reset is complete.
Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Reviewed-by: Simon Horman <horms+renesas@verge.net.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/renesas')
-rw-r--r-- | drivers/net/ethernet/renesas/sh_eth.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/renesas/sh_eth.c b/drivers/net/ethernet/renesas/sh_eth.c index edf6356c7034..3d7a40af5aab 100644 --- a/drivers/net/ethernet/renesas/sh_eth.c +++ b/drivers/net/ethernet/renesas/sh_eth.c @@ -899,7 +899,7 @@ static int sh_eth_check_reset(struct net_device *ndev) int cnt = 100; while (cnt > 0) { - if (!(sh_eth_read(ndev, EDMR) & 0x3)) + if (!(sh_eth_read(ndev, EDMR) & EDMR_SRST_GETHER)) break; mdelay(1); cnt--; |