From da4bcf44d02e28b71b8d92c12878d2f86c47e682 Mon Sep 17 00:00:00 2001 From: Alexander Duyck Date: Tue, 31 Mar 2009 21:32:42 +0000 Subject: [PATCH] --- yaml --- r: 139803 b: refs/heads/master c: b453368dfd74ba5a49bfaa853251212fa306e70d h: refs/heads/master i: 139801: b1504d7c4b09256590de7689c50dd82d105423f1 139799: 15ebf8e63ccf7c93d9651cf4a08323d3ab9590c9 v: v3 --- [refs] | 2 +- trunk/drivers/net/ixgbe/ixgbe_common.h | 9 +++------ trunk/drivers/net/ixgbe/ixgbe_main.c | 12 ++++++++++++ 3 files changed, 16 insertions(+), 7 deletions(-) diff --git a/[refs] b/[refs] index 1d409193c8cf..329a57f6f0f0 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 3fe7c4c9dca4fbbff92eb61a660690dad7029ec3 +refs/heads/master: b453368dfd74ba5a49bfaa853251212fa306e70d diff --git a/trunk/drivers/net/ixgbe/ixgbe_common.h b/trunk/drivers/net/ixgbe/ixgbe_common.h index 7e94d6d399ab..24f73e719c3f 100644 --- a/trunk/drivers/net/ixgbe/ixgbe_common.h +++ b/trunk/drivers/net/ixgbe/ixgbe_common.h @@ -96,14 +96,11 @@ s32 ixgbe_write_analog_reg8_generic(struct ixgbe_hw *hw, u32 reg, u8 val); #define IXGBE_WRITE_FLUSH(a) IXGBE_READ_REG(a, IXGBE_STATUS) #ifdef DEBUG +extern char *ixgbe_get_hw_dev_name(struct ixgbe_hw *hw); #define hw_dbg(hw, format, arg...) \ -printk(KERN_DEBUG, "%s: " format, ixgbe_get_hw_dev_name(hw), ##arg); + printk(KERN_DEBUG "%s: " format, ixgbe_get_hw_dev_name(hw), ##arg) #else -static inline int __attribute__ ((format (printf, 2, 3))) -hw_dbg(struct ixgbe_hw *hw, const char *format, ...) -{ - return 0; -} +#define hw_dbg(hw, format, arg...) do {} while (0) #endif #endif /* IXGBE_COMMON */ diff --git a/trunk/drivers/net/ixgbe/ixgbe_main.c b/trunk/drivers/net/ixgbe/ixgbe_main.c index 79aa811c403c..fd27513a92f6 100644 --- a/trunk/drivers/net/ixgbe/ixgbe_main.c +++ b/trunk/drivers/net/ixgbe/ixgbe_main.c @@ -4987,8 +4987,20 @@ static int ixgbe_notify_dca(struct notifier_block *nb, unsigned long event, return ret_val ? NOTIFY_BAD : NOTIFY_DONE; } + #endif /* CONFIG_IXGBE_DCA */ +#ifdef DEBUG +/** + * ixgbe_get_hw_dev_name - return device name string + * used by hardware layer to print debugging information + **/ +char *ixgbe_get_hw_dev_name(struct ixgbe_hw *hw) +{ + struct ixgbe_adapter *adapter = hw->back; + return adapter->netdev->name; +} +#endif module_exit(ixgbe_exit_module); /* ixgbe_main.c */