summaryrefslogtreecommitdiff
path: root/common/cmd_mii.c
diff options
context:
space:
mode:
authorwdenk <wdenk>2003-12-06 23:20:41 +0000
committerwdenk <wdenk>2003-12-06 23:20:41 +0000
commit8bf3b005ddee3eee179ec961e1c2bd0693e3b79d (patch)
tree89b47bf5457d76bcaf63a38f1087529e1a9de931 /common/cmd_mii.c
parenta8c7c708a9e0051c6358718c53572a4681eaa22b (diff)
* Patches by Stephan Linz, 3 Nov 2003:
- more endianess fixes for LAN91C111 driver - CFG_HZ configuration patch for NIOS Cyclone board * Patch by Stephan Linz, 28 Oct 2003: fix PHY_INT_REG vs. PHY_MASK_REG bug in drivers/smc91111.c * Patch by Steven Scholz, 20 Oct 2003: - make "mii info <addr>" show infor for PHY at "addr" only - Endian fix for miiphy_info()
Diffstat (limited to 'common/cmd_mii.c')
-rw-r--r--common/cmd_mii.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/common/cmd_mii.c b/common/cmd_mii.c
index 18fad1e34ff..94874ddfe0b 100644
--- a/common/cmd_mii.c
+++ b/common/cmd_mii.c
@@ -81,7 +81,7 @@ int do_mii (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[])
* check info/read/write.
*/
if (op == 'i') {
- int j;
+ unsigned char j, start, end;
unsigned int oui;
unsigned char model;
unsigned char rev;
@@ -89,7 +89,13 @@ int do_mii (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[])
/*
* Look for any and all PHYs. Valid addresses are 0..31.
*/
- for (j = 0; j < 32; j++) {
+ if (argc >= 3) {
+ start = addr; end = addr + 1;
+ } else {
+ start = 0; end = 32;
+ }
+
+ for (j = start; j < end; j++) {
if (miiphy_info (j, &oui, &model, &rev) == 0) {
printf ("PHY 0x%02X: "
"OUI = 0x%04X, "