34
34
/* We currently only support 10Gb/FULL */
35
35
if ((info->autoneg == AUTONEG_ENABLE) ||
36
(info->speed != SPEED_10000) || (info->duplex != DUPLEX_FULL))
36
(ethtool_cmd_speed(info) != SPEED_10000) ||
37
(info->duplex != DUPLEX_FULL))
58
59
info->transceiver = XCVR_EXTERNAL;
60
61
if (netif_carrier_ok(dev)) {
61
info->speed = SPEED_10000;
62
ethtool_cmd_speed_set(info, SPEED_10000);
62
63
info->duplex = DUPLEX_FULL;
65
ethtool_cmd_speed_set(info, -1);
135
136
* vxge_ethtool_idnic - To physically identify the nic on the system.
136
137
* @dev : device pointer.
137
* @id : pointer to the structure with identification parameters given by
138
* @state : requested LED state
140
140
* Used to physically identify the NIC on the system.
141
* The Link LED will blink for a time specified by the user.
145
static int vxge_ethtool_idnic(struct net_device *dev, u32 data)
143
static int vxge_ethtool_idnic(struct net_device *dev,
144
enum ethtool_phys_id_state state)
147
146
struct vxgedev *vdev = netdev_priv(dev);
148
147
struct __vxge_hw_device *hldev = vdev->devh;
150
vxge_hw_device_flick_link_led(hldev, VXGE_FLICKER_ON);
151
msleep_interruptible(data ? (data * HZ) : VXGE_MAX_FLICKER_TIME);
152
vxge_hw_device_flick_link_led(hldev, VXGE_FLICKER_OFF);
150
case ETHTOOL_ID_ACTIVE:
151
vxge_hw_device_flick_link_led(hldev, VXGE_FLICKER_ON);
154
case ETHTOOL_ID_INACTIVE:
155
vxge_hw_device_flick_link_led(hldev, VXGE_FLICKER_OFF);
1064
1072
return sizeof(struct vxge_hw_vpath_reg) * vdev->no_of_vpath;
1067
static u32 vxge_get_rx_csum(struct net_device *dev)
1069
struct vxgedev *vdev = netdev_priv(dev);
1071
return vdev->rx_csum;
1074
static int vxge_set_rx_csum(struct net_device *dev, u32 data)
1076
struct vxgedev *vdev = netdev_priv(dev);
1086
static int vxge_ethtool_op_set_tso(struct net_device *dev, u32 data)
1089
dev->features |= (NETIF_F_TSO | NETIF_F_TSO6);
1091
dev->features &= ~(NETIF_F_TSO | NETIF_F_TSO6);
1096
1075
static int vxge_ethtool_get_sset_count(struct net_device *dev, int sset)
1098
1077
struct vxgedev *vdev = netdev_priv(dev);
1115
static int vxge_set_flags(struct net_device *dev, u32 data)
1117
struct vxgedev *vdev = netdev_priv(dev);
1118
enum vxge_hw_status status;
1120
if (ethtool_invalid_flags(dev, data, ETH_FLAG_RXHASH))
1123
if (!!(data & ETH_FLAG_RXHASH) == vdev->devh->config.rth_en)
1126
if (netif_running(dev) || (vdev->config.rth_steering == NO_STEERING))
1129
vdev->devh->config.rth_en = !!(data & ETH_FLAG_RXHASH);
1131
/* Enabling RTH requires some of the logic in vxge_device_register and a
1132
* vpath reset. Due to these restrictions, only allow modification
1133
* while the interface is down.
1135
status = vxge_reset_all_vpaths(vdev);
1136
if (status != VXGE_HW_OK) {
1137
vdev->devh->config.rth_en = !vdev->devh->config.rth_en;
1141
if (vdev->devh->config.rth_en)
1142
dev->features |= NETIF_F_RXHASH;
1144
dev->features &= ~NETIF_F_RXHASH;
1149
1094
static int vxge_fw_flash(struct net_device *dev, struct ethtool_flash *parms)
1151
1096
struct vxgedev *vdev = netdev_priv(dev);
1174
1119
.get_link = ethtool_op_get_link,
1175
1120
.get_pauseparam = vxge_ethtool_getpause_data,
1176
1121
.set_pauseparam = vxge_ethtool_setpause_data,
1177
.get_rx_csum = vxge_get_rx_csum,
1178
.set_rx_csum = vxge_set_rx_csum,
1179
.get_tx_csum = ethtool_op_get_tx_csum,
1180
.set_tx_csum = ethtool_op_set_tx_ipv6_csum,
1181
.get_sg = ethtool_op_get_sg,
1182
.set_sg = ethtool_op_set_sg,
1183
.get_tso = ethtool_op_get_tso,
1184
.set_tso = vxge_ethtool_op_set_tso,
1185
1122
.get_strings = vxge_ethtool_get_strings,
1186
.phys_id = vxge_ethtool_idnic,
1123
.set_phys_id = vxge_ethtool_idnic,
1187
1124
.get_sset_count = vxge_ethtool_get_sset_count,
1188
1125
.get_ethtool_stats = vxge_get_ethtool_stats,
1189
.set_flags = vxge_set_flags,
1190
1126
.flash_device = vxge_fw_flash,