#include "common.h"
enum { … };
enum { … };
enum { … };
#define CFG_CHG_INTR_MASK …
#define INTR_MASK …
#define S_ACSR_ACTIPHY_TMR …
#define M_ACSR_ACTIPHY_TMR …
#define V_ACSR_ACTIPHY_TMR(x) …
#define S_ACSR_SPEED …
#define M_ACSR_SPEED …
#define G_ACSR_SPEED(x) …
#define S_ACSR_DUPLEX …
#define F_ACSR_DUPLEX …
#define S_ACSR_ACTIPHY …
#define F_ACSR_ACTIPHY …
static int vsc8211_reset(struct cphy *cphy, int wait)
{ … }
static int vsc8211_intr_enable(struct cphy *cphy)
{ … }
static int vsc8211_intr_disable(struct cphy *cphy)
{ … }
static int vsc8211_intr_clear(struct cphy *cphy)
{ … }
static int vsc8211_autoneg_enable(struct cphy *cphy)
{ … }
static int vsc8211_autoneg_restart(struct cphy *cphy)
{ … }
static int vsc8211_get_link_status(struct cphy *cphy, int *link_ok,
int *speed, int *duplex, int *fc)
{ … }
static int vsc8211_get_link_status_fiber(struct cphy *cphy, int *link_ok,
int *speed, int *duplex, int *fc)
{ … }
#ifdef UNUSED
static int vsc8211_set_automdi(struct cphy *phy, int enable)
{
int err;
err = t3_mdio_write(phy, MDIO_DEVAD_NONE, VSC8211_EXT_PAGE_AXS, 0x52b5);
if (err)
return err;
err = t3_mdio_write(phy, MDIO_DEVAD_NONE, 18, 0x12);
if (err)
return err;
err = t3_mdio_write(phy, MDIO_DEVAD_NONE, 17, enable ? 0x2803 : 0x3003);
if (err)
return err;
err = t3_mdio_write(phy, MDIO_DEVAD_NONE, 16, 0x87fa);
if (err)
return err;
err = t3_mdio_write(phy, MDIO_DEVAD_NONE, VSC8211_EXT_PAGE_AXS, 0);
if (err)
return err;
return 0;
}
int vsc8211_set_speed_duplex(struct cphy *phy, int speed, int duplex)
{
int err;
err = t3_set_phy_speed_duplex(phy, speed, duplex);
if (!err)
err = vsc8211_set_automdi(phy, 1);
return err;
}
#endif
static int vsc8211_power_down(struct cphy *cphy, int enable)
{ … }
static int vsc8211_intr_handler(struct cphy *cphy)
{ … }
static const struct cphy_ops vsc8211_ops = …;
static const struct cphy_ops vsc8211_fiber_ops = …;
int t3_vsc8211_phy_prep(struct cphy *phy, struct adapter *adapter,
int phy_addr, const struct mdio_ops *mdio_ops)
{ … }