/linux-4.4.14/drivers/net/phy/ |
D | phy.c | 90 void phy_print_status(struct phy_device *phydev) in phy_print_status() argument 92 if (phydev->link) { in phy_print_status() 93 netdev_info(phydev->attached_dev, in phy_print_status() 95 phy_speed_to_str(phydev->speed), in phy_print_status() 96 DUPLEX_FULL == phydev->duplex ? "Full" : "Half", in phy_print_status() 97 phydev->pause ? "rx/tx" : "off"); in phy_print_status() 99 netdev_info(phydev->attached_dev, "Link is Down\n"); in phy_print_status() 113 static int phy_clear_interrupt(struct phy_device *phydev) in phy_clear_interrupt() argument 115 if (phydev->drv->ack_interrupt) in phy_clear_interrupt() 116 return phydev->drv->ack_interrupt(phydev); in phy_clear_interrupt() [all …]
|
D | phy_device.c | 44 void phy_device_free(struct phy_device *phydev) in phy_device_free() argument 46 put_device(&phydev->dev); in phy_device_free() 115 static int phy_needs_fixup(struct phy_device *phydev, struct phy_fixup *fixup) in phy_needs_fixup() argument 117 if (strcmp(fixup->bus_id, dev_name(&phydev->dev)) != 0) in phy_needs_fixup() 122 (phydev->phy_id & fixup->phy_uid_mask)) in phy_needs_fixup() 130 static int phy_scan_fixups(struct phy_device *phydev) in phy_scan_fixups() argument 136 if (phy_needs_fixup(phydev, fixup)) { in phy_scan_fixups() 137 int err = fixup->run(phydev); in phy_scan_fixups() 143 phydev->has_fixups = true; in phy_scan_fixups() 380 int phy_device_register(struct phy_device *phydev) in phy_device_register() argument [all …]
|
D | marvell.c | 140 static int marvell_ack_interrupt(struct phy_device *phydev) in marvell_ack_interrupt() argument 145 err = phy_read(phydev, MII_M1011_IEVENT); in marvell_ack_interrupt() 153 static int marvell_config_intr(struct phy_device *phydev) in marvell_config_intr() argument 157 if (phydev->interrupts == PHY_INTERRUPT_ENABLED) in marvell_config_intr() 158 err = phy_write(phydev, MII_M1011_IMASK, MII_M1011_IMASK_INIT); in marvell_config_intr() 160 err = phy_write(phydev, MII_M1011_IMASK, MII_M1011_IMASK_CLEAR); in marvell_config_intr() 165 static int marvell_set_polarity(struct phy_device *phydev, int polarity) in marvell_set_polarity() argument 172 reg = phy_read(phydev, MII_M1011_PHY_SCR); in marvell_set_polarity() 194 err = phy_write(phydev, MII_M1011_PHY_SCR, val); in marvell_set_polarity() 202 static int marvell_config_aneg(struct phy_device *phydev) in marvell_config_aneg() argument [all …]
|
D | lxt.c | 64 static int lxt970_ack_interrupt(struct phy_device *phydev) in lxt970_ack_interrupt() argument 68 err = phy_read(phydev, MII_BMSR); in lxt970_ack_interrupt() 73 err = phy_read(phydev, MII_LXT970_ISR); in lxt970_ack_interrupt() 81 static int lxt970_config_intr(struct phy_device *phydev) in lxt970_config_intr() argument 85 if (phydev->interrupts == PHY_INTERRUPT_ENABLED) in lxt970_config_intr() 86 err = phy_write(phydev, MII_LXT970_IER, MII_LXT970_IER_IEN); in lxt970_config_intr() 88 err = phy_write(phydev, MII_LXT970_IER, 0); in lxt970_config_intr() 93 static int lxt970_config_init(struct phy_device *phydev) in lxt970_config_init() argument 97 err = phy_write(phydev, MII_LXT970_CONFIG, 0); in lxt970_config_init() 103 static int lxt971_ack_interrupt(struct phy_device *phydev) in lxt971_ack_interrupt() argument [all …]
|
D | broadcom.c | 23 #define BRCM_PHY_MODEL(phydev) \ argument 24 ((phydev)->drv->phy_id & (phydev)->drv->phy_id_mask) 26 #define BRCM_PHY_REV(phydev) \ argument 27 ((phydev)->drv->phy_id & ~((phydev)->drv->phy_id_mask)) 33 static int bcm54xx_auxctl_write(struct phy_device *phydev, u16 regnum, u16 val) in bcm54xx_auxctl_write() argument 35 return phy_write(phydev, MII_BCM54XX_AUX_CTL, regnum | val); in bcm54xx_auxctl_write() 39 static int bcm50610_a0_workaround(struct phy_device *phydev) in bcm50610_a0_workaround() argument 43 err = bcm_phy_write_exp(phydev, MII_BCM54XX_EXP_AADJ1CH0, in bcm50610_a0_workaround() 49 err = bcm_phy_write_exp(phydev, MII_BCM54XX_EXP_AADJ1CH3, in bcm50610_a0_workaround() 54 err = bcm_phy_write_exp(phydev, MII_BCM54XX_EXP_EXP75, in bcm50610_a0_workaround() [all …]
|
D | bcm7xxx.c | 48 static void r_rc_cal_reset(struct phy_device *phydev) in r_rc_cal_reset() argument 51 bcm_phy_write_exp(phydev, 0x00b0, 0x0010); in r_rc_cal_reset() 54 bcm_phy_write_exp(phydev, 0x00b0, 0x0000); in r_rc_cal_reset() 57 static int bcm7xxx_28nm_b0_afe_config_init(struct phy_device *phydev) in bcm7xxx_28nm_b0_afe_config_init() argument 62 bcm_phy_write_misc(phydev, PLL_PLLCTRL_1, 0x0048); in bcm7xxx_28nm_b0_afe_config_init() 65 bcm_phy_write_misc(phydev, PLL_PLLCTRL_2, 0x021b); in bcm7xxx_28nm_b0_afe_config_init() 70 bcm_phy_write_misc(phydev, PLL_PLLCTRL_4, 0x0e20); in bcm7xxx_28nm_b0_afe_config_init() 73 bcm_phy_write_misc(phydev, DSP_TAP10, 0x690b); in bcm7xxx_28nm_b0_afe_config_init() 76 phy_write(phydev, MII_BRCM_CORE_BASE1E, 0xd); in bcm7xxx_28nm_b0_afe_config_init() 78 r_rc_cal_reset(phydev); in bcm7xxx_28nm_b0_afe_config_init() [all …]
|
D | bcm-phy-lib.c | 24 int bcm_phy_write_exp(struct phy_device *phydev, u16 reg, u16 val) in bcm_phy_write_exp() argument 28 rc = phy_write(phydev, MII_BCM54XX_EXP_SEL, reg); in bcm_phy_write_exp() 32 return phy_write(phydev, MII_BCM54XX_EXP_DATA, val); in bcm_phy_write_exp() 36 int bcm_phy_read_exp(struct phy_device *phydev, u16 reg) in bcm_phy_read_exp() argument 40 val = phy_write(phydev, MII_BCM54XX_EXP_SEL, reg); in bcm_phy_read_exp() 44 val = phy_read(phydev, MII_BCM54XX_EXP_DATA); in bcm_phy_read_exp() 47 phy_write(phydev, MII_BCM54XX_EXP_SEL, 0); in bcm_phy_read_exp() 53 int bcm_phy_write_misc(struct phy_device *phydev, in bcm_phy_write_misc() argument 59 rc = phy_write(phydev, MII_BCM54XX_AUX_CTL, in bcm_phy_write_misc() 64 tmp = phy_read(phydev, MII_BCM54XX_AUX_CTL); in bcm_phy_write_misc() [all …]
|
D | at803x.c | 65 static void at803x_context_save(struct phy_device *phydev, in at803x_context_save() argument 68 context->bmcr = phy_read(phydev, MII_BMCR); in at803x_context_save() 69 context->advertise = phy_read(phydev, MII_ADVERTISE); in at803x_context_save() 70 context->control1000 = phy_read(phydev, MII_CTRL1000); in at803x_context_save() 71 context->int_enable = phy_read(phydev, AT803X_INTR_ENABLE); in at803x_context_save() 72 context->smart_speed = phy_read(phydev, AT803X_SMART_SPEED); in at803x_context_save() 73 context->led_control = phy_read(phydev, AT803X_LED_CONTROL); in at803x_context_save() 77 static void at803x_context_restore(struct phy_device *phydev, in at803x_context_restore() argument 80 phy_write(phydev, MII_BMCR, context->bmcr); in at803x_context_restore() 81 phy_write(phydev, MII_ADVERTISE, context->advertise); in at803x_context_restore() [all …]
|
D | icplus.c | 48 static int ip175c_config_init(struct phy_device *phydev) in ip175c_config_init() argument 56 err = mdiobus_write(phydev->bus, 30, 0, 0x175c); in ip175c_config_init() 61 err = mdiobus_read(phydev->bus, 30, 0); in ip175c_config_init() 67 err = mdiobus_write(phydev->bus, 29, 31, 0x175c); in ip175c_config_init() 72 err = mdiobus_write(phydev->bus, 29, 22, 0x420); in ip175c_config_init() 78 err = mdiobus_write(phydev->bus, i, in ip175c_config_init() 85 err = mdiobus_read(phydev->bus, i, MII_BMCR); in ip175c_config_init() 92 if (phydev->addr != 4) { in ip175c_config_init() 93 phydev->state = PHY_RUNNING; in ip175c_config_init() 94 phydev->speed = SPEED_100; in ip175c_config_init() [all …]
|
D | national.c | 59 static u8 ns_exp_read(struct phy_device *phydev, u16 reg) in ns_exp_read() argument 61 phy_write(phydev, NS_EXP_MEM_ADD, reg); in ns_exp_read() 62 return phy_read(phydev, NS_EXP_MEM_DATA); in ns_exp_read() 65 static void ns_exp_write(struct phy_device *phydev, u16 reg, u8 data) in ns_exp_write() argument 67 phy_write(phydev, NS_EXP_MEM_ADD, reg); in ns_exp_write() 68 phy_write(phydev, NS_EXP_MEM_DATA, data); in ns_exp_write() 71 static int ns_config_intr(struct phy_device *phydev) in ns_config_intr() argument 75 if (phydev->interrupts == PHY_INTERRUPT_ENABLED) in ns_config_intr() 76 err = phy_write(phydev, DP83865_INT_MASK, in ns_config_intr() 79 err = phy_write(phydev, DP83865_INT_MASK, 0); in ns_config_intr() [all …]
|
D | bcm87xx.c | 37 static int bcm87xx_of_reg_init(struct phy_device *phydev) in bcm87xx_of_reg_init() argument 43 if (!phydev->dev.of_node) in bcm87xx_of_reg_init() 46 paddr = of_get_property(phydev->dev.of_node, in bcm87xx_of_reg_init() 64 val = phy_read(phydev, regnum); in bcm87xx_of_reg_init() 73 ret = phy_write(phydev, regnum, val); in bcm87xx_of_reg_init() 81 static int bcm87xx_of_reg_init(struct phy_device *phydev) in bcm87xx_of_reg_init() argument 87 static int bcm87xx_config_init(struct phy_device *phydev) in bcm87xx_config_init() argument 89 phydev->supported = SUPPORTED_10000baseR_FEC; in bcm87xx_config_init() 90 phydev->advertising = ADVERTISED_10000baseR_FEC; in bcm87xx_config_init() 91 phydev->state = PHY_NOLINK; in bcm87xx_config_init() [all …]
|
D | dp83867.c | 70 static int dp83867_ack_interrupt(struct phy_device *phydev) in dp83867_ack_interrupt() argument 72 int err = phy_read(phydev, MII_DP83867_ISR); in dp83867_ack_interrupt() 80 static int dp83867_config_intr(struct phy_device *phydev) in dp83867_config_intr() argument 84 if (phydev->interrupts == PHY_INTERRUPT_ENABLED) { in dp83867_config_intr() 85 micr_status = phy_read(phydev, MII_DP83867_MICR); in dp83867_config_intr() 95 return phy_write(phydev, MII_DP83867_MICR, micr_status); in dp83867_config_intr() 99 return phy_write(phydev, MII_DP83867_MICR, micr_status); in dp83867_config_intr() 103 static int dp83867_of_init(struct phy_device *phydev) in dp83867_of_init() argument 105 struct dp83867_private *dp83867 = phydev->priv; in dp83867_of_init() 106 struct device *dev = &phydev->dev; in dp83867_of_init() [all …]
|
D | micrel.c | 122 static int kszphy_extended_write(struct phy_device *phydev, in kszphy_extended_write() argument 125 phy_write(phydev, MII_KSZPHY_EXTREG, KSZPHY_EXTREG_WRITE | regnum); in kszphy_extended_write() 126 return phy_write(phydev, MII_KSZPHY_EXTREG_WRITE, val); in kszphy_extended_write() 129 static int kszphy_extended_read(struct phy_device *phydev, in kszphy_extended_read() argument 132 phy_write(phydev, MII_KSZPHY_EXTREG, regnum); in kszphy_extended_read() 133 return phy_read(phydev, MII_KSZPHY_EXTREG_READ); in kszphy_extended_read() 136 static int kszphy_ack_interrupt(struct phy_device *phydev) in kszphy_ack_interrupt() argument 141 rc = phy_read(phydev, MII_KSZPHY_INTCS); in kszphy_ack_interrupt() 146 static int kszphy_config_intr(struct phy_device *phydev) in kszphy_config_intr() argument 148 const struct kszphy_type *type = phydev->drv->driver_data; in kszphy_config_intr() [all …]
|
D | aquantia.c | 31 static int aquantia_config_aneg(struct phy_device *phydev) in aquantia_config_aneg() argument 33 phydev->supported = PHY_AQUANTIA_FEATURES; in aquantia_config_aneg() 34 phydev->advertising = phydev->supported; in aquantia_config_aneg() 39 static int aquantia_aneg_done(struct phy_device *phydev) in aquantia_aneg_done() argument 43 reg = phy_read_mmd(phydev, MDIO_MMD_AN, MDIO_STAT1); in aquantia_aneg_done() 47 static int aquantia_config_intr(struct phy_device *phydev) in aquantia_config_intr() argument 51 if (phydev->interrupts == PHY_INTERRUPT_ENABLED) { in aquantia_config_intr() 52 err = phy_write_mmd(phydev, MDIO_MMD_AN, 0xd401, 1); in aquantia_config_intr() 56 err = phy_write_mmd(phydev, MDIO_MMD_VEND1, 0xff00, 1); in aquantia_config_intr() 60 err = phy_write_mmd(phydev, MDIO_MMD_VEND1, 0xff01, 0x1001); in aquantia_config_intr() [all …]
|
D | mdio_bus.c | 199 struct phy_device *phydev) in of_mdiobus_link_phydev() argument 201 struct device *dev = &phydev->dev; in of_mdiobus_link_phydev() 225 if (addr == phydev->addr) { in of_mdiobus_link_phydev() 233 struct phy_device *phydev) in of_mdiobus_link_phydev() argument 281 struct phy_device *phydev; in __mdiobus_register() local 283 phydev = mdiobus_scan(bus, i); in __mdiobus_register() 284 if (IS_ERR(phydev)) { in __mdiobus_register() 285 err = PTR_ERR(phydev); in __mdiobus_register() 297 struct phy_device *phydev = bus->phy_map[i]; in __mdiobus_register() local 298 if (phydev) { in __mdiobus_register() [all …]
|
D | microchip.c | 33 static int lan88xx_phy_config_intr(struct phy_device *phydev) in lan88xx_phy_config_intr() argument 37 if (phydev->interrupts == PHY_INTERRUPT_ENABLED) { in lan88xx_phy_config_intr() 39 rc = phy_write(phydev, LAN88XX_INT_MASK, 0x7FFF); in lan88xx_phy_config_intr() 40 rc = phy_read(phydev, LAN88XX_INT_STS); in lan88xx_phy_config_intr() 41 rc = phy_write(phydev, LAN88XX_INT_MASK, in lan88xx_phy_config_intr() 45 rc = phy_write(phydev, LAN88XX_INT_MASK, 0); in lan88xx_phy_config_intr() 51 static int lan88xx_phy_ack_interrupt(struct phy_device *phydev) in lan88xx_phy_ack_interrupt() argument 53 int rc = phy_read(phydev, LAN88XX_INT_STS); in lan88xx_phy_ack_interrupt() 58 int lan88xx_suspend(struct phy_device *phydev) in lan88xx_suspend() argument 60 struct lan88xx_priv *priv = phydev->priv; in lan88xx_suspend() [all …]
|
D | vitesse.c | 78 static int vsc824x_add_skew(struct phy_device *phydev) in vsc824x_add_skew() argument 83 extcon = phy_read(phydev, MII_VSC8244_EXT_CON1); in vsc824x_add_skew() 94 err = phy_write(phydev, MII_VSC8244_EXT_CON1, extcon); in vsc824x_add_skew() 99 static int vsc824x_config_init(struct phy_device *phydev) in vsc824x_config_init() argument 103 err = phy_write(phydev, MII_VSC8244_AUX_CONSTAT, in vsc824x_config_init() 108 if (phydev->interface == PHY_INTERFACE_MODE_RGMII_ID) in vsc824x_config_init() 109 err = vsc824x_add_skew(phydev); in vsc824x_config_init() 114 static int vsc824x_ack_interrupt(struct phy_device *phydev) in vsc824x_ack_interrupt() argument 122 if (phydev->interrupts == PHY_INTERRUPT_ENABLED) in vsc824x_ack_interrupt() 123 err = phy_read(phydev, MII_VSC8244_ISTAT); in vsc824x_ack_interrupt() [all …]
|
D | bcm-cygnus.c | 24 static int bcm_cygnus_afe_config(struct phy_device *phydev) in bcm_cygnus_afe_config() argument 29 rc = phy_write(phydev, MII_BCM54XX_AUX_CTL, 0x0c30); in bcm_cygnus_afe_config() 34 rc = bcm_phy_write_misc(phydev, 0x39, 0x01, 0xA7C8); in bcm_cygnus_afe_config() 39 rc = bcm_phy_write_misc(phydev, 0x3A, 0x00, 0x0803); in bcm_cygnus_afe_config() 44 rc = bcm_phy_write_misc(phydev, 0x3A, 0x01, 0xA740); in bcm_cygnus_afe_config() 49 rc = bcm_phy_write_misc(phydev, 0x3A, 0x03, 0x8400); in bcm_cygnus_afe_config() 54 rc = bcm_phy_write_misc(phydev, 0x3B, 0x00, 0x0004); in bcm_cygnus_afe_config() 59 rc = phy_write(phydev, MII_BRCM_CORE_BASE1E, 0x02); in bcm_cygnus_afe_config() 64 rc = bcm_phy_write_exp(phydev, MII_BRCM_CORE_EXPB1, 0x10); in bcm_cygnus_afe_config() 69 rc = bcm_phy_write_exp(phydev, MII_BRCM_CORE_EXPB0, 0x10); in bcm_cygnus_afe_config() [all …]
|
D | teranetics.c | 37 static int teranetics_config_init(struct phy_device *phydev) in teranetics_config_init() argument 39 phydev->supported = SUPPORTED_10000baseT_Full; in teranetics_config_init() 40 phydev->advertising = SUPPORTED_10000baseT_Full; in teranetics_config_init() 45 static int teranetics_soft_reset(struct phy_device *phydev) in teranetics_soft_reset() argument 50 static int teranetics_aneg_done(struct phy_device *phydev) in teranetics_aneg_done() argument 57 if (!phy_read_mmd(phydev, MDIO_MMD_VEND1, 93)) { in teranetics_aneg_done() 58 reg = phy_read_mmd(phydev, MDIO_MMD_AN, MDIO_STAT1); in teranetics_aneg_done() 65 static int teranetics_config_aneg(struct phy_device *phydev) in teranetics_config_aneg() argument 70 static int teranetics_read_status(struct phy_device *phydev) in teranetics_read_status() argument 74 phydev->link = 1; in teranetics_read_status() [all …]
|
D | realtek.c | 36 static int rtl821x_ack_interrupt(struct phy_device *phydev) in rtl821x_ack_interrupt() argument 40 err = phy_read(phydev, RTL821x_INSR); in rtl821x_ack_interrupt() 45 static int rtl8211f_ack_interrupt(struct phy_device *phydev) in rtl8211f_ack_interrupt() argument 49 phy_write(phydev, RTL8211F_PAGE_SELECT, 0xa43); in rtl8211f_ack_interrupt() 50 err = phy_read(phydev, RTL8211F_INSR); in rtl8211f_ack_interrupt() 52 phy_write(phydev, RTL8211F_PAGE_SELECT, 0x0); in rtl8211f_ack_interrupt() 57 static int rtl8211b_config_intr(struct phy_device *phydev) in rtl8211b_config_intr() argument 61 if (phydev->interrupts == PHY_INTERRUPT_ENABLED) in rtl8211b_config_intr() 62 err = phy_write(phydev, RTL821x_INER, in rtl8211b_config_intr() 65 err = phy_write(phydev, RTL821x_INER, 0); in rtl8211b_config_intr() [all …]
|
D | smsc.c | 27 static int smsc_phy_config_intr(struct phy_device *phydev) in smsc_phy_config_intr() argument 29 int rc = phy_write (phydev, MII_LAN83C185_IM, in smsc_phy_config_intr() 30 ((PHY_INTERRUPT_ENABLED == phydev->interrupts) in smsc_phy_config_intr() 37 static int smsc_phy_ack_interrupt(struct phy_device *phydev) in smsc_phy_ack_interrupt() argument 39 int rc = phy_read (phydev, MII_LAN83C185_ISF); in smsc_phy_ack_interrupt() 44 static int smsc_phy_config_init(struct phy_device *phydev) in smsc_phy_config_init() argument 47 struct device *dev __maybe_unused = &phydev->dev; in smsc_phy_config_init() 49 int rc = phy_read(phydev, MII_LAN83C185_CTRL_STATUS); in smsc_phy_config_init() 60 rc = phy_write(phydev, MII_LAN83C185_CTRL_STATUS, in smsc_phy_config_init() 66 return smsc_phy_ack_interrupt(phydev); in smsc_phy_config_init() [all …]
|
D | bcm-phy-lib.h | 19 int bcm_phy_write_exp(struct phy_device *phydev, u16 reg, u16 val); 20 int bcm_phy_read_exp(struct phy_device *phydev, u16 reg); 22 int bcm_phy_write_misc(struct phy_device *phydev, 24 int bcm_phy_read_misc(struct phy_device *phydev, 27 int bcm_phy_write_shadow(struct phy_device *phydev, u16 shadow, 29 int bcm_phy_read_shadow(struct phy_device *phydev, u16 shadow); 31 int bcm_phy_ack_intr(struct phy_device *phydev); 32 int bcm_phy_config_intr(struct phy_device *phydev); 34 int bcm_phy_enable_apd(struct phy_device *phydev, bool dll_pwr_down); 36 int bcm_phy_enable_eee(struct phy_device *phydev);
|
D | dp83640.c | 113 struct phy_device *phydev; member 229 static int ext_read(struct phy_device *phydev, int page, u32 regnum) in ext_read() argument 231 struct dp83640_private *dp83640 = phydev->priv; in ext_read() 235 broadcast_write(phydev->bus, PAGESEL, page); in ext_read() 238 val = phy_read(phydev, regnum); in ext_read() 244 static void ext_write(int broadcast, struct phy_device *phydev, in ext_write() argument 247 struct dp83640_private *dp83640 = phydev->priv; in ext_write() 250 broadcast_write(phydev->bus, PAGESEL, page); in ext_write() 254 broadcast_write(phydev->bus, regnum, val); in ext_write() 256 phy_write(phydev, regnum, val); in ext_write() [all …]
|
D | davicom.c | 66 static int dm9161_config_intr(struct phy_device *phydev) in dm9161_config_intr() argument 70 temp = phy_read(phydev, MII_DM9161_INTR); in dm9161_config_intr() 75 if (PHY_INTERRUPT_ENABLED == phydev->interrupts) in dm9161_config_intr() 80 temp = phy_write(phydev, MII_DM9161_INTR, temp); in dm9161_config_intr() 85 static int dm9161_config_aneg(struct phy_device *phydev) in dm9161_config_aneg() argument 90 err = phy_write(phydev, MII_BMCR, BMCR_ISOLATE); in dm9161_config_aneg() 96 err = genphy_config_aneg(phydev); in dm9161_config_aneg() 104 static int dm9161_config_init(struct phy_device *phydev) in dm9161_config_init() argument 109 err = phy_write(phydev, MII_BMCR, BMCR_ISOLATE); in dm9161_config_init() 114 switch (phydev->interface) { in dm9161_config_init() [all …]
|
D | et1011c.c | 52 static int et1011c_config_aneg(struct phy_device *phydev) in et1011c_config_aneg() argument 55 ctl = phy_read(phydev, MII_BMCR); in et1011c_config_aneg() 61 phy_write(phydev, MII_BMCR, ctl | BMCR_RESET); in et1011c_config_aneg() 63 return genphy_config_aneg(phydev); in et1011c_config_aneg() 66 static int et1011c_read_status(struct phy_device *phydev) in et1011c_read_status() argument 71 ret = genphy_read_status(phydev); in et1011c_read_status() 73 if (speed != phydev->speed) { in et1011c_read_status() 74 speed = phydev->speed; in et1011c_read_status() 75 val = phy_read(phydev, ET1011C_STATUS_REG); in et1011c_read_status() 78 val = phy_read(phydev, ET1011C_CONFIG_REG); in et1011c_read_status() [all …]
|
D | qsemi.c | 63 static int qs6612_config_init(struct phy_device *phydev) in qs6612_config_init() argument 76 return phy_write(phydev, MII_QS6612_PCR, 0x0dc0); in qs6612_config_init() 79 static int qs6612_ack_interrupt(struct phy_device *phydev) in qs6612_ack_interrupt() argument 83 err = phy_read(phydev, MII_QS6612_ISR); in qs6612_ack_interrupt() 88 err = phy_read(phydev, MII_BMSR); in qs6612_ack_interrupt() 93 err = phy_read(phydev, MII_EXPANSION); in qs6612_ack_interrupt() 101 static int qs6612_config_intr(struct phy_device *phydev) in qs6612_config_intr() argument 104 if (phydev->interrupts == PHY_INTERRUPT_ENABLED) in qs6612_config_intr() 105 err = phy_write(phydev, MII_QS6612_IMR, in qs6612_config_intr() 108 err = phy_write(phydev, MII_QS6612_IMR, 0); in qs6612_config_intr()
|
D | ste10Xp.c | 35 static int ste10Xp_config_init(struct phy_device *phydev) in ste10Xp_config_init() argument 40 value = phy_read(phydev, MII_BMCR); in ste10Xp_config_init() 45 err = phy_write(phydev, MII_BMCR, value); in ste10Xp_config_init() 50 value = phy_read(phydev, MII_BMCR); in ste10Xp_config_init() 56 static int ste10Xp_config_intr(struct phy_device *phydev) in ste10Xp_config_intr() argument 60 if (phydev->interrupts == PHY_INTERRUPT_ENABLED) { in ste10Xp_config_intr() 62 err = phy_write(phydev, MII_XIE, MII_XIE_DEFAULT_MASK); in ste10Xp_config_intr() 65 value = phy_read(phydev, MII_XCIIS); in ste10Xp_config_intr() 70 err = phy_write(phydev, MII_XIE, 0); in ste10Xp_config_intr() 75 static int ste10Xp_ack_interrupt(struct phy_device *phydev) in ste10Xp_ack_interrupt() argument [all …]
|
D | amd.c | 32 static int am79c_ack_interrupt(struct phy_device *phydev) in am79c_ack_interrupt() argument 36 err = phy_read(phydev, MII_BMSR); in am79c_ack_interrupt() 40 err = phy_read(phydev, MII_AM79C_IR); in am79c_ack_interrupt() 47 static int am79c_config_init(struct phy_device *phydev) in am79c_config_init() argument 52 static int am79c_config_intr(struct phy_device *phydev) in am79c_config_intr() argument 56 if (phydev->interrupts == PHY_INTERRUPT_ENABLED) in am79c_config_intr() 57 err = phy_write(phydev, MII_AM79C_IR, MII_AM79C_IR_IMASK_INIT); in am79c_config_intr() 59 err = phy_write(phydev, MII_AM79C_IR, 0); in am79c_config_intr()
|
D | cicada.c | 68 static int cis820x_config_init(struct phy_device *phydev) in cis820x_config_init() argument 72 err = phy_write(phydev, MII_CIS8201_AUX_CONSTAT, in cis820x_config_init() 78 err = phy_write(phydev, MII_CIS8201_EXT_CON1, in cis820x_config_init() 84 static int cis820x_ack_interrupt(struct phy_device *phydev) in cis820x_ack_interrupt() argument 86 int err = phy_read(phydev, MII_CIS8201_ISTAT); in cis820x_ack_interrupt() 91 static int cis820x_config_intr(struct phy_device *phydev) in cis820x_config_intr() argument 95 if (phydev->interrupts == PHY_INTERRUPT_ENABLED) in cis820x_config_intr() 96 err = phy_write(phydev, MII_CIS8201_IMASK, in cis820x_config_intr() 99 err = phy_write(phydev, MII_CIS8201_IMASK, 0); in cis820x_config_intr()
|
D | dp83848.c | 39 static int dp83848_ack_interrupt(struct phy_device *phydev) in dp83848_ack_interrupt() argument 41 int err = phy_read(phydev, DP83848_MISR); in dp83848_ack_interrupt() 46 static int dp83848_config_intr(struct phy_device *phydev) in dp83848_config_intr() argument 50 if (phydev->interrupts == PHY_INTERRUPT_ENABLED) { in dp83848_config_intr() 51 err = phy_write(phydev, DP83848_MICR, in dp83848_config_intr() 57 return phy_write(phydev, DP83848_MISR, in dp83848_config_intr() 64 return phy_write(phydev, DP83848_MICR, 0x0); in dp83848_config_intr()
|
D | fixed_phy.c | 38 struct phy_device *phydev; member 172 fp->link_update(fp->phydev->attached_dev, in fixed_mdio_read() 194 int fixed_phy_set_link_update(struct phy_device *phydev, in fixed_phy_set_link_update() argument 201 if (!phydev || !phydev->bus) in fixed_phy_set_link_update() 205 if (fp->addr == phydev->addr) { in fixed_phy_set_link_update() 207 fp->phydev = phydev; in fixed_phy_set_link_update() 216 int fixed_phy_update_state(struct phy_device *phydev, in fixed_phy_update_state() argument 223 if (!phydev || phydev->bus != fmb->mii_bus) in fixed_phy_update_state() 227 if (fp->addr == phydev->addr) { in fixed_phy_update_state()
|
D | bcm63xx.c | 24 static int bcm63xx_config_init(struct phy_device *phydev) in bcm63xx_config_init() argument 28 reg = phy_read(phydev, MII_BCM63XX_IR); in bcm63xx_config_init() 34 err = phy_write(phydev, MII_BCM63XX_IR, reg); in bcm63xx_config_init() 43 return phy_write(phydev, MII_BCM63XX_IR, reg); in bcm63xx_config_init()
|
/linux-4.4.14/include/linux/ |
D | phy.h | 472 int (*soft_reset)(struct phy_device *phydev); 478 int (*config_init)(struct phy_device *phydev); 484 int (*probe)(struct phy_device *phydev); 487 int (*suspend)(struct phy_device *phydev); 488 int (*resume)(struct phy_device *phydev); 496 int (*config_aneg)(struct phy_device *phydev); 499 int (*aneg_done)(struct phy_device *phydev); 502 int (*read_status)(struct phy_device *phydev); 505 int (*ack_interrupt)(struct phy_device *phydev); 508 int (*config_intr)(struct phy_device *phydev); [all …]
|
D | phy_fixed.h | 23 extern int fixed_phy_set_link_update(struct phy_device *phydev, 26 extern int fixed_phy_update_state(struct phy_device *phydev, 47 static inline int fixed_phy_set_link_update(struct phy_device *phydev, in fixed_phy_set_link_update() argument 53 static inline int fixed_phy_update_state(struct phy_device *phydev, in fixed_phy_update_state() argument
|
D | netdevice.h | 1799 struct phy_device *phydev; member
|
/linux-4.4.14/net/core/ |
D | timestamping.c | 28 if (likely(skb->dev && skb->dev->phydev && in classify() 29 skb->dev->phydev->drv)) in classify() 37 struct phy_device *phydev; in skb_clone_tx_timestamp() local 48 phydev = skb->dev->phydev; in skb_clone_tx_timestamp() 49 if (likely(phydev->drv->txtstamp)) { in skb_clone_tx_timestamp() 53 phydev->drv->txtstamp(phydev, clone, type); in skb_clone_tx_timestamp() 60 struct phy_device *phydev; in skb_defer_rx_timestamp() local 63 if (!skb->dev || !skb->dev->phydev || !skb->dev->phydev->drv) in skb_defer_rx_timestamp() 78 phydev = skb->dev->phydev; in skb_defer_rx_timestamp() 79 if (likely(phydev->drv->rxtstamp)) in skb_defer_rx_timestamp() [all …]
|
D | ethtool.c | 1587 struct phy_device *phydev = dev->phydev; in ethtool_get_ts_info() local 1592 if (phydev && phydev->drv && phydev->drv->ts_info) { in ethtool_get_ts_info() 1593 err = phydev->drv->ts_info(phydev, &info); in ethtool_get_ts_info() 1616 struct phy_device *phydev = dev->phydev; in __ethtool_get_module_info() local 1618 if (phydev && phydev->drv && phydev->drv->module_info) in __ethtool_get_module_info() 1619 return phydev->drv->module_info(phydev, modinfo); in __ethtool_get_module_info() 1650 struct phy_device *phydev = dev->phydev; in __ethtool_get_module_eeprom() local 1652 if (phydev && phydev->drv && phydev->drv->module_eeprom) in __ethtool_get_module_eeprom() 1653 return phydev->drv->module_eeprom(phydev, ee, data); in __ethtool_get_module_eeprom()
|
/linux-4.4.14/drivers/net/ethernet/broadcom/genet/ |
D | bcmmii.c | 89 struct phy_device *phydev = priv->phydev; in bcmgenet_mii_setup() local 93 if (priv->old_link != phydev->link) { in bcmgenet_mii_setup() 95 priv->old_link = phydev->link; in bcmgenet_mii_setup() 98 if (phydev->link) { in bcmgenet_mii_setup() 100 if (priv->old_speed != phydev->speed) { in bcmgenet_mii_setup() 102 priv->old_speed = phydev->speed; in bcmgenet_mii_setup() 105 if (priv->old_duplex != phydev->duplex) { in bcmgenet_mii_setup() 107 priv->old_duplex = phydev->duplex; in bcmgenet_mii_setup() 110 if (priv->old_pause != phydev->pause) { in bcmgenet_mii_setup() 112 priv->old_pause = phydev->pause; in bcmgenet_mii_setup() [all …]
|
D | bcmgenet.c | 461 if (!priv->phydev) in bcmgenet_get_settings() 464 return phy_ethtool_gset(priv->phydev, cmd); in bcmgenet_get_settings() 475 if (!priv->phydev) in bcmgenet_set_settings() 478 return phy_ethtool_sset(priv->phydev, cmd); in bcmgenet_set_settings() 940 return phy_ethtool_get_eee(priv->phydev, e); in bcmgenet_get_eee() 957 ret = phy_init_eee(priv->phydev, 0); in bcmgenet_set_eee() 967 return phy_ethtool_set_eee(priv->phydev, e); in bcmgenet_set_eee() 974 return genphy_restart_aneg(priv->phydev); in bcmgenet_nway_reset() 1006 phy_detach(priv->phydev); in bcmgenet_power_down() 1077 if (!priv->phydev) in bcmgenet_ioctl() [all …]
|
D | bcmgenet.h | 594 struct phy_device *phydev; member
|
/linux-4.4.14/drivers/staging/octeon/ |
D | ethernet-mdio.c | 41 if (priv->phydev) in cvm_oct_get_settings() 42 return phy_ethtool_gset(priv->phydev, cmd); in cvm_oct_get_settings() 54 if (priv->phydev) in cvm_oct_set_settings() 55 return phy_ethtool_sset(priv->phydev, cmd); in cvm_oct_set_settings() 67 if (priv->phydev) in cvm_oct_nway_reset() 68 return phy_start_aneg(priv->phydev); in cvm_oct_nway_reset() 96 if (!priv->phydev) in cvm_oct_ioctl() 99 return phy_mii_ioctl(priv->phydev, rq, cmd); in cvm_oct_ioctl() 121 if (priv->last_link != priv->phydev->link) { in cvm_oct_adjust_link() 122 priv->last_link = priv->phydev->link; in cvm_oct_adjust_link() [all …]
|
D | ethernet-rgmii.c | 71 int use_global_register_lock = (priv->phydev == NULL); in cvm_oct_rgmii_poll() 81 mutex_lock(&priv->phydev->bus->mdio_lock); in cvm_oct_rgmii_poll() 116 mutex_unlock(&priv->phydev->bus->mdio_lock); in cvm_oct_rgmii_poll() 127 if (priv->phydev == NULL) { in cvm_oct_rgmii_poll() 135 mutex_unlock(&priv->phydev->bus->mdio_lock); in cvm_oct_rgmii_poll() 137 if (priv->phydev == NULL) { in cvm_oct_rgmii_poll()
|
D | ethernet.c | 479 if (priv->phydev) in cvm_oct_common_uninit() 480 phy_disconnect(priv->phydev); in cvm_oct_common_uninit() 504 if (priv->phydev) { in cvm_oct_common_open() 505 int r = phy_read_status(priv->phydev); in cvm_oct_common_open() 507 if (r == 0 && priv->phydev->link == 0) in cvm_oct_common_open()
|
D | octeon-ethernet.h | 43 struct phy_device *phydev; member
|
/linux-4.4.14/drivers/net/usb/ |
D | ax88172a.c | 32 struct phy_device *phydev; member 59 if (!net->phydev) in ax88172a_ioctl() 62 return phy_mii_ioctl(net->phydev, rq, cmd); in ax88172a_ioctl() 68 struct phy_device *phydev = netdev->phydev; in ax88172a_adjust_link() local 73 if (phydev->link) { in ax88172a_adjust_link() 76 if (phydev->duplex == DUPLEX_HALF) in ax88172a_adjust_link() 79 if (phydev->speed != SPEED_100) in ax88172a_adjust_link() 87 phydev->speed, phydev->duplex, mode); in ax88172a_adjust_link() 88 phy_print_status(phydev); in ax88172a_adjust_link() 166 if (!net->phydev) in ax88172a_get_settings() [all …]
|
D | lan78xx.c | 835 struct phy_device *phydev = dev->net->phydev; in lan78xx_link_reset() local 841 ret = phy_read(phydev, LAN88XX_INT_STS); in lan78xx_link_reset() 850 phy_read_status(phydev); in lan78xx_link_reset() 852 if (!phydev->link && dev->link_on) { in lan78xx_link_reset() 864 } else if (phydev->link && !dev->link_on) { in lan78xx_link_reset() 867 phy_ethtool_gset(phydev, &ecmd); in lan78xx_link_reset() 869 ret = phy_read(phydev, LAN88XX_INT_STS); in lan78xx_link_reset() 890 ladv = phy_read(phydev, MII_ADVERTISE); in lan78xx_link_reset() 894 radv = phy_read(phydev, MII_LPA); in lan78xx_link_reset() 1067 phy_ethtool_set_wol(netdev->phydev, wol); in lan78xx_set_wol() [all …]
|
/linux-4.4.14/drivers/net/ethernet/ |
D | dnet.c | 176 struct phy_device *phydev = bp->phy_dev; in dnet_handle_link_change() local 187 if (phydev->link) { in dnet_handle_link_change() 188 if (bp->duplex != phydev->duplex) { in dnet_handle_link_change() 189 if (phydev->duplex) in dnet_handle_link_change() 196 bp->duplex = phydev->duplex; in dnet_handle_link_change() 200 if (bp->speed != phydev->speed) { in dnet_handle_link_change() 202 switch (phydev->speed) { in dnet_handle_link_change() 214 phydev->speed); in dnet_handle_link_change() 217 bp->speed = phydev->speed; in dnet_handle_link_change() 221 if (phydev->link != bp->link) { in dnet_handle_link_change() [all …]
|
D | lantiq_etop.c | 105 struct phy_device *phydev; member 312 return phy_ethtool_gset(priv->phydev, cmd); in ltq_etop_get_settings() 320 return phy_ethtool_sset(priv->phydev, cmd); in ltq_etop_set_settings() 328 return phy_start_aneg(priv->phydev); in ltq_etop_nway_reset() 378 struct phy_device *phydev = NULL; in ltq_etop_mdio_probe() local 383 phydev = priv->mii_bus->phy_map[phy_addr]; in ltq_etop_mdio_probe() 388 if (!phydev) { in ltq_etop_mdio_probe() 393 phydev = phy_connect(dev, dev_name(&phydev->dev), in ltq_etop_mdio_probe() 396 if (IS_ERR(phydev)) { in ltq_etop_mdio_probe() 398 return PTR_ERR(phydev); in ltq_etop_mdio_probe() [all …]
|
D | ethoc.c | 903 struct phy_device *phydev = priv->phy; in ethoc_get_settings() local 905 if (!phydev) in ethoc_get_settings() 908 return phy_ethtool_gset(phydev, cmd); in ethoc_get_settings() 914 struct phy_device *phydev = priv->phy; in ethoc_set_settings() local 916 if (!phydev) in ethoc_set_settings() 919 return phy_ethtool_sset(phydev, cmd); in ethoc_set_settings()
|
/linux-4.4.14/drivers/net/ethernet/freescale/ |
D | ucc_geth_ethtool.c | 111 struct phy_device *phydev = ugeth->phydev; in uec_get_settings() local 114 if (!phydev) in uec_get_settings() 120 return phy_ethtool_gset(phydev, ecmd); in uec_get_settings() 127 struct phy_device *phydev = ugeth->phydev; in uec_set_settings() local 129 if (!phydev) in uec_set_settings() 132 return phy_ethtool_sset(phydev, ecmd); in uec_set_settings() 141 pause->autoneg = ugeth->phydev->autoneg; in uec_get_pauseparam() 159 if (ugeth->phydev->autoneg) { in uec_set_pauseparam() 342 return phy_start_aneg(ugeth->phydev); in uec_nway_reset() 361 struct phy_device *phydev = ugeth->phydev; in uec_get_wol() local [all …]
|
D | fec_mpc52xx.c | 69 struct phy_device *phydev; member 168 struct phy_device *phydev = priv->phydev; in mpc52xx_fec_adjust_link() local 171 if (phydev->link != PHY_DOWN) { in mpc52xx_fec_adjust_link() 172 if (phydev->duplex != priv->duplex) { in mpc52xx_fec_adjust_link() 178 priv->duplex = phydev->duplex; in mpc52xx_fec_adjust_link() 185 if (phydev->duplex == DUPLEX_FULL) in mpc52xx_fec_adjust_link() 194 if (phydev->speed != priv->speed) { in mpc52xx_fec_adjust_link() 196 priv->speed = phydev->speed; in mpc52xx_fec_adjust_link() 201 priv->link = phydev->link; in mpc52xx_fec_adjust_link() 212 phy_print_status(phydev); in mpc52xx_fec_adjust_link() [all …]
|
D | gianfar_ethtool.c | 191 struct phy_device *phydev = priv->phydev; in gfar_ssettings() local 193 if (NULL == phydev) in gfar_ssettings() 196 return phy_ethtool_sset(phydev, cmd); in gfar_ssettings() 204 struct phy_device *phydev = priv->phydev; in gfar_gsettings() local 208 if (NULL == phydev) in gfar_gsettings() 218 return phy_ethtool_gset(phydev, cmd); in gfar_gsettings() 248 switch (priv->phydev->speed) { in gfar_usecs2ticks() 273 switch (priv->phydev->speed) { in gfar_ticks2usecs() 307 if (NULL == priv->phydev) in gfar_gcoalesce() 368 if (NULL == priv->phydev) in gfar_scoalesce() [all …]
|
D | gianfar.c | 1015 if (!priv->phydev) in gfar_ioctl() 1018 return phy_mii_ioctl(priv->phydev, rq, cmd); in gfar_ioctl() 1639 phy_stop(priv->phydev); in gfar_suspend() 1668 phy_start(priv->phydev); in gfar_resume() 1702 if (priv->phydev) in gfar_restore() 1703 phy_start(priv->phydev); in gfar_restore() 1789 priv->phydev = of_phy_connect(dev, priv->phy_node, &adjust_link, 0, in init_phy() 1791 if (!priv->phydev) { in init_phy() 1800 priv->phydev->supported &= (GFAR_SUPPORTED | gigabit_support); in init_phy() 1801 priv->phydev->advertising = priv->phydev->supported; in init_phy() [all …]
|
D | ucc_geth.c | 1586 struct phy_device *phydev = ugeth->phydev; in adjust_link() local 1592 if (phydev->link) { in adjust_link() 1597 if (phydev->duplex != ugeth->oldduplex) { in adjust_link() 1599 if (!(phydev->duplex)) in adjust_link() 1603 ugeth->oldduplex = phydev->duplex; in adjust_link() 1606 if (phydev->speed != ugeth->oldspeed) { in adjust_link() 1608 switch (phydev->speed) { in adjust_link() 1626 if (phydev->speed == SPEED_10) in adjust_link() 1636 dev->name, phydev->speed); in adjust_link() 1639 ugeth->oldspeed = phydev->speed; in adjust_link() [all …]
|
D | fec_main.c | 2125 struct phy_device *phydev = fep->phy_dev; in fec_enet_get_settings() local 2127 if (!phydev) in fec_enet_get_settings() 2130 return phy_ethtool_gset(phydev, cmd); in fec_enet_get_settings() 2137 struct phy_device *phydev = fep->phy_dev; in fec_enet_set_settings() local 2139 if (!phydev) in fec_enet_set_settings() 2142 return phy_ethtool_sset(phydev, cmd); in fec_enet_set_settings() 2421 struct phy_device *phydev = fep->phy_dev; in fec_enet_nway_reset() local 2423 if (!phydev) in fec_enet_nway_reset() 2426 return genphy_restart_aneg(phydev); in fec_enet_nway_reset() 2652 struct phy_device *phydev = fep->phy_dev; in fec_enet_ioctl() local [all …]
|
D | gianfar.h | 1156 struct phy_device *phydev; member 1340 void gfar_phy_test(struct mii_bus *bus, struct phy_device *phydev, int enable,
|
D | ucc_geth.h | 1218 struct phy_device *phydev; member
|
/linux-4.4.14/arch/powerpc/platforms/85xx/ |
D | mpc85xx_mds.c | 68 static int mpc8568_fixup_125_clock(struct phy_device *phydev) in mpc8568_fixup_125_clock() argument 74 scr = phy_read(phydev, MV88E1111_SCR); in mpc8568_fixup_125_clock() 79 err = phy_write(phydev, MV88E1111_SCR, scr & ~(MV88E1111_SCR_125CLK)); in mpc8568_fixup_125_clock() 84 err = phy_write(phydev, MII_BMCR, BMCR_RESET); in mpc8568_fixup_125_clock() 89 scr = phy_read(phydev, MV88E1111_SCR); in mpc8568_fixup_125_clock() 94 err = phy_write(phydev, MV88E1111_SCR, scr | 0x0008); in mpc8568_fixup_125_clock() 99 static int mpc8568_mds_phy_fixups(struct phy_device *phydev) in mpc8568_mds_phy_fixups() argument 105 err = phy_write(phydev,29, 0x0006); in mpc8568_mds_phy_fixups() 110 temp = phy_read(phydev, 30); in mpc8568_mds_phy_fixups() 116 err = phy_write(phydev,30, temp); in mpc8568_mds_phy_fixups() [all …]
|
/linux-4.4.14/drivers/net/ethernet/pasemi/ |
D | pasemi_mac_ethtool.c | 71 struct phy_device *phydev = mac->phydev; in pasemi_mac_ethtool_get_settings() local 73 if (!phydev) in pasemi_mac_ethtool_get_settings() 76 return phy_ethtool_gset(phydev, cmd); in pasemi_mac_ethtool_get_settings() 84 struct phy_device *phydev = mac->phydev; in pasemi_mac_ethtool_set_settings() local 86 if (!phydev) in pasemi_mac_ethtool_set_settings() 89 return phy_ethtool_sset(phydev, cmd); in pasemi_mac_ethtool_set_settings()
|
D | pasemi_mac.c | 1030 if (!mac->phydev->link) { in pasemi_adjust_link() 1051 if (!mac->phydev->duplex) in pasemi_adjust_link() 1054 switch (mac->phydev->speed) { in pasemi_adjust_link() 1068 printk("Unsupported speed %d\n", mac->phydev->speed); in pasemi_adjust_link() 1072 msg = mac->link != mac->phydev->link || flags != new_flags; in pasemi_adjust_link() 1074 mac->duplex = mac->phydev->duplex; in pasemi_adjust_link() 1075 mac->speed = mac->phydev->speed; in pasemi_adjust_link() 1076 mac->link = mac->phydev->link; in pasemi_adjust_link() 1090 struct phy_device *phydev; in pasemi_mac_phy_init() local 1100 phydev = of_phy_connect(dev, phy_dn, &pasemi_adjust_link, 0, in pasemi_mac_phy_init() [all …]
|
D | pasemi_mac.h | 74 struct phy_device *phydev; member
|
/linux-4.4.14/drivers/net/ethernet/altera/ |
D | altera_tse_main.c | 640 struct phy_device *phydev = priv->phydev; in altera_tse_adjust_link() local 645 if (phydev->link) { in altera_tse_adjust_link() 650 if (phydev->duplex != priv->oldduplex) { in altera_tse_adjust_link() 652 if (!(phydev->duplex)) in altera_tse_adjust_link() 658 dev->name, phydev->duplex); in altera_tse_adjust_link() 660 priv->oldduplex = phydev->duplex; in altera_tse_adjust_link() 664 if (phydev->speed != priv->oldspeed) { in altera_tse_adjust_link() 666 switch (phydev->speed) { in altera_tse_adjust_link() 682 phydev->speed); in altera_tse_adjust_link() 685 priv->oldspeed = phydev->speed; in altera_tse_adjust_link() [all …]
|
D | altera_tse_ethtool.c | 239 struct phy_device *phydev = priv->phydev; in tse_get_settings() local 241 if (phydev == NULL) in tse_get_settings() 244 return phy_ethtool_gset(phydev, cmd); in tse_get_settings() 250 struct phy_device *phydev = priv->phydev; in tse_set_settings() local 252 if (phydev == NULL) in tse_set_settings() 255 return phy_ethtool_sset(phydev, cmd); in tse_set_settings()
|
D | altera_tse.h | 476 struct phy_device *phydev; member
|
/linux-4.4.14/drivers/staging/netlogic/ |
D | xlr_net.c | 174 struct phy_device *phydev = priv->mii_bus->phy_map[priv->phy_addr]; in xlr_get_settings() local 176 if (!phydev) in xlr_get_settings() 178 return phy_ethtool_gset(phydev, ecmd); in xlr_get_settings() 184 struct phy_device *phydev = priv->mii_bus->phy_map[priv->phy_addr]; in xlr_set_settings() local 186 if (!phydev) in xlr_set_settings() 188 return phy_ethtool_sset(phydev, ecmd); in xlr_set_settings() 221 struct phy_device *phydev = priv->mii_bus->phy_map[priv->phy_addr]; in xlr_net_open() local 224 phy_start(phydev); in xlr_net_open() 226 err = phy_start_aneg(phydev); in xlr_net_open() 242 struct phy_device *phydev = priv->mii_bus->phy_map[priv->phy_addr]; in xlr_net_stop() local [all …]
|
/linux-4.4.14/drivers/net/ethernet/rdc/ |
D | r6040.c | 203 struct phy_device *phydev; member 477 phy_stop(lp->phydev); in r6040_down() 520 if (!lp->phydev) in r6040_ioctl() 523 return phy_mii_ioctl(lp->phydev, rq, cmd); in r6040_ioctl() 735 phy_start(lp->phydev); in r6040_up() 964 return phy_ethtool_gset(rp->phydev, cmd); in netdev_get_settings() 971 return phy_ethtool_sset(rp->phydev, cmd); in netdev_set_settings() 1001 struct phy_device *phydev = lp->phydev; in r6040_adjust_link() local 1005 BUG_ON(!phydev); in r6040_adjust_link() 1007 if (lp->old_link != phydev->link) { in r6040_adjust_link() [all …]
|
/linux-4.4.14/drivers/net/ethernet/amd/ |
D | au1000_eth.c | 418 struct phy_device *phydev = aup->phy_dev; in au1000_adjust_link() local 428 if (phydev->link && (aup->old_speed != phydev->speed)) { in au1000_adjust_link() 431 switch (phydev->speed) { in au1000_adjust_link() 437 phydev->speed); in au1000_adjust_link() 441 aup->old_speed = phydev->speed; in au1000_adjust_link() 446 if (phydev->link && (aup->old_duplex != phydev->duplex)) { in au1000_adjust_link() 453 if (DUPLEX_FULL == phydev->duplex) { in au1000_adjust_link() 465 aup->old_duplex = phydev->duplex; in au1000_adjust_link() 470 if (phydev->link != aup->old_link) { in au1000_adjust_link() 473 if (!phydev->link) { in au1000_adjust_link() [all …]
|
/linux-4.4.14/drivers/net/ethernet/adi/ |
D | bfin_mac.c | 313 struct phy_device *phydev = lp->phydev; in bfin_mac_adjust_link() local 318 if (phydev->link) { in bfin_mac_adjust_link() 321 if (phydev->duplex != lp->old_duplex) { in bfin_mac_adjust_link() 325 if (phydev->duplex) in bfin_mac_adjust_link() 331 lp->old_duplex = phydev->duplex; in bfin_mac_adjust_link() 334 if (phydev->speed != lp->old_speed) { in bfin_mac_adjust_link() 335 if (phydev->interface == PHY_INTERFACE_MODE_RMII) { in bfin_mac_adjust_link() 337 switch (phydev->speed) { in bfin_mac_adjust_link() 347 phydev->speed); in bfin_mac_adjust_link() 354 lp->old_speed = phydev->speed; in bfin_mac_adjust_link() [all …]
|
D | bfin_mac.h | 95 struct phy_device *phydev; member
|
/linux-4.4.14/drivers/net/ethernet/apm/xgene/ |
D | xgene_enet_ethtool.c | 60 struct phy_device *phydev = pdata->phy_dev; in xgene_get_settings() local 63 if (phydev == NULL) in xgene_get_settings() 66 return phy_ethtool_gset(phydev, cmd); in xgene_get_settings() 92 struct phy_device *phydev = pdata->phy_dev; in xgene_set_settings() local 95 if (phydev == NULL) in xgene_set_settings() 98 return phy_ethtool_sset(phydev, cmd); in xgene_set_settings()
|
D | xgene_enet_hw.c | 713 struct phy_device *phydev = pdata->phy_dev; in xgene_enet_adjust_link() local 715 if (phydev->link) { in xgene_enet_adjust_link() 716 if (pdata->phy_speed != phydev->speed) { in xgene_enet_adjust_link() 717 pdata->phy_speed = phydev->speed; in xgene_enet_adjust_link() 721 phy_print_status(phydev); in xgene_enet_adjust_link() 727 phy_print_status(phydev); in xgene_enet_adjust_link()
|
/linux-4.4.14/drivers/net/ethernet/agere/ |
D | et131x.c | 443 struct phy_device *phydev; member 867 struct phy_device *phydev = adapter->phydev; in et1310_config_mac_regs2() local 880 if (phydev->speed == SPEED_1000) { in et1310_config_mac_regs2() 907 if (phydev->duplex == DUPLEX_FULL) in et1310_config_mac_regs2() 911 if (phydev->duplex == DUPLEX_HALF) in et1310_config_mac_regs2() 1038 struct phy_device *phydev = adapter->phydev; in et1310_config_rxmac_regs() local 1125 if (phydev && phydev->speed == SPEED_100) in et1310_config_rxmac_regs() 1233 struct phy_device *phydev = adapter->phydev; in et131x_mii_read() local 1235 if (!phydev) in et131x_mii_read() 1238 return et131x_phy_mii_read(adapter, phydev->addr, reg, value); in et131x_mii_read() [all …]
|
/linux-4.4.14/drivers/net/ethernet/freescale/fs_enet/ |
D | fs_enet-main.c | 655 phy_stop(fep->phydev); in fs_timeout() 658 phy_start(fep->phydev); in fs_timeout() 661 phy_start(fep->phydev); in fs_timeout() 675 struct phy_device *phydev = fep->phydev; in generic_adjust_link() local 678 if (phydev->link) { in generic_adjust_link() 680 if (phydev->duplex != fep->oldduplex) { in generic_adjust_link() 682 fep->oldduplex = phydev->duplex; in generic_adjust_link() 685 if (phydev->speed != fep->oldspeed) { in generic_adjust_link() 687 fep->oldspeed = phydev->speed; in generic_adjust_link() 705 phy_print_status(phydev); in generic_adjust_link() [all …]
|
D | mac-fec.c | 257 struct mii_bus* mii = fep->phydev->bus; in restart() 336 if (fep->phydev->duplex) { in restart() 366 struct fec_info* feci= fep->phydev->bus->priv; in stop()
|
D | fs_enet.h | 152 struct phy_device *phydev; member
|
D | mac-fcc.c | 373 if (fep->phydev->speed == 100) in restart() 399 if (fep->phydev->duplex) in restart()
|
D | mac-scc.c | 355 if (fep->phydev->duplex) in restart()
|
/linux-4.4.14/drivers/net/ethernet/nxp/ |
D | lpc_eth.c | 753 struct phy_device *phydev = pldat->phy_dev; in lpc_handle_link_change() local 760 if (phydev->link) { in lpc_handle_link_change() 761 if ((pldat->speed != phydev->speed) || in lpc_handle_link_change() 762 (pldat->duplex != phydev->duplex)) { in lpc_handle_link_change() 763 pldat->speed = phydev->speed; in lpc_handle_link_change() 764 pldat->duplex = phydev->duplex; in lpc_handle_link_change() 769 if (phydev->link != pldat->link) { in lpc_handle_link_change() 770 if (!phydev->link) { in lpc_handle_link_change() 774 pldat->link = phydev->link; in lpc_handle_link_change() 788 struct phy_device *phydev = phy_find_first(pldat->mii_bus); in lpc_mii_probe() local [all …]
|
/linux-4.4.14/drivers/net/ethernet/octeon/ |
D | octeon_mgmt.c | 149 struct phy_device *phydev; member 796 if (p->phydev) in octeon_mgmt_ioctl() 797 return phy_mii_ioctl(p->phydev, rq, cmd); in octeon_mgmt_ioctl() 843 if (!p->phydev->link) in octeon_mgmt_update_link() 846 prtx_cfg.s.duplex = p->phydev->duplex; in octeon_mgmt_update_link() 848 switch (p->phydev->speed) { in octeon_mgmt_update_link() 874 prtx_cfg.s.burst = p->phydev->duplex; in octeon_mgmt_update_link() 897 if (p->phydev->speed == 10) in octeon_mgmt_update_link() 899 else if (p->phydev->speed == 100) in octeon_mgmt_update_link() 912 if (!p->phydev) in octeon_mgmt_adjust_link() [all …]
|
/linux-4.4.14/drivers/net/ethernet/aurora/ |
D | nb8800.c | 634 struct phy_device *phydev = priv->phydev; in nb8800_pause_config() local 638 if (!phydev || !phydev->link) in nb8800_pause_config() 641 priv->pause_rx = phydev->pause; in nb8800_pause_config() 642 priv->pause_tx = phydev->pause ^ phydev->asym_pause; in nb8800_pause_config() 667 struct phy_device *phydev = priv->phydev; in nb8800_link_reconfigure() local 670 if (phydev->link) { in nb8800_link_reconfigure() 671 if (phydev->speed != priv->speed) { in nb8800_link_reconfigure() 672 priv->speed = phydev->speed; in nb8800_link_reconfigure() 676 if (phydev->duplex != priv->duplex) { in nb8800_link_reconfigure() 677 priv->duplex = phydev->duplex; in nb8800_link_reconfigure() [all …]
|
D | nb8800.h | 287 struct phy_device *phydev; member
|
/linux-4.4.14/drivers/net/ethernet/allwinner/ |
D | sun4i-emac.c | 118 struct phy_device *phydev = db->phy_dev; in emac_handle_link_change() local 122 if (phydev->link) { in emac_handle_link_change() 123 if (db->speed != phydev->speed) { in emac_handle_link_change() 125 db->speed = phydev->speed; in emac_handle_link_change() 131 if (db->duplex != phydev->duplex) { in emac_handle_link_change() 133 db->duplex = phydev->duplex; in emac_handle_link_change() 140 if (phydev->link != db->link) { in emac_handle_link_change() 141 if (!phydev->link) { in emac_handle_link_change() 145 db->link = phydev->link; in emac_handle_link_change() 151 phy_print_status(phydev); in emac_handle_link_change() [all …]
|
/linux-4.4.14/drivers/net/ethernet/stmicro/stmmac/ |
D | stmmac_mdio.c | 242 struct phy_device *phydev = new_bus->phy_map[addr]; in stmmac_mdio_register() local 243 if (phydev) { in stmmac_mdio_register() 255 phydev->irq = mdio_bus_data->probed_phy_irq; in stmmac_mdio_register() 267 switch (phydev->irq) { in stmmac_mdio_register() 275 sprintf(irq_num, "%d", phydev->irq); in stmmac_mdio_register() 280 ndev->name, phydev->phy_id, addr, in stmmac_mdio_register() 281 irq_str, dev_name(&phydev->dev), in stmmac_mdio_register()
|
D | stmmac_main.c | 215 struct phy_device *phydev = priv->phydev; in stmmac_hw_fix_mac_speed() local 218 priv->plat->fix_mac_speed(priv->plat->bsp_priv, phydev->speed); in stmmac_hw_fix_mac_speed() 293 if (phy_init_eee(priv->phydev, 1)) { in stmmac_eee_init() 325 priv->hw->mac->set_eee_pls(priv->hw, priv->phydev->link); in stmmac_eee_init() 693 struct phy_device *phydev = priv->phydev; in stmmac_adjust_link() local 698 if (phydev == NULL) in stmmac_adjust_link() 703 if (phydev->link) { in stmmac_adjust_link() 708 if (phydev->duplex != priv->oldduplex) { in stmmac_adjust_link() 710 if (!(phydev->duplex)) in stmmac_adjust_link() 714 priv->oldduplex = phydev->duplex; in stmmac_adjust_link() [all …]
|
D | stmmac_ethtool.c | 248 struct phy_device *phy = priv->phydev; in stmmac_ethtool_getsettings() 333 struct phy_device *phy = priv->phydev; in stmmac_ethtool_setsettings() 432 pause->autoneg = priv->phydev->autoneg; in stmmac_get_pauseparam() 446 struct phy_device *phy = priv->phydev; in stmmac_set_pauseparam() 496 int val = phy_get_eee_err(priv->phydev); in stmmac_get_ethtool_stats() 610 return phy_ethtool_get_eee(priv->phydev, edata); in stmmac_ethtool_op_get_eee() 635 return phy_ethtool_set_eee(priv->phydev, edata); in stmmac_ethtool_op_set_eee()
|
D | dwmac-socfpga.c | 229 if (stpriv && stpriv->phydev) in socfpga_dwmac_init() 230 phy_resume(stpriv->phydev); in socfpga_dwmac_init()
|
D | stmmac.h | 89 struct phy_device *phydev ____cacheline_aligned_in_smp;
|
/linux-4.4.14/drivers/net/ethernet/faraday/ |
D | ftgmac100.c | 75 struct phy_device *phydev; member 811 struct phy_device *phydev = priv->phydev; in ftgmac100_adjust_link() local 814 if (phydev->speed == priv->old_speed) in ftgmac100_adjust_link() 817 priv->old_speed = phydev->speed; in ftgmac100_adjust_link() 829 ftgmac100_start_hw(priv, phydev->speed); in ftgmac100_adjust_link() 838 struct phy_device *phydev = NULL; in ftgmac100_mii_probe() local 846 phydev = tmp; in ftgmac100_mii_probe() 852 if (!phydev) { in ftgmac100_mii_probe() 857 phydev = phy_connect(netdev, dev_name(&phydev->dev), in ftgmac100_mii_probe() 860 if (IS_ERR(phydev)) { in ftgmac100_mii_probe() [all …]
|
/linux-4.4.14/drivers/net/ethernet/ti/ |
D | davinci_emac.c | 351 struct phy_device *phydev; member 500 if (priv->phydev) in emac_get_settings() 501 return phy_ethtool_gset(priv->phydev, ecmd); in emac_get_settings() 518 if (priv->phydev) in emac_set_settings() 519 return phy_ethtool_sset(priv->phydev, ecmd); in emac_set_settings() 654 if (priv->phydev) in emac_update_phystatus() 655 new_duplex = priv->phydev->duplex; in emac_update_phystatus() 1457 struct phy_device *phydev = priv->phydev; in emac_adjust_link() local 1463 if (phydev->link) { in emac_adjust_link() 1465 if (phydev->duplex != priv->duplex) { in emac_adjust_link() [all …]
|
D | netcp_ethss.c | 1847 struct phy_device *phy = ndev->phydev; in keystone_get_settings() 1872 struct phy_device *phy = ndev->phydev; in keystone_set_settings()
|
/linux-4.4.14/arch/arm/mach-imx/ |
D | mach-imx6q.c | 43 static int ksz9021rn_phy_fixup(struct phy_device *phydev) in ksz9021rn_phy_fixup() argument 47 phy_write(phydev, MICREL_KSZ9021_EXTREG_CTRL, in ksz9021rn_phy_fixup() 49 phy_write(phydev, MICREL_KSZ9021_EXTREG_DATA_WRITE, 0x0000); in ksz9021rn_phy_fixup() 52 phy_write(phydev, MICREL_KSZ9021_EXTREG_CTRL, in ksz9021rn_phy_fixup() 54 phy_write(phydev, MICREL_KSZ9021_EXTREG_DATA_WRITE, 0xf0f0); in ksz9021rn_phy_fixup() 55 phy_write(phydev, MICREL_KSZ9021_EXTREG_CTRL, in ksz9021rn_phy_fixup()
|
/linux-4.4.14/drivers/net/ethernet/renesas/ |
D | ravb_main.c | 835 struct phy_device *phydev = priv->phydev; in ravb_adjust_link() local 838 if (phydev->link) { in ravb_adjust_link() 839 if (phydev->duplex != priv->duplex) { in ravb_adjust_link() 841 priv->duplex = phydev->duplex; in ravb_adjust_link() 845 if (phydev->speed != priv->speed) { in ravb_adjust_link() 847 priv->speed = phydev->speed; in ravb_adjust_link() 854 priv->link = phydev->link; in ravb_adjust_link() 868 phy_print_status(phydev); in ravb_adjust_link() 876 struct phy_device *phydev; in ravb_phy_init() local 885 phydev = of_phy_connect(ndev, pn, ravb_adjust_link, 0, in ravb_phy_init() [all …]
|
D | sh_eth.c | 1806 struct phy_device *phydev = mdp->phydev; in sh_eth_adjust_link() local 1809 if (phydev->link) { in sh_eth_adjust_link() 1810 if (phydev->duplex != mdp->duplex) { in sh_eth_adjust_link() 1812 mdp->duplex = phydev->duplex; in sh_eth_adjust_link() 1817 if (phydev->speed != mdp->speed) { in sh_eth_adjust_link() 1819 mdp->speed = phydev->speed; in sh_eth_adjust_link() 1828 mdp->link = phydev->link; in sh_eth_adjust_link() 1842 phy_print_status(phydev); in sh_eth_adjust_link() 1850 struct phy_device *phydev = NULL; in sh_eth_phy_init() local 1861 phydev = of_phy_connect(ndev, pn, in sh_eth_phy_init() [all …]
|
D | sh_eth.h | 522 struct phy_device *phydev; /* PHY device control */ member
|
D | ravb.h | 808 struct phy_device *phydev; /* PHY device control */ member
|
/linux-4.4.14/Documentation/networking/ |
D | phy.txt | 106 phydev = phy_connect(dev, phy_name, &adjust_link, interface); 108 phydev is a pointer to the phy_device structure which represents the PHY. If 112 has one. The phydev structure will be populated with information about the 116 PHY-specific flags should be set in phydev->dev_flags prior to the call 126 Now just make sure that phydev->supported and phydev->advertising have any 134 phy_start(phydev). This tells the PAL that you are ready, and configures the 136 just set phydev->irq to PHY_IGNORE_INTERRUPT before you call phy_start. 137 Similarly, if you don't want to use interrupts, set phydev->irq to PHY_POLL. 140 phy_stop(phydev). 161 phy_prepare_link(). This will mean that phydev->state is entirely yours to [all …]
|
/linux-4.4.14/drivers/net/ethernet/cavium/thunder/ |
D | thunder_bgx.c | 35 struct phy_device *phydev; member 277 struct phy_device *phydev = lmac->phydev; in bgx_lmac_handler() local 283 if (!phydev->link && lmac->last_link) in bgx_lmac_handler() 286 if (phydev->link && in bgx_lmac_handler() 287 (lmac->last_duplex != phydev->duplex || in bgx_lmac_handler() 288 lmac->last_link != phydev->link || in bgx_lmac_handler() 289 lmac->last_speed != phydev->speed)) { in bgx_lmac_handler() 293 lmac->last_link = phydev->link; in bgx_lmac_handler() 294 lmac->last_speed = phydev->speed; in bgx_lmac_handler() 295 lmac->last_duplex = phydev->duplex; in bgx_lmac_handler() [all …]
|
/linux-4.4.14/drivers/net/ethernet/cadence/ |
D | macb.c | 304 struct phy_device *phydev = bp->phy_dev; in macb_handle_link_change() local 310 if (phydev->link) { in macb_handle_link_change() 311 if ((bp->speed != phydev->speed) || in macb_handle_link_change() 312 (bp->duplex != phydev->duplex)) { in macb_handle_link_change() 320 if (phydev->duplex) in macb_handle_link_change() 322 if (phydev->speed == SPEED_100) in macb_handle_link_change() 324 if (phydev->speed == SPEED_1000 && in macb_handle_link_change() 330 bp->speed = phydev->speed; in macb_handle_link_change() 331 bp->duplex = phydev->duplex; in macb_handle_link_change() 336 if (phydev->link != bp->link) { in macb_handle_link_change() [all …]
|
/linux-4.4.14/drivers/net/ethernet/broadcom/ |
D | bcm63xx_enet.c | 790 struct phy_device *phydev; in bcm_enet_adjust_phy_link() local 794 phydev = priv->phydev; in bcm_enet_adjust_phy_link() 797 if (priv->old_link != phydev->link) { in bcm_enet_adjust_phy_link() 799 priv->old_link = phydev->link; in bcm_enet_adjust_phy_link() 803 if (phydev->link && phydev->duplex != priv->old_duplex) { in bcm_enet_adjust_phy_link() 805 (phydev->duplex == DUPLEX_FULL) ? 1 : 0); in bcm_enet_adjust_phy_link() 807 priv->old_duplex = phydev->duplex; in bcm_enet_adjust_phy_link() 812 if (phydev->link && phydev->pause != priv->old_pause) { in bcm_enet_adjust_phy_link() 815 if (phydev->pause) { in bcm_enet_adjust_phy_link() 830 priv->old_pause = phydev->pause; in bcm_enet_adjust_phy_link() [all …]
|
D | b44.c | 1489 phy_start(bp->phydev); in b44_open() 1654 phy_stop(bp->phydev); in b44_close() 1840 BUG_ON(!bp->phydev); in b44_get_settings() 1841 return phy_ethtool_gset(bp->phydev, cmd); in b44_get_settings() 1889 BUG_ON(!bp->phydev); in b44_set_settings() 1894 ret = phy_ethtool_sset(bp->phydev, cmd); in b44_set_settings() 2140 BUG_ON(!bp->phydev); in b44_ioctl() 2141 err = phy_mii_ioctl(bp->phydev, ifr, cmd); in b44_ioctl() 2209 struct phy_device *phydev = bp->phydev; in b44_adjust_link() local 2212 BUG_ON(!phydev); in b44_adjust_link() [all …]
|
D | bcmsysport.c | 107 return phy_ethtool_sset(priv->phydev, cmd); in bcm_sysport_set_settings() 118 return phy_ethtool_gset(priv->phydev, cmd); in bcm_sysport_get_settings() 1130 struct phy_device *phydev = priv->phydev; in bcm_sysport_adj_link() local 1134 if (priv->old_link != phydev->link) { in bcm_sysport_adj_link() 1136 priv->old_link = phydev->link; in bcm_sysport_adj_link() 1139 if (priv->old_duplex != phydev->duplex) { in bcm_sysport_adj_link() 1141 priv->old_duplex = phydev->duplex; in bcm_sysport_adj_link() 1144 switch (phydev->speed) { in bcm_sysport_adj_link() 1162 if (phydev->duplex == DUPLEX_HALF) in bcm_sysport_adj_link() 1165 if (priv->old_pause != phydev->pause) { in bcm_sysport_adj_link() [all …]
|
D | tg3.c | 1407 struct phy_device *phydev; in tg3_mdio_config_5785() local 1409 phydev = tp->mdio_bus->phy_map[tp->phy_addr]; in tg3_mdio_config_5785() 1410 switch (phydev->drv->phy_id & phydev->drv->phy_id_mask) { in tg3_mdio_config_5785() 1428 if (phydev->interface != PHY_INTERFACE_MODE_RGMII) { in tg3_mdio_config_5785() 1500 struct phy_device *phydev; in tg3_mdio_init() local 1561 phydev = tp->mdio_bus->phy_map[tp->phy_addr]; in tg3_mdio_init() 1563 if (!phydev || !phydev->drv) { in tg3_mdio_init() 1570 switch (phydev->drv->phy_id & phydev->drv->phy_id_mask) { in tg3_mdio_init() 1572 phydev->interface = PHY_INTERFACE_MODE_GMII; in tg3_mdio_init() 1573 phydev->dev_flags |= PHY_BRCM_AUTO_PWRDWN_ENABLE; in tg3_mdio_init() [all …]
|
D | bcm63xx_enet.h | 293 struct phy_device *phydev; member
|
D | b44.h | 407 struct phy_device *phydev; member
|
D | bcmsysport.h | 673 struct phy_device *phydev; member
|
/linux-4.4.14/drivers/net/ethernet/samsung/sxgbe/ |
D | sxgbe_main.c | 132 if (phy_init_eee(priv->phydev, 1)) in sxgbe_eee_init() 160 priv->hw->mac->set_eee_pls(priv->ioaddr, priv->phydev->link); in sxgbe_eee_adjust() 206 struct phy_device *phydev = priv->phydev; in sxgbe_adjust_link() local 210 if (!phydev) in sxgbe_adjust_link() 217 if (phydev->link) { in sxgbe_adjust_link() 218 if (phydev->speed != priv->speed) { in sxgbe_adjust_link() 220 switch (phydev->speed) { in sxgbe_adjust_link() 233 phydev->speed); in sxgbe_adjust_link() 236 priv->speed = phydev->speed; in sxgbe_adjust_link() 251 phy_print_status(phydev); in sxgbe_adjust_link() [all …]
|
D | sxgbe_ethtool.c | 150 return phy_ethtool_get_eee(priv->phydev, edata); in sxgbe_get_eee() 175 return phy_ethtool_set_eee(priv->phydev, edata); in sxgbe_set_eee() 190 if (priv->phydev) in sxgbe_getsettings() 191 return phy_ethtool_gset(priv->phydev, cmd); in sxgbe_getsettings() 200 if (priv->phydev) in sxgbe_setsettings() 201 return phy_ethtool_sset(priv->phydev, cmd); in sxgbe_setsettings() 258 int val = phy_get_eee_err(priv->phydev); in sxgbe_get_ethtool_stats()
|
D | sxgbe_common.h | 478 struct phy_device *phydev; member
|
/linux-4.4.14/Documentation/devicetree/bindings/phy/ |
D | calxeda-combophy.txt | 7 - phydev: device ID for programming the combophy. 15 phydev = <31>;
|
/linux-4.4.14/drivers/net/ethernet/toshiba/ |
D | tc35815.c | 542 struct phy_device *phydev = lp->phy_dev; in tc_handle_link_change() local 547 if (phydev->link && in tc_handle_link_change() 548 (lp->speed != phydev->speed || lp->duplex != phydev->duplex)) { in tc_handle_link_change() 556 if (phydev->duplex == DUPLEX_FULL) in tc_handle_link_change() 573 if (phydev->duplex == DUPLEX_HALF && in tc_handle_link_change() 578 lp->speed = phydev->speed; in tc_handle_link_change() 579 lp->duplex = phydev->duplex; in tc_handle_link_change() 583 if (phydev->link != lp->link) { in tc_handle_link_change() 584 if (phydev->link) { in tc_handle_link_change() 592 lp->link = phydev->link; in tc_handle_link_change() [all …]
|
/linux-4.4.14/drivers/net/ethernet/xscale/ |
D | ixp4xx_eth.c | 174 struct phy_device *phydev; member 565 struct phy_device *phydev = port->phydev; in ixp4xx_adjust_link() local 567 if (!phydev->link) { in ixp4xx_adjust_link() 575 if (port->speed == phydev->speed && port->duplex == phydev->duplex) in ixp4xx_adjust_link() 578 port->speed = phydev->speed; in ixp4xx_adjust_link() 579 port->duplex = phydev->duplex; in ixp4xx_adjust_link() 991 return phy_mii_ioctl(port->phydev, req, cmd); in eth_ioctl() 1011 return phy_ethtool_gset(port->phydev, cmd); in ixp4xx_get_settings() 1017 return phy_ethtool_sset(port->phydev, cmd); in ixp4xx_set_settings() 1023 return phy_start_aneg(port->phydev); in ixp4xx_nway_reset() [all …]
|
/linux-4.4.14/drivers/net/ethernet/synopsys/ |
D | dwc_eth_qos.c | 814 struct phy_device *phydev = lp->phy_dev; in dwceqos_ioctl() local 819 if (!phydev) in dwceqos_ioctl() 826 return phy_mii_ioctl(phydev, rq, cmd); in dwceqos_ioctl() 874 struct phy_device *phydev = lp->phy_dev; in dwceqos_set_speed() local 881 if (phydev->duplex) in dwceqos_set_speed() 883 if (phydev->speed == SPEED_10) { in dwceqos_set_speed() 885 } else if (phydev->speed == SPEED_100) { in dwceqos_set_speed() 888 } else if (phydev->speed != SPEED_1000) { in dwceqos_set_speed() 891 phydev->speed); in dwceqos_set_speed() 901 struct phy_device *phydev = lp->phy_dev; in dwceqos_adjust_link() local [all …]
|
/linux-4.4.14/net/dsa/ |
D | dsa.c | 184 struct phy_device *phydev; in dsa_cpu_dsa_setup() local 199 phydev = of_phy_find_device(port_dn); in dsa_cpu_dsa_setup() 204 phydev->interface = mode; in dsa_cpu_dsa_setup() 206 genphy_config_init(phydev); in dsa_cpu_dsa_setup() 207 genphy_read_status(phydev); in dsa_cpu_dsa_setup() 209 ds->drv->adjust_link(ds, port, phydev); in dsa_cpu_dsa_setup() 422 struct phy_device *phydev; in dsa_switch_destroy() local 438 phydev = of_phy_find_device(port_dn); in dsa_switch_destroy() 439 if (phydev) { in dsa_switch_destroy() 440 int addr = phydev->addr; in dsa_switch_destroy() [all …]
|
/linux-4.4.14/drivers/net/ethernet/aeroflex/ |
D | greth.c | 1227 struct phy_device *phydev = greth->phy; in greth_link_change() local 1234 if (phydev->link) { in greth_link_change() 1236 if ((greth->speed != phydev->speed) || (greth->duplex != phydev->duplex)) { in greth_link_change() 1240 if (phydev->duplex) in greth_link_change() 1243 if (phydev->speed == SPEED_100) in greth_link_change() 1245 else if (phydev->speed == SPEED_1000) in greth_link_change() 1249 greth->speed = phydev->speed; in greth_link_change() 1250 greth->duplex = phydev->duplex; in greth_link_change() 1255 if (phydev->link != greth->link) { in greth_link_change() 1256 if (!phydev->link) { in greth_link_change() [all …]
|
/linux-4.4.14/drivers/phy/ |
D | phy-miphy28lp.c | 207 struct miphy28lp_dev *phydev; member 836 struct miphy28lp_dev *miphy_dev = miphy_phy->phydev; in miphy_osc_is_ready() 895 struct miphy28lp_dev *miphy_dev = miphy_phy->phydev; in miphy28lp_setup() 924 struct miphy28lp_dev *miphy_dev = miphy_phy->phydev; in miphy28lp_init_sata() 960 struct miphy28lp_dev *miphy_dev = miphy_phy->phydev; in miphy28lp_init_pcie() 1005 struct miphy28lp_dev *miphy_dev = miphy_phy->phydev; in miphy28lp_init_usb3() 1047 struct miphy28lp_dev *miphy_dev = miphy_phy->phydev; in miphy28lp_init() 1075 struct miphy28lp_dev *miphy_dev = miphy_phy->phydev; in miphy28lp_get_addr() 1143 struct miphy28lp_dev *miphy_dev = miphy_phy->phydev; in miphy28lp_probe_resets() 1244 miphy_dev->phys[port]->phydev = miphy_dev; in miphy28lp_probe()
|
/linux-4.4.14/drivers/net/dsa/ |
D | bcm_sf2.c | 435 struct phy_device *phydev, in bcm_sf2_sw_set_eee() argument 446 p->eee_enabled = bcm_sf2_eee_init(ds, port, phydev); in bcm_sf2_sw_set_eee() 1137 struct phy_device *phydev) in bcm_sf2_sw_adjust_link() argument 1144 switch (phydev->interface) { in bcm_sf2_sw_adjust_link() 1167 if (!phydev->link) { in bcm_sf2_sw_adjust_link() 1186 if (phydev->pause) { in bcm_sf2_sw_adjust_link() 1187 if (phydev->asym_pause) in bcm_sf2_sw_adjust_link() 1199 switch (phydev->speed) { in bcm_sf2_sw_adjust_link() 1208 if (phydev->link) in bcm_sf2_sw_adjust_link() 1210 if (phydev->duplex == DUPLEX_FULL) in bcm_sf2_sw_adjust_link()
|
D | mv88e6xxx.c | 489 struct phy_device *phydev) in mv88e6xxx_adjust_link() argument 495 if (!phy_is_pseudo_fixed_link(phydev)) in mv88e6xxx_adjust_link() 511 if (phydev->link) in mv88e6xxx_adjust_link() 514 if (mv88e6xxx_6065_family(ds) && phydev->speed > SPEED_100) in mv88e6xxx_adjust_link() 517 switch (phydev->speed) { in mv88e6xxx_adjust_link() 533 if (phydev->duplex == DUPLEX_FULL) in mv88e6xxx_adjust_link() 538 if (phydev->interface == PHY_INTERFACE_MODE_RGMII_RXID) in mv88e6xxx_adjust_link() 540 if (phydev->interface == PHY_INTERFACE_MODE_RGMII_TXID) in mv88e6xxx_adjust_link() 542 if (phydev->interface == PHY_INTERFACE_MODE_RGMII_ID) in mv88e6xxx_adjust_link() 916 struct phy_device *phydev, struct ethtool_eee *e) in mv88e6xxx_set_eee() argument
|
D | mv88e6xxx.h | 455 struct phy_device *phydev); 470 struct phy_device *phydev, struct ethtool_eee *e);
|
/linux-4.4.14/drivers/net/ethernet/smsc/ |
D | smsc9420.c | 1156 struct phy_device *phydev = NULL; in smsc9420_mii_probe() local 1166 phydev = pd->mii_bus->phy_map[1]; in smsc9420_mii_probe() 1168 phydev->addr, phydev->phy_id); in smsc9420_mii_probe() 1170 phydev = phy_connect(dev, dev_name(&phydev->dev), in smsc9420_mii_probe() 1173 if (IS_ERR(phydev)) { in smsc9420_mii_probe() 1175 return PTR_ERR(phydev); in smsc9420_mii_probe() 1179 phydev->drv->name, dev_name(&phydev->dev), phydev->irq); in smsc9420_mii_probe() 1182 phydev->supported &= (PHY_BASIC_FEATURES | SUPPORTED_Pause | in smsc9420_mii_probe() 1184 phydev->advertising = phydev->supported; in smsc9420_mii_probe() 1186 pd->phy_dev = phydev; in smsc9420_mii_probe()
|
D | smsc911x.c | 1013 struct phy_device *phydev = NULL; in smsc911x_mii_probe() local 1017 phydev = phy_find_first(pdata->mii_bus); in smsc911x_mii_probe() 1018 if (!phydev) { in smsc911x_mii_probe() 1024 phydev->addr, phydev->phy_id); in smsc911x_mii_probe() 1026 ret = phy_connect_direct(dev, phydev, &smsc911x_phy_adjust_link, in smsc911x_mii_probe() 1036 phydev->drv->name, dev_name(&phydev->dev), phydev->irq); in smsc911x_mii_probe() 1039 phydev->supported &= (PHY_BASIC_FEATURES | SUPPORTED_Pause | in smsc911x_mii_probe() 1041 phydev->advertising = phydev->supported; in smsc911x_mii_probe() 1043 pdata->phy_dev = phydev; in smsc911x_mii_probe() 1050 phy_disconnect(phydev); in smsc911x_mii_probe()
|
/linux-4.4.14/include/net/ |
D | dsa.h | 235 struct phy_device *phydev); 273 struct phy_device *phydev,
|
/linux-4.4.14/arch/arm/mach-davinci/ |
D | board-dm644x-evm.c | 734 static int davinci_phy_fixup(struct phy_device *phydev) in davinci_phy_fixup() argument 742 control = phy_read(phydev, 26); in davinci_phy_fixup() 743 phy_write(phydev, 26, (control | 0x800)); in davinci_phy_fixup()
|
/linux-4.4.14/arch/arm/boot/dts/ |
D | ecx-common.dtsi | 231 phydev = <5>; 238 phydev = <31>;
|
/linux-4.4.14/drivers/net/ethernet/xilinx/ |
D | xilinx_emaclite.c | 826 struct phy_device *phydev; in xemaclite_mdio_setup() local 827 phydev = of_phy_find_device(lp->phy_node); in xemaclite_mdio_setup() 828 if (!phydev) in xemaclite_mdio_setup() 832 put_device(&phydev->dev); in xemaclite_mdio_setup()
|
D | xilinx_axienet_main.c | 1096 struct phy_device *phydev = lp->phy_dev; in axienet_ethtools_get_settings() local 1097 if (!phydev) in axienet_ethtools_get_settings() 1099 return phy_ethtool_gset(phydev, ecmd); in axienet_ethtools_get_settings() 1119 struct phy_device *phydev = lp->phy_dev; in axienet_ethtools_set_settings() local 1120 if (!phydev) in axienet_ethtools_set_settings() 1122 return phy_ethtool_sset(phydev, ecmd); in axienet_ethtools_set_settings()
|
/linux-4.4.14/drivers/net/ethernet/marvell/ |
D | mvneta.c | 2627 struct phy_device *phydev = pp->phy_dev; in mvneta_adjust_link() local 2630 if (phydev->link) { in mvneta_adjust_link() 2631 if ((pp->speed != phydev->speed) || in mvneta_adjust_link() 2632 (pp->duplex != phydev->duplex)) { in mvneta_adjust_link() 2640 if (phydev->duplex) in mvneta_adjust_link() 2643 if (phydev->speed == SPEED_1000) in mvneta_adjust_link() 2645 else if (phydev->speed == SPEED_100) in mvneta_adjust_link() 2650 pp->duplex = phydev->duplex; in mvneta_adjust_link() 2651 pp->speed = phydev->speed; in mvneta_adjust_link() 2655 if (phydev->link != pp->link) { in mvneta_adjust_link() [all …]
|
D | mvpp2.c | 4865 struct phy_device *phydev = port->phy_dev; in mvpp2_link_event() local 4869 if (phydev->link) { in mvpp2_link_event() 4870 if ((port->speed != phydev->speed) || in mvpp2_link_event() 4871 (port->duplex != phydev->duplex)) { in mvpp2_link_event() 4881 if (phydev->duplex) in mvpp2_link_event() 4884 if (phydev->speed == SPEED_1000) in mvpp2_link_event() 4886 else if (phydev->speed == SPEED_100) in mvpp2_link_event() 4891 port->duplex = phydev->duplex; in mvpp2_link_event() 4892 port->speed = phydev->speed; in mvpp2_link_event() 4896 if (phydev->link != port->link) { in mvpp2_link_event() [all …]
|
D | mv643xx_eth.c | 2974 struct phy_device *phydev; in phy_scan() local 2989 phydev = ERR_PTR(-ENODEV); in phy_scan() 2996 phydev = phy_connect(mp->dev, phy_id, mv643xx_eth_adjust_link, in phy_scan() 2998 if (!IS_ERR(phydev)) { in phy_scan() 3004 return phydev; in phy_scan()
|
/linux-4.4.14/drivers/net/ethernet/hisilicon/hns/ |
D | hns_enet.c | 744 h->dev->ops->adjust_link(h, ndev->phydev->speed, ndev->phydev->duplex); in hns_nic_adjust_link()
|