netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/9] ixgbe: fix build when DEBUG is defined
@ 2009-04-01  7:32 Jeff Kirsher
  2009-04-01  7:33 ` [PATCH 2/9] ixgbe: Fix ethtool output with advertised mode Jeff Kirsher
                   ` (8 more replies)
  0 siblings, 9 replies; 18+ messages in thread
From: Jeff Kirsher @ 2009-04-01  7:32 UTC (permalink / raw)
  To: davem; +Cc: netdev, gospo, Alexander Duyck, Peter P Waskiewicz Jr,
	Jeff Kirsher

From: Alexander Duyck <alexander.h.duyck@intel.com>

The ixgbe driver had issues when DEBUG was defined because the hw_dbg macro
was incomplete.  This patch completes the code based off of the code that
already existed in the igb module.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Acked-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---

 drivers/net/ixgbe/ixgbe_common.h |    9 +++------
 drivers/net/ixgbe/ixgbe_main.c   |   12 ++++++++++++
 2 files changed, 15 insertions(+), 6 deletions(-)

diff --git a/drivers/net/ixgbe/ixgbe_common.h b/drivers/net/ixgbe/ixgbe_common.h
index 7e94d6d..24f73e7 100644
--- a/drivers/net/ixgbe/ixgbe_common.h
+++ b/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/drivers/net/ixgbe/ixgbe_main.c b/drivers/net/ixgbe/ixgbe_main.c
index 79aa811..fd27513 100644
--- a/drivers/net/ixgbe/ixgbe_main.c
+++ b/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 */


^ permalink raw reply related	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2009-04-02  8:16 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-04-01  7:32 [PATCH 1/9] ixgbe: fix build when DEBUG is defined Jeff Kirsher
2009-04-01  7:33 ` [PATCH 2/9] ixgbe: Fix ethtool output with advertised mode Jeff Kirsher
2009-04-02  8:15   ` David Miller
2009-04-01  7:33 ` [PATCH 3/9] ixgbe: Fix DCB netlink layer for 82599 to enable Priority Flow Control Jeff Kirsher
2009-04-02  8:15   ` David Miller
2009-04-01  7:33 ` [PATCH 4/9] ixgbe: feature - driver to default with FC on Jeff Kirsher
2009-04-02  8:15   ` David Miller
2009-04-01  7:34 ` [PATCH 5/9] ixgbe: Fix 82598 MSI-X allocation on systems with more than 8 CPU cores Jeff Kirsher
2009-04-02  8:15   ` David Miller
2009-04-01  7:34 ` [PATCH 6/9] ixgbe: refactor tx buffer processing to use skb_dma_map/unmap Jeff Kirsher
2009-04-02  8:15   ` David Miller
2009-04-01  7:34 ` [PATCH 7/9] ixgbe: Patch to fix driver panic while freeing up tx & rx resources Jeff Kirsher
2009-04-02  8:15   ` David Miller
2009-04-01  7:35 ` [PATCH 8/9] ixgbe: fix ethtool -A|a behavior Jeff Kirsher
2009-04-02  8:16   ` David Miller
2009-04-01  7:35 ` [PATCH 9/9] ixgbe: Fix potential memory leak/driver panic issue while setting up Tx & Rx ring parameters Jeff Kirsher
2009-04-02  8:16   ` David Miller
2009-04-02  8:15 ` [PATCH 1/9] ixgbe: fix build when DEBUG is defined David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).