From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from mail-ia0-f177.google.com ([209.85.210.177]) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1TNRjT-0002t9-BE for barebox@lists.infradead.org; Sun, 14 Oct 2012 17:12:08 +0000 Received: by mail-ia0-f177.google.com with SMTP id x26so3459661iak.36 for ; Sun, 14 Oct 2012 10:12:05 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: References: <1349878154-7099-1-git-send-email-antonynpavlov@gmail.com> <20121014141108.GR13639@game.jcrosoft.org> Date: Sun, 14 Oct 2012 21:12:05 +0400 Message-ID: From: Antony Pavlov List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: barebox-bounces@lists.infradead.org Errors-To: barebox-bounces+u.kleine-koenig=pengutronix.de@lists.infradead.org Subject: Re: [RFC v2] add 'miitool' command to view media-independent interface status To: barebox On 14 October 2012 18:11, Jean-Christophe PLAGNIOL-VILLARD> wrote: >> On 18:09 Wed 10 Oct , Antony Pavlov wrote: >> This command is based on "mii-diag" and "mii-tool" programs. >> >> TODO: >> * add GbE support (see http://ftp.debian.org/debian/pool/main/n/net-tools/net-tools_1.60-24.2.diff.gz); >> * add routines to manipulate media-independent interface state. >> >> EXAMPLES: >> >> barebox:/ miitool /dev/phy0 >> negotiated 100baseTx-FD, link ok >> >> barebox:/ miitool -v /dev/phy0 >> negotiated 100baseTx-FD, link ok >> product info: Level One LXT971A rev 2 >> basic mode: autonegotiation enabled >> basic status: autonegotiation complete, link ok >> capabilities: 100baseTx-FD 100baseTx-HD 10baseT-FD 10baseT-HD >> advertising: 100baseTx-FD 100baseTx-HD 10baseT-FD 10baseT-HD >> link partner: 100baseTx-FD 100baseTx-HD 10baseT-FD 10baseT-HD flow-control >> >> barebox:/ miitool -vv /dev/phy0 >> negotiated 100baseTx-FD, link ok >> registers for MII PHY: >> 3100 782d 0013 78e2 01e1 45e1 0007 2001 >> 0000 ffff ffff ffff ffff ffff ffff ffff >> 0084 4780 0000 0000 0422 0000 0000 0000 >> 0000 0000 0080 0000 ffff 0000 0000 3660 >> product info: Level One LXT971A rev 2 >> basic mode: autonegotiation enabled >> basic status: autonegotiation complete, link ok >> capabilities: 100baseTx-FD 100baseTx-HD 10baseT-FD 10baseT-HD >> advertising: 100baseTx-FD 100baseTx-HD 10baseT-FD 10baseT-HD >> link partner: 100baseTx-FD 100baseTx-HD 10baseT-FD 10baseT-HD flow-control >> >> Signed-off-by: Antony Pavlov >> --- >> commands/Kconfig | 11 +++ >> commands/Makefile | 1 + >> commands/miitool.c | 268 ++++++++++++++++++++++++++++++++++++++++++++++++++++ >> 3 files changed, 280 insertions(+) >> create mode 100644 commands/miitool.c >> >> diff --git a/commands/Kconfig b/commands/Kconfig >> index e934f29..c8cdd54 100644 >> --- a/commands/Kconfig >> +++ b/commands/Kconfig >> @@ -620,6 +620,17 @@ config CMD_USB >> help >> The usb command allows to rescan for USB devices. >> >> +config CMD_MIITOOL >> + bool >> + prompt "miitool command" >> + depends on NET > phylib It seems that miitool does not depends on PHYLIB because it uses abstract file access for reading thranceiver's registers. Moreover it does not really depends on NET. On the other hand the situation can be changed in the future. -- Best regards, Antony Pavlov _______________________________________________ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox