aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/smsc911x.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/smsc911x.h')
-rw-r--r--drivers/net/smsc911x.h35
1 files changed, 21 insertions, 14 deletions
diff --git a/drivers/net/smsc911x.h b/drivers/net/smsc911x.h
index 016360c65ce2..8d67aacf8867 100644
--- a/drivers/net/smsc911x.h
+++ b/drivers/net/smsc911x.h
@@ -22,7 +22,7 @@
22#define __SMSC911X_H__ 22#define __SMSC911X_H__
23 23
24#define TX_FIFO_LOW_THRESHOLD ((u32)1600) 24#define TX_FIFO_LOW_THRESHOLD ((u32)1600)
25#define SMSC911X_EEPROM_SIZE ((u32)7) 25#define SMSC911X_EEPROM_SIZE ((u32)128)
26#define USE_DEBUG 0 26#define USE_DEBUG 0
27 27
28/* This is the maximum number of packets to be received every 28/* This is the maximum number of packets to be received every
@@ -33,25 +33,21 @@
33 * can be successfully looped back */ 33 * can be successfully looped back */
34#define USE_PHY_WORK_AROUND 34#define USE_PHY_WORK_AROUND
35 35
36#define DPRINTK(nlevel, klevel, fmt, args...) \
37 ((void)((NETIF_MSG_##nlevel & pdata->msg_enable) && \
38 printk(KERN_##klevel "%s: %s: " fmt "\n", \
39 pdata->dev->name, __func__, ## args)))
40
41#if USE_DEBUG >= 1 36#if USE_DEBUG >= 1
42#define SMSC_WARNING(nlevel, fmt, args...) \ 37#define SMSC_WARN(pdata, nlevel, fmt, args...) \
43 DPRINTK(nlevel, WARNING, fmt, ## args) 38 netif_warn(pdata, nlevel, (pdata)->dev, \
39 "%s: " fmt "\n", __func__, ##args)
44#else 40#else
45#define SMSC_WARNING(nlevel, fmt, args...) \ 41#define SMSC_WARN(pdata, nlevel, fmt, args...) \
46 ({ do {} while (0); 0; }) 42 no_printk(fmt "\n", ##args)
47#endif 43#endif
48 44
49#if USE_DEBUG >= 2 45#if USE_DEBUG >= 2
50#define SMSC_TRACE(nlevel, fmt, args...) \ 46#define SMSC_TRACE(pdata, nlevel, fmt, args...) \
51 DPRINTK(nlevel, INFO, fmt, ## args) 47 netif_info(pdata, nlevel, pdata->dev, fmt "\n", ##args)
52#else 48#else
53#define SMSC_TRACE(nlevel, fmt, args...) \ 49#define SMSC_TRACE(pdata, nlevel, fmt, args...) \
54 ({ do {} while (0); 0; }) 50 no_printk(fmt "\n", ##args)
55#endif 51#endif
56 52
57#ifdef CONFIG_DEBUG_SPINLOCK 53#ifdef CONFIG_DEBUG_SPINLOCK
@@ -394,4 +390,15 @@
394#define LPA_PAUSE_ALL (LPA_PAUSE_CAP | \ 390#define LPA_PAUSE_ALL (LPA_PAUSE_CAP | \
395 LPA_PAUSE_ASYM) 391 LPA_PAUSE_ASYM)
396 392
393/*
394 * Provide hooks to let the arch add to the initialisation procedure
395 * and to override the source of the MAC address.
396 */
397#define SMSC_INITIALIZE() do {} while (0)
398#define smsc_get_mac(dev) smsc911x_read_mac_address((dev))
399
400#ifdef CONFIG_SMSC911X_ARCH_HOOKS
401#include <asm/smsc911x.h>
402#endif
403
397#endif /* __SMSC911X_H__ */ 404#endif /* __SMSC911X_H__ */