]> www.infradead.org Git - nvme.git/commit
net: stmmac: Create DW XPCS device with particular address
authorSerge Semin <fancer.lancer@gmail.com>
Mon, 1 Jul 2024 18:28:40 +0000 (21:28 +0300)
committerDavid S. Miller <davem@davemloft.net>
Fri, 5 Jul 2024 08:35:51 +0000 (09:35 +0100)
commit351066bad6ade5ad0f5f90fde2dc759759959969
tree293c5af5d0ce1f5548a53205251b53c133b5b996
parent9cad7275463ab9e52aeae8d2ecb169afee6876f3
net: stmmac: Create DW XPCS device with particular address

Currently the only STMMAC platform driver using the DW XPCS code is the
Intel mGBE device driver. (It can be determined by finding all the drivers
having the stmmac_mdio_bus_data::has_xpcs flag set.) At the same time the
low-level platform driver masks out the DW XPCS MDIO-address from being
auto-detected as PHY by the MDIO subsystem core. Seeing the PCS MDIO ID is
known the procedure of the DW XPCS device creation can be simplified by
dropping the loop over all the MDIO IDs. From now the DW XPCS device
descriptor will be created for the MDIO-bus address pre-defined by the
platform drivers via the stmmac_mdio_bus_data::pcs_mask field.

Note besides this shall speed up a bit the Intel mGBE probing.

Signed-off-by: Serge Semin <fancer.lancer@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/stmicro/stmmac/dwmac-intel.c
drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c
include/linux/stmmac.h