Usage of arch_get_platform_mac_address() or the lack thereof

From: Rolf Eike Beer <hidden>
Date: 2022-09-05 14:22:17

Hi,

just for the fun of it I'm poking a bit through the sunhme driver. I noticed 
that this driver as well as many other sun related drivers directly use 
idprom->id_ethaddr, but noone uses arch_get_platform_mac_address(). Some 
drivers use eth_platform_get_mac_address() instead, which does some more 
querying of of_* properties to find out the mac address.

So, what is the right way of doing this? sungem and sunhme query "local-mac-
address" before, but do not query the other possibilities used in 
of_get_mac_address(), and neither of them checks for all-zeroes and other 
things in the returned addresses. sungme will error out if that does not 
return any address, sunhme will simply leave the mac address unassigned.

What would be the correct way of doing this? Should all these driver be ported 
to use arch_get_platform_mac_address() or eth_platform_get_mac_address()?

Eike

Attachments

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help