[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20080604143359.GB11300@solarflare.com>
Date: Wed, 4 Jun 2008 15:34:00 +0100
From: Ben Hutchings <bhutchings@...arflare.com>
To: Eilon Greenstein <eilong@...adcom.com>
Cc: Andi Kleen <andi@...stfloor.org>, netdev <netdev@...r.kernel.org>,
jeff@...zik.org, davem@...emloft.net,
Eliezer Tamir <eliezert@...adcom.com>,
Michael Chan <mchan@...adcom.com>,
Yaniv Rosner <yanivr@...adcom.com>
Subject: MDIO clause 45 (was Re: [PATCH net-next 2/13]bnx2x: Adding bnx2x_link)
Eilon Greenstein wrote:
> On Sun, 2008-06-01 at 22:50 +0200, Andi Kleen wrote:
[...]
> > > +static u8 bnx2x_reset_unicore(struct link_params *params)
> > > +{
> > > + struct bnx2x *bp = params->bp;
> > > + u16 mii_control;
> > > + u16 i;
> > > +
> > > + CL45_RD_OVER_CL22(bp, params->port,
> > > + params->phy_addr,
> > > + MDIO_REG_BANK_COMBO_IEEE0,
> > > + MDIO_COMBO_IEEE0_MII_CONTROL, &mii_control);
> > > +
> > > + /* reset the unicore */
> > > + CL45_WR_OVER_CL22(bp, params->port,
> > > + params->phy_addr,
> > > + MDIO_REG_BANK_COMBO_IEEE0,
> > > + MDIO_COMBO_IEEE0_MII_CONTROL,
> > > + (mii_control |
> > > + MDIO_COMBO_IEEO_MII_CONTROL_RESET));
> >
> > Your macro naming is certainly "interesting".
> :) The original code (which is currently part of bnx2x.c) was using CL22
> and CL45 - we changed everything to CL45 by using these accessories
> macros and the "interesting" name is wrong... it should read CL22 over
> CL45 - we will fix it in the next patch as well
This reminds me that there isn't currently a standard way to do clause 45
MDIO through ioctl(). The sfc driver currently has its own way of unpacking
PHY address, MMD number and a clause 45 flag from SIOC{G,S}MIIREG arguments.
cxgb3 is doing something similar but without the flag, and we choose
different default MMDs. None of the other 10 GbE drivers appear to support
clause 45 MDIO through ioctl(). It seems like it would be useful to set a
rule that all the drivers can follow.
Ben.
--
Ben Hutchings, Senior Software Engineer, Solarflare Communications
Not speaking for my employer; that's the marketing department's job.
--
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