u-boot/net
Vladimir Oltean 0fa4448d51 net: dsa: fix phydev->speed being uninitialized for the CPU port fixed PHY
If the DSA API is going to allow drivers to do things such as:

- phy_config in dsa_ops :: port_probe
- phy_startup in dsa_ops :: port_enable

then it would actually be good if the ->port_probe() method would
actually be called in all cases before the ->port_enable() is.

Currently this is true for user ports, but not true for the CPU port,
because the CPU port does not have a udevice registered for it (this is
all part of DSA's design). So the current issue is that after
phy_startup has finished for the CPU port, its phydev->speed is an
uninitialized value, because phy_config() was never called for the
priv->cpu_port_fixed_phy, and it is precisely phy_config() who copies
the speed into the phydev in the case of the fixed PHY driver.

So we need to simulate a probing event for the CPU port by manually
calling the driver's ->port_probe() method for the CPU port.

Fixes: 8a2982574854 ("net: dsa: introduce a .port_probe() method in struct dsa_ops")
Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
2022-01-15 18:49:03 +02:00
..
arp.c common: Drop linux/delay.h from common header 2020-05-18 21:19:23 -04:00
arp.h net: Don't overwrite waiting packets with asynchronous replies 2018-10-10 12:29:01 -05:00
bootp.c net: bootp: Correct VCI string transmission 2021-11-23 09:57:56 +02:00
bootp.h net: Use packed structures for networking 2017-08-07 15:18:31 -05:00
cdp.c Remove #include <timestamp.h> from files which do not need it 2021-09-17 12:10:44 -04:00
cdp.h SPDX: Convert a few files that were missed before 2018-05-10 20:38:35 -04:00
dns.c net: move random_port() to dns 2020-06-12 13:17:23 -04:00
dns.h SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
dsa-uclass.c net: dsa: fix phydev->speed being uninitialized for the CPU port fixed PHY 2022-01-15 18:49:03 +02:00
eth-uclass.c global: Convert simple_strtoul() with decimal to dectoul() 2021-08-02 13:32:14 -04:00
eth_common.c net: Move network rules to drivers/net 2021-09-04 12:51:47 -04:00
eth_internal.h SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
eth_legacy.c global: Convert simple_strtoul() with decimal to dectoul() 2021-08-02 13:32:14 -04:00
fastboot.c fastboot: Add support for 'reboot fastboot' command 2020-09-01 14:47:43 +02:00
Kconfig Kconfig: Remove all default n/no options 2021-08-31 17:47:49 -04:00
link_local.c common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
link_local.h net: Add link-local addressing support 2012-05-23 17:53:08 -05:00
Makefile net: Introduce DSA class for Ethernet switches 2021-02-16 11:48:20 -05:00
mdio-mux-uclass.c dm: core: Access device ofnode through functions 2021-01-05 12:24:41 -07:00
mdio-uclass.c net: mdio-uclass: rewrite dm_mdio_post_probe using strlcpy 2021-09-28 18:50:57 +03:00
net.c global: Convert simple_strtoul() with decimal to dectoul() 2021-08-02 13:32:14 -04:00
net_rand.h net: Use NDRNG device in srand_mac() 2021-01-19 09:15:02 -05:00
nfs.c common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
nfs.h net: nfs: remove superfluous packed attribute 2019-09-04 11:37:19 -05:00
pcap.c net: introduce packet capture support 2019-09-04 11:37:19 -05:00
ping.c net: Do not respond to ICMP_ECHO_REQUEST if we do not have an IP address 2021-01-19 09:15:02 -05:00
ping.h SPDX: Convert a few files that were missed before 2018-05-10 20:38:35 -04:00
rarp.c common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
rarp.h SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
sntp.c net: sntp: remove CONFIG_TIMESTAMP constraint 2020-12-01 14:12:28 -05:00
tftp.c WS cleanup: remove trailing empty lines 2021-09-30 08:08:56 -04:00
udp.c net: add a generic udp protocol 2020-09-30 16:55:03 -04:00
wol.c env: Drop environment.h header file where not needed 2019-08-11 16:43:41 -04:00
wol.h net: Add new wol command - Wake on LAN 2018-07-02 14:14:20 -05:00