Other Parts Discussed in Thread: DP83TC811
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/net/phy/dp83tc811.c
kernel version:3.18.120
error:
static inline int phy_read_mmd(struct phy_device *phydev, int devad, u32 regnum)
{
if (!phydev->is_c45)
return -EOPNOTSUPP;///////////////////////////////////////////return here
return mdiobus_read(phydev->bus, phydev->addr,
MII_ADDR_C45 | (devad << 16) | (regnum & 0xffff));
}
when i add code to support C45 as fllow:
ethphy0: ethernet-phy@1 {
compatible = "ethernet-phy-ieee802.3-c45";
reg = <0>;
};
It cannot read phyID,phy_id is 0
3.446179] libphy: emac-mdio: probed
[ 3.452680] get_phy_device:===>r(0)phy_id(0) is_c45=1
I think it is a problem with the phy_read_mmd function, which is inconsistent with the current kernel version.
Can you provide a driver based on the current kernel version