diff options
author | Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> | 2016-01-11 00:27:38 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-01-11 17:31:09 -0500 |
commit | 1c1fa821199c707a193efd3bc93c4ac9357bafa0 (patch) | |
tree | 8060974a68209b431395d16536e2eaaa5675ecc8 /drivers/net/ethernet/renesas | |
parent | 66530bdf85eb1d72a0c399665e09a2c2298501c6 (diff) | |
download | blackbird-op-linux-1c1fa821199c707a193efd3bc93c4ac9357bafa0.tar.gz blackbird-op-linux-1c1fa821199c707a193efd3bc93c4ac9357bafa0.zip |
ravb: stop reading ECMR in ravb_emac_init()
The code in ravb_emac_init() twiddling the ECMR bits always looked a bit
strange to me: if one intends to respect 'priv->duplex', why save old value
of the ECMR.DM bit? As all the other bits are zeroed anyway, we don't
really need to read ECMR before writing to it.
Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/renesas')
-rw-r--r-- | drivers/net/ethernet/renesas/ravb_main.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/net/ethernet/renesas/ravb_main.c b/drivers/net/ethernet/renesas/ravb_main.c index 467d41698fd5..fef4fa120d8a 100644 --- a/drivers/net/ethernet/renesas/ravb_main.c +++ b/drivers/net/ethernet/renesas/ravb_main.c @@ -338,16 +338,13 @@ error: static void ravb_emac_init(struct net_device *ndev) { struct ravb_private *priv = netdev_priv(ndev); - u32 ecmr; /* Receive frame limit set register */ ravb_write(ndev, ndev->mtu + ETH_HLEN + VLAN_HLEN + ETH_FCS_LEN, RFLR); /* PAUSE prohibition */ - ecmr = ravb_read(ndev, ECMR); - ecmr &= ECMR_DM; - ecmr |= ECMR_ZPF | (priv->duplex ? ECMR_DM : 0) | ECMR_TE | ECMR_RE; - ravb_write(ndev, ecmr, ECMR); + ravb_write(ndev, ECMR_ZPF | (priv->duplex ? ECMR_DM : 0) | + ECMR_TE | ECMR_RE, ECMR); ravb_set_rate(ndev); |