diff options
author | Amit Kumar Salecha <amit.salecha@qlogic.com> | 2010-04-01 15:01:33 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-04-03 17:19:15 -0400 |
commit | 65b5b420b5974d86ee030b0a15cd9e6f228071f4 (patch) | |
tree | 5ddf10e7f5a3ed54dd6fc75f90c41c4694ff6061 /drivers/net/qlcnic/qlcnic_ethtool.c | |
parent | aa5e18c04af8706251768e6aba83465e31de7810 (diff) |
qlcnic: add driver debug support
Add debug print in driver, can be tuned by ethtool msg level
callback.
Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/qlcnic/qlcnic_ethtool.c')
-rw-r--r-- | drivers/net/qlcnic/qlcnic_ethtool.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/drivers/net/qlcnic/qlcnic_ethtool.c b/drivers/net/qlcnic/qlcnic_ethtool.c index f83e15fe3e1..08d6f105371 100644 --- a/drivers/net/qlcnic/qlcnic_ethtool.c +++ b/drivers/net/qlcnic/qlcnic_ethtool.c | |||
@@ -998,6 +998,20 @@ static int qlcnic_set_flags(struct net_device *netdev, u32 data) | |||
998 | return 0; | 998 | return 0; |
999 | } | 999 | } |
1000 | 1000 | ||
1001 | static u32 qlcnic_get_msglevel(struct net_device *netdev) | ||
1002 | { | ||
1003 | struct qlcnic_adapter *adapter = netdev_priv(netdev); | ||
1004 | |||
1005 | return adapter->msg_enable; | ||
1006 | } | ||
1007 | |||
1008 | static void qlcnic_set_msglevel(struct net_device *netdev, u32 msglvl) | ||
1009 | { | ||
1010 | struct qlcnic_adapter *adapter = netdev_priv(netdev); | ||
1011 | |||
1012 | adapter->msg_enable = msglvl; | ||
1013 | } | ||
1014 | |||
1001 | const struct ethtool_ops qlcnic_ethtool_ops = { | 1015 | const struct ethtool_ops qlcnic_ethtool_ops = { |
1002 | .get_settings = qlcnic_get_settings, | 1016 | .get_settings = qlcnic_get_settings, |
1003 | .set_settings = qlcnic_set_settings, | 1017 | .set_settings = qlcnic_set_settings, |
@@ -1029,4 +1043,6 @@ const struct ethtool_ops qlcnic_ethtool_ops = { | |||
1029 | .get_flags = ethtool_op_get_flags, | 1043 | .get_flags = ethtool_op_get_flags, |
1030 | .set_flags = qlcnic_set_flags, | 1044 | .set_flags = qlcnic_set_flags, |
1031 | .phys_id = qlcnic_blink_led, | 1045 | .phys_id = qlcnic_blink_led, |
1046 | .set_msglevel = qlcnic_set_msglevel, | ||
1047 | .get_msglevel = qlcnic_get_msglevel, | ||
1032 | }; | 1048 | }; |