aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/vxge/vxge-ethtool.c
diff options
context:
space:
mode:
authorstephen hemminger <shemminger@vyatta.com>2011-04-04 07:06:35 -0400
committerDavid S. Miller <davem@davemloft.net>2011-04-06 17:35:20 -0400
commit6d8a7e6f52b0bf646739f2d4bad4643c64977b2a (patch)
tree3d1253de840592a0d43544084493825fcfd93833 /drivers/net/vxge/vxge-ethtool.c
parent12fcf941674fd781117a56f998d2bb28b4bc4cf1 (diff)
vxge: convert to set_phys_id
Also fix up incorrect docbook comment Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/vxge/vxge-ethtool.c')
-rw-r--r--drivers/net/vxge/vxge-ethtool.c25
1 files changed, 16 insertions, 9 deletions
diff --git a/drivers/net/vxge/vxge-ethtool.c b/drivers/net/vxge/vxge-ethtool.c
index c5eb034107fd..43c458323f83 100644
--- a/drivers/net/vxge/vxge-ethtool.c
+++ b/drivers/net/vxge/vxge-ethtool.c
@@ -134,22 +134,29 @@ static void vxge_ethtool_gregs(struct net_device *dev,
134/** 134/**
135 * vxge_ethtool_idnic - To physically identify the nic on the system. 135 * vxge_ethtool_idnic - To physically identify the nic on the system.
136 * @dev : device pointer. 136 * @dev : device pointer.
137 * @id : pointer to the structure with identification parameters given by 137 * @state : requested LED state
138 * ethtool.
139 * 138 *
140 * Used to physically identify the NIC on the system. 139 * Used to physically identify the NIC on the system.
141 * The Link LED will blink for a time specified by the user.
142 * Return value:
143 * 0 on success 140 * 0 on success
144 */ 141 */
145static int vxge_ethtool_idnic(struct net_device *dev, u32 data) 142static int vxge_ethtool_idnic(struct net_device *dev,
143 enum ethtool_phys_id_state state)
146{ 144{
147 struct vxgedev *vdev = netdev_priv(dev); 145 struct vxgedev *vdev = netdev_priv(dev);
148 struct __vxge_hw_device *hldev = vdev->devh; 146 struct __vxge_hw_device *hldev = vdev->devh;
149 147
150 vxge_hw_device_flick_link_led(hldev, VXGE_FLICKER_ON); 148 switch (state) {
151 msleep_interruptible(data ? (data * HZ) : VXGE_MAX_FLICKER_TIME); 149 case ETHTOOL_ID_ACTIVE:
152 vxge_hw_device_flick_link_led(hldev, VXGE_FLICKER_OFF); 150 vxge_hw_device_flick_link_led(hldev, VXGE_FLICKER_ON);
151 break;
152
153 case ETHTOOL_ID_INACTIVE:
154 vxge_hw_device_flick_link_led(hldev, VXGE_FLICKER_OFF);
155 break;
156
157 default:
158 return -EINVAL;
159 }
153 160
154 return 0; 161 return 0;
155} 162}
@@ -1183,7 +1190,7 @@ static const struct ethtool_ops vxge_ethtool_ops = {
1183 .get_tso = ethtool_op_get_tso, 1190 .get_tso = ethtool_op_get_tso,
1184 .set_tso = vxge_ethtool_op_set_tso, 1191 .set_tso = vxge_ethtool_op_set_tso,
1185 .get_strings = vxge_ethtool_get_strings, 1192 .get_strings = vxge_ethtool_get_strings,
1186 .phys_id = vxge_ethtool_idnic, 1193 .set_phys_id = vxge_ethtool_idnic,
1187 .get_sset_count = vxge_ethtool_get_sset_count, 1194 .get_sset_count = vxge_ethtool_get_sset_count,
1188 .get_ethtool_stats = vxge_get_ethtool_stats, 1195 .get_ethtool_stats = vxge_get_ethtool_stats,
1189 .set_flags = vxge_set_flags, 1196 .set_flags = vxge_set_flags,