Skip to contentSkip to conversation

commands: miitool: handle powerdown-flag

PATCH Applied Hubert Feurstein 2 participants 2 messages Dec 11, 2019 – Dec 13, 2019

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 commands: miitool: handle powerdown-flag

---
 commands/miitool.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
commands/miitool.c +6 -1
index 4ea6fda34..a87d567ac 100644
@@ -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) {
Signature · 7 lines
2.24.0


_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
Applied
#1 lore raw
Quoted 4 lines · Hubert Feurstein
---
 commands/miitool.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

Applied, thanks

Sascha

Signature · 9 lines
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
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox