[PATCH] commands: miitool: handle powerdown-flag

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Hubert Feurstein <h.feurstein@xxxxxxxxx>
---
 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@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox



[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux