[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <1394807376.20857.41.camel@deadeye.wl.decadent.org.uk>
Date: Fri, 14 Mar 2014 14:29:36 +0000
From: Ben Hutchings <ben@...adent.org.uk>
To: Yegor Yefremov <yegorslists@...glemail.com>
Cc: David Miller <davem@...emloft.net>, Stefan Roese <sr@...x.de>,
netdev <netdev@...r.kernel.org>, "r.meier" <r.meier@...mens.com>,
"lukas.stockmann" <lukas.stockmann@...mens.com>,
Florian Fainelli <f.fainelli@...il.com>
Subject: Re: [PATCH] net: phy: Add support for SMSC/Microchip LAN9303 3-port
switch
On Thu, 2014-03-13 at 23:42 +0100, Yegor Yefremov wrote:
> On Wed, Mar 12, 2014 at 9:21 PM, Ben Hutchings <ben@...adent.org.uk> wrote:
> > On Wed, 2014-03-12 at 09:43 +0100, Yegor Yefremov wrote:
> >> On Tue, Mar 11, 2014 at 9:39 PM, David Miller <davem@...emloft.net> wrote:
> >> > From: Yegor Yefremov <yegorslists@...glemail.com>
[...]
> >> >> David, what about enabling ethtool to read/write from/to the PHY
> >> >> registers (via passing PHY ID and register number)? I'm trying to get
> >> >> ICplus IP175D running and it has lots of registers, that I would like
> >> >> to look at dynamically.
> >> >
> >> > For debugging, register dumps are already supported by ethtool.
> >>
> >> Do you mean 'ethtool -e' option? AFAIK it dumps Ethernet controller
> >> regs, if it implements ethtool_ops.get_regs(). What I need are PHY
> >> registers, that I can get via MII interface. ethtool should provide
> >> access to PHY registers like mdiobus_read() and mdiobus_write()
> >> routines.
> > [...]
> >
> > Perhaps, but only as a test/debug interface. It is not acceptable as a
> > production configuration interface - that needs some abstraction so the
> > same command will work on any switch chip that can support the
> > operation.
>
> Sure, I'd like to have this functionality for test/debug purpose.
OK. First check that mii-tool doesn't already provide what you need.
If it doesn't, please submit patches for ethtool to support MDIO
register get/set. These should cover both clause 22 and clause 45 PHYs.
Register dump may also be useful, but requires some thought about how to
handle the clause 45 address range (65536 registers per MMD, potentially
2 million per PRTAD).
Ben.
--
Ben Hutchings
Experience is directly proportional to the value of equipment destroyed.
- Carolyn Scheppner
Download attachment "signature.asc" of type "application/pgp-signature" (812 bytes)
Powered by blists - more mailing lists