cphy
struct cphy phy;
void t3_ael1002_phy_prep(struct cphy *phy, adapter_t *adapter, int phy_addr,
static int ael1006_reset(struct cphy *phy, int wait)
static int ael1006_intr_enable(struct cphy *phy)
static int ael1006_intr_disable(struct cphy *phy)
static int ael1006_intr_clear(struct cphy *phy)
static int ael1006_intr_handler(struct cphy *phy)
static int ael1006_power_down(struct cphy *phy, int enable)
void t3_ael1006_phy_prep(struct cphy *phy, adapter_t *adapter, int phy_addr,
void t3_qt2045_phy_prep(struct cphy *phy, adapter_t *adapter, int phy_addr,
static int xaui_direct_reset(struct cphy *phy, int wait)
static int xaui_direct_get_link_status(struct cphy *phy, int *link_ok,
static int xaui_direct_power_down(struct cphy *phy, int enable)
void t3_xaui_direct_phy_prep(struct cphy *phy, adapter_t *adapter, int phy_addr,
static void ael100x_txon(struct cphy *phy)
static int ael1002_power_down(struct cphy *phy, int enable)
static int ael1002_reset(struct cphy *phy, int wait)
static int ael1002_intr_noop(struct cphy *phy)
static int ael100x_get_link_status(struct cphy *phy, int *link_ok,
struct cphy;
void (*phy_prep)(struct cphy *phy, adapter_t *adapter, int phy_addr,
void (*destroy)(struct cphy *phy);
int (*reset)(struct cphy *phy, int wait);
int (*intr_enable)(struct cphy *phy);
int (*intr_disable)(struct cphy *phy);
int (*intr_clear)(struct cphy *phy);
int (*intr_handler)(struct cphy *phy);
int (*autoneg_enable)(struct cphy *phy);
int (*autoneg_restart)(struct cphy *phy);
int (*advertise)(struct cphy *phy, unsigned int advertise_map);
int (*set_loopback)(struct cphy *phy, int mmd, int dir, int enable);
int (*set_speed_duplex)(struct cphy *phy, int speed, int duplex);
int (*get_link_status)(struct cphy *phy, int *link_ok, int *speed,
int (*power_down)(struct cphy *phy, int enable);
static __inline int mdio_read(struct cphy *phy, int mmd, int reg,
static __inline int mdio_write(struct cphy *phy, int mmd, int reg,
static __inline void cphy_init(struct cphy *phy, adapter_t *adapter,
int t3_mdio_change_bits(struct cphy *phy, int mmd, int reg, unsigned int clear,
int t3_phy_reset(struct cphy *phy, int mmd, int wait);
int t3_phy_advertise(struct cphy *phy, unsigned int advert);
int t3_set_phy_speed_duplex(struct cphy *phy, int speed, int duplex);
int t3_link_start(struct cphy *phy, struct cmac *mac, struct link_config *lc);
void t3_mv88e1xxx_phy_prep(struct cphy *phy, adapter_t *adapter, int phy_addr,
void t3_vsc8211_phy_prep(struct cphy *phy, adapter_t *adapter, int phy_addr,
void t3_ael1002_phy_prep(struct cphy *phy, adapter_t *adapter, int phy_addr,
void t3_ael1006_phy_prep(struct cphy *phy, adapter_t *adapter, int phy_addr,
void t3_qt2045_phy_prep(struct cphy *phy, adapter_t *adapter, int phy_addr,
void t3_xaui_direct_phy_prep(struct cphy *phy, adapter_t *adapter, int phy_addr,
static int mv88e1xxx_reset(struct cphy *cphy, int wait)
return t3_phy_reset(cphy, 0, wait);
static int mv88e1xxx_intr_enable(struct cphy *cphy)
return mdio_write(cphy, 0, MV88E1XXX_INTR_ENABLE, INTR_ENABLE_MASK);
static int mv88e1xxx_intr_disable(struct cphy *cphy)
return mdio_write(cphy, 0, MV88E1XXX_INTR_ENABLE, 0);
static int mv88e1xxx_intr_clear(struct cphy *cphy)
return mdio_read(cphy, 0, MV88E1XXX_INTR_STATUS, &val);
static int mv88e1xxx_crossover_set(struct cphy *cphy, int crossover)
return t3_mdio_change_bits(cphy, 0, MV88E1XXX_SPECIFIC_CNTRL,
static int mv88e1xxx_autoneg_enable(struct cphy *cphy)
mv88e1xxx_crossover_set(cphy, CROSSOVER_AUTO);
return t3_mdio_change_bits(cphy, 0, MII_BMCR, BMCR_PDOWN | BMCR_ISOLATE,
static int mv88e1xxx_autoneg_restart(struct cphy *cphy)
return t3_mdio_change_bits(cphy, 0, MII_BMCR, BMCR_PDOWN | BMCR_ISOLATE,
static int mv88e1xxx_set_loopback(struct cphy *cphy, int mmd, int dir, int on)
return t3_mdio_change_bits(cphy, 0, MII_BMCR, BMCR_LOOPBACK,
static int mv88e1xxx_get_link_status(struct cphy *cphy, int *link_ok,
mdio_read(cphy, 0, MV88E1XXX_SPECIFIC_STATUS, &status);
static int mv88e1xxx_downshift_set(struct cphy *cphy, int downshift_enable)
return t3_mdio_change_bits(cphy, 0, MV88E1XXX_EXT_SPECIFIC_CNTRL,
static int mv88e1xxx_power_down(struct cphy *cphy, int enable)
return t3_mdio_change_bits(cphy, 0, MII_BMCR, BMCR_PDOWN,
static int mv88e1xxx_intr_handler(struct cphy *cphy)
mdio_read(cphy, 0, MV88E1XXX_INTR_STATUS, &cause);
void t3_mv88e1xxx_phy_prep(struct cphy *phy, adapter_t *adapter, int phy_addr,
struct cphy *phy = &pi->phy;
int t3_link_start(struct cphy *phy, struct cmac *mac, struct link_config *lc)
int t3_mdio_change_bits(struct cphy *phy, int mmd, int reg, unsigned int clear,
int t3_phy_reset(struct cphy *phy, int mmd, int wait)
int t3_phy_advertise(struct cphy *phy, unsigned int advert)
int t3_set_phy_speed_duplex(struct cphy *phy, int speed, int duplex)
static int vsc8211_intr_clear(struct cphy *cphy)
return mdio_read(cphy, 0, VSC8211_INTR_STATUS, &val);
static int vsc8211_autoneg_enable(struct cphy *cphy)
return t3_mdio_change_bits(cphy, 0, MII_BMCR, BMCR_PDOWN | BMCR_ISOLATE,
static int vsc8211_autoneg_restart(struct cphy *cphy)
return t3_mdio_change_bits(cphy, 0, MII_BMCR, BMCR_PDOWN | BMCR_ISOLATE,
static int vsc8211_get_link_status(struct cphy *cphy, int *link_ok,
err = mdio_read(cphy, 0, MII_BMCR, &bmcr);
err = mdio_read(cphy, 0, MII_BMSR, &status);
err = mdio_read(cphy, 0, MII_BMSR, &status);
err = mdio_read(cphy, 0, VSC8211_AUX_CTRL_STAT, &status);
err = mdio_read(cphy, 0, MII_LPA, &lpa);
err = mdio_read(cphy, 0, MII_ADVERTISE, &adv);
static int vsc8211_power_down(struct cphy *cphy, int enable)
return t3_mdio_change_bits(cphy, 0, MII_BMCR, BMCR_PDOWN,
static int vsc8211_intr_handler(struct cphy *cphy)
err = mdio_read(cphy, 0, VSC8211_INTR_STATUS, &cause);
void t3_vsc8211_phy_prep(struct cphy *phy, adapter_t *adapter, int phy_addr,
static int vsc8211_reset(struct cphy *cphy, int wait)
return t3_phy_reset(cphy, 0, 0);
static int vsc8211_intr_enable(struct cphy *cphy)
return mdio_write(cphy, 0, VSC8211_INTR_ENABLE, INTR_MASK);
static int vsc8211_intr_disable(struct cphy *cphy)
return mdio_write(cphy, 0, VSC8211_INTR_ENABLE, 0);