Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions
b44.c File Reference
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/moduleparam.h>
#include <linux/types.h>
#include <linux/netdevice.h>
#include <linux/ethtool.h>
#include <linux/mii.h>
#include <linux/if_ether.h>
#include <linux/if_vlan.h>
#include <linux/etherdevice.h>
#include <linux/pci.h>
#include <linux/delay.h>
#include <linux/init.h>
#include <linux/interrupt.h>
#include <linux/dma-mapping.h>
#include <linux/ssb/ssb.h>
#include <linux/slab.h>
#include <asm/uaccess.h>
#include <asm/io.h>
#include <asm/irq.h>
#include "b44.h"

Go to the source code of this file.

Macros

#define pr_fmt(fmt)   KBUILD_MODNAME ": " fmt
 
#define DRV_MODULE_NAME   "b44"
 
#define DRV_MODULE_VERSION   "2.0"
 
#define DRV_DESCRIPTION   "Broadcom 44xx/47xx 10/100 PCI ethernet driver"
 
#define B44_DEF_MSG_ENABLE
 
#define B44_TX_TIMEOUT   (5 * HZ)
 
#define B44_MIN_MTU   60
 
#define B44_MAX_MTU   1500
 
#define B44_RX_RING_SIZE   512
 
#define B44_DEF_RX_RING_PENDING   200
 
#define B44_RX_RING_BYTES
 
#define B44_TX_RING_SIZE   512
 
#define B44_DEF_TX_RING_PENDING   (B44_TX_RING_SIZE - 1)
 
#define B44_TX_RING_BYTES
 
#define TX_RING_GAP(BP)   (B44_TX_RING_SIZE - (BP)->tx_pending)
 
#define TX_BUFFS_AVAIL(BP)
 
#define NEXT_TX(N)   (((N) + 1) & (B44_TX_RING_SIZE - 1))
 
#define RX_PKT_OFFSET   (RX_HEADER_LEN + 2)
 
#define RX_PKT_BUF_SZ   (1536 + RX_PKT_OFFSET)
 
#define B44_TX_WAKEUP_THRESH   (B44_TX_RING_SIZE / 4)
 
#define B44_PATTERN_BASE   0x400
 
#define B44_PATTERN_SIZE   0x80
 
#define B44_PMASK_BASE   0x600
 
#define B44_PMASK_SIZE   0x10
 
#define B44_MAX_PATTERNS   16
 
#define B44_ETHIPV6UDP_HLEN   62
 
#define B44_ETHIPV4UDP_HLEN   42
 
#define B44_FULL_RESET   1
 
#define B44_FULL_RESET_SKIP_PHY   2
 
#define B44_PARTIAL_RESET   3
 
#define B44_CHIP_RESET_FULL   4
 
#define B44_CHIP_RESET_PARTIAL   5
 
#define _B44(x...)   # x,
 

Functions

 MODULE_AUTHOR ("Felix Fietkau, Florian Schirmer, Pekka Pietikainen, David S. Miller")
 
 MODULE_DESCRIPTION (DRV_DESCRIPTION)
 
 MODULE_LICENSE ("GPL")
 
 MODULE_VERSION (DRV_MODULE_VERSION)
 
 module_param (b44_debug, int, 0)
 
 MODULE_PARM_DESC (b44_debug,"B44 bitmapped debugging message enable value")
 
 MODULE_DEVICE_TABLE (ssb, b44_ssb_tbl)
 
 module_init (b44_init)
 
 module_exit (b44_cleanup)
 

Macro Definition Documentation

#define _B44 (   x...)    # x,
#define B44_CHIP_RESET_FULL   4

Definition at line 132 of file b44.c.

#define B44_CHIP_RESET_PARTIAL   5

Definition at line 133 of file b44.c.

#define B44_DEF_MSG_ENABLE
Value:
NETIF_MSG_PROBE | \
NETIF_MSG_LINK | \
NETIF_MSG_TIMER | \
NETIF_MSG_IFDOWN | \
NETIF_MSG_IFUP | \
NETIF_MSG_RX_ERR | \
NETIF_MSG_TX_ERR)

Definition at line 44 of file b44.c.

