Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions
smc911x.c File Reference
#include <linux/init.h>
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/sched.h>
#include <linux/delay.h>
#include <linux/interrupt.h>
#include <linux/errno.h>
#include <linux/ioport.h>
#include <linux/crc32.h>
#include <linux/device.h>
#include <linux/platform_device.h>
#include <linux/spinlock.h>
#include <linux/ethtool.h>
#include <linux/mii.h>
#include <linux/workqueue.h>
#include <linux/netdevice.h>
#include <linux/etherdevice.h>
#include <linux/skbuff.h>
#include <asm/io.h>
#include "smc911x.h"

Go to the source code of this file.

Macros

#define ENABLE_SMC_DEBUG_RX   0
 
#define ENABLE_SMC_DEBUG_TX   0
 
#define ENABLE_SMC_DEBUG_DMA   0
 
#define ENABLE_SMC_DEBUG_PKTS   0
 
#define ENABLE_SMC_DEBUG_MISC   0
 
#define ENABLE_SMC_DEBUG_FUNC   0
 
#define SMC_DEBUG_RX   ((ENABLE_SMC_DEBUG_RX ? 1 : 0) << 0)
 
#define SMC_DEBUG_TX   ((ENABLE_SMC_DEBUG_TX ? 1 : 0) << 1)
 
#define SMC_DEBUG_DMA   ((ENABLE_SMC_DEBUG_DMA ? 1 : 0) << 2)
 
#define SMC_DEBUG_PKTS   ((ENABLE_SMC_DEBUG_PKTS ? 1 : 0) << 3)
 
#define SMC_DEBUG_MISC   ((ENABLE_SMC_DEBUG_MISC ? 1 : 0) << 4)
 
#define SMC_DEBUG_FUNC   ((ENABLE_SMC_DEBUG_FUNC ? 1 : 0) << 5)
 
#define SMC_DEBUG
 
#define CARDNAME   "smc911x"
 
#define POWER_DOWN   1
 
#define DBG(n, args...)   do { } while (0)
 
#define PRINTK(args...)   printk(KERN_DEBUG args)
 
#define PRINT_PKT(x...)   do { } while (0)
 
#define SMC_ENABLE_INT(lp, x)
 
#define SMC_DISABLE_INT(lp, x)
 

Functions

 module_param (watchdog, int, 0400)
 
 MODULE_PARM_DESC (watchdog,"transmit timeout in milliseconds")
 
 module_param (tx_fifo_kb, int, 0400)
 
 MODULE_PARM_DESC (tx_fifo_kb,"transmit FIFO size in KB (1<x<15)(default=8)")
 
 MODULE_LICENSE ("GPL")
 
 MODULE_ALIAS ("platform:smc911x")
 
 module_platform_driver (smc911x_driver)
 

Macro Definition Documentation

#define CARDNAME   "smc911x"

Definition at line 101 of file smc911x.c.

#define DBG (   n,
  args... 
)    do { } while (0)

Definition at line 117 of file smc911x.c.

#define ENABLE_SMC_DEBUG_DMA   0

Definition at line 36 of file smc911x.c.

#define ENABLE_SMC_DEBUG_FUNC   0

Definition at line 39 of file smc911x.c.

#define ENABLE_SMC_DEBUG_MISC   0

Definition at line 38 of file smc911x.c.

#define ENABLE_SMC_DEBUG_PKTS   0

Definition at line 37 of file smc911x.c.

#define ENABLE_SMC_DEBUG_RX   0

Definition at line 34 of file smc911x.c.

#define ENABLE_SMC_DEBUG_TX   0

Definition at line 35 of file smc911x.c.

#define POWER_DOWN   1

Definition at line 106 of file smc911x.c.

#define PRINT_PKT (   x...)    do { } while (0)

Definition at line 150 of file smc911x.c.

#define PRINTK (   args...)    printk(KERN_DEBUG args)

Definition at line 118 of file smc911x.c.

#define SMC_DEBUG
Value:
SMC_DEBUG_TX | \
SMC_DEBUG_DMA | \
SMC_DEBUG_PKTS | \
SMC_DEBUG_MISC | \
SMC_DEBUG_FUNC \
)

Definition at line 49 of file smc911x.c.

#define SMC_DEBUG_DMA   ((ENABLE_SMC_DEBUG_DMA ? 1 : 0) << 2)

Definition at line 43 of file smc911x.c.

#define SMC_DEBUG_FUNC   ((ENABLE_SMC_DEBUG_FUNC ? 1 : 0) << 5)

Definition at line 46 of file smc911x.c.

#define SMC_DEBUG_MISC   ((ENABLE_SMC_DEBUG_MISC ? 1 : 0) << 4)

Definition at line 45 of file smc911x.c.

#define SMC_DEBUG_PKTS   ((ENABLE_SMC_DEBUG_PKTS ? 1 : 0) << 3)

Definition at line 44 of file smc911x.c.

#define SMC_DEBUG_RX   ((ENABLE_SMC_DEBUG_RX ? 1 : 0) << 0)

Definition at line 41 of file smc911x.c.

#define SMC_DEBUG_TX   ((ENABLE_SMC_DEBUG_TX ? 1 : 0) << 1)

Definition at line 42 of file smc911x.c.

#define SMC_DISABLE_INT (   lp,
  x 
)
Value:
do { \
unsigned int __mask; \
__mask = SMC_GET_INT_EN((lp)); \
__mask &= ~(x); \
SMC_SET_INT_EN((lp), __mask); \
} while (0)

Definition at line 163 of file smc911x.c.

#define SMC_ENABLE_INT (   lp,
  x 
)
Value:
do { \
unsigned int __mask; \
__mask = SMC_GET_INT_EN((lp)); \
__mask |= (x); \
SMC_SET_INT_EN((lp), __mask); \
} while (0)

Definition at line 155 of file smc911x.c.

Function Documentation

MODULE_ALIAS ( "platform:smc911x"  )
MODULE_LICENSE ( "GPL"  )
module_param ( watchdog  ,
int  ,
0400   
)
module_param ( tx_fifo_kb  ,
int  ,
0400   
)
MODULE_PARM_DESC ( watchdog  ,
"transmit timeout in milliseconds"   
)
MODULE_PARM_DESC ( tx_fifo_kb  ,
"transmit FIFO size in KB (1<x<15)(default=8)"   
)
module_platform_driver ( smc911x_driver  )