netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: <shh.xie@gmail.com>
To: <netdev@vger.kernel.org>, <davem@davemloft.net>
Cc: Shaohui Xie <Shaohui.Xie@freescale.com>
Subject: [PATCH] net/fsl: fix a bug in xgmac_mdio
Date: Tue, 13 Jan 2015 10:30:31 +0800	[thread overview]
Message-ID: <1421116231-16100-1-git-send-email-shh.xie@gmail.com> (raw)

From: Shaohui Xie <Shaohui.Xie@freescale.com>

There is a bug in xgmac_mdio_read when clear the bit MDIO_STAT_ENC,
which '&' is missed in 'mdio_stat &= ~MDIO_STAT_ENC'.

Signed-off-by: Shaohui Xie <Shaohui.Xie@freescale.com>
---
 drivers/net/ethernet/freescale/xgmac_mdio.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/freescale/xgmac_mdio.c b/drivers/net/ethernet/freescale/xgmac_mdio.c
index e0fc3d1..a492e50 100644
--- a/drivers/net/ethernet/freescale/xgmac_mdio.c
+++ b/drivers/net/ethernet/freescale/xgmac_mdio.c
@@ -156,7 +156,7 @@ static int xgmac_mdio_read(struct mii_bus *bus, int phy_id, int regnum)
 		mdio_stat |= MDIO_STAT_ENC;
 	} else {
 		dev_addr = regnum & 0x1f;
-		mdio_stat = ~MDIO_STAT_ENC;
+		mdio_stat &= ~MDIO_STAT_ENC;
 	}
 
 	out_be32(&regs->mdio_stat, mdio_stat);
-- 
1.8.4.1

             reply	other threads:[~2015-01-13  3:36 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-13  2:30 shh.xie [this message]
2015-01-13 21:43 ` [PATCH] net/fsl: fix a bug in xgmac_mdio David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1421116231-16100-1-git-send-email-shh.xie@gmail.com \
    --to=shh.xie@gmail.com \
    --cc=Shaohui.Xie@freescale.com \
    --cc=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).