Home
last modified time | relevance | path

Searched refs:phydev (Results 1 – 122 of 122) sorted by relevance

/linux-4.1.27/drivers/net/phy/
Dphy.c65 void phy_print_status(struct phy_device *phydev) in phy_print_status() argument
67 if (phydev->link) { in phy_print_status()
68 netdev_info(phydev->attached_dev, in phy_print_status()
70 phy_speed_to_str(phydev->speed), in phy_print_status()
71 DUPLEX_FULL == phydev->duplex ? "Full" : "Half", in phy_print_status()
72 phydev->pause ? "rx/tx" : "off"); in phy_print_status()
74 netdev_info(phydev->attached_dev, "Link is Down\n"); in phy_print_status()
88 static int phy_clear_interrupt(struct phy_device *phydev) in phy_clear_interrupt() argument
90 if (phydev->drv->ack_interrupt) in phy_clear_interrupt()
91 return phydev->drv->ack_interrupt(phydev); in phy_clear_interrupt()
[all …]
Dphy_device.c44 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()
348 int phy_device_register(struct phy_device *phydev) in phy_device_register() argument
[all …]
Dmarvell.c137 static int marvell_ack_interrupt(struct phy_device *phydev) in marvell_ack_interrupt() argument
142 err = phy_read(phydev, MII_M1011_IEVENT); in marvell_ack_interrupt()
150 static int marvell_config_intr(struct phy_device *phydev) in marvell_config_intr() argument
154 if (phydev->interrupts == PHY_INTERRUPT_ENABLED) in marvell_config_intr()
155 err = phy_write(phydev, MII_M1011_IMASK, MII_M1011_IMASK_INIT); in marvell_config_intr()
157 err = phy_write(phydev, MII_M1011_IMASK, MII_M1011_IMASK_CLEAR); in marvell_config_intr()
162 static int marvell_config_aneg(struct phy_device *phydev) in marvell_config_aneg() argument
169 err = phy_write(phydev, MII_BMCR, BMCR_RESET); in marvell_config_aneg()
174 err = phy_write(phydev, 0x1d, 0x1f); in marvell_config_aneg()
178 err = phy_write(phydev, 0x1e, 0x200c); in marvell_config_aneg()
[all …]
Dbcm7xxx.c51 static void phy_write_exp(struct phy_device *phydev, in phy_write_exp() argument
54 phy_write(phydev, MII_BCM54XX_EXP_SEL, MII_BCM54XX_EXP_SEL_ER | reg); in phy_write_exp()
55 phy_write(phydev, MII_BCM54XX_EXP_DATA, value); in phy_write_exp()
58 static void phy_write_misc(struct phy_device *phydev, in phy_write_misc() argument
63 phy_write(phydev, MII_BCM54XX_AUX_CTL, MII_BCM54XX_AUXCTL_SHDWSEL_MISC); in phy_write_misc()
65 tmp = phy_read(phydev, MII_BCM54XX_AUX_CTL); in phy_write_misc()
67 phy_write(phydev, MII_BCM54XX_AUX_CTL, tmp); in phy_write_misc()
70 phy_write(phydev, MII_BCM54XX_EXP_SEL, tmp); in phy_write_misc()
72 phy_write(phydev, MII_BCM54XX_EXP_DATA, value); in phy_write_misc()
75 static void r_rc_cal_reset(struct phy_device *phydev) in r_rc_cal_reset() argument
[all …]
Dlxt.c64 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 …]
Dbroadcom.c22 #define BRCM_PHY_MODEL(phydev) \ argument
23 ((phydev)->drv->phy_id & (phydev)->drv->phy_id_mask)
25 #define BRCM_PHY_REV(phydev) \ argument
26 ((phydev)->drv->phy_id & ~((phydev)->drv->phy_id_mask))
33 static int bcm54xx_exp_read(struct phy_device *phydev, u16 regnum) in bcm54xx_exp_read() argument
37 val = phy_write(phydev, MII_BCM54XX_EXP_SEL, regnum); in bcm54xx_exp_read()
41 val = phy_read(phydev, MII_BCM54XX_EXP_DATA); in bcm54xx_exp_read()
44 phy_write(phydev, MII_BCM54XX_EXP_SEL, 0); in bcm54xx_exp_read()
49 static int bcm54xx_exp_write(struct phy_device *phydev, u16 regnum, u16 val) in bcm54xx_exp_write() argument
53 ret = phy_write(phydev, MII_BCM54XX_EXP_SEL, regnum); in bcm54xx_exp_write()
[all …]
Dicplus.c48 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 …]
Damd-xgbe-phy.c397 struct phy_device *phydev; member
445 static int amd_xgbe_an_enable_kr_training(struct phy_device *phydev) in amd_xgbe_an_enable_kr_training() argument
449 ret = phy_read_mmd(phydev, MDIO_MMD_PMAPMD, MDIO_PMA_10GBR_PMD_CTRL); in amd_xgbe_an_enable_kr_training()
454 phy_write_mmd(phydev, MDIO_MMD_PMAPMD, MDIO_PMA_10GBR_PMD_CTRL, ret); in amd_xgbe_an_enable_kr_training()
459 static int amd_xgbe_an_disable_kr_training(struct phy_device *phydev) in amd_xgbe_an_disable_kr_training() argument
463 ret = phy_read_mmd(phydev, MDIO_MMD_PMAPMD, MDIO_PMA_10GBR_PMD_CTRL); in amd_xgbe_an_disable_kr_training()
468 phy_write_mmd(phydev, MDIO_MMD_PMAPMD, MDIO_PMA_10GBR_PMD_CTRL, ret); in amd_xgbe_an_disable_kr_training()
473 static int amd_xgbe_phy_pcs_power_cycle(struct phy_device *phydev) in amd_xgbe_phy_pcs_power_cycle() argument
477 ret = phy_read_mmd(phydev, MDIO_MMD_PCS, MDIO_CTRL1); in amd_xgbe_phy_pcs_power_cycle()
482 phy_write_mmd(phydev, MDIO_MMD_PCS, MDIO_CTRL1, ret); in amd_xgbe_phy_pcs_power_cycle()
[all …]
Dat803x.c65 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 …]
Dnational.c59 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 …]
Dbcm87xx.c37 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 …]
Dmicrel.c122 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 …]
Dvitesse.c77 static int vsc824x_add_skew(struct phy_device *phydev) in vsc824x_add_skew() argument
82 extcon = phy_read(phydev, MII_VSC8244_EXT_CON1); in vsc824x_add_skew()
93 err = phy_write(phydev, MII_VSC8244_EXT_CON1, extcon); in vsc824x_add_skew()
98 static int vsc824x_config_init(struct phy_device *phydev) in vsc824x_config_init() argument
102 err = phy_write(phydev, MII_VSC8244_AUX_CONSTAT, in vsc824x_config_init()
107 if (phydev->interface == PHY_INTERFACE_MODE_RGMII_ID) in vsc824x_config_init()
108 err = vsc824x_add_skew(phydev); in vsc824x_config_init()
113 static int vsc824x_ack_interrupt(struct phy_device *phydev) in vsc824x_ack_interrupt() argument
121 if (phydev->interrupts == PHY_INTERRUPT_ENABLED) in vsc824x_ack_interrupt()
122 err = phy_read(phydev, MII_VSC8244_ISTAT); in vsc824x_ack_interrupt()
[all …]
Dmdio_bus.c197 struct phy_device *phydev) in of_mdiobus_link_phydev() argument
199 struct device *dev = &phydev->dev; in of_mdiobus_link_phydev()
223 if (addr == phydev->addr) { in of_mdiobus_link_phydev()
231 struct phy_device *phydev) in of_mdiobus_link_phydev() argument
275 struct phy_device *phydev; in mdiobus_register() local
277 phydev = mdiobus_scan(bus, i); in mdiobus_register()
278 if (IS_ERR(phydev)) { in mdiobus_register()
279 err = PTR_ERR(phydev); in mdiobus_register()
340 struct phy_device *phydev; in mdiobus_scan() local
343 phydev = get_phy_device(bus, addr, false); in mdiobus_scan()
[all …]
Dsmsc.c27 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
46 int rc = phy_read(phydev, MII_LAN83C185_CTRL_STATUS); in smsc_phy_config_init()
52 rc = phy_write(phydev, MII_LAN83C185_CTRL_STATUS, in smsc_phy_config_init()
57 return smsc_phy_ack_interrupt(phydev); in smsc_phy_config_init()
60 static int smsc_phy_reset(struct phy_device *phydev) in smsc_phy_reset() argument
[all …]
Ddavicom.c66 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 …]
Ddp83640.c112 struct phy_device *phydev; member
228 static int ext_read(struct phy_device *phydev, int page, u32 regnum) in ext_read() argument
230 struct dp83640_private *dp83640 = phydev->priv; in ext_read()
234 broadcast_write(phydev->bus, PAGESEL, page); in ext_read()
237 val = phy_read(phydev, regnum); in ext_read()
243 static void ext_write(int broadcast, struct phy_device *phydev, in ext_write() argument
246 struct dp83640_private *dp83640 = phydev->priv; in ext_write()
249 broadcast_write(phydev->bus, PAGESEL, page); in ext_write()
253 broadcast_write(phydev->bus, regnum, val); in ext_write()
255 phy_write(phydev, regnum, val); in ext_write()
[all …]
Det1011c.c52 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 …]
Dqsemi.c63 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()
Dste10Xp.c35 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 …]
Drealtek.c32 static int rtl821x_ack_interrupt(struct phy_device *phydev) in rtl821x_ack_interrupt() argument
36 err = phy_read(phydev, RTL821x_INSR); in rtl821x_ack_interrupt()
41 static int rtl8211b_config_intr(struct phy_device *phydev) in rtl8211b_config_intr() argument
45 if (phydev->interrupts == PHY_INTERRUPT_ENABLED) in rtl8211b_config_intr()
46 err = phy_write(phydev, RTL821x_INER, in rtl8211b_config_intr()
49 err = phy_write(phydev, RTL821x_INER, 0); in rtl8211b_config_intr()
54 static int rtl8211e_config_intr(struct phy_device *phydev) in rtl8211e_config_intr() argument
58 if (phydev->interrupts == PHY_INTERRUPT_ENABLED) in rtl8211e_config_intr()
59 err = phy_write(phydev, RTL821x_INER, in rtl8211e_config_intr()
62 err = phy_write(phydev, RTL821x_INER, 0); in rtl8211e_config_intr()
Dbcm63xx.c23 static int bcm63xx_config_init(struct phy_device *phydev) in bcm63xx_config_init() argument
27 reg = phy_read(phydev, MII_BCM63XX_IR); in bcm63xx_config_init()
33 err = phy_write(phydev, MII_BCM63XX_IR, reg); in bcm63xx_config_init()
42 return phy_write(phydev, MII_BCM63XX_IR, reg); in bcm63xx_config_init()
45 static int bcm63xx_ack_interrupt(struct phy_device *phydev) in bcm63xx_ack_interrupt() argument
50 reg = phy_read(phydev, MII_BCM63XX_IR); in bcm63xx_ack_interrupt()
57 static int bcm63xx_config_intr(struct phy_device *phydev) in bcm63xx_config_intr() argument
61 reg = phy_read(phydev, MII_BCM63XX_IR); in bcm63xx_config_intr()
65 if (phydev->interrupts == PHY_INTERRUPT_ENABLED) in bcm63xx_config_intr()
70 err = phy_write(phydev, MII_BCM63XX_IR, reg); in bcm63xx_config_intr()
Damd.c32 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()
Dcicada.c68 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()
Dfixed_phy.c37 struct phy_device *phydev; member
144 fp->link_update(fp->phydev->attached_dev, in fixed_mdio_read()
166 int fixed_phy_set_link_update(struct phy_device *phydev, in fixed_phy_set_link_update() argument
173 if (!phydev || !phydev->bus) in fixed_phy_set_link_update()
177 if (fp->addr == phydev->addr) { in fixed_phy_set_link_update()
179 fp->phydev = phydev; in fixed_phy_set_link_update()
188 int fixed_phy_update_state(struct phy_device *phydev, in fixed_phy_update_state() argument
195 if (!phydev || !phydev->bus) in fixed_phy_update_state()
199 if (fp->addr == phydev->addr) { in fixed_phy_update_state()
/linux-4.1.27/include/linux/
Dphy.h460 int (*soft_reset)(struct phy_device *phydev);
466 int (*config_init)(struct phy_device *phydev);
472 int (*probe)(struct phy_device *phydev);
475 int (*suspend)(struct phy_device *phydev);
476 int (*resume)(struct phy_device *phydev);
484 int (*config_aneg)(struct phy_device *phydev);
487 int (*aneg_done)(struct phy_device *phydev);
490 int (*read_status)(struct phy_device *phydev);
493 int (*ack_interrupt)(struct phy_device *phydev);
496 int (*config_intr)(struct phy_device *phydev);
[all …]
Dphy_fixed.h21 extern int fixed_phy_set_link_update(struct phy_device *phydev,
24 extern int fixed_phy_update_state(struct phy_device *phydev,
43 static inline int fixed_phy_set_link_update(struct phy_device *phydev, in fixed_phy_set_link_update() argument
49 static inline int fixed_phy_update_state(struct phy_device *phydev, in fixed_phy_update_state() argument
Dbrcmphy.h209 static inline int bcm54xx_shadow_read(struct phy_device *phydev, u16 shadow) in bcm54xx_shadow_read() argument
211 phy_write(phydev, MII_BCM54XX_SHD, MII_BCM54XX_SHD_VAL(shadow)); in bcm54xx_shadow_read()
212 return MII_BCM54XX_SHD_DATA(phy_read(phydev, MII_BCM54XX_SHD)); in bcm54xx_shadow_read()
215 static inline int bcm54xx_shadow_write(struct phy_device *phydev, u16 shadow, in bcm54xx_shadow_write() argument
218 return phy_write(phydev, MII_BCM54XX_SHD, in bcm54xx_shadow_write()
Dnetdevice.h1752 struct phy_device *phydev; member
/linux-4.1.27/drivers/net/ethernet/broadcom/genet/
Dbcmmii.c84 struct phy_device *phydev = priv->phydev; in bcmgenet_mii_setup() local
88 if (priv->old_link != phydev->link) { in bcmgenet_mii_setup()
90 priv->old_link = phydev->link; in bcmgenet_mii_setup()
93 if (phydev->link) { in bcmgenet_mii_setup()
95 if (priv->old_speed != phydev->speed) { in bcmgenet_mii_setup()
97 priv->old_speed = phydev->speed; in bcmgenet_mii_setup()
100 if (priv->old_duplex != phydev->duplex) { in bcmgenet_mii_setup()
102 priv->old_duplex = phydev->duplex; in bcmgenet_mii_setup()
105 if (priv->old_pause != phydev->pause) { in bcmgenet_mii_setup()
107 priv->old_pause = phydev->pause; in bcmgenet_mii_setup()
[all …]
Dbcmgenet.c393 if (!priv->phydev) in bcmgenet_get_settings()
396 return phy_ethtool_gset(priv->phydev, cmd); in bcmgenet_get_settings()
407 if (!priv->phydev) in bcmgenet_set_settings()
410 return phy_ethtool_sset(priv->phydev, cmd); in bcmgenet_set_settings()
794 return phy_ethtool_get_eee(priv->phydev, e); in bcmgenet_get_eee()
811 ret = phy_init_eee(priv->phydev, 0); in bcmgenet_set_eee()
821 return phy_ethtool_set_eee(priv->phydev, e); in bcmgenet_set_eee()
828 return genphy_restart_aneg(priv->phydev); in bcmgenet_nway_reset()
858 phy_detach(priv->phydev); in bcmgenet_power_down()
928 if (!priv->phydev) in bcmgenet_ioctl()
[all …]
Dbcmgenet.h595 struct phy_device *phydev; member
/linux-4.1.27/net/core/
Dtimestamping.c28 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
74 phydev = skb->dev->phydev; in skb_defer_rx_timestamp()
75 if (likely(phydev->drv->rxtstamp)) in skb_defer_rx_timestamp()
76 return phydev->drv->rxtstamp(phydev, skb, type); in skb_defer_rx_timestamp()
Dethtool.c1576 struct phy_device *phydev = dev->phydev; in ethtool_get_ts_info() local
1581 if (phydev && phydev->drv && phydev->drv->ts_info) { in ethtool_get_ts_info()
1582 err = phydev->drv->ts_info(phydev, &info); in ethtool_get_ts_info()
1605 struct phy_device *phydev = dev->phydev; in __ethtool_get_module_info() local
1607 if (phydev && phydev->drv && phydev->drv->module_info) in __ethtool_get_module_info()
1608 return phydev->drv->module_info(phydev, modinfo); in __ethtool_get_module_info()
1639 struct phy_device *phydev = dev->phydev; in __ethtool_get_module_eeprom() local
1641 if (phydev && phydev->drv && phydev->drv->module_eeprom) in __ethtool_get_module_eeprom()
1642 return phydev->drv->module_eeprom(phydev, ee, data); in __ethtool_get_module_eeprom()
/linux-4.1.27/drivers/net/ethernet/amd/xgbe/
Dxgbe-mdio.c162 struct phy_device *phydev = pdata->mii->phy_map[XGBE_PRTAD]; in xgbe_dump_phy_registers() local
198 phydev->c45_ids.devices_in_package); in xgbe_dump_phy_registers()
199 for (i = 0; i < ARRAY_SIZE(phydev->c45_ids.device_ids); i++) in xgbe_dump_phy_registers()
201 phydev->c45_ids.device_ids[i]); in xgbe_dump_phy_registers()
209 struct phy_device *phydev; in xgbe_mdio_register() local
236 phydev = get_phy_device(mii, XGBE_PRTAD, true); in xgbe_mdio_register()
237 if (IS_ERR(phydev) || !phydev || in xgbe_mdio_register()
238 !phydev->c45_ids.device_ids[MDIO_MMD_PCS]) { in xgbe_mdio_register()
240 ret = phydev ? PTR_ERR(phydev) : -ENOLINK; in xgbe_mdio_register()
244 MDIO_ID_ARGS(phydev->c45_ids.device_ids[MDIO_MMD_PCS])); in xgbe_mdio_register()
[all …]
Dxgbe-ethtool.c253 struct phy_device *phydev = pdata->phydev; in xgbe_set_pauseparam() local
263 phydev->advertising |= ADVERTISED_Pause; in xgbe_set_pauseparam()
264 phydev->advertising |= ADVERTISED_Asym_Pause; in xgbe_set_pauseparam()
267 phydev->advertising &= ~ADVERTISED_Pause; in xgbe_set_pauseparam()
268 phydev->advertising &= ~ADVERTISED_Asym_Pause; in xgbe_set_pauseparam()
275 ret = phy_start_aneg(phydev); in xgbe_set_pauseparam()
290 if (!pdata->phydev) in xgbe_get_settings()
293 ret = phy_ethtool_gset(pdata->phydev, cmd); in xgbe_get_settings()
304 struct phy_device *phydev = pdata->phydev; in xgbe_set_settings() local
310 if (!pdata->phydev) in xgbe_set_settings()
[all …]
Dxgbe-drv.c766 struct phy_device *phydev = pdata->phydev; in xgbe_adjust_link() local
769 if (!phydev) in xgbe_adjust_link()
772 if (phydev->link) { in xgbe_adjust_link()
775 if (phydev->pause || phydev->asym_pause) { in xgbe_adjust_link()
795 if (phydev->speed != pdata->phy_speed) { in xgbe_adjust_link()
798 switch (phydev->speed) { in xgbe_adjust_link()
811 pdata->phy_speed = phydev->speed; in xgbe_adjust_link()
814 if (phydev->link != pdata->phy_link) { in xgbe_adjust_link()
825 phy_print_status(phydev); in xgbe_adjust_link()
831 struct phy_device *phydev = pdata->phydev; in xgbe_phy_init() local
[all …]
Dxgbe.h737 struct phy_device *phydev; member
Dxgbe-dev.c913 struct phy_device *phydev = pdata->phydev; in xgbe_write_mmd_regs() local
917 if (phydev->supported & SUPPORTED_1000baseKX_Full) in xgbe_write_mmd_regs()
/linux-4.1.27/drivers/staging/octeon/
Dethernet-mdio.c58 if (priv->phydev) in cvm_oct_get_settings()
59 return phy_ethtool_gset(priv->phydev, cmd); in cvm_oct_get_settings()
71 if (priv->phydev) in cvm_oct_set_settings()
72 return phy_ethtool_sset(priv->phydev, cmd); in cvm_oct_set_settings()
84 if (priv->phydev) in cvm_oct_nway_reset()
85 return phy_start_aneg(priv->phydev); in cvm_oct_nway_reset()
113 if (!priv->phydev) in cvm_oct_ioctl()
116 return phy_mii_ioctl(priv->phydev, rq, cmd); in cvm_oct_ioctl()
138 if (priv->last_link != priv->phydev->link) { in cvm_oct_adjust_link()
139 priv->last_link = priv->phydev->link; in cvm_oct_adjust_link()
[all …]
Dethernet-rgmii.c56 int use_global_register_lock = (priv->phydev == NULL); in cvm_oct_rgmii_poll()
66 mutex_lock(&priv->phydev->bus->mdio_lock); in cvm_oct_rgmii_poll()
132 mutex_unlock(&priv->phydev->bus->mdio_lock); in cvm_oct_rgmii_poll()
164 if (priv->phydev == NULL) { in cvm_oct_rgmii_poll()
172 mutex_unlock(&priv->phydev->bus->mdio_lock); in cvm_oct_rgmii_poll()
174 if (priv->phydev == NULL) { in cvm_oct_rgmii_poll()
317 if (priv->phydev) { in cvm_oct_rgmii_open()
318 int r = phy_read_status(priv->phydev); in cvm_oct_rgmii_open()
320 if (r == 0 && priv->phydev->link == 0) in cvm_oct_rgmii_open()
Dethernet-xaui.c100 if (priv->phydev) { in cvm_oct_xaui_open()
101 int r = phy_read_status(priv->phydev); in cvm_oct_xaui_open()
103 if (r == 0 && priv->phydev->link == 0) in cvm_oct_xaui_open()
135 if (!octeon_is_simulation() && priv->phydev == NULL) in cvm_oct_xaui_init()
Dethernet-sgmii.c100 if (priv->phydev) { in cvm_oct_sgmii_open()
101 int r = phy_read_status(priv->phydev); in cvm_oct_sgmii_open()
103 if (r == 0 && priv->phydev->link == 0) in cvm_oct_sgmii_open()
Docteon-ethernet.h58 struct phy_device *phydev; member
Dethernet.c498 if (priv->phydev) in cvm_oct_common_uninit()
499 phy_disconnect(priv->phydev); in cvm_oct_common_uninit()
/linux-4.1.27/drivers/net/usb/
Dax88172a.c32 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 …]
/linux-4.1.27/drivers/net/ethernet/
Ddnet.c176 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 …]
Dlantiq_etop.c105 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 …]
Dethoc.c896 struct phy_device *phydev = priv->phy; in ethoc_get_settings() local
898 if (!phydev) in ethoc_get_settings()
901 return phy_ethtool_gset(phydev, cmd); in ethoc_get_settings()
907 struct phy_device *phydev = priv->phy; in ethoc_set_settings() local
909 if (!phydev) in ethoc_set_settings()
912 return phy_ethtool_sset(phydev, cmd); in ethoc_set_settings()
/linux-4.1.27/arch/powerpc/platforms/85xx/
Dmpc85xx_mds.c68 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.1.27/drivers/net/ethernet/freescale/
Ducc_geth_ethtool.c111 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()
363 struct phy_device *phydev = ugeth->phydev; in uec_get_wol() local
[all …]
Dfec_mpc52xx.c69 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 …]
Dgianfar.c1052 if (!priv->phydev) in gfar_ioctl()
1055 return phy_mii_ioctl(priv->phydev, rq, cmd); in gfar_ioctl()
1572 phy_stop(priv->phydev); in gfar_suspend()
1595 if (!magic_packet && priv->phydev) in gfar_resume()
1596 phy_start(priv->phydev); in gfar_resume()
1646 if (priv->phydev) in gfar_restore()
1647 phy_start(priv->phydev); in gfar_restore()
1733 priv->phydev = of_phy_connect(dev, priv->phy_node, &adjust_link, 0, in init_phy()
1735 if (!priv->phydev) { in init_phy()
1744 priv->phydev->supported &= (GFAR_SUPPORTED | gigabit_support); in init_phy()
[all …]
Dgianfar_ethtool.c191 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 …]
Ducc_geth.c1584 struct phy_device *phydev = ugeth->phydev; in adjust_link() local
1590 if (phydev->link) { in adjust_link()
1595 if (phydev->duplex != ugeth->oldduplex) { in adjust_link()
1597 if (!(phydev->duplex)) in adjust_link()
1601 ugeth->oldduplex = phydev->duplex; in adjust_link()
1604 if (phydev->speed != ugeth->oldspeed) { in adjust_link()
1606 switch (phydev->speed) { in adjust_link()
1624 if (phydev->speed == SPEED_10) in adjust_link()
1634 dev->name, phydev->speed); in adjust_link()
1637 ugeth->oldspeed = phydev->speed; in adjust_link()
[all …]
Dfec_main.c2091 struct phy_device *phydev = fep->phy_dev; in fec_enet_get_settings() local
2093 if (!phydev) in fec_enet_get_settings()
2096 return phy_ethtool_gset(phydev, cmd); in fec_enet_get_settings()
2103 struct phy_device *phydev = fep->phy_dev; in fec_enet_set_settings() local
2105 if (!phydev) in fec_enet_set_settings()
2108 return phy_ethtool_sset(phydev, cmd); in fec_enet_set_settings()
2311 struct phy_device *phydev = fep->phy_dev; in fec_enet_nway_reset() local
2313 if (!phydev) in fec_enet_nway_reset()
2316 return genphy_restart_aneg(phydev); in fec_enet_nway_reset()
2540 struct phy_device *phydev = fep->phy_dev; in fec_enet_ioctl() local
[all …]
Dgianfar.h1142 struct phy_device *phydev; member
1305 void gfar_phy_test(struct mii_bus *bus, struct phy_device *phydev, int enable,
Ducc_geth.h1218 struct phy_device *phydev; member
/linux-4.1.27/drivers/net/ethernet/pasemi/
Dpasemi_mac_ethtool.c71 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()
Dpasemi_mac.c1030 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 …]
Dpasemi_mac.h74 struct phy_device *phydev; member
/linux-4.1.27/drivers/net/ethernet/altera/
Daltera_tse_main.c640 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 …]
Daltera_tse_ethtool.c239 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()
Daltera_tse.h477 struct phy_device *phydev; member
/linux-4.1.27/drivers/staging/netlogic/
Dxlr_net.c174 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.1.27/drivers/net/ethernet/rdc/
Dr6040.c203 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.1.27/drivers/net/ethernet/amd/
Dau1000_eth.c418 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.1.27/drivers/net/ethernet/adi/
Dbfin_mac.c313 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 …]
Dbfin_mac.h95 struct phy_device *phydev; member
/linux-4.1.27/drivers/net/ethernet/apm/xgene/
Dxgene_enet_ethtool.c60 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()
Dxgene_enet_hw.c643 struct phy_device *phydev = pdata->phy_dev; in xgene_enet_adjust_link() local
645 if (phydev->link) { in xgene_enet_adjust_link()
646 if (pdata->phy_speed != phydev->speed) { in xgene_enet_adjust_link()
647 pdata->phy_speed = phydev->speed; in xgene_enet_adjust_link()
651 phy_print_status(phydev); in xgene_enet_adjust_link()
657 phy_print_status(phydev); in xgene_enet_adjust_link()
/linux-4.1.27/drivers/net/ethernet/agere/
Det131x.c443 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.1.27/drivers/net/ethernet/freescale/fs_enet/
Dfs_enet-main.c637 phy_stop(fep->phydev); in fs_timeout()
640 phy_start(fep->phydev); in fs_timeout()
643 phy_start(fep->phydev); in fs_timeout()
657 struct phy_device *phydev = fep->phydev; in generic_adjust_link() local
660 if (phydev->link) { in generic_adjust_link()
662 if (phydev->duplex != fep->oldduplex) { in generic_adjust_link()
664 fep->oldduplex = phydev->duplex; in generic_adjust_link()
667 if (phydev->speed != fep->oldspeed) { in generic_adjust_link()
669 fep->oldspeed = phydev->speed; in generic_adjust_link()
687 phy_print_status(phydev); in generic_adjust_link()
[all …]
Dmac-fec.c257 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()
Dfs_enet.h152 struct phy_device *phydev; member
Dmac-fcc.c373 if (fep->phydev->speed == 100) in restart()
399 if (fep->phydev->duplex) in restart()
Dmac-scc.c355 if (fep->phydev->duplex) in restart()
/linux-4.1.27/drivers/net/ethernet/nxp/
Dlpc_eth.c754 struct phy_device *phydev = pldat->phy_dev; in lpc_handle_link_change() local
761 if (phydev->link) { in lpc_handle_link_change()
762 if ((pldat->speed != phydev->speed) || in lpc_handle_link_change()
763 (pldat->duplex != phydev->duplex)) { in lpc_handle_link_change()
764 pldat->speed = phydev->speed; in lpc_handle_link_change()
765 pldat->duplex = phydev->duplex; in lpc_handle_link_change()
770 if (phydev->link != pldat->link) { in lpc_handle_link_change()
771 if (!phydev->link) { in lpc_handle_link_change()
775 pldat->link = phydev->link; in lpc_handle_link_change()
789 struct phy_device *phydev = phy_find_first(pldat->mii_bus); in lpc_mii_probe() local
[all …]
/linux-4.1.27/drivers/net/ethernet/octeon/
Docteon_mgmt.c149 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.1.27/drivers/net/ethernet/stmicro/stmmac/
Dstmmac_mdio.c239 struct phy_device *phydev = new_bus->phy_map[addr]; in stmmac_mdio_register() local
240 if (phydev) { in stmmac_mdio_register()
252 phydev->irq = mdio_bus_data->probed_phy_irq; in stmmac_mdio_register()
264 switch (phydev->irq) { in stmmac_mdio_register()
272 sprintf(irq_num, "%d", phydev->irq); in stmmac_mdio_register()
277 ndev->name, phydev->phy_id, addr, in stmmac_mdio_register()
278 irq_str, dev_name(&phydev->dev), in stmmac_mdio_register()
Dstmmac_main.c214 struct phy_device *phydev = priv->phydev; in stmmac_hw_fix_mac_speed() local
217 priv->plat->fix_mac_speed(priv->plat->bsp_priv, phydev->speed); in stmmac_hw_fix_mac_speed()
292 if (phy_init_eee(priv->phydev, 1)) { in stmmac_eee_init()
324 priv->hw->mac->set_eee_pls(priv->hw, priv->phydev->link); in stmmac_eee_init()
690 struct phy_device *phydev = priv->phydev; in stmmac_adjust_link() local
695 if (phydev == NULL) in stmmac_adjust_link()
700 if (phydev->link) { in stmmac_adjust_link()
705 if (phydev->duplex != priv->oldduplex) { in stmmac_adjust_link()
707 if (!(phydev->duplex)) in stmmac_adjust_link()
711 priv->oldduplex = phydev->duplex; in stmmac_adjust_link()
[all …]
Dstmmac_ethtool.c248 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()
Ddwmac-socfpga.c254 if (stpriv && stpriv->phydev) in socfpga_dwmac_init()
255 phy_resume(stpriv->phydev); in socfpga_dwmac_init()
Dstmmac.h81 struct phy_device *phydev ____cacheline_aligned_in_smp;
/linux-4.1.27/drivers/net/ethernet/allwinner/
Dsun4i-emac.c117 struct phy_device *phydev = db->phy_dev; in emac_handle_link_change() local
121 if (phydev->link) { in emac_handle_link_change()
122 if (db->speed != phydev->speed) { in emac_handle_link_change()
124 db->speed = phydev->speed; in emac_handle_link_change()
130 if (db->duplex != phydev->duplex) { in emac_handle_link_change()
132 db->duplex = phydev->duplex; in emac_handle_link_change()
139 if (phydev->link != db->link) { in emac_handle_link_change()
140 if (!phydev->link) { in emac_handle_link_change()
144 db->link = phydev->link; in emac_handle_link_change()
150 phy_print_status(phydev); in emac_handle_link_change()
[all …]
/linux-4.1.27/drivers/net/ethernet/faraday/
Dftgmac100.c75 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.1.27/drivers/net/ethernet/ti/
Ddavinci_emac.c351 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 …]
Dnetcp_ethss.c1650 struct phy_device *phy = ndev->phydev; in keystone_get_settings()
1675 struct phy_device *phy = ndev->phydev; in keystone_set_settings()
/linux-4.1.27/arch/arm/mach-imx/
Dmach-imx6q.c43 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.1.27/Documentation/networking/
Dphy.txt106 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.1.27/drivers/net/ethernet/cadence/
Dmacb.c251 struct phy_device *phydev = bp->phy_dev; in macb_handle_link_change() local
258 if (phydev->link) { in macb_handle_link_change()
259 if ((bp->speed != phydev->speed) || in macb_handle_link_change()
260 (bp->duplex != phydev->duplex)) { in macb_handle_link_change()
268 if (phydev->duplex) in macb_handle_link_change()
270 if (phydev->speed == SPEED_100) in macb_handle_link_change()
272 if (phydev->speed == SPEED_1000 && in macb_handle_link_change()
278 bp->speed = phydev->speed; in macb_handle_link_change()
279 bp->duplex = phydev->duplex; in macb_handle_link_change()
284 if (phydev->link != bp->link) { in macb_handle_link_change()
[all …]
/linux-4.1.27/drivers/net/ethernet/broadcom/
Dbcm63xx_enet.c790 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 …]
Db44.c1489 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 …]
Dbcmsysport.c107 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()
1051 struct phy_device *phydev = priv->phydev; in bcm_sysport_adj_link() local
1055 if (priv->old_link != phydev->link) { in bcm_sysport_adj_link()
1057 priv->old_link = phydev->link; in bcm_sysport_adj_link()
1060 if (priv->old_duplex != phydev->duplex) { in bcm_sysport_adj_link()
1062 priv->old_duplex = phydev->duplex; in bcm_sysport_adj_link()
1065 switch (phydev->speed) { in bcm_sysport_adj_link()
1083 if (phydev->duplex == DUPLEX_HALF) in bcm_sysport_adj_link()
1086 if (priv->old_pause != phydev->pause) { in bcm_sysport_adj_link()
[all …]
Dtg3.c1407 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 …]
Dbcm63xx_enet.h293 struct phy_device *phydev; member
Db44.h403 struct phy_device *phydev; member
Dbcmsysport.h675 struct phy_device *phydev; member
/linux-4.1.27/drivers/net/ethernet/samsung/sxgbe/
Dsxgbe_main.c132 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 …]
Dsxgbe_ethtool.c150 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()
Dsxgbe_common.h478 struct phy_device *phydev; member
/linux-4.1.27/Documentation/devicetree/bindings/arm/calxeda/
Dcombophy.txt7 - phydev: device ID for programming the combophy.
15 phydev = <31>;
/linux-4.1.27/drivers/net/ethernet/toshiba/
Dtc35815.c542 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.1.27/drivers/net/ethernet/renesas/
Dsh_eth.c1794 struct phy_device *phydev = mdp->phydev; in sh_eth_adjust_link() local
1797 if (phydev->link) { in sh_eth_adjust_link()
1798 if (phydev->duplex != mdp->duplex) { in sh_eth_adjust_link()
1800 mdp->duplex = phydev->duplex; in sh_eth_adjust_link()
1805 if (phydev->speed != mdp->speed) { in sh_eth_adjust_link()
1807 mdp->speed = phydev->speed; in sh_eth_adjust_link()
1816 mdp->link = phydev->link; in sh_eth_adjust_link()
1830 phy_print_status(phydev); in sh_eth_adjust_link()
1838 struct phy_device *phydev = NULL; in sh_eth_phy_init() local
1849 phydev = of_phy_connect(ndev, pn, in sh_eth_phy_init()
[all …]
Dsh_eth.h523 struct phy_device *phydev; /* PHY device control */ member
/linux-4.1.27/drivers/net/ethernet/xscale/
Dixp4xx_eth.c174 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.1.27/drivers/net/ethernet/aeroflex/
Dgreth.c1229 struct phy_device *phydev = greth->phy; in greth_link_change() local
1236 if (phydev->link) { in greth_link_change()
1238 if ((greth->speed != phydev->speed) || (greth->duplex != phydev->duplex)) { in greth_link_change()
1242 if (phydev->duplex) in greth_link_change()
1245 if (phydev->speed == SPEED_100) in greth_link_change()
1247 else if (phydev->speed == SPEED_1000) in greth_link_change()
1251 greth->speed = phydev->speed; in greth_link_change()
1252 greth->duplex = phydev->duplex; in greth_link_change()
1257 if (phydev->link != greth->link) { in greth_link_change()
1258 if (!phydev->link) { in greth_link_change()
[all …]
/linux-4.1.27/drivers/net/dsa/
Dbcm_sf2.c389 struct phy_device *phydev, in bcm_sf2_sw_set_eee() argument
400 p->eee_enabled = bcm_sf2_eee_init(ds, port, phydev); in bcm_sf2_sw_set_eee()
813 struct phy_device *phydev) in bcm_sf2_sw_adjust_link() argument
820 switch (phydev->interface) { in bcm_sf2_sw_adjust_link()
843 if (!phydev->link) { in bcm_sf2_sw_adjust_link()
862 if (phydev->pause) { in bcm_sf2_sw_adjust_link()
863 if (phydev->asym_pause) in bcm_sf2_sw_adjust_link()
875 switch (phydev->speed) { in bcm_sf2_sw_adjust_link()
884 if (phydev->link) in bcm_sf2_sw_adjust_link()
886 if (phydev->duplex == DUPLEX_FULL) in bcm_sf2_sw_adjust_link()
Dmv88e6171.c273 struct phy_device *phydev, struct ethtool_eee *e) in mv88e6171_set_eee() argument
278 return mv88e6xxx_set_eee(ds, port, phydev, e); in mv88e6171_set_eee()
Dmv88e6xxx.h300 struct phy_device *phydev, struct ethtool_eee *e);
Dmv88e6xxx.c849 struct phy_device *phydev, struct ethtool_eee *e) in mv88e6xxx_set_eee() argument
/linux-4.1.27/drivers/phy/
Dphy-miphy28lp.c207 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()
1148 struct miphy28lp_dev *miphy_dev = miphy_phy->phydev; in miphy28lp_probe_resets()
1246 miphy_dev->phys[port]->phydev = miphy_dev; in miphy28lp_probe()
/linux-4.1.27/drivers/net/ethernet/smsc/
Dsmsc9420.c1156 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()
Dsmsc911x.c1016 struct phy_device *phydev = NULL; in smsc911x_mii_probe() local
1020 phydev = phy_find_first(pdata->mii_bus); in smsc911x_mii_probe()
1021 if (!phydev) { in smsc911x_mii_probe()
1027 phydev->addr, phydev->phy_id); in smsc911x_mii_probe()
1029 ret = phy_connect_direct(dev, phydev, &smsc911x_phy_adjust_link, in smsc911x_mii_probe()
1039 phydev->drv->name, dev_name(&phydev->dev), phydev->irq); in smsc911x_mii_probe()
1042 phydev->supported &= (PHY_BASIC_FEATURES | SUPPORTED_Pause | in smsc911x_mii_probe()
1044 phydev->advertising = phydev->supported; in smsc911x_mii_probe()
1046 pdata->phy_dev = phydev; in smsc911x_mii_probe()
/linux-4.1.27/include/net/
Ddsa.h225 struct phy_device *phydev);
263 struct phy_device *phydev,
/linux-4.1.27/arch/arm/mach-davinci/
Dboard-dm644x-evm.c736 static int davinci_phy_fixup(struct phy_device *phydev) in davinci_phy_fixup() argument
744 control = phy_read(phydev, 26); in davinci_phy_fixup()
745 phy_write(phydev, 26, (control | 0x800)); in davinci_phy_fixup()
/linux-4.1.27/drivers/net/ethernet/marvell/
Dmvneta.c2602 struct phy_device *phydev = pp->phy_dev; in mvneta_adjust_link() local
2605 if (phydev->link) { in mvneta_adjust_link()
2606 if ((pp->speed != phydev->speed) || in mvneta_adjust_link()
2607 (pp->duplex != phydev->duplex)) { in mvneta_adjust_link()
2615 if (phydev->duplex) in mvneta_adjust_link()
2618 if (phydev->speed == SPEED_1000) in mvneta_adjust_link()
2620 else if (phydev->speed == SPEED_100) in mvneta_adjust_link()
2625 pp->duplex = phydev->duplex; in mvneta_adjust_link()
2626 pp->speed = phydev->speed; in mvneta_adjust_link()
2630 if (phydev->link != pp->link) { in mvneta_adjust_link()
[all …]
Dmvpp2.c4833 struct phy_device *phydev = port->phy_dev; in mvpp2_link_event() local
4837 if (phydev->link) { in mvpp2_link_event()
4838 if ((port->speed != phydev->speed) || in mvpp2_link_event()
4839 (port->duplex != phydev->duplex)) { in mvpp2_link_event()
4849 if (phydev->duplex) in mvpp2_link_event()
4852 if (phydev->speed == SPEED_1000) in mvpp2_link_event()
4854 else if (phydev->speed == SPEED_100) in mvpp2_link_event()
4859 port->duplex = phydev->duplex; in mvpp2_link_event()
4860 port->speed = phydev->speed; in mvpp2_link_event()
4864 if (phydev->link != port->link) { in mvpp2_link_event()
[all …]
Dmv643xx_eth.c2943 struct phy_device *phydev; in phy_scan() local
2958 phydev = ERR_PTR(-ENODEV); in phy_scan()
2965 phydev = phy_connect(mp->dev, phy_id, mv643xx_eth_adjust_link, in phy_scan()
2967 if (!IS_ERR(phydev)) { in phy_scan()
2973 return phydev; in phy_scan()
/linux-4.1.27/arch/arm/boot/dts/
Decx-common.dtsi231 phydev = <5>;
238 phydev = <31>;
/linux-4.1.27/drivers/net/ethernet/xilinx/
Dxilinx_axienet_main.c1080 struct phy_device *phydev = lp->phy_dev; in axienet_ethtools_get_settings() local
1081 if (!phydev) in axienet_ethtools_get_settings()
1083 return phy_ethtool_gset(phydev, ecmd); in axienet_ethtools_get_settings()
1101 struct phy_device *phydev = lp->phy_dev; in axienet_ethtools_set_settings() local
1102 if (!phydev) in axienet_ethtools_set_settings()
1104 return phy_ethtool_sset(phydev, ecmd); in axienet_ethtools_set_settings()
Dxilinx_emaclite.c826 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()