[PATCH net-next v2 4/6] net: mdio: scan bus based on bus capabilities for C22 and C45
Andrew Lunn
andrew at lunn.ch
Wed Mar 8 07:35:42 AEDT 2023
> Summary: Still 4 calls to mdio_bus_scan_c22, but also *2* calls to mdio_bus_scan_c45, approx. 190*100 reads by the switch driver
Those calls to mdio_bus_scan_c45 are caused by 743a19e38d02 net: dsa:
mv88e6xxx: Separate C22 and C45 transactions.
Some families of the mv88e6xxx do support C45 bus transactions. That
includes the 6171 you have. Before, we never scanned the C45 bus, but
now we do.
But something does not add up. Doing an additional c45 scan should
only double the number of reads by the switch driver.
The only part of a c45 scan which is not linear is
mv88e6xxx_g2_smi_phy_wait() which is implemented by
mv88e6xxx_wait_mask(). That loops reading a register waiting for a bit
to change. Maybe print out the value of i, and see if it is looping
more times for C45 than C22?
Andrew
More information about the Linux-aspeed
mailing list