From: Hector Palacios Date: Fri, 17 Aug 2018 13:06:40 +0200 Subject: [U-Boot] [PATCH] cmd: mii: don't check address for 'device' subcommand Message-ID: <20180817110640.312-1-hector.palacios@digi.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de All mii operations require a valid PHY address except the 'device' command, which expects the PHY name rather than the address. Signed-off-by: Hector Palacios --- cmd/mii.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/mii.c b/cmd/mii.c index ce7b393eeaae..c0c42a851f90 100644 --- a/cmd/mii.c +++ b/cmd/mii.c @@ -313,7 +313,7 @@ static int do_mii(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) mask = simple_strtoul(argv[5], NULL, 16); } - if (addrhi > 31) { + if (addrhi > 31 && strncmp(op, "de", 2)) { printf("Incorrect PHY address. Range should be 0-31\n"); return CMD_RET_USAGE; }