diff options
author | Amit Kumar Salecha <amit.salecha@qlogic.com> | 2010-04-01 19:01:33 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-04-03 14:19:15 -0700 |
commit | 65b5b420b5974d86ee030b0a15cd9e6f228071f4 (patch) | |
tree | 5ddf10e7f5a3ed54dd6fc75f90c41c4694ff6061 /drivers/net/qlcnic/qlcnic.h | |
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.h')
-rw-r--r-- | drivers/net/qlcnic/qlcnic.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/net/qlcnic/qlcnic.h b/drivers/net/qlcnic/qlcnic.h index 87cd1a7ef9ca..68687e24aae2 100644 --- a/drivers/net/qlcnic/qlcnic.h +++ b/drivers/net/qlcnic/qlcnic.h @@ -961,6 +961,7 @@ struct qlcnic_adapter { u8 reset_ack_timeo; u8 dev_init_timeo; u8 rsrd1; + u16 msg_enable; u8 mac_addr[ETH_ALEN]; @@ -1135,4 +1136,11 @@ static inline u32 qlcnic_tx_avail(struct qlcnic_host_tx_ring *tx_ring) extern const struct ethtool_ops qlcnic_ethtool_ops; +#define QLCDB(adapter, lvl, _fmt, _args...) do { \ + if (NETIF_MSG_##lvl & adapter->msg_enable) \ + printk(KERN_INFO "%s: %s: " _fmt, \ + dev_name(&adapter->pdev->dev), \ + __func__, ##_args); \ + } while (0) + #endif /* __QLCNIC_H_ */ |