Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions
sunhme.c File Reference
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/types.h>
#include <linux/fcntl.h>
#include <linux/interrupt.h>
#include <linux/ioport.h>
#include <linux/in.h>
#include <linux/slab.h>
#include <linux/string.h>
#include <linux/delay.h>
#include <linux/init.h>
#include <linux/ethtool.h>
#include <linux/mii.h>
#include <linux/crc32.h>
#include <linux/random.h>
#include <linux/errno.h>
#include <linux/netdevice.h>
#include <linux/etherdevice.h>
#include <linux/skbuff.h>
#include <linux/mm.h>
#include <linux/bitops.h>
#include <linux/dma-mapping.h>
#include <asm/io.h>
#include <asm/dma.h>
#include <asm/byteorder.h>
#include <asm/uaccess.h>
#include <asm/pgtable.h>
#include <asm/irq.h>
#include "sunhme.h"

Go to the source code of this file.

Macros

#define DRV_NAME   "sunhme"
 
#define DRV_VERSION   "3.10"
 
#define DRV_RELDATE   "August 26, 2008"
 
#define DRV_AUTHOR   "David S. Miller ([email protected])"
 
#define tx_add_log(hp, a, s)   do { } while(0)
 
#define tx_dump_log()   do { } while(0)
 
#define tx_dump_ring(hp)   do { } while(0)
 
#define HMD(x)
 
#define ASD(x)
 
#define DEFAULT_IPG0   16 /* For lance-mode only */
 
#define DEFAULT_IPG1   8 /* For all modes */
 
#define DEFAULT_IPG2   4 /* For all modes */
 
#define DEFAULT_JAMSIZE   4 /* Toe jam */
 
#define hme_write32(__hp, __reg, __val)   writel((__val), (__reg))
 
#define hme_read32(__hp, __reg)   readl(__reg)
 
#define hme_write_rxd(__hp, __rxd, __flags, __addr)
 
#define hme_write_txd(__hp, __txd, __flags, __addr)
 
#define hme_dma_map(__hp, __ptr, __size, __dir)   pci_map_single((__hp)->dma_dev, (__ptr), (__size), (__dir))
 
#define hme_dma_unmap(__hp, __addr, __size, __dir)   pci_unmap_single((__hp)->dma_dev, (__addr), (__size), (__dir))
 
#define hme_dma_sync_for_cpu(__hp, __addr, __size, __dir)   pci_dma_sync_single_for_cpu((__hp)->dma_dev, (__addr), (__size), (__dir))
 
#define hme_dma_sync_for_device(__hp, __addr, __size, __dir)   pci_dma_sync_single_for_device((__hp)->dma_dev, (__addr), (__size), (__dir))
 
#define TCVR_FAILURE   0x80000000 /* Impossible MIF read value */
 
#define TCVR_READ_TRIES   16
 
#define TCVR_WRITE_TRIES   16
 
#define TX_RESET_TRIES   32
 
#define RX_RESET_TRIES   32
 
#define STOP_TRIES   16
 
#define TCVR_RESET_TRIES   16 /* It should reset quickly */
 
#define TCVR_UNISOLATE_TRIES   32 /* Dis-isolation can take longer. */
 
#define TXD(x)
 
#define RXD(x)
 
#define SXD(x)
 

Functions

 MODULE_VERSION (DRV_VERSION)
 
 MODULE_AUTHOR (DRV_AUTHOR)
 
 MODULE_DESCRIPTION ("Sun HappyMealEthernet(HME) 10/100baseT ethernet driver")
 
 MODULE_LICENSE ("GPL")
 
 module_param_array (macaddr, int, NULL, 0)
 
 MODULE_PARM_DESC (macaddr,"Happy Meal MAC address to set")
 
 module_init (happy_meal_probe)
 
 module_exit (happy_meal_exit)
 

Macro Definition Documentation

#define ASD (   x)

Definition at line 170 of file sunhme.c.

#define DEFAULT_IPG0   16 /* For lance-mode only */

Definition at line 173 of file sunhme.c.

#define DEFAULT_IPG1   8 /* For all modes */

Definition at line 174 of file sunhme.c.

#define DEFAULT_IPG2   4 /* For all modes */

Definition at line 175 of file sunhme.c.

#define DEFAULT_JAMSIZE   4 /* Toe jam */

Definition at line 176 of file sunhme.c.

