[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <1274468159.2089.5.camel@achroite.uk.solarflarecom.com>
Date: Fri, 21 May 2010 19:55:59 +0100
From: Ben Hutchings <bhutchings@...arflare.com>
To: Andy Fleming <afleming@...escale.com>
Cc: davem@...emloft.net, netdev@...r.kernel.org
Subject: Re: [PATCH v2 2/2] phylib: Convert MDIO bitbang to new MDIO 45
format
On Fri, 2010-05-21 at 13:31 -0500, Andy Fleming wrote:
> Now that we've added somewhat more complete MDIO 45 support to the PHY
> Lib, convert the MDIO bitbang driver to use this new infrastructure.
>
> Signed-off-by: Andy Fleming <afleming@...escale.com>
> ---
> drivers/net/phy/mdio-bitbang.c | 29 +++++++++++++++--------------
> 1 files changed, 15 insertions(+), 14 deletions(-)
>
> diff --git a/drivers/net/phy/mdio-bitbang.c b/drivers/net/phy/mdio-bitbang.c
> index 2f6f02e..be7ae74 100644
> --- a/drivers/net/phy/mdio-bitbang.c
> +++ b/drivers/net/phy/mdio-bitbang.c
[...]
> @@ -157,11 +154,13 @@ static int mdiobb_read(struct mii_bus *bus, int phy, int devad, int reg)
> struct mdiobb_ctrl *ctrl = bus->priv;
> int ret, i;
>
> - if (reg & MII_ADDR_C45) {
> - reg = mdiobb_cmd_addr(ctrl, phy, reg);
> - mdiobb_cmd(ctrl, MDIO_C45_READ, phy, reg);
> - } else
> + /* Clause 22 PHYs only use devad = 0, and Clause 45 only use nonzero */
> + if (devad == MDIO_DEVAD_NONE)
> mdiobb_cmd(ctrl, MDIO_READ, phy, reg);
> + else {
> + mdiobb_cmd_addr(ctrl, phy, devad, reg);
> + mdiobb_cmd(ctrl, MDIO_C45_READ, phy, devad);
> + }
[...]
This comment is now wrong.
Ben.
--
Ben Hutchings, Senior Software Engineer, Solarflare Communications
Not speaking for my employer; that's the marketing department's job.
They asked us to note that Solarflare product names are trademarked.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists