Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions
smc91x.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/irq.h>
#include <linux/errno.h>
#include <linux/ioport.h>
#include <linux/crc32.h>
#include <linux/platform_device.h>
#include <linux/spinlock.h>
#include <linux/ethtool.h>
#include <linux/mii.h>
#include <linux/workqueue.h>
#include <linux/of.h>
#include <linux/netdevice.h>
#include <linux/etherdevice.h>
#include <linux/skbuff.h>
#include <asm/io.h>
#include "smc91x.h"

Go to the source code of this file.

Macros

#define SMC_DEBUG   0
 
#define CARDNAME   "smc91x"
 
#define POWER_DOWN   1
 
#define MEMORY_WAIT_TIME   16
 
#define MAX_IRQ_LOOPS   8
 
#define THROTTLE_TX_PKTS   0
 
#define MII_DELAY   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)
 
#define SMC_WAIT_MMU_BUSY(lp)
 
#define smc_special_trylock(lock, flags)   (flags == flags)
 
#define smc_special_lock(lock, flags)   do { flags = 0; } while (0)
 
#define smc_special_unlock(lock, flags)   do { flags = 0; } while (0)
 
#define smc91x_match   NULL
 

Functions

 module_param (nowait, int, 0400)
 
 MODULE_PARM_DESC (nowait,"set to 1 for no wait state")
 
 module_param (watchdog, int, 0400)
 
 MODULE_PARM_DESC (watchdog,"transmit timeout in milliseconds")
 
 MODULE_LICENSE ("GPL")
 
 MODULE_ALIAS ("platform:smc91x")
 
 module_platform_driver (smc_driver)
 

Macro Definition Documentation

#define CARDNAME   "smc91x"

Definition at line 116 of file smc91x.c.

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

Definition at line 160 of file smc91x.c.

#define MAX_IRQ_LOOPS   8

Definition at line 134 of file smc91x.c.

#define MEMORY_WAIT_TIME   16

Definition at line 128 of file smc91x.c.

#define MII_DELAY   1

Definition at line 149 of file smc91x.c.

#define POWER_DOWN   1

Definition at line 121 of file smc91x.c.

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

Definition at line 193 of file smc91x.c.

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

Definition at line 161 of file smc91x.c.

#define smc91x_match   NULL

Definition at line 2400 of file smc91x.c.

#define SMC_DEBUG   0

Definition at line 65 of file smc91x.c.

#define SMC_DISABLE_INT (   lp,
  x 
)
Value:
do { \
unsigned char mask; \
unsigned long smc_disable_flags; \
spin_lock_irqsave(&lp->lock, smc_disable_flags); \
mask = SMC_GET_INT_MASK(lp); \
mask &= ~(x); \
SMC_SET_INT_MASK(lp, mask); \
spin_unlock_irqrestore(&lp->lock, smc_disable_flags); \
} while (0)

Definition at line 209 of file smc91x.c.

#define SMC_ENABLE_INT (   lp,
  x 
)
Value:
do { \
unsigned char mask; \
unsigned long smc_enable_flags; \
spin_lock_irqsave(&lp->lock, smc_enable_flags); \
mask = SMC_GET_INT_MASK(lp); \
mask |= (x); \
SMC_SET_INT_MASK(lp, mask); \
spin_unlock_irqrestore(&lp->lock, smc_enable_flags); \
} while (0)

Definition at line 198 of file smc91x.c.

#define smc_special_lock (   lock,
  flags 
)    do { flags = 0; } while (0)

Definition at line 539 of file smc91x.c.

#define smc_special_trylock (   lock,
  flags 
)    (flags == flags)

Definition at line 538 of file smc91x.c.

#define smc_special_unlock (   lock,
  flags 
)    do { flags = 0; } while (0)

Definition at line 540 of file smc91x.c.

#define SMC_WAIT_MMU_BUSY (   lp)
Value:
do { \
unsigned long timeout = jiffies + 2; \
while (SMC_GET_MMU_CMD(lp) & MC_BUSY) { \
if (time_after(jiffies, timeout)) { \
printk("%s: timeout %s line %d\n", \
dev->name, __FILE__, __LINE__); \
break; \
} \
cpu_relax(); \
} \
} \
} while (0)

Definition at line 224 of file smc91x.c.

#define THROTTLE_TX_PKTS   0

Definition at line 143 of file smc91x.c.

Function Documentation

MODULE_ALIAS ( "platform:smc91x"  )
MODULE_LICENSE ( "GPL"  )
module_param ( nowait  ,
int  ,
0400   
)
module_param ( watchdog  ,
int  ,
0400   
)
MODULE_PARM_DESC ( nowait  ,
"set to 1 for no wait state  
)
MODULE_PARM_DESC ( watchdog  ,
"transmit timeout in milliseconds"   
)
module_platform_driver ( smc_driver  )