From: Hector Palacios Date: Fri, 17 Aug 2018 11:06:40 +0000 (+0200) Subject: cmd: mii: don't check address for 'device' subcommand X-Git-Tag: v2025.01-rc5-pxa1908~3319^2~12 X-Git-Url: http://git.dujemihanovic.xyz/html/index.html?a=commitdiff_plain;h=fb265a74cfed2c655e02390d4fb13ffcfece2101;p=u-boot.git cmd: mii: don't check address for 'device' subcommand 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 Acked-by: Joe Hershberger --- diff --git a/cmd/mii.c b/cmd/mii.c index ce7b393eea..c0c42a851f 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; }