#define DRV_AUTHOR   "David S. Miller ([email protected])"

Definition at line 66 of file sunhme.c.

#define DRV_NAME   "sunhme"

Definition at line 63 of file sunhme.c.

#define DRV_RELDATE   "August 26, 2008"

Definition at line 65 of file sunhme.c.

#define DRV_VERSION   "3.10"

Definition at line 64 of file sunhme.c.

#define HMD (   x)

Definition at line 162 of file sunhme.c.

#define hme_dma_map (   __hp,
  __ptr,
  __size,
  __dir 
)    pci_map_single((__hp)->dma_dev, (__ptr), (__size), (__dir))

Definition at line 308 of file sunhme.c.

#define hme_dma_sync_for_cpu (   __hp,
  __addr,
  __size,
  __dir 
)    pci_dma_sync_single_for_cpu((__hp)->dma_dev, (__addr), (__size), (__dir))

Definition at line 312 of file sunhme.c.

#define hme_dma_sync_for_device (   __hp,
  __addr,
  __size,
  __dir 
)    pci_dma_sync_single_for_device((__hp)->dma_dev, (__addr), (__size), (__dir))

Definition at line 314 of file sunhme.c.

#define hme_dma_unmap (   __hp,
  __addr,
  __size,
  __dir 
)    pci_unmap_single((__hp)->dma_dev, (__addr), (__size), (__dir))

Definition at line 310 of file sunhme.c.

#define hme_read32 (   __hp,
  __reg 
)    readl(__reg)

Definition at line 292 of file sunhme.c.

#define hme_write32 (   __hp,
  __reg,
  __val 
)    writel((__val), (__reg))

Definition at line 290 of file sunhme.c.

#define hme_write_rxd (   __hp,
  __rxd,
  __flags,
  __addr 
)
Value:
do { (__rxd)->rx_addr = (__force hme32)cpu_to_le32(__addr); \
wmb(); \
(__rxd)->rx_flags = (__force hme32)cpu_to_le32(__flags); \
} while(0)

Definition at line 294 of file sunhme.c.

#define hme_write_txd (   __hp,
  __txd,
  __flags,
  __addr 
)
Value:
do { (__txd)->tx_addr = (__force hme32)cpu_to_le32(__addr); \
wmb(); \
(__txd)->tx_flags = (__force hme32)cpu_to_le32(__flags); \
} while(0)

Definition at line 299 of file sunhme.c.

#define RX_RESET_TRIES   32

Definition at line 869 of file sunhme.c.

#define RXD (   x)

Definition at line 1972 of file sunhme.c.

#define STOP_TRIES   16

Definition at line 911 of file sunhme.c.

#define SXD (   x)

Definition at line 2230 of file sunhme.c.

#define TCVR_FAILURE   0x80000000 /* Impossible MIF read value */

Definition at line 361 of file sunhme.c.

#define TCVR_READ_TRIES   16

Definition at line 452 of file sunhme.c.

#define TCVR_RESET_TRIES   16 /* It should reset quickly */

Definition at line 988 of file sunhme.c.

#define TCVR_UNISOLATE_TRIES   32 /* Dis-isolation can take longer. */

Definition at line 989 of file sunhme.c.

#define TCVR_WRITE_TRIES   16

Definition at line 484 of file sunhme.c.

#define tx_add_log (   hp,
  a,
  s 
)    do { } while(0)

Definition at line 154 of file sunhme.c.

#define tx_dump_log ( )    do { } while(0)

Definition at line 155 of file sunhme.c.

#define tx_dump_ring (   hp)    do { } while(0)

Definition at line 156 of file sunhme.c.

#define TX_RESET_TRIES   32

Definition at line 868 of file sunhme.c.

#define TXD (   x)

Definition at line 1908 of file sunhme.c.

Function Documentation

MODULE_AUTHOR ( DRV_AUTHOR  )
MODULE_DESCRIPTION ( "Sun HappyMealEthernet(HME) 10/100baseT ethernet driver"  )
module_exit ( happy_meal_exit  )
module_init ( happy_meal_probe  )
MODULE_LICENSE ( "GPL"  )
module_param_array ( macaddr  ,
int  ,
NULL  ,
 
)
MODULE_PARM_DESC ( macaddr  ,
"Happy Meal MAC address to set  
)
MODULE_VERSION ( DRV_VERSION  )