Home
last modified time | relevance | path

Searched refs:phy_id (Results 1 – 200 of 306) sorted by relevance

12

/linux-4.4.14/drivers/scsi/aic94xx/
Daic94xx_scb.c90 int phy_id = dl->status_block[0] & DL_PHY_MASK; in asd_phy_event_tasklet() local
91 struct asd_phy *phy = &asd_ha->phys[phy_id]; in asd_phy_event_tasklet()
99 ASD_DPRINTK("phy%d: device unplugged\n", phy_id); in asd_phy_event_tasklet()
100 asd_turn_led(asd_ha, phy_id, 0); in asd_phy_event_tasklet()
106 asd_turn_led(asd_ha, phy_id, 1); in asd_phy_event_tasklet()
109 phy_id, phy->sas_phy.linkrate, phy->sas_phy.iproto); in asd_phy_event_tasklet()
114 asd_turn_led(asd_ha, phy_id, 1); in asd_phy_event_tasklet()
119 ASD_DPRINTK("phy%d error while OOB: oob status:0x%x\n", phy_id, in asd_phy_event_tasklet()
121 asd_turn_led(asd_ha, phy_id, 0); in asd_phy_event_tasklet()
237 int edb_id, int phy_id) in asd_bytes_dmaed_tasklet() argument
[all …]
Daic94xx_hwi.c84 phy->identify_frame->phy_id = phy->sas_phy.id; in asd_init_phy_identify()
1279 void asd_turn_led(struct asd_ha_struct *asd_ha, int phy_id, int op) in asd_turn_led() argument
1281 if (phy_id < ASD_MAX_PHYS) { in asd_turn_led()
1282 u32 v = asd_read_reg_dword(asd_ha, LmCONTROL(phy_id)); in asd_turn_led()
1287 asd_write_reg_dword(asd_ha, LmCONTROL(phy_id), v); in asd_turn_led()
1300 void asd_control_led(struct asd_ha_struct *asd_ha, int phy_id, int op) in asd_control_led() argument
1302 if (phy_id < ASD_MAX_PHYS) { in asd_control_led()
1307 v |= (1 << phy_id); in asd_control_led()
1309 v &= ~(1 << phy_id); in asd_control_led()
1314 v |= (1 << phy_id); in asd_control_led()
[all …]
Daic94xx_hwi.h390 void asd_build_control_phy(struct asd_ascb *ascb, int phy_id, u8 subfunc);
391 void asd_control_led(struct asd_ha_struct *asd_ha, int phy_id, int op);
392 void asd_turn_led(struct asd_ha_struct *asd_ha, int phy_id, int op);
Daic94xx_sas.h438 u8 phy_id; member
485 u8 phy_id; member
583 u8 phy_id; member
/linux-4.4.14/drivers/scsi/mvsas/
Dmv_94xx.c51 void set_phy_tuning(struct mvs_info *mvi, int phy_id, in set_phy_tuning() argument
96 mvs_write_port_vsr_addr(mvi, phy_id, setting_0); in set_phy_tuning()
97 tmp = mvs_read_port_vsr_data(mvi, phy_id); in set_phy_tuning()
102 mvs_write_port_vsr_data(mvi, phy_id, tmp); in set_phy_tuning()
105 mvs_write_port_vsr_addr(mvi, phy_id, setting_1); in set_phy_tuning()
106 tmp = mvs_read_port_vsr_data(mvi, phy_id); in set_phy_tuning()
109 mvs_write_port_vsr_data(mvi, phy_id, tmp); in set_phy_tuning()
113 void set_phy_ffe_tuning(struct mvs_info *mvi, int phy_id, in set_phy_ffe_tuning() argument
130 mvs_write_port_vsr_addr(mvi, phy_id, VSR_PHY_FFE_CONTROL); in set_phy_ffe_tuning()
131 tmp = mvs_read_port_vsr_data(mvi, phy_id); in set_phy_ffe_tuning()
[all …]
Dmv_64xx.c44 static void mvs_64xx_enable_xmt(struct mvs_info *mvi, int phy_id) in mvs_64xx_enable_xmt() argument
51 tmp |= 1 << (phy_id + PCS_EN_PORT_XMT_SHIFT); in mvs_64xx_enable_xmt()
53 tmp |= 1 << (phy_id + PCS_EN_PORT_XMT_SHIFT2); in mvs_64xx_enable_xmt()
83 static void mvs_64xx_stp_reset(struct mvs_info *mvi, u32 phy_id) in mvs_64xx_stp_reset() argument
89 if (phy_id < MVS_SOC_PORTS) in mvs_64xx_stp_reset()
98 if (phy_id < MVS_SOC_PORTS) in mvs_64xx_stp_reset()
99 tmp |= (1U << phy_id) << PCTL_LINK_OFFS; in mvs_64xx_stp_reset()
101 tmp |= (1U << (phy_id - MVS_SOC_PORTS)) << PCTL_LINK_OFFS; in mvs_64xx_stp_reset()
104 if (phy_id < MVS_SOC_PORTS) { in mvs_64xx_stp_reset()
120 static void mvs_64xx_phy_reset(struct mvs_info *mvi, u32 phy_id, int hard) in mvs_64xx_phy_reset() argument
[all …]
Dmv_sas.h152 void (*phy_set_link_rate)(struct mvs_info *mvi, u32 phy_id,
155 void (*phy_disable)(struct mvs_info *mvi, u32 phy_id);
156 void (*phy_enable)(struct mvs_info *mvi, u32 phy_id);
157 void (*phy_reset)(struct mvs_info *mvi, u32 phy_id, int hard);
158 void (*stp_reset)(struct mvs_info *mvi, u32 phy_id);
Dmv_sas.c182 int rc = 0, phy_id = sas_phy->id; in mvs_phy_control() local
197 MVS_CHIP_DISP->phy_set_link_rate(mvi, phy_id, funcdata); in mvs_phy_control()
201 tmp = MVS_CHIP_DISP->read_phy_ctl(mvi, phy_id); in mvs_phy_control()
204 MVS_CHIP_DISP->phy_reset(mvi, phy_id, MVS_HARD_RESET); in mvs_phy_control()
208 MVS_CHIP_DISP->phy_enable(mvi, phy_id); in mvs_phy_control()
209 MVS_CHIP_DISP->phy_reset(mvi, phy_id, MVS_SOFT_RESET); in mvs_phy_control()
213 MVS_CHIP_DISP->phy_disable(mvi, phy_id); in mvs_phy_control()
1209 int phy_id; in mvs_dev_found_notify() local
1212 for (phy_id = 0; phy_id < phy_num; phy_id++) { in mvs_dev_found_notify()
1213 phy = &parent_dev->ex_dev.ex_phy[phy_id]; in mvs_dev_found_notify()
[all …]
Dmv_init.c89 static void mvs_phy_init(struct mvs_info *mvi, int phy_id) in mvs_phy_init() argument
91 struct mvs_phy *phy = &mvi->phy[phy_id]; in mvs_phy_init()
97 sas_phy->enabled = (phy_id < mvi->chip->n_phy) ? 1 : 0; in mvs_phy_init()
106 sas_phy->id = phy_id; in mvs_phy_init()
/linux-4.4.14/drivers/net/
Dmii.c40 advert = mii->mdio_read(mii->dev, mii->phy_id, addr); in mii_get_an()
76 ecmd->phy_address = mii->phy_id; in mii_ethtool_gset()
81 bmcr = mii->mdio_read(dev, mii->phy_id, MII_BMCR); in mii_ethtool_gset()
82 bmsr = mii->mdio_read(dev, mii->phy_id, MII_BMSR); in mii_ethtool_gset()
84 ctrl1000 = mii->mdio_read(dev, mii->phy_id, MII_CTRL1000); in mii_ethtool_gset()
85 stat1000 = mii->mdio_read(dev, mii->phy_id, MII_STAT1000); in mii_ethtool_gset()
159 if (ecmd->phy_address != mii->phy_id) in mii_ethtool_sset()
181 advert = mii->mdio_read(dev, mii->phy_id, MII_ADVERTISE); in mii_ethtool_sset()
184 advert2 = mii->mdio_read(dev, mii->phy_id, MII_CTRL1000); in mii_ethtool_sset()
193 mii->mdio_write(dev, mii->phy_id, MII_ADVERTISE, tmp); in mii_ethtool_sset()
[all …]
Dsungem_phy.c70 static int reset_one_mii_phy(struct mii_phy* phy, int phy_id) in reset_one_mii_phy() argument
75 val = __sungem_phy_read(phy, phy_id, MII_BMCR); in reset_one_mii_phy()
78 __sungem_phy_write(phy, phy_id, MII_BMCR, val); in reset_one_mii_phy()
83 val = __sungem_phy_read(phy, phy_id, MII_BMCR); in reset_one_mii_phy()
89 __sungem_phy_write(phy, phy_id, MII_BMCR, val & ~BMCR_ISOLATE); in reset_one_mii_phy()
899 .phy_id = 0x00406210,
918 .phy_id = 0x004061e0,
936 .phy_id = 0x0143bc30,
955 .phy_id = 0x00206040,
974 .phy_id = 0x00206050,
[all …]
Dmdio.c363 mii_data->phy_id = mdio->prtad; in mdio_mii_ioctl()
375 mdio_phy_id_is_c45(mii_data->phy_id)) { in mdio_mii_ioctl()
376 prtad = mdio_phy_id_prtad(mii_data->phy_id); in mdio_mii_ioctl()
377 devad = mdio_phy_id_devad(mii_data->phy_id); in mdio_mii_ioctl()
379 mii_data->phy_id < 0x20) { in mdio_mii_ioctl()
380 prtad = mii_data->phy_id; in mdio_mii_ioctl()
385 mii_data->phy_id == mdio->prtad) { in mdio_mii_ioctl()
/linux-4.4.14/drivers/scsi/libsas/
Dsas_expander.c38 static int sas_configure_phy(struct domain_device *dev, int phy_id,
198 static void sas_set_ex_phy(struct domain_device *dev, int phy_id, void *rsp) in sas_set_ex_phy() argument
207 struct ex_phy *phy = &ex->ex_phy[phy_id]; in sas_set_ex_phy()
215 phy->phy = sas_phy_alloc(&rphy->dev, phy_id); in sas_set_ex_phy()
243 phy->phy_id = phy_id; in sas_set_ex_phy()
252 phy->phy_id = phy_id; in sas_set_ex_phy()
279 phy->phy->identify.phy_identifier = phy_id; in sas_set_ex_phy()
341 SAS_ADDR(dev->sas_addr), phy->phy_id, in sas_set_ex_phy()
347 struct domain_device *sas_ex_to_ata(struct domain_device *ex_dev, int phy_id) in sas_ex_to_ata() argument
349 struct ex_phy *ex_phy = &ex_dev->ex_dev.ex_phy[phy_id]; in sas_ex_to_ata()
[all …]
Dsas_host_smp.c23 u8 phy_id) in sas_host_smp_discover() argument
28 if (phy_id >= sas_ha->num_phys) { in sas_host_smp_discover()
34 phy = sas_ha->sas_phy[phy_id]->phy; in sas_host_smp_discover()
35 resp_data[9] = phy_id; in sas_host_smp_discover()
38 memcpy(resp_data + 24, sas_ha->sas_phy[phy_id]->attached_sas_addr, in sas_host_smp_discover()
45 if (!sas_ha->sas_phy[phy_id]->port || in sas_host_smp_discover()
46 !sas_ha->sas_phy[phy_id]->port->port_dev) in sas_host_smp_discover()
49 rphy = sas_ha->sas_phy[phy_id]->port->port_dev->rphy; in sas_host_smp_discover()
141 u8 phy_id) in sas_report_phy_sata() argument
147 if (phy_id >= sas_ha->num_phys) { in sas_report_phy_sata()
[all …]
Dsas_internal.h86 int sas_smp_phy_control(struct domain_device *dev, int phy_id,
93 struct domain_device *sas_ex_to_ata(struct domain_device *ex_dev, int phy_id);
95 int sas_get_report_phy_sata(struct domain_device *dev, int phy_id,
166 static inline void sas_add_parent_port(struct domain_device *dev, int phy_id) in sas_add_parent_port() argument
169 struct ex_phy *ex_phy = &ex->ex_phy[phy_id]; in sas_add_parent_port()
172 ex->parent_port = sas_port_alloc(&dev->rphy->dev, phy_id); in sas_add_parent_port()
/linux-4.4.14/drivers/net/phy/
Dvitesse.c134 (phydev->drv->phy_id == PHY_ID_VSC8234 || in vsc82xx_config_intr()
135 phydev->drv->phy_id == PHY_ID_VSC8244 || in vsc82xx_config_intr()
136 phydev->drv->phy_id == PHY_ID_VSC8514 || in vsc82xx_config_intr()
137 phydev->drv->phy_id == PHY_ID_VSC8574 || in vsc82xx_config_intr()
138 phydev->drv->phy_id == PHY_ID_VSC8601) ? in vsc82xx_config_intr()
229 .phy_id = PHY_ID_VSC8234,
241 .phy_id = PHY_ID_VSC8244,
253 .phy_id = PHY_ID_VSC8514,
265 .phy_id = PHY_ID_VSC8574,
277 .phy_id = PHY_ID_VSC8601,
[all …]
Dbroadcom.c24 ((phydev)->drv->phy_id & (phydev)->drv->phy_id_mask)
27 ((phydev)->drv->phy_id & ~((phydev)->drv->phy_id_mask))
90 if (phydev->drv->phy_id == PHY_ID_BCM50610) { in bcm54xx_phydsp_config()
452 .phy_id = PHY_ID_BCM5411,
465 .phy_id = PHY_ID_BCM5421,
478 .phy_id = PHY_ID_BCM5461,
491 .phy_id = PHY_ID_BCM54616S,
504 .phy_id = PHY_ID_BCM5464,
517 .phy_id = PHY_ID_BCM5481,
530 .phy_id = PHY_ID_BCM5482,
[all …]
Drealtek.c120 .phy_id = 0x00008201,
129 .phy_id = 0x001cc912,
140 .phy_id = 0x001cc914,
153 .phy_id = 0x001cc915,
166 .phy_id = 0x001cc916,
Dmdio-octeon.c150 int phy_id, int regnum) in octeon_mdiobus_c45_addr() argument
166 smi_cmd.s.phy_adr = phy_id; in octeon_mdiobus_c45_addr()
183 static int octeon_mdiobus_read(struct mii_bus *bus, int phy_id, int regnum) in octeon_mdiobus_read() argument
192 int r = octeon_mdiobus_c45_addr(p, phy_id, regnum); in octeon_mdiobus_read()
205 smi_cmd.s.phy_adr = phy_id; in octeon_mdiobus_read()
223 static int octeon_mdiobus_write(struct mii_bus *bus, int phy_id, in octeon_mdiobus_write() argument
234 int r = octeon_mdiobus_c45_addr(p, phy_id, regnum); in octeon_mdiobus_write()
250 smi_cmd.s.phy_adr = phy_id; in octeon_mdiobus_write()
Dsmsc.c154 .phy_id = 0x0007c0a0, /* OUI=0x00800f, Model#=0x0a */
177 .phy_id = 0x0007c0b0, /* OUI=0x00800f, Model#=0x0b */
200 .phy_id = 0x0007c0c0, /* OUI=0x00800f, Model#=0x0c */
223 .phy_id = 0x0007c0d0, /* OUI=0x00800f, Model#=0x0d */
245 .phy_id = 0x0007c0f0, /* OUI=0x00800f, Model#=0x0f */
Ddavicom.c149 .phy_id = 0x0181b880,
161 .phy_id = 0x0181b8b0,
173 .phy_id = 0x0181b8a0,
185 .phy_id = 0x00181b80,
Dmdio-bcm-unimac.c60 static int unimac_mdio_read(struct mii_bus *bus, int phy_id, int reg) in unimac_mdio_read() argument
67 cmd = MDIO_RD | (phy_id << MDIO_PMD_SHIFT) | (reg << MDIO_REG_SHIFT); in unimac_mdio_read()
90 if (!(bus->phy_ignore_ta_mask & 1 << phy_id) && (cmd & MDIO_READ_FAIL)) in unimac_mdio_read()
96 static int unimac_mdio_write(struct mii_bus *bus, int phy_id, in unimac_mdio_write() argument
104 cmd = MDIO_WR | (phy_id << MDIO_PMD_SHIFT) | in unimac_mdio_write()
Daquantia.c121 .phy_id = PHY_ID_AQ1202,
134 .phy_id = PHY_ID_AQ2104,
147 .phy_id = PHY_ID_AQR105,
160 .phy_id = PHY_ID_AQR405,
Dphy_device.c122 (phydev->phy_id & fixup->phy_uid_mask)) in phy_needs_fixup()
151 struct phy_device *phy_device_create(struct mii_bus *bus, int addr, int phy_id, in phy_device_create() argument
175 dev->phy_id = phy_id; in phy_device_create()
200 request_module(MDIO_MODULE_PREFIX MDIO_ID_FMT, MDIO_ID_ARGS(phy_id)); in phy_device_create()
252 static int get_phy_c45_ids(struct mii_bus *bus, int addr, u32 *phy_id, in get_phy_c45_ids() argument
278 *phy_id = 0xffffffff; in get_phy_c45_ids()
303 *phy_id = 0; in get_phy_c45_ids()
323 static int get_phy_id(struct mii_bus *bus, int addr, u32 *phy_id, in get_phy_id() argument
329 return get_phy_c45_ids(bus, addr, phy_id, c45_ids); in get_phy_id()
336 *phy_id = (phy_reg & 0xffff) << 16; in get_phy_id()
[all …]
Dmicrel.c634 .phy_id = PHY_ID_KS8737,
649 .phy_id = PHY_ID_KSZ8021,
666 .phy_id = PHY_ID_KSZ8031,
683 .phy_id = PHY_ID_KSZ8041,
700 .phy_id = PHY_ID_KSZ8041RNLI,
717 .phy_id = PHY_ID_KSZ8051,
734 .phy_id = PHY_ID_KSZ8001,
750 .phy_id = PHY_ID_KSZ8081,
766 .phy_id = PHY_ID_KSZ8061,
780 .phy_id = PHY_ID_KSZ9021,
[all …]
Dmdio-bcm-iproc.c74 static int iproc_mdio_read(struct mii_bus *bus, int phy_id, int reg) in iproc_mdio_read() argument
89 (phy_id << MII_DATA_PA_SHIFT) | in iproc_mdio_read()
104 static int iproc_mdio_write(struct mii_bus *bus, int phy_id, in iproc_mdio_write() argument
120 (phy_id << MII_DATA_PA_SHIFT) | in iproc_mdio_write()
Dmdio-mux.c43 static int mdio_mux_read(struct mii_bus *bus, int phy_id, int regnum) in mdio_mux_read() argument
62 r = pb->mii_bus->read(pb->mii_bus, phy_id, regnum); in mdio_mux_read()
72 static int mdio_mux_write(struct mii_bus *bus, int phy_id, in mdio_mux_write() argument
87 r = pb->mii_bus->write(pb->mii_bus, phy_id, regnum, val); in mdio_mux_write()
Dlxt.c271 .phy_id = 0x78100000,
283 .phy_id = 0x001378e0,
294 .phy_id = 0x00137a10,
304 .phy_id = 0x00137a10,
Dbcm7xxx.c317 .phy_id = (_oui), \
338 .phy_id = PHY_ID_BCM7425,
351 .phy_id = PHY_ID_BCM7429,
364 .phy_id = PHY_BCM_OUI_4,
377 .phy_id = PHY_BCM_OUI_5,
Dmarvell.c991 .phy_id = MARVELL_PHY_ID_88E1101,
1005 .phy_id = MARVELL_PHY_ID_88E1112,
1020 .phy_id = MARVELL_PHY_ID_88E1111,
1035 .phy_id = MARVELL_PHY_ID_88E1118,
1050 .phy_id = MARVELL_PHY_ID_88E1121R,
1065 .phy_id = MARVELL_PHY_ID_88E1318S,
1082 .phy_id = MARVELL_PHY_ID_88E1145,
1097 .phy_id = MARVELL_PHY_ID_88E1149R,
1112 .phy_id = MARVELL_PHY_ID_88E1240,
1127 .phy_id = MARVELL_PHY_ID_88E1116R,
[all …]
Dbcm63xx.c48 .phy_id = 0x00406000,
62 .phy_id = 0x002bdc00,
Dcicada.c107 .phy_id = 0x000fc410,
119 .phy_id = 0x000fc440,
Dicplus.c215 .phy_id = 0x02430d80,
226 .phy_id = 0x02430d90,
238 .phy_id = 0x02430c54,
Dste10Xp.c86 .phy_id = STE101P_PHY_ID,
100 .phy_id = STE100P_PHY_ID,
Dat803x.c270 if (phydev->drv->phy_id == ATH8030_PHY_ID) { in at803x_link_change_notify()
297 .phy_id = ATH8035_PHY_ID,
318 .phy_id = ATH8030_PHY_ID,
339 .phy_id = ATH8031_PHY_ID,
Dmdio_bus.c504 if ((phydrv->phy_id & phydrv->phy_id_mask) == in mdio_bus_match()
511 return (phydrv->phy_id & phydrv->phy_id_mask) == in mdio_bus_match()
512 (phydev->phy_id & phydrv->phy_id_mask); in mdio_bus_match()
631 return sprintf(buf, "0x%.8lx\n", (unsigned long)phydev->phy_id); in phy_id_show()
633 static DEVICE_ATTR_RO(phy_id);
Dbcm87xx.c192 .phy_id = PHY_ID_BCM8706,
205 .phy_id = PHY_ID_BCM8727,
Damd.c65 .phy_id = PHY_ID_AM79C874,
Dqsemi.c115 .phy_id = 0x00181440,
Det1011c.c91 .phy_id = 0x0282f014,
Ddp83848.c75 .phy_id = DP83848_PHY_ID,
Dteranetics.c102 .phy_id = PHY_ID_TN2020,
Dphy.c406 mii_data->phy_id = phydev->addr; in phy_mii_ioctl()
410 mii_data->val_out = mdiobus_read(phydev->bus, mii_data->phy_id, in phy_mii_ioctl()
415 if (mii_data->phy_id == phydev->addr) { in phy_mii_ioctl()
448 mdiobus_write(phydev->bus, mii_data->phy_id, in phy_mii_ioctl()
451 if (mii_data->phy_id == phydev->addr && in phy_mii_ioctl()
Dbcm-cygnus.c134 .phy_id = PHY_ID_BCM_CYGNUS,
Dmicrochip.c112 .phy_id = 0x0007c130,
Dnational.c133 .phy_id = DP83865_PHY_ID,
Ddp83867.c203 .phy_id = DP83867_PHY_ID,
/linux-4.4.14/drivers/nfc/s3fwrn5/
Ds3fwrn5.h44 void *phy_id; member
61 info->phy_ops->set_mode(info->phy_id, mode); in s3fwrn5_set_mode()
71 return info->phy_ops->get_mode(info->phy_id); in s3fwrn5_get_mode()
79 info->phy_ops->set_wake(info->phy_id, wake); in s3fwrn5_set_wake()
89 return info->phy_ops->write(info->phy_id, skb); in s3fwrn5_write()
92 int s3fwrn5_probe(struct nci_dev **ndev, void *phy_id, struct device *pdev,
Di2c.c49 static void s3fwrn5_i2c_set_wake(void *phy_id, bool wake) in s3fwrn5_i2c_set_wake() argument
51 struct s3fwrn5_i2c_phy *phy = phy_id; in s3fwrn5_i2c_set_wake()
59 static void s3fwrn5_i2c_set_mode(void *phy_id, enum s3fwrn5_mode mode) in s3fwrn5_i2c_set_mode() argument
61 struct s3fwrn5_i2c_phy *phy = phy_id; in s3fwrn5_i2c_set_mode()
87 static enum s3fwrn5_mode s3fwrn5_i2c_get_mode(void *phy_id) in s3fwrn5_i2c_get_mode() argument
89 struct s3fwrn5_i2c_phy *phy = phy_id; in s3fwrn5_i2c_get_mode()
101 static int s3fwrn5_i2c_write(void *phy_id, struct sk_buff *skb) in s3fwrn5_i2c_write() argument
103 struct s3fwrn5_i2c_phy *phy = phy_id; in s3fwrn5_i2c_write()
175 static irqreturn_t s3fwrn5_i2c_irq_thread_fn(int irq, void *phy_id) in s3fwrn5_i2c_irq_thread_fn() argument
177 struct s3fwrn5_i2c_phy *phy = phy_id; in s3fwrn5_i2c_irq_thread_fn()
Dcore.c149 int s3fwrn5_probe(struct nci_dev **ndev, void *phy_id, struct device *pdev, in s3fwrn5_probe() argument
159 info->phy_id = phy_id; in s3fwrn5_probe()
/linux-4.4.14/drivers/net/ethernet/sis/
Dsis190.c297 int phy_id; member
383 static void mdio_write(void __iomem *ioaddr, int phy_id, int reg, int val) in mdio_write() argument
386 (((u32) reg) << EhnMIIregShift) | (phy_id << EhnMIIpmdShift) | in mdio_write()
390 static int mdio_read(void __iomem *ioaddr, int phy_id, int reg) in mdio_read() argument
393 (((u32) reg) << EhnMIIregShift) | (phy_id << EhnMIIpmdShift)); in mdio_read()
398 static void __mdio_write(struct net_device *dev, int phy_id, int reg, int val) in __mdio_write() argument
402 mdio_write(tp->mmio_addr, phy_id, reg, val); in __mdio_write()
405 static int __mdio_read(struct net_device *dev, int phy_id, int reg) in __mdio_read() argument
409 return mdio_read(tp->mmio_addr, phy_id, reg); in __mdio_read()
412 static u16 mdio_read_latched(void __iomem *ioaddr, int phy_id, int reg) in mdio_read_latched() argument
[all …]
Dsis900.c219 static int mdio_read(struct net_device *net_dev, int phy_id, int location);
220 static void mdio_write(struct net_device *net_dev, int phy_id, int location, int val);
762 sis_priv->mii_info.phy_id = sis_priv->cur_phy; in sis900_default_phy()
893 static int mdio_read(struct net_device *net_dev, int phy_id, int location) in mdio_read() argument
895 int mii_cmd = MIIread|(phy_id<<MIIpmdShift)|(location<<MIIregShift); in mdio_read()
938 static void mdio_write(struct net_device *net_dev, int phy_id, int location, in mdio_write() argument
941 int mii_cmd = MIIwrite|(phy_id<<MIIpmdShift)|(location<<MIIregShift); in mdio_write()
2156 data->phy_id = sis_priv->mii->phy_addr; in mii_ioctl()
2160 data->val_out = mdio_read(net_dev, data->phy_id & 0x1f, data->reg_num & 0x1f); in mii_ioctl()
2164 mdio_write(net_dev, data->phy_id & 0x1f, data->reg_num & 0x1f, data->val_in); in mii_ioctl()
/linux-4.4.14/include/linux/
Dmdio.h15 static inline bool mdio_phy_id_is_c45(int phy_id) in mdio_phy_id_is_c45() argument
17 return (phy_id & MDIO_PHY_ID_C45) && !(phy_id & ~MDIO_PHY_ID_C45_MASK); in mdio_phy_id_is_c45()
20 static inline __u16 mdio_phy_id_prtad(int phy_id) in mdio_phy_id_prtad() argument
22 return (phy_id & MDIO_PHY_ID_PRTAD) >> 5; in mdio_phy_id_prtad()
25 static inline __u16 mdio_phy_id_devad(int phy_id) in mdio_phy_id_devad() argument
27 return phy_id & MDIO_PHY_ID_DEVAD; in mdio_phy_id_devad()
Dphy_fixed.h15 extern int fixed_phy_add(unsigned int irq, int phy_id,
30 static inline int fixed_phy_add(unsigned int irq, int phy_id, in fixed_phy_add() argument
Dmii.h17 int phy_id; member
27 int (*mdio_read) (struct net_device *dev, int phy_id, int location);
28 void (*mdio_write) (struct net_device *dev, int phy_id, int location, int val);
Dphy.h161 int (*read)(struct mii_bus *bus, int phy_id, int regnum);
162 int (*write)(struct mii_bus *bus, int phy_id, int regnum, u16 val);
372 u32 phy_id; member
462 u32 phy_id; member
745 struct phy_device *phy_device_create(struct mii_bus *bus, int addr, int phy_id,
Ddavinci_emac.h35 const char *phy_id; member
Dsungem_phy.h21 u32 phy_id; /* Concatenated ID1 << 16 | ID2 */ member
/linux-4.4.14/drivers/char/tpm/st33zp24/
Dst33zp24.c78 void *phy_id; member
93 tpm_dev->ops->recv(tpm_dev->phy_id, TPM_INT_STATUS, &interrupt, 1); in clear_interruption()
94 tpm_dev->ops->send(tpm_dev->phy_id, TPM_INT_STATUS, &interrupt, 1); in clear_interruption()
111 tpm_dev->ops->send(tpm_dev->phy_id, TPM_STS, &data, 1); in st33zp24_cancel()
126 tpm_dev->ops->recv(tpm_dev->phy_id, TPM_STS, &data, 1); in st33zp24_status()
143 status = tpm_dev->ops->recv(tpm_dev->phy_id, TPM_ACCESS, &data, 1); in check_locality()
170 ret = tpm_dev->ops->send(tpm_dev->phy_id, TPM_ACCESS, &data, 1); in request_locality()
199 tpm_dev->ops->send(tpm_dev->phy_id, TPM_ACCESS, &data, 1); in release_locality()
219 status = tpm_dev->ops->recv(tpm_dev->phy_id, tpm_reg, &temp, 1); in get_burstcount()
225 status = tpm_dev->ops->recv(tpm_dev->phy_id, tpm_reg, &temp, 1); in get_burstcount()
[all …]
Di2c.c45 static int write8_reg(void *phy_id, u8 tpm_register, u8 *tpm_data, int tpm_size) in write8_reg() argument
47 struct st33zp24_i2c_phy *phy = phy_id; in write8_reg()
62 static int read8_reg(void *phy_id, u8 tpm_register, u8 *tpm_data, int tpm_size) in read8_reg() argument
64 struct st33zp24_i2c_phy *phy = phy_id; in read8_reg()
84 static int st33zp24_i2c_send(void *phy_id, u8 tpm_register, u8 *tpm_data, in st33zp24_i2c_send() argument
87 return write8_reg(phy_id, tpm_register | TPM_WRITE_DIRECTION, tpm_data, in st33zp24_i2c_send()
100 static int st33zp24_i2c_recv(void *phy_id, u8 tpm_register, u8 *tpm_data, in st33zp24_i2c_recv() argument
103 return read8_reg(phy_id, tpm_register, tpm_data, tpm_size); in st33zp24_i2c_recv()
Dspi.c110 static int st33zp24_spi_send(void *phy_id, u8 tpm_register, u8 *tpm_data, in st33zp24_spi_send() argument
115 struct st33zp24_spi_phy *phy = phy_id; in st33zp24_spi_send()
157 static int read8_reg(void *phy_id, u8 tpm_register, u8 *tpm_data, int tpm_size) in read8_reg() argument
161 struct st33zp24_spi_phy *phy = phy_id; in read8_reg()
201 static int st33zp24_spi_recv(void *phy_id, u8 tpm_register, u8 *tpm_data, in st33zp24_spi_recv() argument
206 ret = read8_reg(phy_id, tpm_register, tpm_data, tpm_size); in st33zp24_spi_recv()
212 static int evaluate_latency(void *phy_id) in evaluate_latency() argument
214 struct st33zp24_spi_phy *phy = phy_id; in evaluate_latency()
220 status = read8_reg(phy_id, TPM_INTF_CAPABILITY, &data, 1); in evaluate_latency()
Dst33zp24.h25 int (*send)(void *phy_id, u8 tpm_register, u8 *tpm_data, int tpm_size);
26 int (*recv)(void *phy_id, u8 tpm_register, u8 *tpm_data, int tpm_size);
34 int st33zp24_probe(void *phy_id, const struct st33zp24_phy_ops *ops,
/linux-4.4.14/drivers/nfc/nxp-nci/
Dcore.c56 r = info->phy_ops->set_mode(info->phy_id, NXP_NCI_MODE_NCI); in nxp_nci_open()
73 r = info->phy_ops->set_mode(info->phy_id, NXP_NCI_MODE_COLD); in nxp_nci_close()
96 r = info->phy_ops->write(info->phy_id, skb); in nxp_nci_send()
111 int nxp_nci_probe(void *phy_id, struct device *pdev, in nxp_nci_probe() argument
125 info->phy_id = phy_id; in nxp_nci_probe()
134 r = info->phy_ops->set_mode(info->phy_id, NXP_NCI_MODE_COLD); in nxp_nci_probe()
176 info->phy_ops->set_mode(info->phy_id, NXP_NCI_MODE_COLD); in nxp_nci_remove()
Di2c.c63 static int nxp_nci_i2c_set_mode(void *phy_id, in nxp_nci_i2c_set_mode() argument
66 struct nxp_nci_i2c_phy *phy = (struct nxp_nci_i2c_phy *) phy_id; in nxp_nci_i2c_set_mode()
78 static int nxp_nci_i2c_write(void *phy_id, struct sk_buff *skb) in nxp_nci_i2c_write() argument
81 struct nxp_nci_i2c_phy *phy = phy_id; in nxp_nci_i2c_write()
201 static irqreturn_t nxp_nci_i2c_irq_thread_fn(int irq, void *phy_id) in nxp_nci_i2c_irq_thread_fn() argument
203 struct nxp_nci_i2c_phy *phy = phy_id; in nxp_nci_i2c_irq_thread_fn()
Dnxp-nci.h66 void *phy_id; member
84 int nxp_nci_probe(void *phy_id, struct device *pdev,
Dfirmware.c69 r = info->phy_ops->set_mode(info->phy_id, NXP_NCI_MODE_COLD); in nxp_nci_fw_work_complete()
133 r = info->phy_ops->write(info->phy_id, skb); in nxp_nci_fw_send_chunk()
236 r = info->phy_ops->set_mode(info->phy_id, NXP_NCI_MODE_FW); in nxp_nci_fw_download()
/linux-4.4.14/arch/mips/include/asm/octeon/
Dcvmx-mdio.h300 static inline int cvmx_mdio_read(int bus_id, int phy_id, int location) in cvmx_mdio_read() argument
311 smi_cmd.s.phy_adr = phy_id; in cvmx_mdio_read()
339 static inline int cvmx_mdio_write(int bus_id, int phy_id, int location, int val) in cvmx_mdio_write() argument
354 smi_cmd.s.phy_adr = phy_id; in cvmx_mdio_write()
381 static inline int cvmx_mdio_45_read(int bus_id, int phy_id, int device, in cvmx_mdio_45_read() argument
400 smi_cmd.s.phy_adr = phy_id; in cvmx_mdio_45_read()
411 bus_id, phy_id, device, location); in cvmx_mdio_45_read()
417 smi_cmd.s.phy_adr = phy_id; in cvmx_mdio_45_read()
429 bus_id, phy_id, device, location); in cvmx_mdio_45_read()
438 bus_id, phy_id, device, location); in cvmx_mdio_45_read()
[all …]
/linux-4.4.14/drivers/net/usb/
Dasix_devices.c76 u32 phy_id; in asix_get_phyid() local
81 phy_reg = asix_mdio_read(dev->net, dev->mii.phy_id, MII_PHYSID1); in asix_get_phyid()
90 phy_id = (phy_reg & 0xffff) << 16; in asix_get_phyid()
92 phy_reg = asix_mdio_read(dev->net, dev->mii.phy_id, MII_PHYSID2); in asix_get_phyid()
96 phy_id |= (phy_reg & 0xffff); in asix_get_phyid()
98 return phy_id; in asix_get_phyid()
242 dev->mii.phy_id = asix_get_phy_addr(dev); in ax88172_bind()
249 asix_mdio_write(dev->net, dev->mii.phy_id, MII_BMCR, BMCR_RESET); in ax88172_bind()
250 asix_mdio_write(dev->net, dev->mii.phy_id, MII_ADVERTISE, in ax88172_bind()
361 asix_mdio_write(dev->net, dev->mii.phy_id, MII_BMCR, BMCR_RESET); in ax88772_reset()
[all …]
Dsr9800.c336 static int sr_mdio_read(struct net_device *net, int phy_id, int loc) in sr_mdio_read() argument
343 sr_read_cmd(dev, SR_CMD_READ_MII_REG, phy_id, (__u16)loc, 2, &res); in sr_mdio_read()
349 phy_id, loc, le16_to_cpu(res)); in sr_mdio_read()
355 sr_mdio_write(struct net_device *net, int phy_id, int loc, int val) in sr_mdio_write() argument
362 phy_id, loc, val); in sr_mdio_write()
365 sr_write_cmd(dev, SR_CMD_WRITE_MII_REG, phy_id, (__u16)loc, 2, &res); in sr_mdio_write()
374 u32 phy_id; in sr_get_phyid() local
379 phy_reg = sr_mdio_read(dev->net, dev->mii.phy_id, MII_PHYSID1); in sr_get_phyid()
388 phy_id = (phy_reg & 0xffff) << 16; in sr_get_phyid()
390 phy_reg = sr_mdio_read(dev->net, dev->mii.phy_id, MII_PHYSID2); in sr_get_phyid()
[all …]
Dsmsc95xx.c178 static int __smsc95xx_mdio_read(struct net_device *netdev, int phy_id, int idx, in __smsc95xx_mdio_read() argument
195 phy_id &= dev->mii.phy_id_mask; in __smsc95xx_mdio_read()
197 addr = (phy_id << 11) | (idx << 6) | MII_READ_ | MII_BUSY_; in __smsc95xx_mdio_read()
223 static void __smsc95xx_mdio_write(struct net_device *netdev, int phy_id, in __smsc95xx_mdio_write() argument
247 phy_id &= dev->mii.phy_id_mask; in __smsc95xx_mdio_write()
249 addr = (phy_id << 11) | (idx << 6) | MII_WRITE_ | MII_BUSY_; in __smsc95xx_mdio_write()
266 static int smsc95xx_mdio_read_nopm(struct net_device *netdev, int phy_id, in smsc95xx_mdio_read_nopm() argument
269 return __smsc95xx_mdio_read(netdev, phy_id, idx, 1); in smsc95xx_mdio_read_nopm()
272 static void smsc95xx_mdio_write_nopm(struct net_device *netdev, int phy_id, in smsc95xx_mdio_write_nopm() argument
275 __smsc95xx_mdio_write(netdev, phy_id, idx, regval, 1); in smsc95xx_mdio_write_nopm()
[all …]
Dsmsc75xx.c185 static int __smsc75xx_mdio_read(struct net_device *netdev, int phy_id, int idx, in __smsc75xx_mdio_read() argument
202 phy_id &= dev->mii.phy_id_mask; in __smsc75xx_mdio_read()
204 addr = ((phy_id << MII_ACCESS_PHY_ADDR_SHIFT) & MII_ACCESS_PHY_ADDR) in __smsc75xx_mdio_read()
232 static void __smsc75xx_mdio_write(struct net_device *netdev, int phy_id, in __smsc75xx_mdio_write() argument
256 phy_id &= dev->mii.phy_id_mask; in __smsc75xx_mdio_write()
258 addr = ((phy_id << MII_ACCESS_PHY_ADDR_SHIFT) & MII_ACCESS_PHY_ADDR) in __smsc75xx_mdio_write()
277 static int smsc75xx_mdio_read_nopm(struct net_device *netdev, int phy_id, in smsc75xx_mdio_read_nopm() argument
280 return __smsc75xx_mdio_read(netdev, phy_id, idx, 1); in smsc75xx_mdio_read_nopm()
283 static void smsc75xx_mdio_write_nopm(struct net_device *netdev, int phy_id, in smsc75xx_mdio_write_nopm() argument
286 __smsc75xx_mdio_write(netdev, phy_id, idx, regval, 1); in smsc75xx_mdio_write_nopm()
[all …]
Dch9200.c180 static int ch9200_mdio_read(struct net_device *netdev, int phy_id, int loc) in ch9200_mdio_read() argument
186 phy_id, loc); in ch9200_mdio_read()
188 if (phy_id != 0) in ch9200_mdio_read()
198 int phy_id, int loc, int val) in ch9200_mdio_write() argument
204 phy_id, loc); in ch9200_mdio_write()
206 if (phy_id != 0) in ch9200_mdio_write()
Dsr9700.c176 static int sr_mdio_read(struct net_device *netdev, int phy_id, int loc) in sr_mdio_read() argument
182 if (phy_id) { in sr_mdio_read()
202 phy_id, loc, res); in sr_mdio_read()
207 static void sr_mdio_write(struct net_device *netdev, int phy_id, int loc, in sr_mdio_write() argument
213 if (phy_id) { in sr_mdio_write()
219 phy_id, loc, val); in sr_mdio_write()
368 sr_mdio_write(netdev, mii->phy_id, MII_BMCR, BMCR_RESET); in sr9700_bind()
369 sr_mdio_write(netdev, mii->phy_id, MII_ADVERTISE, ADVERTISE_ALL | in sr9700_bind()
Ddm9601.c219 static int dm9601_mdio_read(struct net_device *netdev, int phy_id, int loc) in dm9601_mdio_read() argument
225 if (phy_id) { in dm9601_mdio_read()
234 phy_id, loc, le16_to_cpu(res)); in dm9601_mdio_read()
239 static void dm9601_mdio_write(struct net_device *netdev, int phy_id, int loc, in dm9601_mdio_write() argument
245 if (phy_id) { in dm9601_mdio_write()
251 phy_id, loc, val); in dm9601_mdio_write()
426 dm9601_mdio_write(dev->net, dev->mii.phy_id, MII_BMCR, BMCR_RESET); in dm9601_bind()
427 dm9601_mdio_write(dev->net, dev->mii.phy_id, MII_ADVERTISE, in dm9601_bind()
Dasix_common.c397 int asix_mdio_read(struct net_device *netdev, int phy_id, int loc) in asix_mdio_read() argument
404 asix_read_cmd(dev, AX_CMD_READ_MII_REG, phy_id, in asix_mdio_read()
410 phy_id, loc, le16_to_cpu(res)); in asix_mdio_read()
415 void asix_mdio_write(struct net_device *netdev, int phy_id, int loc, int val) in asix_mdio_write() argument
421 phy_id, loc, val); in asix_mdio_write()
424 asix_write_cmd(dev, AX_CMD_WRITE_MII_REG, phy_id, (__u16)loc, 2, &res); in asix_mdio_write()
Dax88172a.c41 static int asix_mdio_bus_read(struct mii_bus *bus, int phy_id, int regnum) in asix_mdio_bus_read() argument
43 return asix_mdio_read(((struct usbnet *)bus->priv)->net, phy_id, in asix_mdio_bus_read()
47 static int asix_mdio_bus_write(struct mii_bus *bus, int phy_id, int regnum, in asix_mdio_bus_write() argument
50 asix_mdio_write(((struct usbnet *)bus->priv)->net, phy_id, regnum, val); in asix_mdio_bus_write()
Dasix.h218 int asix_mdio_read(struct net_device *netdev, int phy_id, int loc);
219 void asix_mdio_write(struct net_device *netdev, int phy_id, int loc, int val);
Dmcs7830.c318 static int mcs7830_mdio_read(struct net_device *netdev, int phy_id, in mcs7830_mdio_read() argument
325 static void mcs7830_mdio_write(struct net_device *netdev, int phy_id, in mcs7830_mdio_write() argument
516 dev->mii.phy_id = *((u8 *) net->dev_addr + 1); in mcs7830_bind()
Dpegasus.c247 static int mdio_read(struct net_device *dev, int phy_id, int loc) in mdio_read() argument
252 read_mii_word(pegasus, phy_id, loc, &res); in mdio_read()
256 static void mdio_write(struct net_device *dev, int phy_id, int loc, int val) in mdio_write() argument
261 write_mii_word(pegasus, phy_id, loc, &data); in mdio_write()
1188 pegasus->mii.phy_id = pegasus->phy; in pegasus_probe()
/linux-4.4.14/drivers/net/ethernet/xilinx/
Dll_temac_mdio.c22 static int temac_mdio_read(struct mii_bus *bus, int phy_id, int reg) in temac_mdio_read() argument
31 temac_iow(lp, XTE_LSW0_OFFSET, (phy_id << 5) | reg); in temac_mdio_read()
36 phy_id, reg, rc); in temac_mdio_read()
41 static int temac_mdio_write(struct mii_bus *bus, int phy_id, int reg, u16 val) in temac_mdio_write() argument
46 phy_id, reg, val); in temac_mdio_write()
53 temac_indirect_out32(lp, XTE_MIIMAI_OFFSET, (phy_id << 5) | reg); in temac_mdio_write()
Dxilinx_axienet_mdio.c46 static int axienet_mdio_read(struct mii_bus *bus, int phy_id, int reg) in axienet_mdio_read() argument
57 (((phy_id << XAE_MDIO_MCR_PHYAD_SHIFT) & in axienet_mdio_read()
71 phy_id, reg, rc); in axienet_mdio_read()
89 static int axienet_mdio_write(struct mii_bus *bus, int phy_id, int reg, in axienet_mdio_write() argument
96 phy_id, reg, val); in axienet_mdio_write()
104 (((phy_id << XAE_MDIO_MCR_PHYAD_SHIFT) & in axienet_mdio_write()
Dxilinx_emaclite.c726 static int xemaclite_mdio_read(struct mii_bus *bus, int phy_id, int reg) in xemaclite_mdio_read() argument
741 ((phy_id << XEL_MDIOADDR_PHYADR_SHIFT) | reg), in xemaclite_mdio_read()
753 phy_id, reg, rc); in xemaclite_mdio_read()
768 static int xemaclite_mdio_write(struct mii_bus *bus, int phy_id, int reg, in xemaclite_mdio_write() argument
776 phy_id, reg, val); in xemaclite_mdio_write()
788 ((phy_id << XEL_MDIOADDR_PHYADR_SHIFT) | reg), in xemaclite_mdio_write()
/linux-4.4.14/drivers/net/ethernet/freescale/
Dfec_mpc52xx_phy.c28 static int mpc52xx_fec_mdio_transfer(struct mii_bus *bus, int phy_id, in mpc52xx_fec_mdio_transfer() argument
35 value |= (phy_id << FEC_MII_DATA_PA_SHIFT) & FEC_MII_DATA_PA_MSK; in mpc52xx_fec_mdio_transfer()
52 static int mpc52xx_fec_mdio_read(struct mii_bus *bus, int phy_id, int reg) in mpc52xx_fec_mdio_read() argument
54 return mpc52xx_fec_mdio_transfer(bus, phy_id, reg, FEC_MII_READ_FRAME); in mpc52xx_fec_mdio_read()
57 static int mpc52xx_fec_mdio_write(struct mii_bus *bus, int phy_id, int reg, in mpc52xx_fec_mdio_write() argument
60 return mpc52xx_fec_mdio_transfer(bus, phy_id, reg, in mpc52xx_fec_mdio_write()
Dxgmac_mdio.c128 static int xgmac_mdio_write(struct mii_bus *bus, int phy_id, int regnum, u16 value) in xgmac_mdio_write() argument
155 mdio_ctl = MDIO_CTL_PORT_ADDR(phy_id) | MDIO_CTL_DEV_ADDR(dev_addr); in xgmac_mdio_write()
182 static int xgmac_mdio_read(struct mii_bus *bus, int phy_id, int regnum) in xgmac_mdio_read() argument
209 mdio_ctl = MDIO_CTL_PORT_ADDR(phy_id) | MDIO_CTL_DEV_ADDR(dev_addr); in xgmac_mdio_read()
232 phy_id, dev_addr, regnum); in xgmac_mdio_read()
Dfec_main.c1921 int phy_id; in fec_enet_mii_probe() local
1934 for (phy_id = 0; (phy_id < PHY_MAX_ADDR); phy_id++) { in fec_enet_mii_probe()
1935 if ((fep->mii_bus->phy_mask & (1 << phy_id))) in fec_enet_mii_probe()
1937 if (fep->mii_bus->phy_map[phy_id] == NULL) in fec_enet_mii_probe()
1939 if (fep->mii_bus->phy_map[phy_id]->phy_id == 0) in fec_enet_mii_probe()
1947 if (phy_id >= PHY_MAX_ADDR) { in fec_enet_mii_probe()
1950 phy_id = 0; in fec_enet_mii_probe()
1954 PHY_ID_FMT, mdio_bus_id, phy_id); in fec_enet_mii_probe()
/linux-4.4.14/arch/mips/include/asm/mach-bcm63xx/
Dbcm63xx_dev_enet.h21 int phy_id; member
39 int phy_id, int reg),
41 int phy_id, int reg, int val));
70 int phy_id; member
/linux-4.4.14/drivers/net/ethernet/hisilicon/
Dhns_mdio.c195 u8 is_c45, u8 op, u8 phy_id, u16 cmd) in hns_mdio_cmd_write() argument
203 (phy_id & MDIO_CMD_PRTAD_M) << MDIO_CMD_PRTAD_S; in hns_mdio_cmd_write()
220 int phy_id, int regnum, u16 data) in hns_mdio_write() argument
233 phy_id, is_c45, devad, reg, data); in hns_mdio_write()
251 MDIO_C45_WRITE_ADDR, phy_id, devad); in hns_mdio_write()
268 hns_mdio_cmd_write(mdio_dev, is_c45, op, phy_id, cmd_reg_cfg); in hns_mdio_write()
282 static int hns_mdio_read(struct mii_bus *bus, int phy_id, int regnum) in hns_mdio_read() argument
294 phy_id, is_c45, devad, reg); in hns_mdio_read()
305 MDIO_C22_READ, phy_id, reg); in hns_mdio_read()
312 MDIO_C45_WRITE_ADDR, phy_id, devad); in hns_mdio_read()
[all …]
/linux-4.4.14/arch/powerpc/platforms/85xx/
Dmpc85xx_mds.c319 char phy_id[20]; in board_fixups() local
329 snprintf(phy_id, sizeof(phy_id), "%llx:%02x", in board_fixups()
332 phy_register_fixup_for_id(phy_id, mpc8568_fixup_125_clock); in board_fixups()
333 phy_register_fixup_for_id(phy_id, mpc8568_mds_phy_fixups); in board_fixups()
336 snprintf(phy_id, sizeof(phy_id), "%llx:%02x", in board_fixups()
338 phy_register_fixup_for_id(phy_id, mpc8568_mds_phy_fixups); in board_fixups()
/linux-4.4.14/drivers/nfc/st-nci/
Di2c.c61 static int st_nci_i2c_enable(void *phy_id) in st_nci_i2c_enable() argument
63 struct st_nci_i2c_phy *phy = phy_id; in st_nci_i2c_enable()
78 static void st_nci_i2c_disable(void *phy_id) in st_nci_i2c_disable() argument
80 struct st_nci_i2c_phy *phy = phy_id; in st_nci_i2c_disable()
91 static int st_nci_i2c_write(void *phy_id, struct sk_buff *skb) in st_nci_i2c_write() argument
94 struct st_nci_i2c_phy *phy = phy_id; in st_nci_i2c_write()
175 static irqreturn_t st_nci_irq_thread_fn(int irq, void *phy_id) in st_nci_irq_thread_fn() argument
177 struct st_nci_i2c_phy *phy = phy_id; in st_nci_irq_thread_fn()
Dspi.c62 static int st_nci_spi_enable(void *phy_id) in st_nci_spi_enable() argument
64 struct st_nci_spi_phy *phy = phy_id; in st_nci_spi_enable()
79 static void st_nci_spi_disable(void *phy_id) in st_nci_spi_disable() argument
81 struct st_nci_spi_phy *phy = phy_id; in st_nci_spi_disable()
92 static int st_nci_spi_write(void *phy_id, struct sk_buff *skb) in st_nci_spi_write() argument
95 struct st_nci_spi_phy *phy = phy_id; in st_nci_spi_write()
190 static irqreturn_t st_nci_irq_thread_fn(int irq, void *phy_id) in st_nci_irq_thread_fn() argument
192 struct st_nci_spi_phy *phy = phy_id; in st_nci_irq_thread_fn()
Dndlc.c61 ndlc->ops->enable(ndlc->phy_id); in ndlc_open()
75 ndlc->ops->enable(ndlc->phy_id); in ndlc_close()
81 ndlc->ops->disable(ndlc->phy_id); in ndlc_close()
113 r = ndlc->ops->write(ndlc->phy_id, skb); in llt_ndlc_send_queue()
268 int ndlc_probe(void *phy_id, struct nfc_phy_ops *phy_ops, struct device *dev, in ndlc_probe() argument
279 ndlc->phy_id = phy_id; in ndlc_probe()
Dndlc.h31 void *phy_id; member
59 int ndlc_probe(void *phy_id, struct nfc_phy_ops *phy_ops, struct device *dev,
/linux-4.4.14/drivers/nfc/fdp/
Di2c.c57 static int fdp_nci_i2c_enable(void *phy_id) in fdp_nci_i2c_enable() argument
59 struct fdp_i2c_phy *phy = phy_id; in fdp_nci_i2c_enable()
67 static void fdp_nci_i2c_disable(void *phy_id) in fdp_nci_i2c_disable() argument
69 struct fdp_i2c_phy *phy = phy_id; in fdp_nci_i2c_disable()
98 static int fdp_nci_i2c_write(void *phy_id, struct sk_buff *skb) in fdp_nci_i2c_write() argument
100 struct fdp_i2c_phy *phy = phy_id; in fdp_nci_i2c_write()
206 static irqreturn_t fdp_nci_i2c_irq_thread_fn(int irq, void *phy_id) in fdp_nci_i2c_irq_thread_fn() argument
208 struct fdp_i2c_phy *phy = phy_id; in fdp_nci_i2c_irq_thread_fn()
/linux-4.4.14/arch/arm/mach-omap2/
Dusb-host.c436 char *phy_id; in usbhs_init_phys() local
453 phy_id = kmalloc(MAX_STR, GFP_KERNEL); in usbhs_init_phys()
454 if (!phy_id) { in usbhs_init_phys()
473 scnprintf(phy_id, MAX_STR, "usb_phy_generic.%d", in usbhs_init_phys()
478 __func__, phy_id, PTR_ERR(pdev)); in usbhs_init_phys()
479 kfree(phy_id); in usbhs_init_phys()
483 usb_bind_phy("ehci-omap.0", phy->port - 1, phy_id); in usbhs_init_phys()
488 usbhs_add_regulator(rail_name, phy_id, "vcc", in usbhs_init_phys()
/linux-4.4.14/drivers/scsi/pm8001/
Dpm8001_sas.c157 int rc = 0, phy_id = sas_phy->id; in pm8001_phy_control() local
163 pm8001_ha->phy[phy_id].enable_completion = &completion; in pm8001_phy_control()
168 pm8001_ha->phy[phy_id].minimum_linkrate = in pm8001_phy_control()
172 pm8001_ha->phy[phy_id].maximum_linkrate = in pm8001_phy_control()
175 if (pm8001_ha->phy[phy_id].phy_state == 0) { in pm8001_phy_control()
176 PM8001_CHIP_DISP->phy_start_req(pm8001_ha, phy_id); in pm8001_phy_control()
179 PM8001_CHIP_DISP->phy_ctl_req(pm8001_ha, phy_id, in pm8001_phy_control()
183 if (pm8001_ha->phy[phy_id].phy_state == 0) { in pm8001_phy_control()
184 PM8001_CHIP_DISP->phy_start_req(pm8001_ha, phy_id); in pm8001_phy_control()
187 PM8001_CHIP_DISP->phy_ctl_req(pm8001_ha, phy_id, in pm8001_phy_control()
[all …]
Dpm80xx_hwi.c2863 u8 phy_id = (u8)((phyid_npip_portstate & 0xFF0000) >> 16); in hw_event_port_recover() local
2868 struct pm8001_phy *phy = &pm8001_ha->phy[phy_id]; in hw_event_port_recover()
2873 pm80xx_chip_phy_ctl_req(pm8001_ha, phy_id, in hw_event_port_recover()
2877 port->wide_port_phymap |= (1U << phy_id); in hw_event_port_recover()
2901 u8 phy_id = in hw_event_sas_phy_up() local
2907 struct pm8001_phy *phy = &pm8001_ha->phy[phy_id]; in hw_event_sas_phy_up()
2911 port->wide_port_phymap |= (1U << phy_id); in hw_event_sas_phy_up()
2916 port_id, phy_id, link_rate, portstate, deviceType)); in hw_event_sas_phy_up()
2925 pm80xx_chip_phy_ctl_req(pm8001_ha, phy_id, in hw_event_sas_phy_up()
2964 pm8001_bytes_dmaed(pm8001_ha, phy_id); in hw_event_sas_phy_up()
[all …]
Dpm8001_hwi.c3204 u32 phy_id = le32_to_cpu(pPayload->phyop_phyid) & ID_BITS; in pm8001_mpi_local_phy_ctl() local
3209 phy_id, phy_op)); in pm8001_mpi_local_phy_ctl()
3213 phy_id, phy_op)); in pm8001_mpi_local_phy_ctl()
3366 u8 phy_id = in hw_event_sas_phy_up() local
3372 struct pm8001_phy *phy = &pm8001_ha->phy[phy_id]; in hw_event_sas_phy_up()
3379 port_id, phy_id)); in hw_event_sas_phy_up()
3388 pm8001_chip_phy_ctl_req(pm8001_ha, phy_id, in hw_event_sas_phy_up()
3427 pm8001_bytes_dmaed(pm8001_ha, phy_id); in hw_event_sas_phy_up()
3445 u8 phy_id = in hw_event_sata_phy_up() local
3451 struct pm8001_phy *phy = &pm8001_ha->phy[phy_id]; in hw_event_sata_phy_up()
[all …]
Dpm8001_sas.h211 int (*phy_start_req)(struct pm8001_hba_info *pm8001_ha, u8 phy_id);
212 int (*phy_stop_req)(struct pm8001_hba_info *pm8001_ha, u8 phy_id);
217 u32 phy_id, u32 phy_op);
/linux-4.4.14/drivers/net/cris/
Deth_v10.c211 static int e100_get_mdio_reg(struct net_device *dev, int phy_id, int location);
212 static void e100_set_mdio_reg(struct net_device *dev, int phy_id, int location, int value);
643 data = e100_get_mdio_reg(dev, np->mii_if.phy_id, MII_ADVERTISE); in generic_check_speed()
657 data = e100_get_mdio_reg(dev, np->mii_if.phy_id, in tdk_check_speed()
668 data = e100_get_mdio_reg(dev, np->mii_if.phy_id, in broadcom_check_speed()
679 data = e100_get_mdio_reg(dev, np->mii_if.phy_id, in intel_check_speed()
695 data = e100_get_mdio_reg(dev, np->mii_if.phy_id, MII_BMSR); in e100_check_speed()
724 unsigned short data = e100_get_mdio_reg(dev, np->mii_if.phy_id, in e100_negotiate()
766 e100_set_mdio_reg(dev, np->mii_if.phy_id, MII_ADVERTISE, data); in e100_negotiate()
768 data = e100_get_mdio_reg(dev, np->mii_if.phy_id, MII_BMCR); in e100_negotiate()
[all …]
/linux-4.4.14/drivers/nfc/microread/
Di2c.c106 static int microread_i2c_enable(void *phy_id) in microread_i2c_enable() argument
111 static void microread_i2c_disable(void *phy_id) in microread_i2c_disable() argument
116 static int microread_i2c_write(void *phy_id, struct sk_buff *skb) in microread_i2c_write() argument
119 struct microread_i2c_phy *phy = phy_id; in microread_i2c_write()
211 static irqreturn_t microread_i2c_irq_thread_fn(int irq, void *phy_id) in microread_i2c_irq_thread_fn() argument
213 struct microread_i2c_phy *phy = phy_id; in microread_i2c_irq_thread_fn()
Dmicroread.c167 void *phy_id; member
180 return info->phy_ops->enable(info->phy_id); in microread_open()
187 info->phy_ops->disable(info->phy_id); in microread_close()
233 return info->phy_ops->write(info->phy_id, skb); in microread_xmit()
656 int microread_probe(void *phy_id, struct nfc_phy_ops *phy_ops, char *llc_name, in microread_probe() argument
673 info->phy_id = phy_id; in microread_probe()
Dmicroread.h25 int microread_probe(void *phy_id, struct nfc_phy_ops *phy_ops, char *llc_name,
/linux-4.4.14/arch/mn10300/kernel/
Dsmp.c690 int phy_id; in smp_prepare_cpus() local
705 for (phy_id = 0; phy_id < NR_CPUS; phy_id++) { in smp_prepare_cpus()
709 if (phy_id != 0) in smp_prepare_cpus()
710 do_boot_cpu(phy_id); in smp_prepare_cpus()
711 set_cpu_possible(phy_id, true); in smp_prepare_cpus()
712 smp_show_cpu_info(phy_id); in smp_prepare_cpus()
750 static int __init do_boot_cpu(int phy_id) in do_boot_cpu() argument
759 cpu_id = phy_id; in do_boot_cpu()
776 send_IPI_mask(cpumask_of(phy_id), SMP_BOOT_IRQ); in do_boot_cpu()
784 CROSS_GxICR(SMP_BOOT_IRQ, phy_id) & GxICR_REQUEST; in do_boot_cpu()
/linux-4.4.14/Documentation/devicetree/bindings/net/
Dcpsw.txt48 - phy_id : Specifies slave phy id
53 Either the property phy_id, or the sub-node
81 phy_id = <&davinci_mdio>, <0>;
87 phy_id = <&davinci_mdio>, <1>;
110 phy_id = <&davinci_mdio>, <0>;
116 phy_id = <&davinci_mdio>, <1>;
/linux-4.4.14/drivers/phy/
Dphy-berlin-sata.c199 u32 phy_id; in phy_berlin_sata_probe() local
237 if (of_property_read_u32(child, "reg", &phy_id)) { in phy_berlin_sata_probe()
244 if (phy_id >= ARRAY_SIZE(phy_berlin_power_down_bits)) { in phy_berlin_sata_probe()
258 dev_err(dev, "failed to create PHY %d\n", phy_id); in phy_berlin_sata_probe()
264 phy_desc->power_bit = phy_berlin_power_down_bits[phy_id]; in phy_berlin_sata_probe()
265 phy_desc->index = phy_id; in phy_berlin_sata_probe()
/linux-4.4.14/drivers/scsi/isci/
Dsas.h128 u8 phy_id; /* byte 9 */ member
146 u8 phy_id; /* byte 9 */ member
169 u8 phy_id; /* byte 9 */ member
Dhost.c1929 u32 phy_id; in sci_controller_afe_initialization() local
1983 for (phy_id = 0; phy_id < SCI_MAX_PHYS; phy_id++) { in sci_controller_afe_initialization()
1984 struct scu_afe_transceiver __iomem *xcvr = &afe->scu_afe_xcvr[phy_id]; in sci_controller_afe_initialization()
1985 const struct sci_phy_oem_params *oem_phy = &oem->phys[phy_id]; in sci_controller_afe_initialization()
1987 is_long_cable(phy_id, cable_selection_mask); in sci_controller_afe_initialization()
1989 is_medium_cable(phy_id, cable_selection_mask); in sci_controller_afe_initialization()
/linux-4.4.14/drivers/net/ethernet/freescale/fs_enet/
Dmii-fec.c52 static int fs_enet_fec_mii_read(struct mii_bus *bus , int phy_id, int location) in fs_enet_fec_mii_read() argument
61 out_be32(&fecp->fec_mii_data, (phy_id << 23) | mk_mii_read(location)); in fs_enet_fec_mii_read()
75 static int fs_enet_fec_mii_write(struct mii_bus *bus, int phy_id, int location, u16 val) in fs_enet_fec_mii_write() argument
85 out_be32(&fecp->fec_mii_data, (phy_id << 23) | mk_mii_write(location, val)); in fs_enet_fec_mii_write()
/linux-4.4.14/drivers/message/fusion/
Dmptsas.h102 u8 phy_id; member
134 u8 phy_id; /* phy number of parent device */ member
160 u8 phy_id; /* phy index */ member
Dmptsas.c857 port_details->phy_bitmask &= ~ (1 << phy_info->phy_id); in mptsas_setup_wide_ports()
863 phy_info->phy_id, phy_info->phy)); in mptsas_setup_wide_ports()
890 if (phy_info->phy_id < 64 ) in mptsas_setup_wide_ports()
892 (1 << phy_info->phy_id); in mptsas_setup_wide_ports()
932 if (phy_info_cmp->phy_id < 64 ) in mptsas_setup_wide_ports()
934 (1 << phy_info_cmp->phy_id); in mptsas_setup_wide_ports()
1462 phy_info->attached.phy_id, (unsigned long long) in mptsas_add_end_device()
1543 phy_info->attached.id, phy_info->attached.phy_id, in mptsas_del_end_device()
1563 ioc->name, phy_info_parent->phy_id, in mptsas_del_end_device()
1828 p->phy_info[i].attached.phy_id, (unsigned long long) in mptsas_target_destroy()
[all …]
/linux-4.4.14/drivers/nfc/
Dmei_phy.c263 static int nfc_mei_phy_write(void *phy_id, struct sk_buff *skb) in nfc_mei_phy_write() argument
265 struct nfc_mei_phy *phy = phy_id; in nfc_mei_phy_write()
331 static int nfc_mei_phy_enable(void *phy_id) in nfc_mei_phy_enable() argument
334 struct nfc_mei_phy *phy = phy_id; in nfc_mei_phy_enable()
376 static void nfc_mei_phy_disable(void *phy_id) in nfc_mei_phy_disable() argument
378 struct nfc_mei_phy *phy = phy_id; in nfc_mei_phy_disable()
/linux-4.4.14/drivers/net/ethernet/8390/
Dpcnet_cs.c209 u_char phy_id; member
706 static int mdio_read(unsigned int addr, int phy_id, int loc) in mdio_read() argument
708 u_int cmd = (0x06<<10)|(phy_id<<5)|loc; in mdio_read()
725 static void mdio_write(unsigned int addr, int phy_id, int loc, int value) in mdio_write() argument
727 u_int cmd = (0x05<<28)|(phy_id<<23)|(loc<<18)|(1<<17)|value; in mdio_write()
919 info->phy_id = info->eth_phy; in pcnet_open()
1038 mdio_read(mii_addr, info->phy_id, 1); in ei_watchdog()
1039 link = mdio_read(mii_addr, info->phy_id, 1); in ei_watchdog()
1042 info->phy_id = info->eth_phy = 0; in ei_watchdog()
1052 u_short p = mdio_read(mii_addr, info->phy_id, 5); in ei_watchdog()
[all …]
Daxnet_cs.c91 static int mdio_read(unsigned int addr, int phy_id, int loc);
92 static void mdio_write(unsigned int addr, int phy_id, int loc, int value);
118 int phy_id; member
350 info->phy_id = (i < 32) ? i : -1; in axnet_config()
361 if (info->phy_id != -1) { in axnet_config()
363 info->phy_id, j); in axnet_config()
429 static int mdio_read(unsigned int addr, int phy_id, int loc) in mdio_read() argument
431 u_int cmd = (0xf6<<10)|(phy_id<<5)|loc; in mdio_read()
448 static void mdio_write(unsigned int addr, int phy_id, int loc, int value) in mdio_write() argument
450 u_int cmd = (0x05<<28)|(phy_id<<23)|(loc<<18)|(1<<17)|value; in mdio_write()
[all …]
/linux-4.4.14/arch/powerpc/sysdev/
Dtsi108_dev.c78 const unsigned int *phy_id; in tsi108_eth_of_init() local
126 phy_id = of_get_property(phy, "reg", NULL); in tsi108_eth_of_init()
130 tsi_eth_data.phy = *phy_id; in tsi108_eth_of_init()
/linux-4.4.14/drivers/of/
Dof_mdio.c29 static int of_get_phy_id(struct device_node *device, u32 *phy_id) in of_get_phy_id() argument
37 *phy_id = ((upper & 0xFFFF) << 16) | (lower & 0xFFFF); in of_get_phy_id()
50 u32 phy_id; in of_mdiobus_register_phy() local
55 if (!is_c45 && !of_get_phy_id(child, &phy_id)) in of_mdiobus_register_phy()
56 phy = phy_device_create(mdio, addr, phy_id, 0, NULL); in of_mdiobus_register_phy()
/linux-4.4.14/arch/arm/boot/dts/
Ddm8148-evm.dts21 phy_id = <&davinci_mdio>, <0>;
26 phy_id = <&davinci_mdio>, <1>;
Ddm8148-t410.dts21 phy_id = <&davinci_mdio>, <0>;
26 phy_id = <&davinci_mdio>, <1>;
Dam335x-igep0033.dtsi107 phy_id = <&davinci_mdio>, <0>;
112 phy_id = <&davinci_mdio>, <1>;
Dam335x-chiliboard.dts71 phy_id = <&davinci_mdio>, <0>;
Dam335x-lxm.dts320 phy_id = <&davinci_mdio>, <5>;
326 phy_id = <&davinci_mdio>, <4>;
Dam335x-bone-common.dtsi358 phy_id = <&davinci_mdio>, <0>;
363 phy_id = <&davinci_mdio>, <1>;
Dam335x-wega.dtsi66 phy_id = <&davinci_mdio>, <1>;
/linux-4.4.14/drivers/nfc/st21nfca/
Di2c.c153 static int st21nfca_hci_i2c_enable(void *phy_id) in st21nfca_hci_i2c_enable() argument
155 struct st21nfca_i2c_phy *phy = phy_id; in st21nfca_hci_i2c_enable()
166 static void st21nfca_hci_i2c_disable(void *phy_id) in st21nfca_hci_i2c_disable() argument
168 struct st21nfca_i2c_phy *phy = phy_id; in st21nfca_hci_i2c_disable()
204 static int st21nfca_hci_i2c_write(void *phy_id, struct sk_buff *skb) in st21nfca_hci_i2c_write() argument
207 struct st21nfca_i2c_phy *phy = phy_id; in st21nfca_hci_i2c_write()
444 static irqreturn_t st21nfca_hci_irq_thread_fn(int irq, void *phy_id) in st21nfca_hci_irq_thread_fn() argument
446 struct st21nfca_i2c_phy *phy = phy_id; in st21nfca_hci_irq_thread_fn()
Dst21nfca.h159 void *phy_id; member
177 int st21nfca_hci_probe(void *phy_id, struct nfc_phy_ops *phy_ops,
Dcore.c229 r = info->phy_ops->enable(info->phy_id); in st21nfca_hci_open()
248 info->phy_ops->disable(info->phy_id); in st21nfca_hci_close()
330 return info->phy_ops->write(info->phy_id, skb); in st21nfca_hci_xmit()
956 int st21nfca_hci_probe(void *phy_id, struct nfc_phy_ops *phy_ops, in st21nfca_hci_probe() argument
975 info->phy_id = phy_id; in st21nfca_hci_probe()
/linux-4.4.14/drivers/net/ethernet/ibm/emac/
Dphy.c287 .phy_id = 0x00000000,
352 .phy_id = 0x000fc410,
360 .phy_id = 0x0143bc00,
432 .phy_id = 0x0282f000,
452 .phy_id = 0x01410CC0,
467 .phy_id = 0x01410C90,
503 if ((id & def->phy_id_mask) == def->phy_id) in emac_mii_phy_probe()
Dphy.h43 u32 phy_id; /* Concatenated ID1 << 16 | ID2 */ member
/linux-4.4.14/tools/firewire/
Dnosy-dump.h18 uint32_t phy_id:6; member
44 uint32_t phy_id:6; member
62 uint32_t phy_id:6; member
Dnosy-dump.c792 printf("link-on packet, phy_id=%02x", pp->link_on.phy_id); in print_packet()
798 pp->ext_self_id.phy_id, pp->ext_self_id.sequence); in print_packet()
804 pp->self_id.phy_id, in print_packet()
/linux-4.4.14/drivers/thermal/
Dx86_pkg_temp_thermal.c320 int phy_id = topology_physical_package_id(cpu); in pkg_temp_thermal_threshold_work_fn() local
330 if (unlikely(phy_id > max_phy_id)) { in pkg_temp_thermal_threshold_work_fn()
334 pkg_work_scheduled[phy_id] = 0; in pkg_temp_thermal_threshold_work_fn()
359 int phy_id = topology_physical_package_id(cpu); in pkg_temp_thermal_platform_thermal_notify() local
368 if (unlikely(phy_id > max_phy_id) || unlikely(!pkg_work_scheduled) || in pkg_temp_thermal_platform_thermal_notify()
369 pkg_work_scheduled[phy_id]) { in pkg_temp_thermal_platform_thermal_notify()
374 pkg_work_scheduled[phy_id] = 1; in pkg_temp_thermal_platform_thermal_notify()
/linux-4.4.14/drivers/firewire/
Dcore-topology.c189 int i, port_count, child_port_count, phy_id, parent_count, stack_depth; in build_tree() local
198 phy_id = 0; in build_tree()
212 if (phy_id != SELF_ID_PHY_ID(q)) { in build_tree()
214 phy_id, SELF_ID_PHY_ID(q)); in build_tree()
241 if (phy_id == (card->node_id & 0x3f)) in build_tree()
287 "parent_count=%d\n", phy_id, parent_count); in build_tree()
310 phy_id++; in build_tree()
/linux-4.4.14/drivers/net/ethernet/ti/
Ddavinci_mdio.c219 static int davinci_mdio_read(struct mii_bus *bus, int phy_id, int phy_reg) in davinci_mdio_read() argument
225 if (phy_reg & ~PHY_REG_MASK || phy_id & ~PHY_ID_MASK) in davinci_mdio_read()
236 (phy_id << 16)); in davinci_mdio_read()
263 static int davinci_mdio_write(struct mii_bus *bus, int phy_id, in davinci_mdio_write() argument
270 if (phy_reg & ~PHY_REG_MASK || phy_id & ~PHY_ID_MASK) in davinci_mdio_write()
281 (phy_id << 16) | (phy_data & USERACCESS_DATA)); in davinci_mdio_write()
Dcpmac.c278 static int cpmac_mdio_read(struct mii_bus *bus, int phy_id, int reg) in cpmac_mdio_read() argument
285 MDIO_PHY(phy_id)); in cpmac_mdio_read()
292 static int cpmac_mdio_write(struct mii_bus *bus, int phy_id, in cpmac_mdio_write() argument
298 MDIO_REG(reg) | MDIO_PHY(phy_id) | MDIO_DATA(val)); in cpmac_mdio_write()
1105 int rc, phy_id; in cpmac_probe() local
1116 phy_id = pdev->id; in cpmac_probe()
1118 for (phy_id = 0; phy_id < PHY_MAX_ADDR; phy_id++) { in cpmac_probe()
1119 if (!(pdata->phy_mask & (1 << phy_id))) in cpmac_probe()
1121 if (!cpmac_mii->phy_map[phy_id]) in cpmac_probe()
1128 if (phy_id == PHY_MAX_ADDR) { in cpmac_probe()
[all …]
Dcpsw.h21 char phy_id[MII_BUS_ID_SIZE]; member
Ddavinci_emac.c349 const char *phy_id; member
1621 if (!priv->phydev && !priv->phy_id) { in emac_dev_open()
1627 priv->phy_id = dev_name(phy); in emac_dev_open()
1630 if (!priv->phydev && priv->phy_id && *priv->phy_id) { in emac_dev_open()
1631 priv->phydev = phy_connect(ndev, priv->phy_id, in emac_dev_open()
1637 priv->phy_id); in emac_dev_open()
1650 priv->phydev->phy_id); in emac_dev_open()
1866 pdata->phy_id = NULL; in davinci_emac_of_get_pdata()
1951 priv->phy_id = pdata->phy_id; in davinci_emac_probe()
/linux-4.4.14/arch/powerpc/platforms/pasemi/
Dgpio_mdio.c128 static int gpio_mdio_read(struct mii_bus *bus, int phy_id, int location) in gpio_mdio_read() argument
132 u8 addr = phy_id & 0xff; in gpio_mdio_read()
167 static int gpio_mdio_write(struct mii_bus *bus, int phy_id, int location, u16 val) in gpio_mdio_write() argument
171 u8 addr = phy_id & 0xff; in gpio_mdio_write()
/linux-4.4.14/drivers/net/ethernet/
Djme.c118 jme->mii_if.phy_id, in jme_reset_phy_processor()
124 jme->mii_if.phy_id, in jme_reset_phy_processor()
129 jme->mii_if.phy_id, in jme_reset_phy_processor()
133 jme->mii_if.phy_id, in jme_reset_phy_processor()
403 phylink = jme_mdio_read(jme->dev, jme->mii_if.phy_id, 17); in jme_linkstat_from_phy()
404 bmsr = jme_mdio_read(jme->dev, jme->mii_if.phy_id, MII_BMSR); in jme_linkstat_from_phy()
414 jme_mdio_write(jme->dev, jme->mii_if.phy_id, 27, 0x0004); in jme_set_phyfifo_5level()
420 jme_mdio_write(jme->dev, jme->mii_if.phy_id, 27, 0x0000); in jme_set_phyfifo_8level()
447 jme->mii_if.phy_id, in jme_check_link()
1642 bmcr = jme_mdio_read(jme->dev, jme->mii_if.phy_id, MII_BMCR); in jme_restart_an()
[all …]
Dnetx-eth.c274 netx_eth_phy_read(struct net_device *ndev, int phy_id, int reg) in netx_eth_phy_read() argument
278 val = MIIMU_SNRDY | MIIMU_PREAMBLE | MIIMU_PHYADDR(phy_id) | in netx_eth_phy_read()
289 netx_eth_phy_write(struct net_device *ndev, int phy_id, int reg, int value) in netx_eth_phy_write() argument
293 val = MIIMU_SNRDY | MIIMU_PREAMBLE | MIIMU_PHYADDR(phy_id) | in netx_eth_phy_write()
329 priv->mii.phy_id = INTERNAL_PHY_ADR + priv->id; in netx_eth_enable()
Dethoc.c225 s8 phy_id; member
680 if (priv->phy_id != -1) in ethoc_mdio_probe()
681 phy = priv->mdio->phy_map[priv->phy_id]; in ethoc_mdio_probe()
766 if (mdio->phy_id >= PHY_MAX_ADDR) in ethoc_ioctl()
769 phy = priv->mdio->phy_map[mdio->phy_id]; in ethoc_ioctl()
1143 priv->phy_id = pdata->phy_id; in ethoc_probe()
1152 priv->phy_id = -1; in ethoc_probe()
/linux-4.4.14/include/scsi/
Dsas.h302 u8 phy_id; member
374 u8 phy_id; member
423 u8 phy_id; member
496 u8 phy_id; member
568 u8 phy_id; member
617 u8 phy_id; member
/linux-4.4.14/drivers/net/ethernet/broadcom/
Dbcm63xx_enet.c876 char phy_id[MII_BUS_ID_SIZE + 3]; in bcm_enet_open() local
885 snprintf(phy_id, sizeof(phy_id), PHY_ID_FMT, in bcm_enet_open()
886 priv->mii_bus->id, priv->phy_id); in bcm_enet_open()
888 phydev = phy_connect(dev, phy_id, bcm_enet_adjust_phy_link, in bcm_enet_open()
1617 mii.phy_id = 0; in bcm_enet_ioctl()
1800 priv->phy_id = pd->phy_id; in bcm_enet_probe()
1850 bus->phy_mask = ~(1 << priv->phy_id); in bcm_enet_probe()
1860 bus->irq[priv->phy_id] = priv->phy_interrupt; in bcm_enet_probe()
1862 bus->irq[priv->phy_id] = PHY_POLL; in bcm_enet_probe()
1991 int ext, int phy_id, int location) in bcmenet_sw_mdio_read() argument
[all …]
Dbcm63xx_enet.h285 int phy_id; member
Db44.c304 static int b44_mdio_read_mii(struct net_device *dev, int phy_id, int location) in b44_mdio_read_mii() argument
308 int rc = __b44_readphy(bp, phy_id, location, &val); in b44_mdio_read_mii()
314 static void b44_mdio_write_mii(struct net_device *dev, int phy_id, int location, in b44_mdio_write_mii() argument
318 __b44_writephy(bp, phy_id, location, val); in b44_mdio_write_mii()
321 static int b44_mdio_read_phylib(struct mii_bus *bus, int phy_id, int location) in b44_mdio_read_phylib() argument
325 int rc = __b44_readphy(bp, phy_id, location, &val); in b44_mdio_read_phylib()
331 static int b44_mdio_write_phylib(struct mii_bus *bus, int phy_id, int location, in b44_mdio_write_phylib() argument
335 return __b44_writephy(bp, phy_id, location, val); in b44_mdio_write_phylib()
2415 bp->mii_if.phy_id = bp->phy_addr; in b44_init_one()
/linux-4.4.14/drivers/net/ethernet/dec/tulip/
Dmedia.c47 int tulip_mdio_read(struct net_device *dev, int phy_id, int location) in tulip_mdio_read() argument
51 int read_cmd = (0xf6 << 10) | ((phy_id & 0x1f) << 5) | location; in tulip_mdio_read()
60 if (tp->chip_id == COMET && phy_id == 30) { in tulip_mdio_read()
68 iowrite32(0x60020000 + (phy_id<<23) + (location<<18), ioaddr + 0xA0); in tulip_mdio_read()
109 void tulip_mdio_write(struct net_device *dev, int phy_id, int location, int val) in tulip_mdio_write() argument
113 int cmd = (0x5002 << 16) | ((phy_id & 0x1f) << 23) | (location<<18) | (val & 0xffff); in tulip_mdio_write()
121 if (tp->chip_id == COMET && phy_id == 30) { in tulip_mdio_write()
Dwinbond-840.c326 static int mdio_read(struct net_device *dev, int phy_id, int location);
327 static void mdio_write(struct net_device *dev, int phy_id, int location, int value);
460 np->mii_if.phy_id = np->phys[0]; in w840_probe1()
567 static int mdio_read(struct net_device *dev, int phy_id, int location) in mdio_read() argument
571 int mii_cmd = (0xf6 << 10) | (phy_id << 5) | location; in mdio_read()
597 static void mdio_write(struct net_device *dev, int phy_id, int location, int value) in mdio_write() argument
601 int mii_cmd = (0x5002 << 16) | (phy_id << 23) | (location<<18) | value; in mdio_write()
604 if (location == 4 && phy_id == np->phys[0]) in mdio_write()
1458 data->phy_id = ((struct netdev_private *)netdev_priv(dev))->phys[0] & 0x1f; in netdev_ioctl()
1463 data->val_out = mdio_read(dev, data->phy_id & 0x1f, data->reg_num & 0x1f); in netdev_ioctl()
[all …]
Dtulip.h498 int tulip_mdio_read(struct net_device *dev, int phy_id, int location);
499 void tulip_mdio_write(struct net_device *dev, int phy_id, int location, int value);
Dtulip_core.c923 data->phy_id = phy; in private_ioctl()
925 data->phy_id = 32; in private_ioctl()
927 data->phy_id = 1; in private_ioctl()
932 if (data->phy_id == 32 && (tp->flags & HAS_NWAY)) { in private_ioctl()
962 data->val_out = tulip_mdio_read (dev, data->phy_id & 0x1f, regnum); in private_ioctl()
969 if (data->phy_id == phy) { in private_ioctl()
983 if (data->phy_id == 32 && (tp->flags & HAS_NWAY)) { in private_ioctl()
996 tulip_mdio_write (dev, data->phy_id & 0x1f, regnum, data->val_in); in private_ioctl()
/linux-4.4.14/drivers/scsi/esas2r/
Datioctl.h373 u8 phy_id; member
390 u8 phy_id; member
412 u8 phy_id; member
436 u8 phy_id; member
470 u8 phy_id; member
494 u8 phy_id; member
617 u8 phy_id; member
947 u8 phy_id[ATTO_SDI_MAX_PHYS_WIDE_PORT]; /* IDs of parent exp/adapt */ member
1199 u8 phy_id; member
/linux-4.4.14/drivers/nfc/pn544/
Di2c.c256 static int pn544_hci_i2c_enable(void *phy_id) in pn544_hci_i2c_enable() argument
258 struct pn544_i2c_phy *phy = phy_id; in pn544_hci_i2c_enable()
269 static void pn544_hci_i2c_disable(void *phy_id) in pn544_hci_i2c_disable() argument
271 struct pn544_i2c_phy *phy = phy_id; in pn544_hci_i2c_disable()
311 static int pn544_hci_i2c_write(void *phy_id, struct sk_buff *skb) in pn544_hci_i2c_write() argument
314 struct pn544_i2c_phy *phy = phy_id; in pn544_hci_i2c_write()
498 static irqreturn_t pn544_hci_i2c_irq_thread_fn(int irq, void *phy_id) in pn544_hci_i2c_irq_thread_fn() argument
500 struct pn544_i2c_phy *phy = phy_id; in pn544_hci_i2c_irq_thread_fn()
542 static int pn544_hci_i2c_fw_download(void *phy_id, const char *firmware_name, in pn544_hci_i2c_fw_download() argument
545 struct pn544_i2c_phy *phy = phy_id; in pn544_hci_i2c_fw_download()
Dpn544.c123 void *phy_id; member
150 r = info->phy_ops->enable(info->phy_id); in pn544_hci_open()
169 info->phy_ops->disable(info->phy_id); in pn544_hci_close()
341 return info->phy_ops->write(info->phy_id, skb); in pn544_hci_xmit()
790 return info->fw_download(info->phy_id, firmware_name, hdev->sw_romlib); in pn544_hci_fw_download()
915 int pn544_hci_probe(void *phy_id, struct nfc_phy_ops *phy_ops, char *llc_name, in pn544_hci_probe() argument
931 info->phy_id = phy_id; in pn544_hci_probe()
Dpn544.h31 int pn544_hci_probe(void *phy_id, struct nfc_phy_ops *phy_ops, char *llc_name,
/linux-4.4.14/drivers/net/ethernet/xscale/
Dixp4xx_eth.c442 static int ixp4xx_mdio_cmd(struct mii_bus *bus, int phy_id, int location, in ixp4xx_mdio_cmd() argument
456 __raw_writel(((phy_id << 5) | location) & 0xFF, in ixp4xx_mdio_cmd()
458 __raw_writel((phy_id >> 3) | (write << 2) | 0x80 /* GO */, in ixp4xx_mdio_cmd()
469 phy_id); in ixp4xx_mdio_cmd()
475 phy_id, write ? "write" : "read", cycles); in ixp4xx_mdio_cmd()
484 phy_id); in ixp4xx_mdio_cmd()
493 static int ixp4xx_mdio_read(struct mii_bus *bus, int phy_id, int location) in ixp4xx_mdio_read() argument
499 ret = ixp4xx_mdio_cmd(bus, phy_id, location, 0, 0); in ixp4xx_mdio_read()
503 phy_id, location, ret); in ixp4xx_mdio_read()
508 static int ixp4xx_mdio_write(struct mii_bus *bus, int phy_id, int location, in ixp4xx_mdio_write() argument
[all …]
/linux-4.4.14/drivers/net/ethernet/3com/
D3c574_cs.c221 static int mdio_read(unsigned int ioaddr, int phy_id, int location);
222 static void mdio_write(unsigned int ioaddr, int phy_id, int location,
543 static int mdio_read(unsigned int ioaddr, int phy_id, int location) in mdio_read() argument
546 int read_cmd = (0xf6 << 10) | (phy_id << 5) | location; in mdio_read()
568 static void mdio_write(unsigned int ioaddr, int phy_id, int location, int value) in mdio_write() argument
570 int write_cmd = 0x50020000 | (phy_id << 23) | (location << 18) | value; in mdio_write()
1047 data->phy_id, data->reg_num, data->val_in, data->val_out); in el3_ioctl()
1051 data->phy_id = phy; in el3_ioctl()
1060 data->val_out = mdio_read(ioaddr, data->phy_id & 0x1f, in el3_ioctl()
1074 mdio_write(ioaddr, data->phy_id & 0x1f, in el3_ioctl()
/linux-4.4.14/drivers/net/ethernet/intel/
De100.c992 u16 advert = mdio_read(nic->netdev, nic->mii.phy_id, in mdio_ctrl_phy_82552_v()
1442 nic->mii.phy_id = 0; /* is this ok for an MII-less PHY? */ in e100_phy_check_without_mii()
1470 nic->mii.phy_id = (addr == 0) ? 1 : (addr == 1) ? 0 : addr; in e100_phy_init()
1471 bmcr = mdio_read(netdev, nic->mii.phy_id, MII_BMCR); in e100_phy_init()
1472 stat = mdio_read(netdev, nic->mii.phy_id, MII_BMSR); in e100_phy_init()
1473 stat = mdio_read(netdev, nic->mii.phy_id, MII_BMSR); in e100_phy_init()
1492 "phy_addr = %d\n", nic->mii.phy_id); in e100_phy_init()
1495 id_lo = mdio_read(netdev, nic->mii.phy_id, MII_PHYSID1); in e100_phy_init()
1496 id_hi = mdio_read(netdev, nic->mii.phy_id, MII_PHYSID2); in e100_phy_init()
1503 if (addr != nic->mii.phy_id) { in e100_phy_init()
[all …]
/linux-4.4.14/drivers/net/ethernet/smsc/
Dsmc91c92_cs.c284 static int mdio_read(struct net_device *dev, int phy_id, int loc);
285 static void mdio_write(struct net_device *dev, int phy_id, int loc, int value);
911 smc->mii_if.phy_id = (i < 32) ? i : -1; in smc91c92_config()
936 if (smc->mii_if.phy_id != -1) { in smc91c92_config()
938 smc->mii_if.phy_id, j); in smc91c92_config()
985 static int mdio_read(struct net_device *dev, int phy_id, int loc) in mdio_read() argument
988 u_int cmd = (0x06<<10)|(phy_id<<5)|loc; in mdio_read()
1005 static void mdio_write(struct net_device *dev, int phy_id, int loc, int value) in mdio_write() argument
1008 u_int cmd = (0x05<<28)|(phy_id<<23)|(loc<<18)|(1<<17)|value; in mdio_write()
1688 mdio_write(dev, smc->mii_if.phy_id, 0, 0x8000); in smc_reset()
[all …]
Dsmc911x.c715 lp->mii.phy_id = phyaddr & 31; in smc911x_phy_detect()
729 lp->mii.phy_id = 1; in smc911x_phy_detect()
734 id1, id2, lp->mii.phy_id); in smc911x_phy_detect()
744 int phyaddr = lp->mii.phy_id; in smc911x_phy_fixed()
850 int phyaddr = lp->mii.phy_id; in smc911x_phy_check_media()
887 int phyaddr = lp->mii.phy_id; in smc911x_phy_configure()
983 int phyaddr = lp->mii.phy_id; in smc911x_phy_interrupt()
1435 smc911x_phy_powerdown(dev, lp->mii.phy_id); in smc911x_close()
1475 if (lp->mii.phy_id==1) in smc911x_ethtool_getsettings()
1480 SMC_GET_PHY_SPECIAL(lp, lp->mii.phy_id, status); in smc911x_ethtool_getsettings()
[all …]
Depic100.c291 static int mdio_read(struct net_device *dev, int phy_id, int location);
292 static void mdio_write(struct net_device *dev, int phy_id, int loc, int val);
466 ep->mii.phy_id = ep->phys[0]; in epic_init_one()
605 static int mdio_read(struct net_device *dev, int phy_id, int location) in mdio_read() argument
609 int read_cmd = (phy_id << 9) | (location << 4) | MII_READOP; in mdio_read()
618 if (phy_id == 1 && location < 6 && in mdio_read()
629 static void mdio_write(struct net_device *dev, int phy_id, int loc, int value) in mdio_write() argument
636 ew32(MIICtrl, (phy_id << 9) | (loc << 4) | MII_WRITEOP); in mdio_write()
/linux-4.4.14/drivers/net/wireless/iwlwifi/mvm/
Dquota.c143 int i, phy_id = -1, beacon_int = 0; in iwl_mvm_adjust_quota_for_noa() local
152 phy_id = mvmvif->phy_ctxt->id; in iwl_mvm_adjust_quota_for_noa()
160 if (id != phy_id) in iwl_mvm_adjust_quota_for_noa()
/linux-4.4.14/drivers/net/ethernet/via/
Dvia-rhine.c504 static int mdio_read(struct net_device *dev, int phy_id, int location);
505 static void mdio_write(struct net_device *dev, int phy_id, int location, int value);
910 int i, rc, phy_id; in rhine_init_one_common() local
935 phy_id = rp->quirks & rqIntPHY ? 1 : 0; in rhine_init_one_common()
956 if (!phy_id) in rhine_init_one_common()
957 phy_id = ioread8(ioaddr + 0x6C); in rhine_init_one_common()
1006 int mii_status = mdio_read(dev, phy_id, 1); in rhine_init_one_common()
1007 mii_cmd = mdio_read(dev, phy_id, MII_BMCR) & ~BMCR_ISOLATE; in rhine_init_one_common()
1008 mdio_write(dev, phy_id, MII_BMCR, mii_cmd); in rhine_init_one_common()
1010 rp->mii_if.advertising = mdio_read(dev, phy_id, 4); in rhine_init_one_common()
[all …]
/linux-4.4.14/drivers/net/ethernet/apm/xgene/
Dxgene_enet_hw.c370 static int xgene_mii_phy_write(struct xgene_enet_pdata *pdata, int phy_id, in xgene_mii_phy_write() argument
377 PHY_ADDR_SET(&addr, phy_id); in xgene_mii_phy_write()
397 u8 phy_id, u32 reg) in xgene_mii_phy_read() argument
403 PHY_ADDR_SET(&addr, phy_id); in xgene_mii_phy_read()
782 u32 phy_id; in xgene_mdiobus_register() local
809 ret = device_property_read_u32(dev, "phy-channel", &phy_id); in xgene_mdiobus_register()
811 ret = device_property_read_u32(dev, "phy-addr", &phy_id); in xgene_mdiobus_register()
815 phy = get_phy_device(mdio, phy_id, false); in xgene_mdiobus_register()
Dxgene_enet_sgmac.c159 static void xgene_mii_phy_write(struct xgene_enet_pdata *p, u8 phy_id, in xgene_mii_phy_write() argument
165 addr = PHY_ADDR(phy_id) | REG_ADDR(reg); in xgene_mii_phy_write()
181 static u32 xgene_mii_phy_read(struct xgene_enet_pdata *p, u8 phy_id, u32 reg) in xgene_mii_phy_read() argument
186 addr = PHY_ADDR(phy_id) | REG_ADDR(reg); in xgene_mii_phy_read()
/linux-4.4.14/include/net/
Dethoc.h18 s8 phy_id; member
/linux-4.4.14/drivers/net/ethernet/broadcom/genet/
Dbcmmii.c31 static int bcmgenet_mii_read(struct mii_bus *bus, int phy_id, int location) in bcmgenet_mii_read() argument
38 bcmgenet_umac_writel(priv, (MDIO_RD | (phy_id << MDIO_PMD_SHIFT) | in bcmgenet_mii_read()
55 if (!(bus->phy_ignore_ta_mask & 1 << phy_id) && (ret & MDIO_READ_FAIL)) in bcmgenet_mii_read()
62 static int bcmgenet_mii_write(struct mii_bus *bus, int phy_id, in bcmgenet_mii_write() argument
69 bcmgenet_umac_writel(priv, (MDIO_WR | (phy_id << MDIO_PMD_SHIFT) | in bcmgenet_mii_write()
/linux-4.4.14/drivers/net/ethernet/nuvoton/
Dw90p910_ether.c124 static int w90p910_mdio_read(struct net_device *dev, int phy_id, int reg);
223 bmsr = w90p910_mdio_read(dev, ether->mii.phy_id, MII_BMSR); in update_linkspeed()
224 bmcr = w90p910_mdio_read(dev, ether->mii.phy_id, MII_BMCR); in update_linkspeed()
230 lpa = w90p910_mdio_read(dev, ether->mii.phy_id, MII_LPA); in update_linkspeed()
500 int phy_id, int reg, int data) in w90p910_mdio_write() argument
510 val = (phy_id << 0x08) | reg; in w90p910_mdio_write()
523 static int w90p910_mdio_read(struct net_device *dev, int phy_id, int reg) in w90p910_mdio_read() argument
531 val = (phy_id << 0x08) | reg; in w90p910_mdio_read()
959 ether->mii.phy_id = 0x01; in w90p910_ether_setup()
/linux-4.4.14/arch/arm/mach-ep93xx/
Dgesbc9312.c26 .phy_id = 1,
Dadssphere.c26 .phy_id = 1,
Dmicro9.c66 .phy_id = 0x1f,
Dsnappercl15.c127 .phy_id = 1,
Dsimone.c39 .phy_id = 1,
Dts72xx.c230 .phy_id = 1,
Dedb93xx.c58 .phy_id = 1,
Dvision_ep9307.c71 .phy_id = 1,
/linux-4.4.14/drivers/net/ethernet/cirrus/
Dep93xx_eth.c189 static int ep93xx_mdio_read(struct net_device *dev, int phy_id, int reg) in ep93xx_mdio_read() argument
195 wrl(ep, REG_MIICMD, REG_MIICMD_READ | (phy_id << 5) | reg); in ep93xx_mdio_read()
213 static void ep93xx_mdio_write(struct net_device *dev, int phy_id, int reg, int data) in ep93xx_mdio_write() argument
219 wrl(ep, REG_MIICMD, REG_MIICMD_WRITE | (phy_id << 5) | reg); in ep93xx_mdio_write()
570 if ((ep93xx_mdio_read(dev, ep->mii.phy_id, MII_BMSR) & 0x0040) != 0) in ep93xx_start_hw()
849 ep->mii.phy_id = data->phy_id; in ep93xx_eth_probe()
/linux-4.4.14/drivers/net/ethernet/packetengines/
Dyellowfin.c342 static int mdio_read(void __iomem *ioaddr, int phy_id, int location);
343 static void mdio_write(void __iomem *ioaddr, int phy_id, int location, int value);
539 static int mdio_read(void __iomem *ioaddr, int phy_id, int location) in mdio_read() argument
543 iowrite16((phy_id<<8) + location, ioaddr + MII_Addr); in mdio_read()
551 static void mdio_write(void __iomem *ioaddr, int phy_id, int location, int value) in mdio_write() argument
555 iowrite16((phy_id<<8) + location, ioaddr + MII_Addr); in mdio_write()
1349 data->phy_id = np->phys[0] & 0x1f; in netdev_ioctl()
1353 data->val_out = mdio_read(ioaddr, data->phy_id & 0x1f, data->reg_num & 0x1f); in netdev_ioctl()
1357 if (data->phy_id == np->phys[0]) { in netdev_ioctl()
1370 mdio_write(ioaddr, data->phy_id & 0x1f, data->reg_num & 0x1f, data->val_in); in netdev_ioctl()
Dhamachi.c546 static int mdio_read(struct net_device *dev, int phy_id, int location);
547 static void mdio_write(struct net_device *dev, int phy_id, int location, int value);
764 hmp->mii_if.phy_id = hmp->phys[0]; in hamachi_init_one()
812 static int mdio_read(struct net_device *dev, int phy_id, int location) in mdio_read() argument
822 writew((phy_id<<8) + location, ioaddr + MII_Addr); in mdio_read()
830 static void mdio_write(struct net_device *dev, int phy_id, int location, int value) in mdio_write() argument
840 writew((phy_id<<8) + location, ioaddr + MII_Addr); in mdio_write()
/linux-4.4.14/drivers/net/ethernet/amd/
Damd8111e.c113 int phy_id, int reg, u32 *val) in amd8111e_read_phy() argument
123 writel( PHY_RD_CMD | ((phy_id & 0x1f) << 21) | in amd8111e_read_phy()
142 int phy_id, int reg, u32 val) in amd8111e_write_phy() argument
152 writel( PHY_WR_CMD | ((phy_id & 0x1f) << 21) | in amd8111e_write_phy()
171 static int amd8111e_mdio_read(struct net_device *dev, int phy_id, int reg_num) in amd8111e_mdio_read() argument
176 amd8111e_read_phy(lp,phy_id,reg_num,&reg_val); in amd8111e_mdio_read()
183 int phy_id, int reg_num, int val) in amd8111e_mdio_write() argument
187 amd8111e_write_phy(lp, phy_id, reg_num, val); in amd8111e_mdio_write()
1506 data->phy_id = lp->ext_phy_addr; in amd8111e_ioctl()
1512 err = amd8111e_read_phy(lp, data->phy_id, in amd8111e_ioctl()
[all …]
Dpcnet32.c322 static int mdio_read(struct net_device *dev, int phy_id, int reg_num);
323 static void mdio_write(struct net_device *dev, int phy_id, int reg_num,
1891 lp->mii_if.phy_id = ((lp->a->read_bcr(ioaddr, 33)) >> 5) & 0x1f; in pcnet32_probe1()
1906 lp->mii_if.phy_id = i; in pcnet32_probe1()
1911 lp->a->write_bcr(ioaddr, 33, (lp->mii_if.phy_id) << 5); in pcnet32_probe1()
2182 lp->mii_if.phy_id = i; in pcnet32_open()
2191 lp->mii_if.phy_id = first_phy; in pcnet32_open()
2696 static int mdio_read(struct net_device *dev, int phy_id, int reg_num) in mdio_read() argument
2705 lp->a->write_bcr(ioaddr, 33, ((phy_id & 0x1f) << 5) | (reg_num & 0x1f)); in mdio_read()
2712 static void mdio_write(struct net_device *dev, int phy_id, int reg_num, int val) in mdio_write() argument
[all …]
/linux-4.4.14/arch/arm/mach-ep93xx/include/mach/
Dplatform.h21 unsigned char phy_id; member
/linux-4.4.14/arch/arm/mach-davinci/
Dboard-sffsdr.c141 soc_info->emac_pdata->phy_id = SFFSDR_PHY_ID; in davinci_sffsdr_init()
Dboard-neuros-osd2.c205 soc_info->emac_pdata->phy_id = NEUROS_OSD2_PHY_ID; in davinci_ntosd2_init()
Dboard-omapl138-hawk.c61 soc_info->emac_pdata->phy_id = HAWKBOARD_PHY_ID; in omapl138_hawk_config_emac()
/linux-4.4.14/include/uapi/linux/
Dmii.h155 __u16 phy_id; member
/linux-4.4.14/drivers/gpu/drm/msm/dsi/phy/
Ddsi_phy.c148 int phy_id = phy->id; in msm_dsi_phy_set_src_pll() local
151 if ((phy_id >= DSI_MAX) || (pll_id >= DSI_MAX)) in msm_dsi_phy_set_src_pll()
156 if (phy->cfg->src_pll_truthtable[phy_id][pll_id]) in msm_dsi_phy_set_src_pll()
/linux-4.4.14/Documentation/ABI/testing/
Dsysfs-bus-mdio1 What: /sys/bus/mdio_bus/devices/.../phy_id
/linux-4.4.14/drivers/net/ethernet/faraday/
Dftmac100.c764 static int ftmac100_mdio_read(struct net_device *netdev, int phy_id, int reg) in ftmac100_mdio_read() argument
770 phycr = FTMAC100_PHYCR_PHYAD(phy_id) | in ftmac100_mdio_read()
789 static void ftmac100_mdio_write(struct net_device *netdev, int phy_id, int reg, in ftmac100_mdio_write() argument
796 phycr = FTMAC100_PHYCR_PHYAD(phy_id) | in ftmac100_mdio_write()
1122 priv->mii.phy_id = 0; in ftmac100_probe()
/linux-4.4.14/drivers/net/ethernet/dlink/
Dsundance.c429 static int mdio_read(struct net_device *dev, int phy_id, int location);
430 static void mdio_write(struct net_device *dev, int phy_id, int location, int value);
628 np->mii_if.phy_id = np->phys[0]; in sundance_probe1()
770 static int mdio_read(struct net_device *dev, int phy_id, int location) in mdio_read() argument
774 int mii_cmd = (0xf6 << 10) | (phy_id << 5) | location; in mdio_read()
800 static void mdio_write(struct net_device *dev, int phy_id, int location, int value) in mdio_write() argument
804 int mii_cmd = (0x5002 << 16) | (phy_id << 23) | (location<<18) | value; in mdio_write()
831 int phy_id; in mdio_wait_link() local
835 phy_id = np->phys[0]; in mdio_wait_link()
838 bmsr = mdio_read(dev, phy_id, MII_BMSR); in mdio_wait_link()
/linux-4.4.14/drivers/net/ethernet/intel/e1000e/
D82571.c410 u16 phy_id = 0; in e1000_get_phy_id_82571() local
426 ret_val = e1e_rphy(hw, MII_PHYSID1, &phy_id); in e1000_get_phy_id_82571()
430 phy->id = (u32)(phy_id << 16); in e1000_get_phy_id_82571()
432 ret_val = e1e_rphy(hw, MII_PHYSID2, &phy_id); in e1000_get_phy_id_82571()
436 phy->id |= (u32)(phy_id); in e1000_get_phy_id_82571()
437 phy->revision = (u32)(phy_id & ~PHY_REVISION_MASK); in e1000_get_phy_id_82571()
Dphy.c81 u16 phy_id; in e1000e_get_phy_id() local
88 ret_val = e1e_rphy(hw, MII_PHYSID1, &phy_id); in e1000e_get_phy_id()
92 phy->id = (u32)(phy_id << 16); in e1000e_get_phy_id()
94 ret_val = e1e_rphy(hw, MII_PHYSID2, &phy_id); in e1000e_get_phy_id()
98 phy->id |= (u32)(phy_id & PHY_REVISION_MASK); in e1000e_get_phy_id()
99 phy->revision = (u32)(phy_id & ~PHY_REVISION_MASK); in e1000e_get_phy_id()
2242 enum e1000_phy_type e1000e_get_phy_type_from_id(u32 phy_id) in e1000e_get_phy_type_from_id() argument
2246 switch (phy_id) { in e1000e_get_phy_type_from_id()
/linux-4.4.14/drivers/net/ethernet/natsemi/
Dnatsemi.c603 static int miiport_read(struct net_device *dev, int phy_id, int reg);
604 static void miiport_write(struct net_device *dev, int phy_id, int reg, u16 data);
1074 static int miiport_read(struct net_device *dev, int phy_id, int reg) in miiport_read() argument
1084 cmd = (0x06 << 10) | (phy_id << 5) | reg; in miiport_read()
1099 static void miiport_write(struct net_device *dev, int phy_id, int reg, u16 data) in miiport_write() argument
1107 cmd = (0x5002 << 16) | (phy_id << 23) | (reg << 18) | data; in miiport_write()
3069 data->phy_id = np->phy_addr_external; in netdev_ioctl()
3078 if ((data->phy_id & 0x1f) == np->phy_addr_external) in netdev_ioctl()
3084 move_int_phy(dev, data->phy_id & 0x1f); in netdev_ioctl()
3085 data->val_out = miiport_read(dev, data->phy_id & 0x1f, in netdev_ioctl()
[all …]
/linux-4.4.14/Documentation/networking/
Dphy.txt189 struct phy_device * phy_attach(struct net_device *dev, const char *phy_id,
239 driver's phy_id field by ANDing it with each driver's
243 .phy_id = 0x0181b880,
314 registered for it, matching based on UID (contained in the PHY device's phy_id
325 int phy_register_fixup(const char *phy_id,
334 int phy_register_fixup_for_id(const char *phy_id,
/linux-4.4.14/drivers/net/ethernet/intel/e1000/
De1000_hw.c121 switch (hw->phy_id) { in e1000_set_phy_type()
1059 e_dbg("Phy ID = %x\n", hw->phy_id); in e1000_copper_link_preconfig()
1295 (hw->phy_id == M88E1111_I_PHY_ID)) { in e1000_copper_link_mgp_setup()
3171 if (hw->phy_id != 0) in e1000_detect_gig_phy()
3179 hw->phy_id = (u32) (phy_id_high << 16); in e1000_detect_gig_phy()
3185 hw->phy_id |= (u32) (phy_id_low & PHY_REVISION_MASK); in e1000_detect_gig_phy()
3190 if (hw->phy_id == M88E1000_E_PHY_ID) in e1000_detect_gig_phy()
3194 if (hw->phy_id == M88E1000_I_PHY_ID) in e1000_detect_gig_phy()
3202 if (hw->phy_id == M88E1011_I_PHY_ID) in e1000_detect_gig_phy()
3206 if ((hw->phy_id == RTL8211B_PHY_ID) || in e1000_detect_gig_phy()
[all …]
/linux-4.4.14/drivers/net/ethernet/adaptec/
Dstarfire.c575 static int mdio_read(struct net_device *dev, int phy_id, int location);
576 static void mdio_write(struct net_device *dev, int phy_id, int location, int value);
828 np->mii_if.phy_id = np->phys[0]; in starfire_init_one()
848 static int mdio_read(struct net_device *dev, int phy_id, int location) in mdio_read() argument
851 void __iomem *mdio_addr = np->base + MIICtrl + (phy_id<<7) + (location<<2); in mdio_read()
865 static void mdio_write(struct net_device *dev, int phy_id, int location, int value) in mdio_write() argument
868 void __iomem *mdio_addr = np->base + MIICtrl + (phy_id<<7) + (location<<2); in mdio_write()
1886 if ((cmd == SIOCSMIIREG) && (data->phy_id == np->phys[0])) in netdev_ioctl()
/linux-4.4.14/drivers/scsi/mpt3sas/
Dmpt3sas_transport.c506 (unsigned long long) sas_address, mpt3sas_phy->phy_id); in _transport_delete_phy()
530 sas_address, mpt3sas_phy->phy_id); in _transport_add_phy()
722 mpt3sas_phy->phy_id); in mpt3sas_transport_port_add()
845 mpt3sas_phy->phy_id); in mpt3sas_transport_port_remove()
868 int phy_index = mpt3sas_phy->phy_id; in mpt3sas_transport_add_host_phy()
890 phy->identify.phy_identifier = mpt3sas_phy->phy_id; in mpt3sas_transport_add_host_phy()
937 int phy_index = mpt3sas_phy->phy_id; in mpt3sas_transport_add_expander_phy()
959 phy->identify.phy_identifier = mpt3sas_phy->phy_id; in mpt3sas_transport_add_expander_phy()
/linux-4.4.14/drivers/net/ethernet/realtek/
D8139too.c640 static int mdio_read (struct net_device *dev, int phy_id, int location);
641 static void mdio_write (struct net_device *dev, int phy_id, int location,
1079 tp->mii.phy_id = tp->phys[0]; in rtl8139_init_one()
1240 static int mdio_read (struct net_device *dev, int phy_id, int location) in mdio_read() argument
1246 int mii_cmd = (0xf6 << 10) | (phy_id << 5) | location; in mdio_read()
1250 if (phy_id > 31) { /* Really a 8139. Use internal registers. */ in mdio_read()
1282 static void mdio_write (struct net_device *dev, int phy_id, int location, in mdio_write() argument
1288 int mii_cmd = (0x5002 << 16) | (phy_id << 23) | (location << 18) | value; in mdio_write()
1292 if (phy_id > 31) { /* Really a 8139. Use internal registers. */ in mdio_write()
/linux-4.4.14/net/dsa/
Dslave.c1049 int phy_id = of_mdio_parse_addr(&slave_dev->dev, phy_dn); in dsa_slave_phy_setup() local
1056 if (!phy_is_fixed && phy_id >= 0 && in dsa_slave_phy_setup()
1057 (ds->phys_mii_mask & (1 << phy_id))) { in dsa_slave_phy_setup()
1058 ret = dsa_slave_phy_connect(p, slave_dev, phy_id); in dsa_slave_phy_setup()
1060 netdev_err(slave_dev, "failed to connect to phy%d: %d\n", phy_id, ret); in dsa_slave_phy_setup()
/linux-4.4.14/drivers/net/ethernet/sgi/
Dioc3-eth.c811 ip->mii.phy_id = -1; in ioc3_mii_init()
817 ip->mii.phy_id = i; in ioc3_mii_init()
1314 if (ip->mii.phy_id == -1) { in ioc3_probe()
1332 sw_physid1 = ioc3_mdio_read(dev, ip->mii.phy_id, MII_PHYSID1); in ioc3_probe()
1333 sw_physid2 = ioc3_mdio_read(dev, ip->mii.phy_id, MII_PHYSID2); in ioc3_probe()
1346 "rev %d.\n", dev->name, ip->mii.phy_id, vendor, model, rev); in ioc3_probe()
/linux-4.4.14/arch/xtensa/platforms/xtfpga/
Dsetup.c225 .phy_id = -1,
/linux-4.4.14/drivers/net/ethernet/tundra/
Dtsi108_eth.c276 val = (*mii->mdio_read) (mii->dev, mii->phy_id, MII_BMSR); in mii_speed()
280 advert = (*mii->mdio_read) (mii->dev, mii->phy_id, MII_ADVERTISE); in mii_speed()
281 lpa = (*mii->mdio_read) (mii->dev, mii->phy_id, MII_LPA); in mii_speed()
285 lpa2 = mii->mdio_read(mii->dev, mii->phy_id, MII_STAT1000); in mii_speed()
1596 data->mii_if.phy_id = einfo->phy; in tsi108_init_one()
/linux-4.4.14/drivers/net/ethernet/samsung/sxgbe/
Dsxgbe_mdio.c218 phy->phy_id, phy_addr, irq_str, in sxgbe_mdio_register()
/linux-4.4.14/drivers/net/ethernet/intel/igb/
De1000_phy.c78 u16 phy_id; in igb_get_phy_id() local
80 ret_val = phy->ops.read_reg(hw, PHY_ID1, &phy_id); in igb_get_phy_id()
84 phy->id = (u32)(phy_id << 16); in igb_get_phy_id()
86 ret_val = phy->ops.read_reg(hw, PHY_ID2, &phy_id); in igb_get_phy_id()
90 phy->id |= (u32)(phy_id & PHY_REVISION_MASK); in igb_get_phy_id()
91 phy->revision = (u32)(phy_id & ~PHY_REVISION_MASK); in igb_get_phy_id()

12