mirror-linux/drivers/net
Quentin Schulz eb7fd7aa35 net: stmmac: platform: guarantee uniqueness of bus_id
bus_id is currently derived from the ethernetX alias. If one is missing
for the device, 0 is used. If ethernet0 points to another stmmac device
or if there are 2+ stmmac devices without an ethernet alias, then bus_id
will be 0 for all of those.

This is an issue because the bus_id is used to generate the mdio bus id
(new_bus->id in drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c
stmmac_mdio_register) and this needs to be unique.

This allows to avoid needing to define ethernet aliases for devices with
multiple stmmac controllers (such as the Rockchip RK3588) for multiple
stmmac devices to probe properly.

Obviously, the bus_id isn't guaranteed to be stable across reboots if no
alias is set for the device but that is easily fixed by simply adding an
alias if this is desired.

Fixes: 25c83b5c2e ("dt:net:stmmac: Add support to dwmac version 3.610 and 3.710")
Signed-off-by: Quentin Schulz <quentin.schulz@cherry.de>
Reviewed-by: Maxime Chevallier <maxime.chevallier@bootlin.com>
Link: https://patch.msgid.link/20250527-stmmac-mdio-bus_id-v2-1-a5ca78454e3c@cherry.de
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
2025-05-29 10:51:43 +02:00
..
arcnet
bonding net: core: Convert dev_set_mac_address() to struct sockaddr_storage 2025-05-27 08:25:43 +02:00
caif
can linux-can-next-for-6.16-20250522 2025-05-26 18:11:24 +02:00
dsa Networking changes for 6.16. 2025-05-28 15:24:36 -07:00
ethernet net: stmmac: platform: guarantee uniqueness of bus_id 2025-05-29 10:51:43 +02:00
fddi
fjes
hamradio
hippi
hyperv net: core: Convert dev_set_mac_address() to struct sockaddr_storage 2025-05-27 08:25:43 +02:00
ieee802154
ipa net: ipa: Make the SMEM item ID constant 2025-05-13 15:42:50 -07:00
ipvlan
mctp net: mctp: start tx queue on netdev open 2025-05-27 17:23:19 -07:00
mdio net: phy: fixed_phy: remove irq argument from fixed_phy_register 2025-05-20 18:17:43 -07:00
netdevsim ipsec-next-2025-05-23 2025-05-26 18:32:48 +02:00
ovpn ovpn: fix check for skb_to_sgvec_nomark() return value 2025-05-15 13:09:36 +02:00
pcs
phy Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2025-05-28 10:11:15 +02:00
plip
ppp
pse-pd
slip
team net: core: Convert dev_set_mac_address() to struct sockaddr_storage 2025-05-27 08:25:43 +02:00
thunderbolt
usb net: ch9200: fix uninitialised access during mii_nway_restart 2025-05-28 19:10:04 -07:00
vmxnet3 Core x86 updates for v6.16: 2025-05-26 16:04:17 -07:00
vxlan
wan
wireguard wireguard: allowedips: add WGALLOWEDIP_F_REMOVE_ME flag 2025-05-27 09:06:19 +02:00
wireless Lots of new things, notably: 2025-05-22 14:05:18 -07:00
wwan
xen-netback
Kconfig
LICENSE.SRC
Makefile
Space.c
amt.c
bareudp.c
dummy.c
eql.c
geneve.c
gtp.c
ifb.c
loopback.c
macsec.c
macvlan.c net: core: Convert dev_set_mac_address() to struct sockaddr_storage 2025-05-27 08:25:43 +02:00
macvtap.c
mdio.c
mhi_net.c
mii.c
net_failover.c
netconsole.c
netkit.c
nlmon.c
ntb_netdev.c
pfcp.c
rionet.c
sungem_phy.c
tap.c net: core: Convert dev_set_mac_address_user() to use struct sockaddr_storage 2025-05-27 08:25:43 +02:00
tun.c net: core: Convert dev_set_mac_address_user() to use struct sockaddr_storage 2025-05-27 08:25:43 +02:00
tun_vnet.h
veth.c
virtio_net.c
vrf.c
vsockmon.c
xen-netfront.c