mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Sascha Hauer <s.hauer@pengutronix.de>
To: barebox@lists.infradead.org
Subject: [PATCH 3/3] mii-tool: Fix gigabit advertise / link partner ability mixup
Date: Wed, 21 May 2014 14:09:56 +0200	[thread overview]
Message-ID: <1400674196-31951-4-git-send-email-s.hauer@pengutronix.de> (raw)
In-Reply-To: <1400674196-31951-1-git-send-email-s.hauer@pengutronix.de>

bmcr2 contains the gigabit advertise bits and lpa2 contains the gigabit
link partner ability bits, not the other way round.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
 commands/miitool.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/commands/miitool.c b/commands/miitool.c
index 341506c..64c2a93 100644
--- a/commands/miitool.c
+++ b/commands/miitool.c
@@ -209,7 +209,7 @@ static int show_basic_mii(struct mii_bus *mii, struct phy_device *phydev,
 			printf("remote fault, ");
 		printf((bmsr & BMSR_LSTATUS) ? "link ok" : "no link");
 		printf("\n  capabilities:%s", media_list(bmsr >> 6, bmcr2, 0));
-		printf("\n  advertising: %s", media_list(advert, lpa2 >> 2, 0));
+		printf("\n  advertising: %s", media_list(advert, bmcr2, 0));
 
 #define LPA_ABILITY_MASK	(LPA_10HALF | LPA_10FULL \
 				| LPA_100HALF | LPA_100FULL \
@@ -217,7 +217,7 @@ static int show_basic_mii(struct mii_bus *mii, struct phy_device *phydev,
 
 		if (lkpar & LPA_ABILITY_MASK)
 			printf("\n  link partner:%s",
-				media_list(lkpar, bmcr2, 0));
+				media_list(lkpar, lpa2 >> 2, 0));
 		printf("\n");
 	}
 
-- 
2.0.0.rc0


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

      parent reply	other threads:[~2014-05-21 12:10 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-21 12:09 [PATCH] mii-tool fixes Sascha Hauer
2014-05-21 12:09 ` [PATCH 1/3] mii-tool: Fix string length Sascha Hauer
2014-05-21 12:09 ` [PATCH 2/3] mii-tool: Fix gigabit link test Sascha Hauer
2014-05-21 12:09 ` 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=1400674196-31951-4-git-send-email-s.hauer@pengutronix.de \
    --to=s.hauer@pengutronix.de \
    --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