Home
last modified time | relevance | path

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

12

/Linux-v6.1/drivers/net/phy/
Dswphy.c23 u16 lpa; member
43 .lpa = LPA_10FULL | LPA_10HALF,
47 .lpa = LPA_100FULL | LPA_100HALF,
59 .lpa = LPA_10HALF | LPA_100HALF,
65 .lpa = LPA_10FULL | LPA_100FULL,
121 u16 lpa = 0; in swphy_read_reg() local
138 lpa |= speed[speed_index].lpa & duplex[duplex_index].lpa; in swphy_read_reg()
142 lpa |= LPA_PAUSE_CAP; in swphy_read_reg()
145 lpa |= LPA_PAUSE_ASYM; in swphy_read_reg()
157 return lpa; in swphy_read_reg()
Dlxt.c223 int lpa; in lxt973a2_read_status() local
239 lpa = phy_read(phydev, MII_LPA); in lxt973a2_read_status()
241 if (lpa < 0) in lxt973a2_read_status()
242 return lpa; in lxt973a2_read_status()
247 } while (lpa == adv && retry--); in lxt973a2_read_status()
249 mii_lpa_to_linkmode_lpa_t(phydev->lp_advertising, lpa); in lxt973a2_read_status()
251 lpa &= adv; in lxt973a2_read_status()
257 if (lpa & (LPA_100FULL | LPA_100HALF)) { in lxt973a2_read_status()
260 if (lpa & LPA_100FULL) in lxt973a2_read_status()
263 if (lpa & LPA_10FULL) in lxt973a2_read_status()
Dmeson-gxl.c164 int ret, wol, lpa, exp; in meson_gxl_read_status() local
178 lpa = phy_read(phydev, MII_LPA); in meson_gxl_read_status()
179 if (lpa < 0) in meson_gxl_read_status()
180 return lpa; in meson_gxl_read_status()
187 ((exp & EXPANSION_NWAY) && !(lpa & LPA_LPACK))) { in meson_gxl_read_status()
Dphy_device.c2326 int lpa, lpagb; in genphy_read_lpa() local
2358 lpa = phy_read(phydev, MII_LPA); in genphy_read_lpa()
2359 if (lpa < 0) in genphy_read_lpa()
2360 return lpa; in genphy_read_lpa()
2362 mii_lpa_mod_linkmode_lpa_t(phydev->lp_advertising, lpa); in genphy_read_lpa()
2462 int lpa, err, old_link = phydev->link; in genphy_c37_read_status() local
2478 lpa = phy_read(phydev, MII_LPA); in genphy_c37_read_status()
2479 if (lpa < 0) in genphy_c37_read_status()
2480 return lpa; in genphy_c37_read_status()
2483 phydev->lp_advertising, lpa & LPA_LPACK); in genphy_c37_read_status()
[all …]
Dphylink.c2534 unsigned long *lpa = state->lp_advertising; in phylink_mii_emul_read() local
2540 fs.pause = test_bit(ETHTOOL_LINK_MODE_Pause_BIT, lpa); in phylink_mii_emul_read()
2541 fs.asym_pause = test_bit(ETHTOOL_LINK_MODE_Asym_Pause_BIT, lpa); in phylink_mii_emul_read()
3215 uint16_t lpa) in phylink_decode_usxgmii_word() argument
3217 switch (lpa & MDIO_USXGMII_SPD_MASK) { in phylink_decode_usxgmii_word()
3241 if (lpa & MDIO_USXGMII_FULL_DUPLEX) in phylink_decode_usxgmii_word()
3263 u16 bmsr, u16 lpa) in phylink_mii_c22_pcs_decode_state() argument
3275 phylink_decode_c37_word(state, lpa, SPEED_1000); in phylink_mii_c22_pcs_decode_state()
3279 phylink_decode_c37_word(state, lpa, SPEED_2500); in phylink_mii_c22_pcs_decode_state()
3285 phylink_decode_sgmii_word(state, lpa); in phylink_mii_c22_pcs_decode_state()
[all …]
Dmarvell.c1564 static void fiber_lpa_mod_linkmode_lpa_t(unsigned long *advertising, u32 lpa) in fiber_lpa_mod_linkmode_lpa_t() argument
1567 advertising, lpa & LPA_1000XHALF); in fiber_lpa_mod_linkmode_lpa_t()
1570 advertising, lpa & LPA_1000XFULL); in fiber_lpa_mod_linkmode_lpa_t()
1576 int lpa; in marvell_read_status_page_an() local
1610 lpa = phy_read(phydev, MII_LPA); in marvell_read_status_page_an()
1611 if (lpa < 0) in marvell_read_status_page_an()
1612 return lpa; in marvell_read_status_page_an()
1615 fiber_lpa_mod_linkmode_lpa_t(phydev->lp_advertising, lpa); in marvell_read_status_page_an()
1618 if (!(lpa & LPA_PAUSE_FIBER)) { in marvell_read_status_page_an()
1621 } else if ((lpa & LPA_PAUSE_ASYM_FIBER)) { in marvell_read_status_page_an()
/Linux-v6.1/include/linux/
Dmii.h260 static inline u32 mii_lpa_to_ethtool_lpa_t(u32 lpa) in mii_lpa_to_ethtool_lpa_t() argument
264 if (lpa & LPA_LPACK) in mii_lpa_to_ethtool_lpa_t()
267 return result | mii_adv_to_ethtool_adv_t(lpa); in mii_lpa_to_ethtool_lpa_t()
278 static inline u32 mii_stat1000_to_ethtool_lpa_t(u32 lpa) in mii_stat1000_to_ethtool_lpa_t() argument
282 if (lpa & LPA_1000HALF) in mii_stat1000_to_ethtool_lpa_t()
284 if (lpa & LPA_1000FULL) in mii_stat1000_to_ethtool_lpa_t()
300 u32 lpa) in mii_stat1000_mod_linkmode_lpa_t() argument
303 advertising, lpa & LPA_1000HALF); in mii_stat1000_mod_linkmode_lpa_t()
306 advertising, lpa & LPA_1000FULL); in mii_stat1000_mod_linkmode_lpa_t()
413 u32 lpa) in mii_lpa_to_linkmode_lpa_t() argument
[all …]
Dmdio.h333 u32 lpa) in mii_10gbt_stat_mod_linkmode_lpa_t() argument
336 advertising, lpa & MDIO_AN_10GBT_STAT_LP2_5G); in mii_10gbt_stat_mod_linkmode_lpa_t()
338 advertising, lpa & MDIO_AN_10GBT_STAT_LP5G); in mii_10gbt_stat_mod_linkmode_lpa_t()
340 advertising, lpa & MDIO_AN_10GBT_STAT_LP10G); in mii_10gbt_stat_mod_linkmode_lpa_t()
352 static inline void mii_t1_adv_l_mod_linkmode_t(unsigned long *advertising, u32 lpa) in mii_t1_adv_l_mod_linkmode_t() argument
355 lpa & MDIO_AN_T1_ADV_L_PAUSE_CAP); in mii_t1_adv_l_mod_linkmode_t()
357 lpa & MDIO_AN_T1_ADV_L_PAUSE_ASYM); in mii_t1_adv_l_mod_linkmode_t()
369 static inline void mii_t1_adv_m_mod_linkmode_t(unsigned long *advertising, u32 lpa) in mii_t1_adv_m_mod_linkmode_t() argument
372 advertising, lpa & MDIO_AN_T1_ADV_M_B10L); in mii_t1_adv_m_mod_linkmode_t()
Dphylink.h617 u16 bmsr, u16 lpa);
631 uint16_t lpa);
/Linux-v6.1/drivers/net/ethernet/chelsio/cxgb3/
Dvsc8211.c133 unsigned int bmcr, status, lpa, adv; in vsc8211_get_link_status() local
179 &lpa); in vsc8211_get_link_status()
186 if (lpa & adv & ADVERTISE_PAUSE_CAP) in vsc8211_get_link_status()
188 else if ((lpa & ADVERTISE_PAUSE_CAP) && in vsc8211_get_link_status()
189 (lpa & ADVERTISE_PAUSE_ASYM) && in vsc8211_get_link_status()
192 else if ((lpa & ADVERTISE_PAUSE_ASYM) && in vsc8211_get_link_status()
209 unsigned int bmcr, status, lpa, adv; in vsc8211_get_link_status_fiber() local
239 err = t3_mdio_read(cphy, MDIO_DEVAD_NONE, MII_LPA, &lpa); in vsc8211_get_link_status_fiber()
246 if (adv & lpa & ADVERTISE_1000XFULL) { in vsc8211_get_link_status_fiber()
249 } else if (adv & lpa & ADVERTISE_1000XHALF) { in vsc8211_get_link_status_fiber()
[all …]
/Linux-v6.1/drivers/net/pcs/
Dpcs-lynx.c53 int status, lpa; in lynx_pcs_get_state_usxgmii() local
64 lpa = mdiobus_c45_read(bus, addr, MDIO_MMD_VEND2, MII_LPA); in lynx_pcs_get_state_usxgmii()
65 if (lpa < 0) in lynx_pcs_get_state_usxgmii()
68 phylink_decode_usxgmii_word(state, lpa); in lynx_pcs_get_state_usxgmii()
74 int bmsr, lpa; in lynx_pcs_get_state_2500basex() local
77 lpa = mdiodev_read(pcs, MII_LPA); in lynx_pcs_get_state_2500basex()
78 if (bmsr < 0 || lpa < 0) { in lynx_pcs_get_state_2500basex()
Dpcs-altera-tse.c125 u16 bmsr, lpa; in alt_tse_pcs_get_state() local
128 lpa = tse_pcs_read(tse_pcs, MII_LPA); in alt_tse_pcs_get_state()
130 phylink_mii_c22_pcs_decode_state(state, bmsr, lpa); in alt_tse_pcs_get_state()
Dpcs-xpcs.c1017 int lpa, bmsr; in xpcs_get_state_c37_1000basex() local
1023 lpa = xpcs_read(xpcs, MDIO_MMD_VEND2, MII_LPA); in xpcs_get_state_c37_1000basex()
1024 if (lpa < 0 || lpa & LPA_RFAULT) in xpcs_get_state_c37_1000basex()
1025 return lpa; in xpcs_get_state_c37_1000basex()
1031 phylink_mii_c22_pcs_decode_state(state, bmsr, lpa); in xpcs_get_state_c37_1000basex()
/Linux-v6.1/drivers/net/ethernet/ibm/emac/
Dphy.c224 int lpa = phy_read(phy, MII_LPA) & phy_read(phy, MII_ADVERTISE); in genmii_read_link() local
225 if (lpa < 0) in genmii_read_link()
226 return lpa; in genmii_read_link()
247 } else if (lpa & (LPA_100FULL | LPA_100HALF)) { in genmii_read_link()
249 if (lpa & LPA_100FULL) in genmii_read_link()
251 } else if (lpa & LPA_10FULL) in genmii_read_link()
255 phy->pause = lpa & LPA_PAUSE_CAP ? 1 : 0; in genmii_read_link()
256 phy->asym_pause = lpa & LPA_PAUSE_ASYM ? 1 : 0; in genmii_read_link()
/Linux-v6.1/drivers/rtc/
Drtc-st-lpc.c158 unsigned long long lpa; in st_rtc_set_alarm() local
168 lpa = (unsigned long long)alarm_secs * rtc->clkrate; in st_rtc_set_alarm()
170 st_rtc_set_hw_alarm(rtc, lpa >> 32, lpa); in st_rtc_set_alarm()
/Linux-v6.1/drivers/net/ethernet/dec/tulip/
Dmedia.c400 unsigned int bmsr, lpa, negotiated, new_csr6; in tulip_check_duplex() local
403 lpa = tulip_mdio_read(dev, tp->phys[0], MII_LPA); in tulip_check_duplex()
406 bmsr, lpa); in tulip_check_duplex()
419 negotiated = lpa & tp->advertising[0]; in tulip_check_duplex()
437 tp->phys[0], lpa); in tulip_check_duplex()
/Linux-v6.1/drivers/net/ethernet/sfc/falcon/
Dtenxpress.c443 u32 adv = 0, lpa = 0; in tenxpress_get_link_ksettings() local
451 lpa |= ADVERTISED_10000baseT_Full; in tenxpress_get_link_ksettings()
453 mdio45_ethtool_ksettings_get_npage(&efx->mdio, cmd, adv, lpa); in tenxpress_get_link_ksettings()
/Linux-v6.1/drivers/net/dsa/mv88e6xxx/
Dserdes.c53 u16 bmsr, u16 lpa, u16 status, in mv88e6xxx_serdes_pcs_get_state() argument
115 mii_lpa_mod_linkmode_x(state->lp_advertising, lpa, in mv88e6xxx_serdes_pcs_get_state()
118 mii_lpa_mod_linkmode_x(state->lp_advertising, lpa, in mv88e6xxx_serdes_pcs_get_state()
197 u16 bmsr, lpa, status; in mv88e6352_serdes_pcs_get_state() local
212 err = mv88e6352_serdes_read(chip, MII_LPA, &lpa); in mv88e6352_serdes_pcs_get_state()
218 return mv88e6xxx_serdes_pcs_get_state(chip, bmsr, lpa, status, state); in mv88e6352_serdes_pcs_get_state()
924 u16 bmsr, lpa, status; in mv88e6390_serdes_pcs_get_state_sgmii() local
942 MV88E6390_SGMII_LPA, &lpa); in mv88e6390_serdes_pcs_get_state_sgmii()
948 return mv88e6xxx_serdes_pcs_get_state(chip, bmsr, lpa, status, state); in mv88e6390_serdes_pcs_get_state_sgmii()
/Linux-v6.1/arch/parisc/include/asm/
Dspecial_insns.h5 #define lpa(va) ({ \ macro
/Linux-v6.1/drivers/net/
Dmii.c507 int advertise, lpa, media, duplex; in mii_check_media() local
546 lpa = mii->mdio_read(mii->dev, mii->phy_id, MII_LPA); in mii_check_media()
551 media = mii_nway_result(lpa & advertise); in mii_check_media()
562 lpa); in mii_check_media()
Dsungem_phy.c389 u16 lpa; in genmii_read_link() local
392 lpa = sungem_phy_read(phy, MII_LPA); in genmii_read_link()
394 if (lpa & (LPA_10FULL | LPA_100FULL)) in genmii_read_link()
398 if (lpa & (LPA_100FULL | LPA_100HALF)) in genmii_read_link()
/Linux-v6.1/drivers/net/usb/
Drtl8150.c781 short lpa, bmcr; in rtl8150_get_link_ksettings() local
793 get_registers(dev, ANLP, 2, &lpa); in rtl8150_get_link_ksettings()
795 u32 speed = ((lpa & (LPA_100HALF | LPA_100FULL)) ? in rtl8150_get_link_ksettings()
800 ecmd->base.duplex = (lpa & LPA_100FULL) ? in rtl8150_get_link_ksettings()
803 ecmd->base.duplex = (lpa & LPA_10FULL) ? in rtl8150_get_link_ksettings()
/Linux-v6.1/drivers/net/ethernet/sfc/siena/
Dmcdi_port_common.c375 static void efx_mcdi_phy_check_fcntl(struct efx_nic *efx, u32 lpa) in efx_mcdi_phy_check_fcntl() argument
391 if (lpa & (1 << MC_CMD_PHY_CAP_PAUSE_LBN)) in efx_mcdi_phy_check_fcntl()
393 if (lpa & (1 << MC_CMD_PHY_CAP_ASYM_LBN)) in efx_mcdi_phy_check_fcntl()
1263 u32 flags, fcntl, speed, lpa; in efx_siena_mcdi_process_link_change() local
1271 lpa = EFX_QWORD_FIELD(*ev, MCDI_EVENT_LINKCHANGE_LP_CAP); in efx_siena_mcdi_process_link_change()
1279 efx_mcdi_phy_check_fcntl(efx, lpa); in efx_siena_mcdi_process_link_change()
/Linux-v6.1/drivers/net/ethernet/sfc/
Dmcdi_port_common.c374 void efx_mcdi_phy_check_fcntl(struct efx_nic *efx, u32 lpa) in efx_mcdi_phy_check_fcntl() argument
390 if (lpa & (1 << MC_CMD_PHY_CAP_PAUSE_LBN)) in efx_mcdi_phy_check_fcntl()
392 if (lpa & (1 << MC_CMD_PHY_CAP_ASYM_LBN)) in efx_mcdi_phy_check_fcntl()
1282 u32 flags, fcntl, speed, lpa; in efx_mcdi_process_link_change() local
1290 lpa = EFX_QWORD_FIELD(*ev, MCDI_EVENT_LINKCHANGE_LP_CAP); in efx_mcdi_process_link_change()
1298 efx_mcdi_phy_check_fcntl(efx, lpa); in efx_mcdi_process_link_change()
Dmcdi_port_common.h46 void efx_mcdi_phy_check_fcntl(struct efx_nic *efx, u32 lpa);

12