From: "Kweh, Hock Leong" <hock.leong.kweh@intel.com>
To: "David S. Miller" <davem@davemloft.net>,
Joao Pinto <Joao.Pinto@synopsys.com>,
Giuseppe CAVALLARO <peppe.cavallaro@st.com>,
seraphin.bonnaffe@st.com, f.fainelli@gmail.com
Cc: Alexandre TORGUE <alexandre.torgue@gmail.com>,
Joachim Eastwood <manabian@gmail.com>,
Niklas Cassel <niklas.cassel@axis.com>,
Johan Hovold <johan@kernel.org>,
pavel@ucw.cz, Ong Boon Leong <boon.leong.ong@intel.com>,
"Kweh, Hock Leong" <hock.leong.kweh@intel.com>,
weifeng.voon@intel.com, lars.persson@axis.com,
netdev <netdev@vger.kernel.org>,
LKML <linux-kernel@vger.kernel.org>
Subject: [PATCH] net: stmmac: fix incorrect bit set in gmac4 mdio addr register
Date: Wed, 28 Dec 2016 04:07:41 +0800 [thread overview]
Message-ID: <1482869261-23803-1-git-send-email-hock.leong.kweh@intel.com> (raw)
From: "Kweh, Hock Leong" <hock.leong.kweh@intel.com>
Fixing the gmac4 mdio write access to use MII_GMAC4_WRITE only instead of
OR together with MII_WRITE.
Signed-off-by: Kweh, Hock Leong <hock.leong.kweh@intel.com>
---
drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c
index fda01f7..b0344c2 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c
@@ -116,7 +116,7 @@ static int stmmac_mdio_write(struct mii_bus *bus, int phyaddr, int phyreg,
unsigned int mii_address = priv->hw->mii.addr;
unsigned int mii_data = priv->hw->mii.data;
- u32 value = MII_WRITE | MII_BUSY;
+ u32 value = MII_BUSY;
value |= (phyaddr << priv->hw->mii.addr_shift)
& priv->hw->mii.addr_mask;
@@ -126,6 +126,8 @@ static int stmmac_mdio_write(struct mii_bus *bus, int phyaddr, int phyreg,
& priv->hw->mii.clk_csr_mask;
if (priv->plat->has_gmac4)
value |= MII_GMAC4_WRITE;
+ else
+ value |= MII_WRITE;
/* Wait until any existing MII operation is complete */
if (stmmac_mdio_busy_wait(priv->ioaddr, mii_address))
--
1.7.9.5
next reply other threads:[~2016-12-27 12:03 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-12-27 20:07 Kweh, Hock Leong [this message]
2016-12-27 12:11 ` [PATCH] net: stmmac: fix incorrect bit set in gmac4 mdio addr register Joao Pinto
2016-12-27 17:30 ` 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=1482869261-23803-1-git-send-email-hock.leong.kweh@intel.com \
--to=hock.leong.kweh@intel.com \
--cc=Joao.Pinto@synopsys.com \
--cc=alexandre.torgue@gmail.com \
--cc=boon.leong.ong@intel.com \
--cc=davem@davemloft.net \
--cc=f.fainelli@gmail.com \
--cc=johan@kernel.org \
--cc=lars.persson@axis.com \
--cc=linux-kernel@vger.kernel.org \
--cc=manabian@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=niklas.cassel@axis.com \
--cc=pavel@ucw.cz \
--cc=peppe.cavallaro@st.com \
--cc=seraphin.bonnaffe@st.com \
--cc=weifeng.voon@intel.com \
/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).