RE: [U-Boot-Users] ether mac auto override.

Yes. I've read that and inspected many of the drivers and I've yet to find one which implements the whole specification, especially as it relates to validating the mac address. Is there a good example which you can point to? I did take a few looks into the kernel/drivers/net sources and no good examples jumped out.
The 91c111 can run with our with out an eeprom. Just because you have an eeprom there is no guarantee the mac is correct, just like there is nothing which say the user inputted it correctly. I recall working with some code in the past which did some validation of the mac, but I am unable to find it (not broadcast, not multicast, not 0, ...). The closest thing to validation a couple of the drivers do is a checksum over the eeprom this gives you some confidence but its not a validation.
Its sort of picky to worry about it at this level, but it would be nice to find something good. I'll likely end up throwing in a simple check, followed by setting the local address to what the env asked for or ... If none, what in the rom, if none, the default which is there already.
Regards,
Richard W.
-----Original Message----- From: Wolfgang Denk [mailto:wd@denx.de] Sent: Wednesday, June 18, 2003 2:56 AM To: Woodruff, Richard Cc: u-boot-users@lists.sourceforge.net Subject: Re: [U-Boot-Users] ether mac auto override.
Dear Richard,
in message FD2AC9A020DDD51194710008C7089B20053D4C87@dlee17.itg.ti.com you wrote:
Should u-boot define a standard way to override the mac
address that
an ethernet chip will use (if that chip allows it)? Back when I enabled the
There is already such a definition.
See the 3rd and following paragraphs in section "Note for Redundant Ethernet Interfaces" in the README (Text starting "If the network interface stores some valid MAC address...").
91c111 for my board, it took a couple of looks to notice that the ethaddr environment variable was not used by the
driver...but it was
for things like
Then the driver should be fixed.
Best regards,
Wolfgang Denk
-- Software Engineering: Embedded and Realtime Systems, Embedded Linux Phone: (+49)-8142-4596-87 Fax: (+49)-8142-4596-88 Email: wd@denx.de Murder is contrary to the laws of man and God. -- M-5 Computer, "The Ultimate Computer", stardate 4731.3

In message FD2AC9A020DDD51194710008C7089B20053D4C8E@dlee17.itg.ti.com you wrote:
Yes. I've read that and inspected many of the drivers and I've yet to find one which implements the whole specification, especially as it relates to validating the mac address. Is there a good example which you can point to?
See for example drivers/cs8900.c
The 91c111 can run with our with out an eeprom. Just because you have an eeprom there is no guarantee the mac is correct, just like there is nothing
If there is an EEPROM it has a checksum.
which say the user inputted it correctly. I recall working with some code
You cannot prevent against operator error.
a couple of the drivers do is a checksum over the eeprom this gives you some confidence but its not a validation.
It is IMHO not a task for a boot loader to validate user input on this level.
Its sort of picky to worry about it at this level, but it would be nice to find something good. I'll likely end up throwing in a simple check,
I may decide not to accept it because of inefficient memory footprint vs. benefits ration.
followed by setting the local address to what the env asked for or ... If none, what in the rom, if none, the default which is there already.
The code in drivers/cs8900.c is very simple (and small) and works pretty well for me.
Best regards,
Wolfgang Denk
participants (2)
-
Wolfgang Denk
-
Woodruff, Richard