The MDIO self-test should not be run on boards without an MDIO PHY,
such as SFN5122F-R3 and later revisions. It should also not try to
address a specific MMD in an MDIO clause 22 PHY. Check the
mode_support field to decide which mode to use, if any.
Signed-off-by: Ben Hutchings <firstname.lastname@example.org>
Signed-off-by: David S. Miller <email@example.com>
(cherry picked from commit f3766c26a5d00189e5c0965c66f01956d15a92d6)