* 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()
diff --git a/common/cmd_mii.c b/common/cmd_mii.c
index 18fad1e..94874dd 100644
--- a/common/cmd_mii.c
+++ b/common/cmd_mii.c
@@ -81,7 +81,7 @@
 	 * 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 @@
 		/*
 		 * 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, "