[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Sat, 7 Jul 2012 20:55:59 +0100
From: Ben Hutchings <bhutchings@...arflare.com>
To: Émeric Vigier
<emeric.vigier@...oirfairelinux.com>
CC: Steve Glendinning <steve@...well.net>,
steve glendinning <steve.glendinning@...c.com>,
<netdev@...r.kernel.org>, Nancy Lin <nancy.lin@...c.com>
Subject: Re: [PATCH] smsc95xx: support ethtool get_regs
On Sat, 2012-07-07 at 09:58 -0400, Émeric Vigier wrote:
[...]
> > > + for (i = 0; i <= PHY_SPECIAL; i++)
> > > + data[j++] = smsc95xx_mdio_read(netdev, dev->mii.phy_id, i);
> > > +}
> >
> > Again, why use PHY_SPECIAL (+ 1) here as opposed to 32 in the
> > calculation of the length?
>
> 32 was ok, but I hesitated between defining a SMSC95XX_PHY_END or using the last defined register.
> Are 32 register-PHY generic to most devices? I mean could 32 be use widely?
Yes, the address space for the original MDIO protocol ('clause 22')
allows for 32 registers. Perhaps that number should be named in
<linux/mii.h>.
As another reviewer commented, though, MDIO PHY registers should be
accessible with SIOCGMIIREG and mii-tool so it's not really necessary to
duplicate them here.
Ben.
--
Ben Hutchings, Staff Engineer, Solarflare
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