Re: [PATCH net v2 06/12] net: au1000: assign a valid MAC address without platform data
From: netdev-bot+sashiko
Date: Mon Nov 16 2026 - 08:52:29 EST
Thank you for your contribution! Sashiko AI review found more severe
issue(s) in other patches of this series. This mail is only an FYI, in case
you want to address the nit picks below when you respin.
Low priority / nit picks for your consideration:
- [Low] The commit message overstates how far the bug reaches, and it
carries a Fixes: tag.
--
net: au1000: assign a valid MAC address without platform data
When no platform data is passed, au1000_probe() now calls
eth_hw_addr_random(). Before this, the device kept an all-zero dev_addr,
and eth_validate_addr() rejected it at open time.
> The supported no-platform-data path leaves dev_addr as all zeroes. The
> device can register but eth_validate_addr() prevents it from opening.
[Severity: Low]
Can any in-tree configuration actually reach this path?
The only in-tree au1000-eth platform devices are au1xxx_eth0_device and
au1xxx_eth1_device in arch/mips/alchemy/common/platform.c. Both always set
platform_data:
.platform_data = &au1xxx_eth0_platform_data,
au1xxx_override_eth_cfg() is the board override path, used by
board-mtx1.c. It copies into the same static structures, so the pointer
stays non-NULL:
if (port == 0)
memcpy(&au1xxx_eth0_platform_data, eth_data,
sizeof(struct au1000_eth_platform_data));
au1000_eth_driver has no of_match_table or id_table. It can only bind by
name to the platform devices above.
So dev_get_platdata() never seems to return NULL for an in-tree user. The
failure described could only happen with out-of-tree board code that
registers the device without platform data.
The code change itself looks correct. It restores what the !pd branch did
before 7718f2c27dbd, which only added eth_hw_addr_random() to the
invalid-MAC branch.
> Fixes: 7718f2c27dbd ("au1000_eth: use eth_hw_addr_random() instead of random_ether_addr()")
Could the commit message say that only out-of-tree platform code can hit
this, or describe the change as hardening? As written, the Fixes: tag may
lead to a stable backport for a failure no mainline configuration can hit.
--
Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261112045301.3669532-1-f.fainelli%40gmail.com