[U-Boot] [PATCH] net: eth-uclass: call stop only for active devices

Joe Hershberger joe.hershberger at ni.com
Thu Feb 21 18:40:50 UTC 2019


On Wed, Feb 20, 2019 at 9:01 PM Bin Meng <bmeng.cn at gmail.com> wrote:
>
> On Wed, Feb 20, 2019 at 8:33 PM Keerthy <j-keerthy at ti.com> wrote:
> >
> > Currently stop is being called unconditionally without even
> > checking if start is called. In case of multiple instances eth
> > being present many devices might just be initialized without
> > a start call in such cases stop might lead unpredictable behaviors
> > including aborts and crashes. Hence add a check before calling stop.
> >
> > Signed-off-by: Keerthy <j-keerthy at ti.com>
> > ---
> >  net/eth-uclass.c | 3 ++-
> >  1 file changed, 2 insertions(+), 1 deletion(-)
> >
>
> Could you please provide a test case?

Presumably that test should live in test/dm/eth.c with some potential
support needed by drivers/net/sandbox.c

Thanks,
-Joe

> Regards,
> Bin
> _______________________________________________
> U-Boot mailing list
> U-Boot at lists.denx.de
> https://lists.denx.de/listinfo/u-boot


More information about the U-Boot mailing list