Hi Bin, On Tue, Aug 25, 2015 at 2:22 AM, Bin Meng <bmeng...@gmail.com> wrote: > When given a device name string, we should test if it contains "eth" > before we treat it as an alias. > > With this commit, now we are really able to rotate between network > interfaces with driver model (previously it was broken).
I believe there is a test for this (dm_test_eth_rotate). Apparently it is not a sufficient test. Please describe the way in which this behavior is broken and add a test case to test/dm/eth.c that would fail without your change. > Signed-off-by: Bin Meng <bmeng...@gmail.com> > > --- > > net/eth.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/net/eth.c b/net/eth.c > index 0b4b08a..fbf30b0 100644 > --- a/net/eth.c > +++ b/net/eth.c > @@ -197,7 +197,7 @@ struct udevice *eth_get_dev_by_name(const char *devname) > struct uclass *uc; > > /* Must be longer than 3 to be an alias */ > - if (strlen(devname) > strlen("eth")) { > + if (strstr(devname, "eth") && strlen(devname) > strlen("eth")) { > startp = devname + strlen("eth"); > seq = simple_strtoul(startp, &endp, 10); > } > -- > 1.8.2.1 > > _______________________________________________ > U-Boot mailing list > U-Boot@lists.denx.de > http://lists.denx.de/mailman/listinfo/u-boot _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot