[U-Boot] [RFC] net: eth_write_hwaddr hides ENOSYS

Heinrich Schuchardt xypron.debian at gmx.de
Sat Mar 24 13:41:21 UTC 2018


Hello Simon,

in patch
db9391e165dd ("net: Move driver-model code into its own file")
function eth_write_hwaddr hides() you chose to introduce the follwing lines:

static int eth_write_hwaddr(struct udevice *dev)
...
/*
 * Drivers are allowed to decide not to implement this at
 * run-time. E.g. Some devices may use it and some may not.
 */
ret = eth_get_ops(dev)->write_hwaddr(dev);
if (ret == -ENOSYS)
	ret = 0;

For implementing efi_net_station_address() it would be preferable if the
function would return -ENOSYS to signal that changing the MAC address
failed.

I could not find any caller of the driver model version of
eth_write_hwaddr(). Do you remember why you made this choice?

Best regards

Heinrich


More information about the U-Boot mailing list