Home
last modified time | relevance | path

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

12

/drivers/net/phy/
Dphy.c46 void phy_print_status(struct phy_device *phydev) in phy_print_status() argument
48 pr_info("PHY: %s - Link is %s", dev_name(&phydev->dev), in phy_print_status()
49 phydev->link ? "Up" : "Down"); in phy_print_status()
50 if (phydev->link) in phy_print_status()
51 printk(" - %d/%s", phydev->speed, in phy_print_status()
52 DUPLEX_FULL == phydev->duplex ? in phy_print_status()
69 int phy_clear_interrupt(struct phy_device *phydev) in phy_clear_interrupt() argument
73 if (phydev->drv->ack_interrupt) in phy_clear_interrupt()
74 err = phydev->drv->ack_interrupt(phydev); in phy_clear_interrupt()
86 int phy_config_interrupt(struct phy_device *phydev, u32 interrupts) in phy_config_interrupt() argument
[all …]
Dphy_device.c46 void phy_device_free(struct phy_device *phydev) in phy_device_free() argument
48 kfree(phydev); in phy_device_free()
110 static int phy_needs_fixup(struct phy_device *phydev, struct phy_fixup *fixup) in phy_needs_fixup() argument
112 if (strcmp(fixup->bus_id, dev_name(&phydev->dev)) != 0) in phy_needs_fixup()
117 (phydev->phy_id & fixup->phy_uid_mask)) in phy_needs_fixup()
125 int phy_scan_fixups(struct phy_device *phydev) in phy_scan_fixups() argument
131 if (phy_needs_fixup(phydev, fixup)) { in phy_scan_fixups()
134 err = fixup->run(phydev); in phy_scan_fixups()
251 void phy_prepare_link(struct phy_device *phydev, in phy_prepare_link() argument
254 phydev->adjust_link = handler; in phy_prepare_link()
[all …]
Dmarvell.c85 static int marvell_ack_interrupt(struct phy_device *phydev) in marvell_ack_interrupt() argument
90 err = phy_read(phydev, MII_M1011_IEVENT); in marvell_ack_interrupt()
98 static int marvell_config_intr(struct phy_device *phydev) in marvell_config_intr() argument
102 if (phydev->interrupts == PHY_INTERRUPT_ENABLED) in marvell_config_intr()
103 err = phy_write(phydev, MII_M1011_IMASK, MII_M1011_IMASK_INIT); in marvell_config_intr()
105 err = phy_write(phydev, MII_M1011_IMASK, MII_M1011_IMASK_CLEAR); in marvell_config_intr()
110 static int marvell_config_aneg(struct phy_device *phydev) in marvell_config_aneg() argument
117 err = phy_write(phydev, MII_BMCR, BMCR_RESET); in marvell_config_aneg()
122 err = phy_write(phydev, 0x1d, 0x1f); in marvell_config_aneg()
126 err = phy_write(phydev, 0x1e, 0x200c); in marvell_config_aneg()
[all …]
Dnational.c54 static u8 ns_exp_read(struct phy_device *phydev, u16 reg) in ns_exp_read() argument
56 phy_write(phydev, NS_EXP_MEM_ADD, reg); in ns_exp_read()
57 return phy_read(phydev, NS_EXP_MEM_DATA); in ns_exp_read()
60 static void ns_exp_write(struct phy_device *phydev, u16 reg, u8 data) in ns_exp_write() argument
62 phy_write(phydev, NS_EXP_MEM_ADD, reg); in ns_exp_write()
63 phy_write(phydev, NS_EXP_MEM_DATA, data); in ns_exp_write()
66 static int ns_config_intr(struct phy_device *phydev) in ns_config_intr() argument
70 if (phydev->interrupts == PHY_INTERRUPT_ENABLED) in ns_config_intr()
71 err = phy_write(phydev, DP83865_INT_MASK_REG, in ns_config_intr()
74 err = phy_write(phydev, DP83865_INT_MASK_REG, 0); in ns_config_intr()
[all …]
Dbroadcom.c152 static int bcm54xx_shadow_read(struct phy_device *phydev, u16 shadow) in bcm54xx_shadow_read() argument
154 phy_write(phydev, MII_BCM54XX_SHD, MII_BCM54XX_SHD_VAL(shadow)); in bcm54xx_shadow_read()
155 return MII_BCM54XX_SHD_DATA(phy_read(phydev, MII_BCM54XX_SHD)); in bcm54xx_shadow_read()
158 static int bcm54xx_shadow_write(struct phy_device *phydev, u16 shadow, u16 val) in bcm54xx_shadow_write() argument
160 return phy_write(phydev, MII_BCM54XX_SHD, in bcm54xx_shadow_write()
167 static int bcm54xx_exp_read(struct phy_device *phydev, u8 regnum) in bcm54xx_exp_read() argument
171 val = phy_write(phydev, MII_BCM54XX_EXP_SEL, regnum); in bcm54xx_exp_read()
175 val = phy_read(phydev, MII_BCM54XX_EXP_DATA); in bcm54xx_exp_read()
178 phy_write(phydev, MII_BCM54XX_EXP_SEL, 0); in bcm54xx_exp_read()
183 static int bcm54xx_exp_write(struct phy_device *phydev, u16 regnum, u16 val) in bcm54xx_exp_write() argument
[all …]
Dicplus.c38 static int ip175c_config_init(struct phy_device *phydev) in ip175c_config_init() argument
46 err = phydev->bus->write(phydev->bus, 30, 0, 0x175c); in ip175c_config_init()
51 err = phydev->bus->read(phydev->bus, 30, 0); in ip175c_config_init()
57 err = phydev->bus->write(phydev->bus, 29, 31, 0x175c); in ip175c_config_init()
62 err = phydev->bus->write(phydev->bus, 29, 22, 0x420); in ip175c_config_init()
68 err = phydev->bus->write(phydev->bus, i, in ip175c_config_init()
75 err = phydev->bus->read(phydev->bus, i, MII_BMCR); in ip175c_config_init()
82 if (phydev->addr != 4) { in ip175c_config_init()
83 phydev->state = PHY_RUNNING; in ip175c_config_init()
84 phydev->speed = SPEED_100; in ip175c_config_init()
[all …]
Dmdio_bus.c117 struct phy_device *phydev; in mdiobus_register() local
119 phydev = mdiobus_scan(bus, i); in mdiobus_register()
120 if (IS_ERR(phydev)) { in mdiobus_register()
121 err = PTR_ERR(phydev); in mdiobus_register()
183 struct phy_device *phydev; in mdiobus_scan() local
186 phydev = get_phy_device(bus, addr); in mdiobus_scan()
187 if (IS_ERR(phydev) || phydev == NULL) in mdiobus_scan()
188 return phydev; in mdiobus_scan()
199 phydev->irq = bus->irq != NULL ? bus->irq[addr] : PHY_POLL; in mdiobus_scan()
201 phydev->dev.parent = bus->parent; in mdiobus_scan()
[all …]
Dlxt.c62 static int lxt970_ack_interrupt(struct phy_device *phydev) in lxt970_ack_interrupt() argument
66 err = phy_read(phydev, MII_BMSR); in lxt970_ack_interrupt()
71 err = phy_read(phydev, MII_LXT970_ISR); in lxt970_ack_interrupt()
79 static int lxt970_config_intr(struct phy_device *phydev) in lxt970_config_intr() argument
83 if(phydev->interrupts == PHY_INTERRUPT_ENABLED) in lxt970_config_intr()
84 err = phy_write(phydev, MII_LXT970_IER, MII_LXT970_IER_IEN); in lxt970_config_intr()
86 err = phy_write(phydev, MII_LXT970_IER, 0); in lxt970_config_intr()
91 static int lxt970_config_init(struct phy_device *phydev) in lxt970_config_init() argument
95 err = phy_write(phydev, MII_LXT970_CONFIG, 0); in lxt970_config_init()
101 static int lxt971_ack_interrupt(struct phy_device *phydev) in lxt971_ack_interrupt() argument
[all …]
Dvitesse.c64 static int vsc824x_config_init(struct phy_device *phydev) in vsc824x_config_init() argument
69 err = phy_write(phydev, MII_VSC8244_AUX_CONSTAT, in vsc824x_config_init()
74 extcon = phy_read(phydev, MII_VSC8244_EXT_CON1); in vsc824x_config_init()
82 if (phydev->interface == PHY_INTERFACE_MODE_RGMII_ID) in vsc824x_config_init()
86 err = phy_write(phydev, MII_VSC8244_EXT_CON1, extcon); in vsc824x_config_init()
91 static int vsc824x_ack_interrupt(struct phy_device *phydev) in vsc824x_ack_interrupt() argument
100 if (phydev->interrupts == PHY_INTERRUPT_ENABLED) in vsc824x_ack_interrupt()
101 err = phy_read(phydev, MII_VSC8244_ISTAT); in vsc824x_ack_interrupt()
106 static int vsc82xx_config_intr(struct phy_device *phydev) in vsc82xx_config_intr() argument
110 if (phydev->interrupts == PHY_INTERRUPT_ENABLED) in vsc82xx_config_intr()
[all …]
Ddavicom.c67 static int dm9161_config_intr(struct phy_device *phydev) in dm9161_config_intr() argument
71 temp = phy_read(phydev, MII_DM9161_INTR); in dm9161_config_intr()
76 if(PHY_INTERRUPT_ENABLED == phydev->interrupts ) in dm9161_config_intr()
81 temp = phy_write(phydev, MII_DM9161_INTR, temp); in dm9161_config_intr()
86 static int dm9161_config_aneg(struct phy_device *phydev) in dm9161_config_aneg() argument
91 err = phy_write(phydev, MII_BMCR, BMCR_ISOLATE); in dm9161_config_aneg()
97 err = genphy_config_aneg(phydev); in dm9161_config_aneg()
105 static int dm9161_config_init(struct phy_device *phydev) in dm9161_config_init() argument
110 err = phy_write(phydev, MII_BMCR, BMCR_ISOLATE); in dm9161_config_init()
115 switch (phydev->interface) { in dm9161_config_init()
[all …]
Det1011c.c53 static int et1011c_config_aneg(struct phy_device *phydev) in et1011c_config_aneg() argument
56 ctl = phy_read(phydev, MII_BMCR); in et1011c_config_aneg()
62 phy_write(phydev, MII_BMCR, ctl | BMCR_RESET); in et1011c_config_aneg()
64 return genphy_config_aneg(phydev); in et1011c_config_aneg()
67 static int et1011c_read_status(struct phy_device *phydev) in et1011c_read_status() argument
72 ret = genphy_read_status(phydev); in et1011c_read_status()
74 if (speed != phydev->speed) { in et1011c_read_status()
75 speed = phydev->speed; in et1011c_read_status()
76 val = phy_read(phydev, ET1011C_STATUS_REG); in et1011c_read_status()
79 val = phy_read(phydev, ET1011C_CONFIG_REG); in et1011c_read_status()
[all …]
Dqsemi.c64 static int qs6612_config_init(struct phy_device *phydev) in qs6612_config_init() argument
77 return phy_write(phydev, MII_QS6612_PCR, 0x0dc0); in qs6612_config_init()
80 static int qs6612_ack_interrupt(struct phy_device *phydev) in qs6612_ack_interrupt() argument
84 err = phy_read(phydev, MII_QS6612_ISR); in qs6612_ack_interrupt()
89 err = phy_read(phydev, MII_BMSR); in qs6612_ack_interrupt()
94 err = phy_read(phydev, MII_EXPANSION); in qs6612_ack_interrupt()
102 static int qs6612_config_intr(struct phy_device *phydev) in qs6612_config_intr() argument
105 if (phydev->interrupts == PHY_INTERRUPT_ENABLED) in qs6612_config_intr()
106 err = phy_write(phydev, MII_QS6612_IMR, in qs6612_config_intr()
109 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 …]
Dcicada.c69 static int cis820x_config_init(struct phy_device *phydev) in cis820x_config_init() argument
73 err = phy_write(phydev, MII_CIS8201_AUX_CONSTAT, in cis820x_config_init()
79 err = phy_write(phydev, MII_CIS8201_EXT_CON1, in cis820x_config_init()
85 static int cis820x_ack_interrupt(struct phy_device *phydev) in cis820x_ack_interrupt() argument
87 int err = phy_read(phydev, MII_CIS8201_ISTAT); in cis820x_ack_interrupt()
92 static int cis820x_config_intr(struct phy_device *phydev) in cis820x_config_intr() argument
96 if(phydev->interrupts == PHY_INTERRUPT_ENABLED) in cis820x_config_intr()
97 err = phy_write(phydev, MII_CIS8201_IMASK, in cis820x_config_intr()
100 err = phy_write(phydev, MII_CIS8201_IMASK, 0); in cis820x_config_intr()
Drealtek.c29 static int rtl821x_ack_interrupt(struct phy_device *phydev) in rtl821x_ack_interrupt() argument
33 err = phy_read(phydev, RTL821x_INSR); in rtl821x_ack_interrupt()
38 static int rtl821x_config_intr(struct phy_device *phydev) in rtl821x_config_intr() argument
42 if (phydev->interrupts == PHY_INTERRUPT_ENABLED) in rtl821x_config_intr()
43 err = phy_write(phydev, RTL821x_INER, in rtl821x_config_intr()
46 err = phy_write(phydev, RTL821x_INER, 0); in rtl821x_config_intr()
Dsmsc.c43 static int smsc_phy_config_intr(struct phy_device *phydev) in smsc_phy_config_intr() argument
45 int rc = phy_write (phydev, MII_LAN83C185_IM, in smsc_phy_config_intr()
46 ((PHY_INTERRUPT_ENABLED == phydev->interrupts) in smsc_phy_config_intr()
53 static int smsc_phy_ack_interrupt(struct phy_device *phydev) in smsc_phy_ack_interrupt() argument
55 int rc = phy_read (phydev, MII_LAN83C185_ISF); in smsc_phy_ack_interrupt()
60 static int smsc_phy_config_init(struct phy_device *phydev) in smsc_phy_config_init() argument
62 return smsc_phy_ack_interrupt (phydev); in smsc_phy_config_init()
Dfixed.c34 struct phy_device *phydev; member
128 fp->link_update(fp->phydev->attached_dev, in fixed_mdio_read()
150 int fixed_phy_set_link_update(struct phy_device *phydev, in fixed_phy_set_link_update() argument
157 if (!link_update || !phydev || !phydev->bus) in fixed_phy_set_link_update()
161 if (fp->id == phydev->phy_id) { in fixed_phy_set_link_update()
163 fp->phydev = phydev; in fixed_phy_set_link_update()
/drivers/net/
Ddnet.c182 struct phy_device *phydev = bp->phy_dev; in dnet_handle_link_change() local
193 if (phydev->link) { in dnet_handle_link_change()
194 if (bp->duplex != phydev->duplex) { in dnet_handle_link_change()
195 if (phydev->duplex) in dnet_handle_link_change()
202 bp->duplex = phydev->duplex; in dnet_handle_link_change()
206 if (bp->speed != phydev->speed) { in dnet_handle_link_change()
208 switch (phydev->speed) { in dnet_handle_link_change()
220 phydev->speed); in dnet_handle_link_change()
223 bp->speed = phydev->speed; in dnet_handle_link_change()
227 if (phydev->link != bp->link) { in dnet_handle_link_change()
[all …]
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()
337 switch (phydev->speed) { in bfin_mac_adjust_link()
347 DRV_NAME, phydev->speed); in bfin_mac_adjust_link()
354 lp->old_speed = phydev->speed; in bfin_mac_adjust_link()
370 phy_print_status(phydev); in bfin_mac_adjust_link()
[all …]
Dmacb.c138 struct phy_device *phydev = bp->phy_dev; in macb_handle_link_change() local
145 if (phydev->link) { in macb_handle_link_change()
146 if ((bp->speed != phydev->speed) || in macb_handle_link_change()
147 (bp->duplex != phydev->duplex)) { in macb_handle_link_change()
153 if (phydev->duplex) in macb_handle_link_change()
155 if (phydev->speed == SPEED_100) in macb_handle_link_change()
160 bp->speed = phydev->speed; in macb_handle_link_change()
161 bp->duplex = phydev->duplex; in macb_handle_link_change()
166 if (phydev->link != bp->link) { in macb_handle_link_change()
167 if (!phydev->link) { in macb_handle_link_change()
[all …]
Dau1000_eth.c287 struct phy_device *phydev = NULL; in mii_probe() local
294 phydev = au_macs[AU1XXX_PHY0_BUSID]->mii_bus->phy_map[AU1XXX_PHY0_ADDR]; in mii_probe()
302 phydev = au_macs[AU1XXX_PHY1_BUSID]->mii_bus->phy_map[AU1XXX_PHY1_ADDR]; in mii_probe()
316 phydev = aup->mii_bus->phy_map[phy_addr]; in mii_probe()
324 if (!phydev && (aup->mac_id == 1)) { in mii_probe()
343 phydev = tmp_phydev; in mii_probe()
350 if (!phydev) { in mii_probe()
356 BUG_ON(phydev->attached_dev); in mii_probe()
358 phydev = phy_connect(dev, phydev->dev.bus_id, &au1000_adjust_link, 0, in mii_probe()
361 if (IS_ERR(phydev)) { in mii_probe()
[all …]
Dfec_mpc52xx.c64 struct phy_device *phydev; member
166 struct phy_device *phydev = priv->phydev; in mpc52xx_fec_adjust_link() local
169 if (phydev->link != PHY_DOWN) { in mpc52xx_fec_adjust_link()
170 if (phydev->duplex != priv->duplex) { in mpc52xx_fec_adjust_link()
176 priv->duplex = phydev->duplex; in mpc52xx_fec_adjust_link()
183 if (phydev->duplex == DUPLEX_FULL) in mpc52xx_fec_adjust_link()
192 if (phydev->speed != priv->speed) { in mpc52xx_fec_adjust_link()
194 priv->speed = phydev->speed; in mpc52xx_fec_adjust_link()
199 priv->link = phydev->link; in mpc52xx_fec_adjust_link()
210 phy_print_status(phydev); in mpc52xx_fec_adjust_link()
[all …]
Ducc_geth_ethtool.c115 struct phy_device *phydev = ugeth->phydev; in uec_get_settings() local
118 if (!phydev) in uec_get_settings()
124 return phy_ethtool_gset(phydev, ecmd); in uec_get_settings()
131 struct phy_device *phydev = ugeth->phydev; in uec_set_settings() local
133 if (!phydev) in uec_set_settings()
136 return phy_ethtool_sset(phydev, ecmd); in uec_set_settings()
145 pause->autoneg = ugeth->phydev->autoneg; in uec_get_pauseparam()
163 if (ugeth->phydev->autoneg) { in uec_set_pauseparam()
344 return phy_start_aneg(ugeth->phydev); in uec_nway_reset()
Dsh_eth.c751 struct phy_device *phydev = mdp->phydev; in sh_eth_adjust_link() local
755 if (phydev->link != PHY_DOWN) { in sh_eth_adjust_link()
756 if (phydev->duplex != mdp->duplex) { in sh_eth_adjust_link()
758 mdp->duplex = phydev->duplex; in sh_eth_adjust_link()
770 if (phydev->speed != mdp->speed) { in sh_eth_adjust_link()
772 mdp->speed = phydev->speed; in sh_eth_adjust_link()
790 mdp->link = phydev->link; in sh_eth_adjust_link()
800 phy_print_status(phydev); in sh_eth_adjust_link()
808 struct phy_device *phydev = NULL; in sh_eth_phy_init() local
818 phydev = phy_connect(ndev, phy_id, &sh_eth_adjust_link, in sh_eth_phy_init()
[all …]
/drivers/net/fs_enet/
Dfs_enet-main.c678 phy_stop(fep->phydev); in fs_timeout()
681 phy_start(fep->phydev); in fs_timeout()
684 phy_start(fep->phydev); in fs_timeout()
698 struct phy_device *phydev = fep->phydev; in generic_adjust_link() local
701 if (phydev->link) { in generic_adjust_link()
703 if (phydev->duplex != fep->oldduplex) { in generic_adjust_link()
705 fep->oldduplex = phydev->duplex; in generic_adjust_link()
708 if (phydev->speed != fep->oldspeed) { in generic_adjust_link()
710 fep->oldspeed = phydev->speed; in generic_adjust_link()
728 phy_print_status(phydev); in generic_adjust_link()
[all …]

12