summaryrefslogtreecommitdiffstats
path: root/drivers/net/qlge/qlge_ethtool.c
diff options
context:
space:
mode:
authorRon Mercer <ron.mercer@qlogic.com>2009-10-21 11:07:39 +0000
committerDavid S. Miller <davem@davemloft.net>2009-10-21 21:45:40 -0700
commitd8eb59dc8b9e77bb4fa5420ff80142759ad5cd7b (patch)
treed0b331eca84dabceae8463ec119743907fabcd3b /drivers/net/qlge/qlge_ethtool.c
parent1d30df24ec85477368e6e38fe1b4d1b67b3be9d4 (diff)
downloadop-kernel-dev-d8eb59dc8b9e77bb4fa5420ff80142759ad5cd7b.zip
op-kernel-dev-d8eb59dc8b9e77bb4fa5420ff80142759ad5cd7b.tar.gz
qlge: Add ethtool blink function.
Signed-off-by: Ron Mercer <ron.mercer@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/qlge/qlge_ethtool.c')
-rw-r--r--drivers/net/qlge/qlge_ethtool.c28
1 files changed, 28 insertions, 0 deletions
diff --git a/drivers/net/qlge/qlge_ethtool.c b/drivers/net/qlge/qlge_ethtool.c
index dfb5c80..0c0549b 100644
--- a/drivers/net/qlge/qlge_ethtool.c
+++ b/drivers/net/qlge/qlge_ethtool.c
@@ -371,6 +371,33 @@ static void ql_get_drvinfo(struct net_device *ndev,
drvinfo->eedump_len = 0;
}
+
+static int ql_phys_id(struct net_device *ndev, u32 data)
+{
+ struct ql_adapter *qdev = netdev_priv(ndev);
+ u32 led_reg, i;
+ int status;
+
+ /* Save the current LED settings */
+ status = ql_mb_get_led_cfg(qdev);
+ if (status)
+ return status;
+ led_reg = qdev->led_config;
+
+ /* Start blinking the led */
+ if (!data || data > 300)
+ data = 300;
+
+ for (i = 0; i < (data * 10); i++)
+ ql_mb_set_led_cfg(qdev, QL_LED_BLINK);
+
+ /* Restore LED settings */
+ status = ql_mb_set_led_cfg(qdev, led_reg);
+ if (status)
+ return status;
+
+ return 0;
+}
static int ql_get_coalesce(struct net_device *dev, struct ethtool_coalesce *c)
{
struct ql_adapter *qdev = netdev_priv(dev);
@@ -499,6 +526,7 @@ const struct ethtool_ops qlge_ethtool_ops = {
.get_msglevel = ql_get_msglevel,
.set_msglevel = ql_set_msglevel,
.get_link = ethtool_op_get_link,
+ .phys_id = ql_phys_id,
.get_pauseparam = ql_get_pauseparam,
.set_pauseparam = ql_set_pauseparam,
.get_rx_csum = ql_get_rx_csum,
OpenPOWER on IntegriCloud