diff options
Diffstat (limited to 'sys/mips/cavium/octe/octe.c')
-rw-r--r-- | sys/mips/cavium/octe/octe.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/sys/mips/cavium/octe/octe.c b/sys/mips/cavium/octe/octe.c index 2e05734..daccb36 100644 --- a/sys/mips/cavium/octe/octe.c +++ b/sys/mips/cavium/octe/octe.c @@ -157,10 +157,11 @@ octe_attach(device_t dev) if (priv->phy_id != -1) { if (priv->phy_device == NULL) { - error = mii_phy_probe(dev, &priv->miibus, octe_mii_medchange, - octe_mii_medstat); + error = mii_attach(dev, &priv->miibus, ifp, + octe_mii_medchange, octe_mii_medstat, + BMSR_DEFCAPMASK, priv->phy_id, MII_OFFSET_ANY, 0); if (error != 0) - device_printf(dev, "missing phy %u\n", priv->phy_id); + device_printf(dev, "attaching PHYs failed\n"); } else { child = device_add_child(dev, priv->phy_device, -1); if (child == NULL) @@ -239,9 +240,8 @@ octe_miibus_readreg(device_t dev, int phy, int reg) /* * Try generic MII routine. */ - if (phy != priv->phy_id) - return (0); - + KASSERT(phy == priv->phy_id, + ("read from phy %u but our phy is %u", phy, priv->phy_id)); return (cvm_oct_mdio_read(priv->ifp, phy, reg)); } |