Lines Matching +full:port +full:- +full:base
1 // SPDX-License-Identifier: GPL-2.0-or-later
11 * Jan-Bernd Themann <themann@de.ibm.com>
23 struct ehea_port *port = netdev_priv(dev); in ehea_get_link_ksettings() local
28 ret = ehea_sense_port_attr(port); in ehea_get_link_ksettings()
34 switch (port->port_speed) { in ehea_get_link_ksettings()
48 speed = -1; in ehea_get_link_ksettings()
51 cmd->base.duplex = port->full_duplex == 1 ? in ehea_get_link_ksettings()
55 cmd->base.duplex = DUPLEX_UNKNOWN; in ehea_get_link_ksettings()
57 cmd->base.speed = speed; in ehea_get_link_ksettings()
59 if (cmd->base.speed == SPEED_10000) { in ehea_get_link_ksettings()
62 cmd->base.port = PORT_FIBRE; in ehea_get_link_ksettings()
70 cmd->base.port = PORT_TP; in ehea_get_link_ksettings()
73 cmd->base.autoneg = port->autoneg == 1 ? in ehea_get_link_ksettings()
76 ethtool_convert_legacy_u32_to_link_mode(cmd->link_modes.supported, in ehea_get_link_ksettings()
78 ethtool_convert_legacy_u32_to_link_mode(cmd->link_modes.advertising, in ehea_get_link_ksettings()
87 struct ehea_port *port = netdev_priv(dev); in ehea_set_link_ksettings() local
91 if (cmd->base.autoneg == AUTONEG_ENABLE) { in ehea_set_link_ksettings()
96 switch (cmd->base.speed) { in ehea_set_link_ksettings()
98 if (cmd->base.duplex == DUPLEX_FULL) in ehea_set_link_ksettings()
105 if (cmd->base.duplex == DUPLEX_FULL) in ehea_set_link_ksettings()
112 if (cmd->base.duplex == DUPLEX_FULL) in ehea_set_link_ksettings()
115 ret = -EINVAL; in ehea_set_link_ksettings()
119 if (cmd->base.duplex == DUPLEX_FULL) in ehea_set_link_ksettings()
122 ret = -EINVAL; in ehea_set_link_ksettings()
126 ret = -EINVAL; in ehea_set_link_ksettings()
133 ret = ehea_set_portspeed(port, sp); in ehea_set_link_ksettings()
137 "Port speed successfully set: %dMbps %s Duplex\n", in ehea_set_link_ksettings()
138 port->port_speed, in ehea_set_link_ksettings()
139 port->full_duplex == 1 ? "Full" : "Half"); in ehea_set_link_ksettings()
146 struct ehea_port *port = netdev_priv(dev); in ehea_nway_reset() local
149 ret = ehea_set_portspeed(port, EHEA_SPEED_AUTONEG); in ehea_nway_reset()
152 netdev_info(port->netdev, in ehea_nway_reset()
153 "Port speed successfully set: %dMbps %s Duplex\n", in ehea_nway_reset()
154 port->port_speed, in ehea_nway_reset()
155 port->full_duplex == 1 ? "Full" : "Half"); in ehea_nway_reset()
162 strscpy(info->driver, DRV_NAME, sizeof(info->driver)); in ehea_get_drvinfo()
163 strscpy(info->version, DRV_VERSION, sizeof(info->version)); in ehea_get_drvinfo()
168 struct ehea_port *port = netdev_priv(dev); in ehea_get_msglevel() local
169 return port->msg_enable; in ehea_get_msglevel()
174 struct ehea_port *port = netdev_priv(dev); in ehea_set_msglevel() local
175 port->msg_enable = value; in ehea_set_msglevel()
181 {"port resets"},
219 return -EOPNOTSUPP; in ehea_get_sset_count()
227 struct ehea_port *port = netdev_priv(dev); in ehea_get_ethtool_stats() local
233 data[i++] = port->sig_comp_iv; in ehea_get_ethtool_stats()
234 data[i++] = port->port_res[0].swqe_refill_th; in ehea_get_ethtool_stats()
235 data[i++] = port->resets; in ehea_get_ethtool_stats()
238 tmp += port->port_res[k].p_stats.poll_receive_errors; in ehea_get_ethtool_stats()
242 tmp += port->port_res[k].p_stats.err_tcp_cksum; in ehea_get_ethtool_stats()
246 tmp += port->port_res[k].p_stats.err_ip_cksum; in ehea_get_ethtool_stats()
250 tmp += port->port_res[k].p_stats.err_frame_crc; in ehea_get_ethtool_stats()
254 tmp += port->port_res[k].p_stats.queue_stopped; in ehea_get_ethtool_stats()
258 data[i++] = atomic_read(&port->port_res[k].swqe_avail); in ehea_get_ethtool_stats()
276 netdev->ethtool_ops = &ehea_ethtool_ops; in ehea_set_ethtool_ops()