diff options
Diffstat (limited to 'drivers/net/sfc/net_driver.h')
-rw-r--r-- | drivers/net/sfc/net_driver.h | 35 |
1 files changed, 6 insertions, 29 deletions
diff --git a/drivers/net/sfc/net_driver.h b/drivers/net/sfc/net_driver.h index ba636e086fc3..0cca44b4ee44 100644 --- a/drivers/net/sfc/net_driver.h +++ b/drivers/net/sfc/net_driver.h | |||
@@ -13,6 +13,10 @@ | |||
13 | #ifndef EFX_NET_DRIVER_H | 13 | #ifndef EFX_NET_DRIVER_H |
14 | #define EFX_NET_DRIVER_H | 14 | #define EFX_NET_DRIVER_H |
15 | 15 | ||
16 | #if defined(EFX_ENABLE_DEBUG) && !defined(DEBUG) | ||
17 | #define DEBUG | ||
18 | #endif | ||
19 | |||
16 | #include <linux/version.h> | 20 | #include <linux/version.h> |
17 | #include <linux/netdevice.h> | 21 | #include <linux/netdevice.h> |
18 | #include <linux/etherdevice.h> | 22 | #include <linux/etherdevice.h> |
@@ -48,35 +52,6 @@ | |||
48 | #define EFX_WARN_ON_PARANOID(x) do {} while (0) | 52 | #define EFX_WARN_ON_PARANOID(x) do {} while (0) |
49 | #endif | 53 | #endif |
50 | 54 | ||
51 | /* Un-rate-limited logging */ | ||
52 | #define EFX_ERR(efx, fmt, args...) \ | ||
53 | dev_err(&((efx)->pci_dev->dev), "ERR: %s " fmt, efx_dev_name(efx), ##args) | ||
54 | |||
55 | #define EFX_INFO(efx, fmt, args...) \ | ||
56 | dev_info(&((efx)->pci_dev->dev), "INFO: %s " fmt, efx_dev_name(efx), ##args) | ||
57 | |||
58 | #ifdef EFX_ENABLE_DEBUG | ||
59 | #define EFX_LOG(efx, fmt, args...) \ | ||
60 | dev_info(&((efx)->pci_dev->dev), "DBG: %s " fmt, efx_dev_name(efx), ##args) | ||
61 | #else | ||
62 | #define EFX_LOG(efx, fmt, args...) \ | ||
63 | dev_dbg(&((efx)->pci_dev->dev), "DBG: %s " fmt, efx_dev_name(efx), ##args) | ||
64 | #endif | ||
65 | |||
66 | #define EFX_TRACE(efx, fmt, args...) do {} while (0) | ||
67 | |||
68 | #define EFX_REGDUMP(efx, fmt, args...) do {} while (0) | ||
69 | |||
70 | /* Rate-limited logging */ | ||
71 | #define EFX_ERR_RL(efx, fmt, args...) \ | ||
72 | do {if (net_ratelimit()) EFX_ERR(efx, fmt, ##args); } while (0) | ||
73 | |||
74 | #define EFX_INFO_RL(efx, fmt, args...) \ | ||
75 | do {if (net_ratelimit()) EFX_INFO(efx, fmt, ##args); } while (0) | ||
76 | |||
77 | #define EFX_LOG_RL(efx, fmt, args...) \ | ||
78 | do {if (net_ratelimit()) EFX_LOG(efx, fmt, ##args); } while (0) | ||
79 | |||
80 | /************************************************************************** | 55 | /************************************************************************** |
81 | * | 56 | * |
82 | * Efx data structures | 57 | * Efx data structures |
@@ -663,6 +638,7 @@ union efx_multicast_hash { | |||
663 | * @interrupt_mode: Interrupt mode | 638 | * @interrupt_mode: Interrupt mode |
664 | * @irq_rx_adaptive: Adaptive IRQ moderation enabled for RX event queues | 639 | * @irq_rx_adaptive: Adaptive IRQ moderation enabled for RX event queues |
665 | * @irq_rx_moderation: IRQ moderation time for RX event queues | 640 | * @irq_rx_moderation: IRQ moderation time for RX event queues |
641 | * @msg_enable: Log message enable flags | ||
666 | * @state: Device state flag. Serialised by the rtnl_lock. | 642 | * @state: Device state flag. Serialised by the rtnl_lock. |
667 | * @reset_pending: Pending reset method (normally RESET_TYPE_NONE) | 643 | * @reset_pending: Pending reset method (normally RESET_TYPE_NONE) |
668 | * @tx_queue: TX DMA queues | 644 | * @tx_queue: TX DMA queues |
@@ -746,6 +722,7 @@ struct efx_nic { | |||
746 | enum efx_int_mode interrupt_mode; | 722 | enum efx_int_mode interrupt_mode; |
747 | bool irq_rx_adaptive; | 723 | bool irq_rx_adaptive; |
748 | unsigned int irq_rx_moderation; | 724 | unsigned int irq_rx_moderation; |
725 | u32 msg_enable; | ||
749 | 726 | ||
750 | enum nic_state state; | 727 | enum nic_state state; |
751 | enum reset_type reset_pending; | 728 | enum reset_type reset_pending; |