75 phy->
mdio.prtad, err);
80 static int aq100x_intr_enable(
struct cphy *
phy)
90 static int aq100x_intr_disable(
struct cphy *phy)
95 static int aq100x_intr_clear(
struct cphy *phy)
105 static int aq100x_intr_handler(
struct cphy *phy)
120 static int aq100x_power_down(
struct cphy *phy,
int off)
127 static int aq100x_autoneg_enable(
struct cphy *phy)
131 err = aq100x_power_down(phy, 0);
140 static int aq100x_autoneg_restart(
struct cphy *phy)
144 err = aq100x_power_down(phy, 0);
153 static int aq100x_advertise(
struct cphy *phy,
unsigned int advertise_map)
194 static int aq100x_set_loopback(
struct cphy *phy,
int mmd,
int dir,
int enable)
201 static int aq100x_set_speed_duplex(
struct cphy *phy,
int speed,
int duplex)
207 static int aq100x_get_link_status(
struct cphy *phy,
int *link_ok,
250 static struct cphy_ops aq100x_ops = {
251 .reset = aq100x_reset,
252 .intr_enable = aq100x_intr_enable,
253 .intr_disable = aq100x_intr_disable,
254 .intr_clear = aq100x_intr_clear,
255 .intr_handler = aq100x_intr_handler,
256 .autoneg_enable = aq100x_autoneg_enable,
257 .autoneg_restart = aq100x_autoneg_restart,
258 .advertise = aq100x_advertise,
259 .set_loopback = aq100x_set_loopback,
260 .set_speed_duplex = aq100x_set_speed_duplex,
261 .get_link_status = aq100x_get_link_status,
262 .power_down = aq100x_power_down,
272 cphy_init(phy, adapter, phy_addr, &aq100x_ops, mdio_ops,
293 if (err || v == 0xffff) {
297 CH_WARN(adapter,
"PHY%d: reset failed (0x%x, 0x%x).\n",
305 }
while (v && --wait);
307 CH_WARN(adapter,
"PHY%d: reset timed out (0x%x).\n",
314 wait = (500 -
wait) * 10 + 1000;
316 CH_WARN(adapter,
"PHY%d: reset took %ums\n", phy_addr, wait);
321 CH_WARN(adapter,
"PHY%d: unsupported firmware %d\n",
338 CH_WARN(adapter,
"PHY%d does not start in low power mode.\n",
347 if (v != 0x1b || v2 != 0x1b)
349 "PHY%d: incorrect XAUI settings (0x%x, 0x%x).\n",