mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH] commands: miitool: handle powerdown-flag
@ 2019-12-11  9:53 Hubert Feurstein
  2019-12-13  8:26 ` Sascha Hauer
  0 siblings, 1 reply; 2+ messages in thread
From: Hubert Feurstein @ 2019-12-11  9:53 UTC (permalink / raw)
  To: barebox; +Cc: Hubert Feurstein

Signed-off-by: Hubert Feurstein <h.feurstein@gmail.com>
---
 commands/miitool.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/commands/miitool.c b/commands/miitool.c
index 4ea6fda34..a87d567ac 100644
--- a/commands/miitool.c
+++ b/commands/miitool.c
@@ -140,7 +140,10 @@ static int show_basic_mii(struct mii_bus *mii, struct phy_device *phydev,
 	}
 
 	*buf = '\0';
-	if (bmcr & BMCR_ANENABLE) {
+
+	if (bmcr & BMCR_PDOWN) {
+		sprintf(buf, "powerdown, ");
+	} else if (bmcr & BMCR_ANENABLE) {
 		if (bmsr & BMSR_ANEGCOMPLETE) {
 			if (advert & lkpar) {
 				sprintf(buf, "%s%s, ", (lkpar & LPA_LPACK) ?
@@ -192,6 +195,8 @@ static int show_basic_mii(struct mii_bus *mii, struct phy_device *phydev,
 			printf("loopback, ");
 		if (bmcr & BMCR_ISOLATE)
 			printf("isolate, ");
+		if (bmcr & BMCR_PDOWN)
+			printf("powerdown, ");
 		if (bmcr & BMCR_CTST)
 			printf("collision test, ");
 		if (bmcr & BMCR_ANENABLE) {
-- 
2.24.0


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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] commands: miitool: handle powerdown-flag
  2019-12-11  9:53 [PATCH] commands: miitool: handle powerdown-flag Hubert Feurstein
@ 2019-12-13  8:26 ` Sascha Hauer
  0 siblings, 0 replies; 2+ messages in thread
From: Sascha Hauer @ 2019-12-13  8:26 UTC (permalink / raw)
  To: Hubert Feurstein; +Cc: barebox

On Wed, Dec 11, 2019 at 10:53:32AM +0100, Hubert Feurstein wrote:
> Signed-off-by: Hubert Feurstein <h.feurstein@gmail.com>
> ---
>  commands/miitool.c | 7 ++++++-
>  1 file changed, 6 insertions(+), 1 deletion(-)

Applied, thanks

Sascha

-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-12-13  8:26 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-11  9:53 [PATCH] commands: miitool: handle powerdown-flag Hubert Feurstein
2019-12-13  8:26 ` Sascha Hauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox