[U-Boot] [PATCH v2 1/3] net: eth: Clear MAC address in eth_pre_remove()

Joe Hershberger joe.hershberger at gmail.com
Fri Sep 11 02:52:43 CEST 2015


Hi Bin,

On Thu, Sep 10, 2015 at 7:49 PM, Bin Meng <bmeng.cn at gmail.com> wrote:
> Hi Joe,
>
> On Fri, Sep 11, 2015 at 6:32 AM, Joe Hershberger
> <joe.hershberger at gmail.com> wrote:
>> Hi Bin,
>>
>> On Thu, Sep 10, 2015 at 4:29 AM, Bin Meng <bmeng.cn at gmail.com> wrote:
>>> When removing an Ethernet device, the MAC address saved in the dev's
>>> platdata should be cleared.
>>
>> Why is this important to do?  Test case?
>
> platdata->enetaddr was assigned to a value in last dev_probe(). If we
> don't clear it, for dev_probe() the second time, dm eth will end up
> treating it as a MAC address from ROM no matter where it came from
> originally (maybe env, ROM, or even random)
>
> I don't think we need a test case to test this, but I can update
> commit message to include the reason above.

OK. Sounds fine.

Thanks,
-Joe


More information about the U-Boot mailing list