#define B44_DEF_RX_RING_PENDING   200

Definition at line 64 of file b44.c.

#define B44_DEF_TX_RING_PENDING   (B44_TX_RING_SIZE - 1)

Definition at line 68 of file b44.c.

#define B44_ETHIPV4UDP_HLEN   42

Definition at line 93 of file b44.c.

#define B44_ETHIPV6UDP_HLEN   62

Definition at line 92 of file b44.c.

#define B44_FULL_RESET   1

Definition at line 129 of file b44.c.

#define B44_FULL_RESET_SKIP_PHY   2

Definition at line 130 of file b44.c.

#define B44_MAX_MTU   1500

Definition at line 61 of file b44.c.

#define B44_MAX_PATTERNS   16

Definition at line 91 of file b44.c.

#define B44_MIN_MTU   60

Definition at line 60 of file b44.c.

#define B44_PARTIAL_RESET   3

Definition at line 131 of file b44.c.

#define B44_PATTERN_BASE   0x400

Definition at line 87 of file b44.c.

#define B44_PATTERN_SIZE   0x80

Definition at line 88 of file b44.c.

#define B44_PMASK_BASE   0x600

Definition at line 89 of file b44.c.

#define B44_PMASK_SIZE   0x10

Definition at line 90 of file b44.c.

#define B44_RX_RING_BYTES
Value:
(sizeof(struct dma_desc) * \
B44_RX_RING_SIZE)

Definition at line 65 of file b44.c.

#define B44_RX_RING_SIZE   512

Definition at line 63 of file b44.c.

#define B44_TX_RING_BYTES
Value:
(sizeof(struct dma_desc) * \
B44_TX_RING_SIZE)

Definition at line 69 of file b44.c.

#define B44_TX_RING_SIZE   512

Definition at line 67 of file b44.c.

#define B44_TX_TIMEOUT   (5 * HZ)

Definition at line 57 of file b44.c.

#define B44_TX_WAKEUP_THRESH   (B44_TX_RING_SIZE / 4)

Definition at line 84 of file b44.c.

#define DRV_DESCRIPTION   "Broadcom 44xx/47xx 10/100 PCI ethernet driver"

Definition at line 42 of file b44.c.

#define DRV_MODULE_NAME   "b44"

Definition at line 40 of file b44.c.

#define DRV_MODULE_VERSION   "2.0"

Definition at line 41 of file b44.c.

#define NEXT_TX (   N)    (((N) + 1) & (B44_TX_RING_SIZE - 1))

Definition at line 78 of file b44.c.

#define pr_fmt (   fmt)    KBUILD_MODNAME ": " fmt

Definition at line 13 of file b44.c.

#define RX_PKT_BUF_SZ   (1536 + RX_PKT_OFFSET)

Definition at line 81 of file b44.c.

#define RX_PKT_OFFSET   (RX_HEADER_LEN + 2)

Definition at line 80 of file b44.c.

#define TX_BUFFS_AVAIL (   BP)
Value:
(((BP)->tx_cons <= (BP)->tx_prod) ? \
(BP)->tx_cons + (BP)->tx_pending - (BP)->tx_prod : \
(BP)->tx_cons - (BP)->tx_prod - TX_RING_GAP(BP))

Definition at line 74 of file b44.c.

#define TX_RING_GAP (   BP)    (B44_TX_RING_SIZE - (BP)->tx_pending)

Definition at line 72 of file b44.c.

Function Documentation

MODULE_AUTHOR ( "Felix  Fietkau,
Florian  Schirmer,
Pekka  Pietikainen,
David S.Miller"   
)
MODULE_DESCRIPTION ( DRV_DESCRIPTION  )
MODULE_DEVICE_TABLE ( ssb  ,
b44_ssb_tbl   
)
module_exit ( b44_cleanup  )
module_init ( b44_init  )
MODULE_LICENSE ( "GPL"  )
module_param ( b44_debug  ,
int  ,
 
)
MODULE_PARM_DESC ( b44_debug  ,
"B44 bitmapped debugging message enable value  
)
MODULE_VERSION ( DRV_MODULE_VERSION  )