From: Emil Medve <Emilian.Medve@Freescale.com>
To: <shh.xie@gmail.com>, <netdev@vger.kernel.org>, <davem@davemloft.net>
Cc: Andy Fleming <afleming@gmail.com>,
Shaohui Xie <Shaohui.Xie@Freescale.com>
Subject: Re: [PATCH] net/fsl: Add mEMAC MDIO support to XGMAC MDIO
Date: Fri, 9 Jan 2015 14:11:32 -0600 [thread overview]
Message-ID: <54B035F4.4020804@Freescale.com> (raw)
In-Reply-To: <1420364162-13109-1-git-send-email-shh.xie@gmail.com>
Hello Shao-Hui,
On 01/04/2015 03:36 AM, shh.xie@gmail.com wrote:
> From: Andy Fleming <afleming@gmail.com>
>
> The Freescale mEMAC supports operating at 10/100/1000/10G, and
> its associated MDIO controller is likewise capable of operating
> both Clause 22 and Clause 45 MDIO buses. It is nearly identical
> to the MDIO controller on the XGMAC, so we just modify that
> driver.
>
> Portions of this driver developed by:
>
> Sandeep Singh <sandeep@freescale.com>
> Roy Zang <tie-fei.zang@freescale.com>
>
> Signed-off-by: Andy Fleming <afleming@gmail.com>
> Signed-off-by: Shaohui Xie <Shaohui.Xie@freescale.com>
> ---
> drivers/net/ethernet/freescale/Kconfig | 3 +-
> drivers/net/ethernet/freescale/xgmac_mdio.c | 64 ++++++++++++++++++++++++-----
> 2 files changed, 55 insertions(+), 12 deletions(-)
>
> ...
>
> diff --git a/drivers/net/ethernet/freescale/xgmac_mdio.c b/drivers/net/ethernet/freescale/xgmac_mdio.c
> index a352445..e0fc3d1 100644
> --- a/drivers/net/ethernet/freescale/xgmac_mdio.c
> +++ b/drivers/net/ethernet/freescale/xgmac_mdio.c
>
> ...
>
> @@ -123,21 +144,39 @@ static int xgmac_mdio_write(struct mii_bus *bus, int phy_id, int regnum, u16 val
> static int xgmac_mdio_read(struct mii_bus *bus, int phy_id, int regnum)
> {
> struct tgec_mdio_controller __iomem *regs = bus->priv;
> - uint16_t dev_addr = regnum >> 16;
> + uint16_t dev_addr;
> + uint32_t mdio_stat;
> uint32_t mdio_ctl;
> uint16_t value;
> int ret;
>
> + mdio_stat = in_be32(®s->mdio_stat);
> + if (regnum & MII_ADDR_C45) {
> + dev_addr = (regnum >> 16) & 0x1f;
> + mdio_stat |= MDIO_STAT_ENC;
> + } else {
> + dev_addr = regnum & 0x1f;
> + mdio_stat = ~MDIO_STAT_ENC;
Shouldn't this be 'mdio_stat &= ~MDIO_STAT_ENC'?
Cheers,
next prev parent reply other threads:[~2015-01-09 20:26 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-04 9:36 [PATCH] net/fsl: Add mEMAC MDIO support to XGMAC MDIO shh.xie
2015-01-06 22:18 ` David Miller
2015-01-09 20:11 ` Emil Medve [this message]
2015-01-12 3:13 ` Shaohui Xie
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=54B035F4.4020804@Freescale.com \
--to=emilian.medve@freescale.com \
--cc=Shaohui.Xie@Freescale.com \
--cc=afleming@gmail.com \
--cc=davem@davemloft.net \
--cc=netdev@vger.kernel.org \
--cc=shh.xie@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.