37#define msleep t3_os_sleep
90#define AEL2005_MODDET_IRQ 4
105 for (err = 0; rv->
mmd_addr && !err; rv++) {
132 unsigned int stat, data;
135 (dev_addr << 8) | (1 << 8) | word_addr);
139 for (i = 0; i < 200; i++) {
144 if ((stat & 3) == 1) {
153 phy->
addr, dev_addr, word_addr);
170 (dev_addr << 8) | word_addr);
174 for (i = 0; i < 200; i++) {
183 phy->
addr, dev_addr, word_addr, data);
243 BMCR_PDOWN, enable ? BMCR_PDOWN : 0);
288 int *duplex,
int *fc)
291 unsigned int stat0, stat1, stat2;
303 stat2 = (stat2 >> 12) & 1;
304 if (stat0 & stat1 & stat2)
306 else if (stat0 == 1 && stat1 == 0 && stat2 == 1)
318#ifdef C99_NOT_SUPPORTED
400#ifdef C99_NOT_SUPPORTED
528 static struct reg_val regs[] = {
534 static u16 sr_edc[] = {
815 for (i = 0; i <
ARRAY_SIZE(sr_edc) && !err; i += 2)
825 static struct reg_val regs[] = {
829 static struct reg_val preemphasis[] = {
834 static u16 twinax_edc[] = {
1212 for (i = 0; i <
ARRAY_SIZE(twinax_edc) && !err; i += 2)
1229 if (stat & (1 << 8))
1255 static struct reg_val regs0[] = {
1265 static struct reg_val regs1[] = {
1272 unsigned int lasi_ctrl;
1317 int ret, edc_needed, cause = 0;
1343 if (edc_needed !=
phy->
priv) {
1361#ifdef C99_NOT_SUPPORTED
1410 static struct reg_val regs[] = {
1436 static struct reg_val uCclock40MHz[] = {
1442 static struct reg_val uCclockActivate[] = {
1447 static struct reg_val uCactivate[] = {
1453 static u16 twinax_edc[] = {
1906 for (i = 0; i <
ARRAY_SIZE(twinax_edc) && !err; i += 2)
2029 unsigned int lasi_ctrl;
2074 int ret, edc_needed, cause = 0;
2095 if (edc_needed !=
phy->
priv) {
2113#ifdef C99_NOT_SUPPORTED
2165 int *duplex,
int *fc)
2168 unsigned int stat0, stat1, stat2;
2177 if ((stat0 & (stat1 >> 12) & (stat2 >> 12)) & 1)
2189#ifdef C99_NOT_SUPPORTED
2242 int *speed,
int *duplex,
int *fc)
2245 unsigned int status;
2270#ifdef C99_NOT_SUPPORTED
static __inline uint32_t t3_read_reg(adapter_t *adapter, uint32_t reg_addr)
static int xaui_direct_get_link_status(struct cphy *phy, int *link_state, int *speed, int *duplex, int *fc)
static int set_phy_regs(struct cphy *phy, const struct reg_val *rv)
int t3_ael2005_phy_prep(pinfo_t *pinfo, int phy_addr, const struct mdio_ops *mdio_ops)
static struct reg_val ael2020_reset_regs[]
static int ael2005_intr_handler(struct cphy *phy)
int t3_qt2045_phy_prep(pinfo_t *pinfo, int phy_addr, const struct mdio_ops *mdio_ops)
static int ael2020_reset(struct cphy *phy, int wait)
static struct cphy_ops ael2020_ops
static int ael1002_power_down(struct cphy *phy, int enable)
static int ael2020_intr_clear(struct cphy *phy)
static int xaui_direct_power_down(struct cphy *phy, int enable)
int t3_ael1002_phy_prep(pinfo_t *pinfo, int phy_addr, const struct mdio_ops *mdio_ops)
static int get_link_status_x(struct cphy *phy, int *link_state, int *speed, int *duplex, int *fc)
static int ael2xxx_get_module_type(struct cphy *phy, int delay_ms)
int t3_ael2020_phy_prep(pinfo_t *pinfo, int phy_addr, const struct mdio_ops *mdio_ops)
int t3_ael1006_phy_prep(pinfo_t *pinfo, int phy_addr, const struct mdio_ops *mdio_ops)
static int ael2005_reset(struct cphy *phy, int wait)
static int ael2005_setup_sr_edc(struct cphy *phy)
static int ael2020_get_module_type(struct cphy *phy, int delay_ms)
static int ael_laser_down(struct cphy *phy, int enable)
static int ael2020_setup_sr_edc(struct cphy *phy)
static int ael1002_get_module_type(struct cphy *phy, int delay_ms)
static int ael2020_setup_twinax_edc(struct cphy *phy, int modtype)
static int ael2020_intr_handler(struct cphy *phy)
static struct cphy_ops ael2005_ops
int t3_xaui_direct_phy_prep(pinfo_t *pinfo, int phy_addr, const struct mdio_ops *mdio_ops)
static int xaui_direct_reset(struct cphy *phy, int wait)
static int ael2005_setup_twinax_edc(struct cphy *phy, int modtype)
static int get_phytrans_type(struct cphy *phy)
static struct cphy_ops ael1002_ops
static int get_link_status_r(struct cphy *phy, int *link_state, int *speed, int *duplex, int *fc)
static int ael_i2c_wr(struct cphy *phy, int dev_addr, int word_addr, int data)
static int ael2005_intr_clear(struct cphy *phy)
static int ael1006_reset(struct cphy *phy, int wait)
static struct cphy_ops xaui_direct_ops
static struct cphy_ops qt2045_ops
static int ael1002_reset(struct cphy *phy, int wait)
static int ael2020_intr_disable(struct cphy *phy)
static int ael2005_intr_enable(struct cphy *phy)
static void ael100x_txon(struct cphy *phy)
static int ael_i2c_rd(struct cphy *phy, int dev_addr, int word_addr)
static int ael2020_intr_enable(struct cphy *phy)
static int ael1002_intr_noop(struct cphy *phy)
static int ael2005_get_module_type(struct cphy *phy, int delay_ms)
#define AEL2005_MODDET_IRQ
static struct cphy_ops ael1006_ops
static int ael2005_intr_disable(struct cphy *phy)
static int mdio_read(struct cphy *phy, int mmd, int reg, unsigned int *valp)
void t3_set_reg_field(adapter_t *adap, unsigned int addr, u32 mask, u32 val)
int t3_mdio_change_bits(struct cphy *phy, int mmd, int reg, unsigned int clear, unsigned int set)
#define XGM_REG(reg_addr, idx)
int t3_phy_reset(struct cphy *phy, int mmd, int wait)
int t3_phy_lasi_intr_handler(struct cphy *phy)
@ cphy_cause_module_change
int t3_phy_lasi_intr_clear(struct cphy *phy)
@ phy_modtype_twinax_long
static int mdio_write(struct cphy *phy, int mmd, int reg, unsigned int val)
int t3_phy_lasi_intr_enable(struct cphy *phy)
int t3_phy_lasi_intr_disable(struct cphy *phy)
static void cphy_init(struct cphy *phy, adapter_t *adapter, pinfo_t *pinfo, int phy_addr, struct cphy_ops *phy_ops, const struct mdio_ops *mdio_ops, unsigned int caps, const char *desc)
#define SUPPORTED_10000baseT_Full
#define CH_WARN(adap, fmt,...)
#define A_XGM_SERDES_STAT1
#define A_XGM_SERDES_STAT3
#define A_XGM_SERDES_STAT2
#define A_XGM_SERDES_STAT0
int(* reset)(struct cphy *phy, int wait)
unsigned short clear_bits