/** * vxge_ethtool_idnic - To physically identify the nic on the system. * @dev : device pointer. * @id : pointer to the structure with identification parameters given by * ethtool. * * Used to physically identify the NIC on the system. * The Link LED will blink for a time specified by the user. * Return value: * 0 on success */ static int vxge_ethtool_idnic(struct net_device *dev, u32 data) { struct vxgedev *vdev = (struct vxgedev *)netdev_priv(dev); struct __vxge_hw_device *hldev = (struct __vxge_hw_device *) pci_get_drvdata(vdev->pdev); vxge_hw_device_flick_link_led(hldev, VXGE_FLICKER_ON); msleep_interruptible(data ? (data * HZ) : VXGE_MAX_FLICKER_TIME); vxge_hw_device_flick_link_led(hldev, VXGE_FLICKER_OFF); return 0; }
/** * vxge_ethtool_idnic - To physically identify the nic on the system. * @dev : device pointer. * @state : requested LED state * * Used to physically identify the NIC on the system. * 0 on success */ static int vxge_ethtool_idnic(struct net_device *dev, enum ethtool_phys_id_state state) { struct vxgedev *vdev = netdev_priv(dev); struct __vxge_hw_device *hldev = vdev->devh; switch (state) { case ETHTOOL_ID_ACTIVE: vxge_hw_device_flick_link_led(hldev, VXGE_FLICKER_ON); break; case ETHTOOL_ID_INACTIVE: vxge_hw_device_flick_link_led(hldev, VXGE_FLICKER_OFF); break; default: return -EINVAL; } return 0; }