Lines Matching refs:phydev
30 static int linkstate_get_sqi(struct phy_device *phydev) in linkstate_get_sqi() argument
34 if (!phydev) in linkstate_get_sqi()
37 mutex_lock(&phydev->lock); in linkstate_get_sqi()
38 if (!phydev->drv || !phydev->drv->get_sqi) in linkstate_get_sqi()
40 else if (!phydev->link) in linkstate_get_sqi()
43 ret = phydev->drv->get_sqi(phydev); in linkstate_get_sqi()
44 mutex_unlock(&phydev->lock); in linkstate_get_sqi()
49 static int linkstate_get_sqi_max(struct phy_device *phydev) in linkstate_get_sqi_max() argument
53 if (!phydev) in linkstate_get_sqi_max()
56 mutex_lock(&phydev->lock); in linkstate_get_sqi_max()
57 if (!phydev->drv || !phydev->drv->get_sqi_max) in linkstate_get_sqi_max()
59 else if (!phydev->link) in linkstate_get_sqi_max()
62 ret = phydev->drv->get_sqi_max(phydev); in linkstate_get_sqi_max()
63 mutex_unlock(&phydev->lock); in linkstate_get_sqi_max()
103 struct phy_device *phydev; in linkstate_prepare_data() local
106 phydev = ethnl_req_get_phydev(req_base, tb, ETHTOOL_A_LINKSTATE_HEADER, in linkstate_prepare_data()
108 if (IS_ERR(phydev)) { in linkstate_prepare_data()
109 ret = PTR_ERR(phydev); in linkstate_prepare_data()
118 ret = linkstate_get_sqi(phydev); in linkstate_prepare_data()
123 ret = linkstate_get_sqi_max(phydev); in linkstate_prepare_data()
138 if (phydev) in linkstate_prepare_data()
139 phy_ethtool_get_link_ext_stats(phydev, in linkstate_prepare_data()