Lines Matching refs:port_priv
37 struct ethsw_port_priv *port_priv = netdev_priv(netdev); in dpaa2_switch_get_drvinfo() local
43 err = dpsw_get_api_version(port_priv->ethsw_data->mc_io, 0, in dpaa2_switch_get_drvinfo()
61 struct ethsw_port_priv *port_priv = netdev_priv(netdev); in dpaa2_switch_get_link_ksettings() local
65 mutex_lock(&port_priv->mac_lock); in dpaa2_switch_get_link_ksettings()
67 if (dpaa2_switch_port_is_type_phy(port_priv)) { in dpaa2_switch_get_link_ksettings()
68 err = phylink_ethtool_ksettings_get(port_priv->mac->phylink, in dpaa2_switch_get_link_ksettings()
70 mutex_unlock(&port_priv->mac_lock); in dpaa2_switch_get_link_ksettings()
74 mutex_unlock(&port_priv->mac_lock); in dpaa2_switch_get_link_ksettings()
76 err = dpsw_if_get_link_state(port_priv->ethsw_data->mc_io, 0, in dpaa2_switch_get_link_ksettings()
77 port_priv->ethsw_data->dpsw_handle, in dpaa2_switch_get_link_ksettings()
78 port_priv->idx, in dpaa2_switch_get_link_ksettings()
103 struct ethsw_port_priv *port_priv = netdev_priv(netdev); in dpaa2_switch_set_link_ksettings() local
104 struct ethsw_core *ethsw = port_priv->ethsw_data; in dpaa2_switch_set_link_ksettings()
109 mutex_lock(&port_priv->mac_lock); in dpaa2_switch_set_link_ksettings()
111 if (dpaa2_switch_port_is_type_phy(port_priv)) { in dpaa2_switch_set_link_ksettings()
112 err = phylink_ethtool_ksettings_set(port_priv->mac->phylink, in dpaa2_switch_set_link_ksettings()
114 mutex_unlock(&port_priv->mac_lock); in dpaa2_switch_set_link_ksettings()
118 mutex_unlock(&port_priv->mac_lock); in dpaa2_switch_set_link_ksettings()
125 port_priv->idx); in dpaa2_switch_set_link_ksettings()
142 err = dpsw_if_set_link_cfg(port_priv->ethsw_data->mc_io, 0, in dpaa2_switch_set_link_ksettings()
143 port_priv->ethsw_data->dpsw_handle, in dpaa2_switch_set_link_ksettings()
144 port_priv->idx, in dpaa2_switch_set_link_ksettings()
150 port_priv->idx); in dpaa2_switch_set_link_ksettings()
192 struct ethsw_port_priv *port_priv = netdev_priv(netdev); in dpaa2_switch_ethtool_get_stats() local
196 err = dpsw_if_get_counter(port_priv->ethsw_data->mc_io, 0, in dpaa2_switch_ethtool_get_stats()
197 port_priv->ethsw_data->dpsw_handle, in dpaa2_switch_ethtool_get_stats()
198 port_priv->idx, in dpaa2_switch_ethtool_get_stats()
206 mutex_lock(&port_priv->mac_lock); in dpaa2_switch_ethtool_get_stats()
208 if (dpaa2_switch_port_has_mac(port_priv)) in dpaa2_switch_ethtool_get_stats()
209 dpaa2_mac_get_ethtool_stats(port_priv->mac, data + i); in dpaa2_switch_ethtool_get_stats()
211 mutex_unlock(&port_priv->mac_lock); in dpaa2_switch_ethtool_get_stats()