mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Sascha Hauer <s.hauer@pengutronix.de>
To: Antony Pavlov <antonynpavlov@gmail.com>
Cc: barebox@lists.infradead.org
Subject: Re: [RFC] add 'miitool' command to view media-independent interface status
Date: Wed, 10 Oct 2012 10:53:35 +0200	[thread overview]
Message-ID: <20121010085335.GU27665@pengutronix.de> (raw)
In-Reply-To: <CAA4bVAH7YpUgp6-hJZMLVK3Vt=LsEJNgjqg8E+50WiXuc7=U7g@mail.gmail.com>

On Tue, Oct 09, 2012 at 11:39:24AM +0400, Antony Pavlov wrote:
> On 9 October 2012 00:47, Sascha Hauer <s.hauer@pengutronix.de> wrote:
> > Hi Antony,
> >
> > On Mon, Oct 08, 2012 at 12:17:33AM +0400, Antony Pavlov wrote:
> >> This command is based on "mii-diag" and "mii-tool" programs.
> >>
> >> TODO:
> >>  * drop MII_ANER_ and MII_AN_, use linux/mii.h macros;
> >>  * add routines to manipulate media-independent interface state.
> >
> > Such a tool is nice to have. Some small comments inline.
> >
> ...
> >> +
> >> +/* Table of known MII's */
> >> +static struct {
> >> +     u_short id1, id2;
> >> +     u_short mask1, mask2;
> >> +     char    *name;
> >> +} mii_id[] = {
> >> +     { 0x7810, 0x0003, 0xffff, 0xffff, "Level One LXT970A" },
> >> +     { 0x7810, 0x0000, 0xffff, 0xfff0, "Level One LXT970/LXT971" },
> >> +     { 0x0013, 0x78e0, 0xffff, 0xfff0, "Level One LXT971A" },
> >> +};
> >
> > Maybe we should find a place where other code (phylib?) can use this
> > table aswell?
> 
> I agree. It is very convinient to use only one place to store the MII
> tranceivers database.
> But just now we have only one phy driver ("Generic PHY"). It has no
> table of know MII.
> I have tryed to port drivers/net/phy/lxt.c from linux. But there is no
> reason to do it: it contain only generic support for LXT970/971.
> 
> IMHO mii_id[] table is a __temporary__ but a good-enough solution.

Ack

Sascha

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

      reply	other threads:[~2012-10-10  8:53 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-07 20:17 Antony Pavlov
2012-10-08 20:47 ` Sascha Hauer
2012-10-09  7:39   ` Antony Pavlov
2012-10-10  8:53     ` Sascha Hauer [this message]

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=20121010085335.GU27665@pengutronix.de \
    --to=s.hauer@pengutronix.de \
    --cc=antonynpavlov@gmail.com \
    --cc=barebox@lists.infradead.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox