Lines Matching refs:phy
118 int phy, port = 0, err = 0;
123 for (phy = 0; phy < MII_NPHY; phy++) {
124 if (((1 << phy) & sc->phymask) == 0)
126 sc->ifpport[phy] = port;
127 sc->portphy[port] = phy;
145 BMSR_DEFCAPMASK, phy + sc->phyoffset, MII_OFFSET_ANY, 0);
152 phy);
268 ukswitch_portforphy(struct ukswitch_softc *sc, int phy)
271 return (sc->ifpport[phy]);
362 int err, phy;
368 phy = sc->portphy[p->es_port];
370 if (sc->cpuport != -1 && phy == sc->cpuport) {
475 ukswitch_readphy(device_t dev, int phy, int reg)
483 if (phy < 0 || phy >= 32)
489 data = MDIO_READREG(device_get_parent(dev), phy, reg);
496 ukswitch_writephy(device_t dev, int phy, int reg, int data)
504 if (phy < 0 || phy >= 32)
510 err = MDIO_WRITEREG(device_get_parent(dev), phy, reg, data);