提交 fbfe9759 编写于 作者: A Andrew Lunn 提交者: Paolo Abeni

net: phy: Decide on C45 capabilities based on presence of method

Some PHYs provide invalid IDs in C22 space. If C45 is supported on the
bus an attempt can be made to get the IDs from the C45 space. Decide
on this based on the presence of the C45 read method in the bus
structure. This will allow the unreliable probe_capabilities to be
removed.
Signed-off-by: NAndrew Lunn <andrew@lunn.ch>
Signed-off-by: NMichael Walle <michael@walle.cc>
Reviewed-by: NJesse Brandeburg <jesse.brandeburg@intel.com>
Signed-off-by: NPaolo Abeni <pabeni@redhat.com>
上级 1a136ca2
...@@ -946,7 +946,7 @@ struct phy_device *get_phy_device(struct mii_bus *bus, int addr, bool is_c45) ...@@ -946,7 +946,7 @@ struct phy_device *get_phy_device(struct mii_bus *bus, int addr, bool is_c45)
* probe with C45 to see if we're able to get a valid PHY ID in the C45 * probe with C45 to see if we're able to get a valid PHY ID in the C45
* space, if successful, create the C45 PHY device. * space, if successful, create the C45 PHY device.
*/ */
if (!is_c45 && phy_id == 0 && bus->probe_capabilities >= MDIOBUS_C45) { if (!is_c45 && phy_id == 0 && bus->read_c45) {
r = get_phy_c45_ids(bus, addr, &c45_ids); r = get_phy_c45_ids(bus, addr, &c45_ids);
if (!r) if (!r)
return phy_device_create(bus, addr, phy_id, return phy_device_create(bus, addr, phy_id,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册