
On Thu, Oct 25, 2018 at 2:34 PM Hannes Schmelzer hannes@schmelzer.or.at wrote:
On 10/25/2018 08:41 PM, Joe Hershberger wrote:
On Thu, Oct 25, 2018 at 9:26 AM Hannes Schmelzer hannes.schmelzer@br-automation.com wrote:
Hi Joe,
* reading the current address failed
*/
if (!ret_val && memcmp(current_mac, mac, 6) == 0)
return 0;
for (i = 0; i < 3; ++i)
data[i] = mac[i * 2 + 1] << 8 | mac[i * 2];
ret_val = e1000_write_eeprom_srwr(hw, 0x0, 3, data);
This is a pretty uncommon implementation of this driver operation. Does the i120 in this case read the MAC directly from the EEPROM?
Usually this function is used to write the hwaddr into the registers of the MAC. The .read_rom_hwaddr is used to fetch the hwaddr from the EEPROM and that address is used in the case that the U-Boot env has not set one.
This implementation is not new, just moved a bit upward in the file to avoid forward declaration for non-DM build.
Yes, I understand... I just brought it up since I was looking at it and maybe you had some insight.
I will double check it, but i guess there will be no change until we've no fail behavior of the existing code.
What do you mean here?
I didn't imagine that this little change would become so big ;-)
:) Sorry, wasn't meaning for it to be big... my comment about the current implementation is not meant to block this change.
I will provide some v3 within next days with the cosmetic cleanup and other requested changes.
Thanks!
cheers, Hannes
U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot