Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions
tg3.c File Reference
#include <linux/module.h>
#include <linux/moduleparam.h>
#include <linux/stringify.h>
#include <linux/kernel.h>
#include <linux/types.h>
#include <linux/compiler.h>
#include <linux/slab.h>
#include <linux/delay.h>
#include <linux/in.h>
#include <linux/init.h>
#include <linux/interrupt.h>
#include <linux/ioport.h>
#include <linux/pci.h>
#include <linux/netdevice.h>
#include <linux/etherdevice.h>
#include <linux/skbuff.h>
#include <linux/ethtool.h>
#include <linux/mdio.h>
#include <linux/mii.h>
#include <linux/phy.h>
#include <linux/brcmphy.h>
#include <linux/if_vlan.h>
#include <linux/ip.h>
#include <linux/tcp.h>
#include <linux/workqueue.h>
#include <linux/prefetch.h>
#include <linux/dma-mapping.h>
#include <linux/firmware.h>
#include <linux/hwmon.h>
#include <linux/hwmon-sysfs.h>
#include <net/checksum.h>
#include <net/ip.h>
#include <linux/io.h>
#include <asm/byteorder.h>
#include <linux/uaccess.h>
#include "tg3.h"

Go to the source code of this file.

Data Structures

struct  fw_info
 
struct  tg3_fiber_aneginfo
 
struct  subsys_tbl_ent
 

Macros

#define BAR_0   0
 
#define BAR_2   2
 
#define tg3_flag(tp, flag)   _tg3_flag(TG3_FLAG_##flag, (tp)->tg3_flags)
 
#define tg3_flag_set(tp, flag)   _tg3_flag_set(TG3_FLAG_##flag, (tp)->tg3_flags)
 
#define tg3_flag_clear(tp, flag)   _tg3_flag_clear(TG3_FLAG_##flag, (tp)->tg3_flags)
 
#define DRV_MODULE_NAME   "tg3"
 
#define TG3_MAJ_NUM   3
 
#define TG3_MIN_NUM   125
 
#define DRV_MODULE_VERSION   __stringify(TG3_MAJ_NUM) "." __stringify(TG3_MIN_NUM)
 
#define DRV_MODULE_RELDATE   "September 26, 2012"
 
#define RESET_KIND_SHUTDOWN   0
 
#define RESET_KIND_INIT   1
 
#define RESET_KIND_SUSPEND   2
 
#define TG3_DEF_RX_MODE   0
 
#define TG3_DEF_TX_MODE   0
 
#define TG3_DEF_MSG_ENABLE
 
#define TG3_GRC_LCLCTL_PWRSW_DELAY   100
 
#define TG3_TX_TIMEOUT   (5 * HZ)
 
#define TG3_MIN_MTU   60
 
#define TG3_MAX_MTU(tp)   (tg3_flag(tp, JUMBO_CAPABLE) ? 9000 : 1500)
 
#define TG3_RX_STD_RING_SIZE(tp)
 
#define TG3_DEF_RX_RING_PENDING   200
 
#define TG3_RX_JMB_RING_SIZE(tp)
 
#define TG3_DEF_RX_JUMBO_RING_PENDING   100
 
#define TG3_TX_RING_SIZE   512
 
#define TG3_DEF_TX_RING_PENDING   (TG3_TX_RING_SIZE - 1)
 
#define TG3_RX_STD_RING_BYTES(tp)   (sizeof(struct tg3_rx_buffer_desc) * TG3_RX_STD_RING_SIZE(tp))
 
#define TG3_RX_JMB_RING_BYTES(tp)   (sizeof(struct tg3_ext_rx_buffer_desc) * TG3_RX_JMB_RING_SIZE(tp))
 
#define TG3_RX_RCB_RING_BYTES(tp)   (sizeof(struct tg3_rx_buffer_desc) * (tp->rx_ret_ring_mask + 1))
 
#define TG3_TX_RING_BYTES
 
#define NEXT_TX(N)   (((N) + 1) & (TG3_TX_RING_SIZE - 1))
 
#define TG3_DMA_BYTE_ENAB   64
 
#define TG3_RX_STD_DMA_SZ   1536
 
#define TG3_RX_JMB_DMA_SZ   9046
 
#define TG3_RX_DMA_TO_MAP_SZ(x)   ((x) + TG3_DMA_BYTE_ENAB)
 
#define TG3_RX_STD_MAP_SZ   TG3_RX_DMA_TO_MAP_SZ(TG3_RX_STD_DMA_SZ)
 
#define TG3_RX_JMB_MAP_SZ   TG3_RX_DMA_TO_MAP_SZ(TG3_RX_JMB_DMA_SZ)
 
#define TG3_RX_STD_BUFF_RING_SIZE(tp)   (sizeof(struct ring_info) * TG3_RX_STD_RING_SIZE(tp))
 
#define TG3_RX_JMB_BUFF_RING_SIZE(tp)   (sizeof(struct ring_info) * TG3_RX_JMB_RING_SIZE(tp))
 
#define TG3_RX_COPY_THRESHOLD   256
 
#define TG3_RX_COPY_THRESH(tp)   TG3_RX_COPY_THRESHOLD
 
#define TG3_RX_OFFSET(tp)   (NET_SKB_PAD)
 
#define TG3_TX_WAKEUP_THRESH(tnapi)   ((tnapi)->tx_pending / 4)
 
#define TG3_TX_BD_DMA_MAX_2K   2048
 
#define TG3_TX_BD_DMA_MAX_4K   4096
 
#define TG3_RAW_IP_ALIGN   2
 
#define TG3_FW_UPDATE_TIMEOUT_SEC   5
 
#define TG3_FW_UPDATE_FREQ_SEC   (TG3_FW_UPDATE_TIMEOUT_SEC / 2)
 
#define FIRMWARE_TG3   "tigon/tg3.bin"
 
#define FIRMWARE_TG3TSO   "tigon/tg3_tso.bin"
 
#define FIRMWARE_TG3TSO5   "tigon/tg3_tso5.bin"
 
#define TG3_NUM_STATS   ARRAY_SIZE(ethtool_stats_keys)
 
#define TG3_NUM_TEST   ARRAY_SIZE(ethtool_test_keys)
 
#define tw32_mailbox(reg, val)   tp->write32_mbox(tp, reg, val)
 
#define tw32_mailbox_f(reg, val)   tw32_mailbox_flush(tp, (reg), (val))
 
#define tw32_rx_mbox(reg, val)   tp->write32_rx_mbox(tp, reg, val)
 
#define tw32_tx_mbox(reg, val)   tp->write32_tx_mbox(tp, reg, val)
 
#define tr32_mailbox(reg)   tp->read32_mbox(tp, reg)
 
#define tw32(reg, val)   tp->write32(tp, reg, val)
 
#define tw32_f(reg, val)   _tw32_flush(tp, (reg), (val), 0)
 
#define tw32_wait_f(reg, val, us)   _tw32_flush(tp, (reg), (val), (us))
 
#define tr32(reg)   tp->read32(tp, reg)
 
#define PHY_BUSY_LOOPS   5000
 
#define TG3_PHY_AUXCTL_SMDSP_ENABLE(tp)
 
#define TG3_PHY_AUXCTL_SMDSP_DISABLE(tp)
 
#define TG3_FW_EVENT_TIMEOUT_USEC   2500
 
#define TG3_GPIO_MSG_DRVR_PRES   0x00000001
 
#define TG3_GPIO_MSG_NEED_VAUX   0x00000002
 
#define TG3_GPIO_MSG_MASK
 
#define TG3_GPIO_MSG_ALL_DRVR_PRES_MASK
 
#define TG3_GPIO_MSG_ALL_NEED_VAUX_MASK
 
#define NVRAM_CMD_TIMEOUT   10000
 
#define RX_CPU_SCRATCH_BASE   0x30000
 
#define RX_CPU_SCRATCH_SIZE   0x04000
 
#define TX_CPU_SCRATCH_BASE   0x34000
 
#define TX_CPU_SCRATCH_SIZE   0x04000
 
#define ANEG_STATE_UNKNOWN   0
 
#define ANEG_STATE_AN_ENABLE   1
 
#define ANEG_STATE_RESTART_INIT   2
 
#define ANEG_STATE_RESTART   3
 
#define ANEG_STATE_DISABLE_LINK_OK   4
 
#define ANEG_STATE_ABILITY_DETECT_INIT   5
 
#define ANEG_STATE_ABILITY_DETECT   6
 
#define ANEG_STATE_ACK_DETECT_INIT   7
 
#define ANEG_STATE_ACK_DETECT   8
 
#define ANEG_STATE_COMPLETE_ACK_INIT   9
 
#define ANEG_STATE_COMPLETE_ACK   10
 
#define ANEG_STATE_IDLE_DETECT_INIT   11
 
#define ANEG_STATE_IDLE_DETECT   12
 
#define ANEG_STATE_LINK_OK   13
 
#define ANEG_STATE_NEXT_PAGE_WAIT_INIT   14
 
#define ANEG_STATE_NEXT_PAGE_WAIT   15
 
#define MR_AN_ENABLE   0x00000001
 
#define MR_RESTART_AN   0x00000002
 
#define MR_AN_COMPLETE   0x00000004
 
#define MR_PAGE_RX   0x00000008
 
#define MR_NP_LOADED   0x00000010
 
#define MR_TOGGLE_TX   0x00000020
 
#define MR_LP_ADV_FULL_DUPLEX   0x00000040
 
#define MR_LP_ADV_HALF_DUPLEX   0x00000080
 
#define MR_LP_ADV_SYM_PAUSE   0x00000100
 
#define MR_LP_ADV_ASYM_PAUSE   0x00000200
 
#define MR_LP_ADV_REMOTE_FAULT1   0x00000400
 
#define MR_LP_ADV_REMOTE_FAULT2   0x00000800
 
#define MR_LP_ADV_NEXT_PAGE   0x00001000
 
#define MR_TOGGLE_RX   0x00002000
 
#define MR_NP_RX   0x00004000
 
#define MR_LINK_OK   0x80000000
 
#define ANEG_CFG_NP   0x00000080
 
#define ANEG_CFG_ACK   0x00000040
 
#define ANEG_CFG_RF2   0x00000020
 
#define ANEG_CFG_RF1   0x00000010
 
#define ANEG_CFG_PS2   0x00000001
 
#define ANEG_CFG_PS1   0x00008000
 
#define ANEG_CFG_HD   0x00004000
 
#define ANEG_CFG_FD   0x00002000
 
#define ANEG_CFG_INVAL   0x00001f06
 
#define ANEG_OK   0
 
#define ANEG_DONE   1
 
#define ANEG_TIMER_ENAB   2
 
#define ANEG_FAILED   -1
 
#define ANEG_STATE_SETTLE_TIME   10000
 
#define MAX_WAIT_CNT   1000
 
#define TG3_STAT_ADD32(PSTAT, REG)
 
#define ESTAT_ADD(member)
 
#define NVRAM_TEST_SIZE   0x100
 
#define NVRAM_SELFBOOT_FORMAT1_0_SIZE   0x14
 
#define NVRAM_SELFBOOT_FORMAT1_2_SIZE   0x18
 
#define NVRAM_SELFBOOT_FORMAT1_3_SIZE   0x1c
 
#define NVRAM_SELFBOOT_FORMAT1_4_SIZE   0x20
 
#define NVRAM_SELFBOOT_FORMAT1_5_SIZE   0x24
 
#define NVRAM_SELFBOOT_FORMAT1_6_SIZE   0x50
 
#define NVRAM_SELFBOOT_HW_SIZE   0x20
 
#define NVRAM_SELFBOOT_DATA_SIZE   0x1c
 
#define TG3_SERDES_TIMEOUT_SEC   2
 
#define TG3_COPPER_TIMEOUT_SEC   6
 
#define TG3_FL_5705   0x1
 
#define TG3_FL_NOT_5705   0x2
 
#define TG3_FL_NOT_5788   0x4
 
#define TG3_FL_NOT_5750   0x8
 
#define TG3_TSO_MSS   500
 
#define TG3_TSO_IP_HDR_LEN   20
 
#define TG3_TSO_TCP_HDR_LEN   20
 
#define TG3_TSO_TCP_OPT_LEN   12
 
#define TG3_STD_LOOPBACK_FAILED   1
 
#define TG3_JMB_LOOPBACK_FAILED   2
 
#define TG3_TSO_LOOPBACK_FAILED   4
 
#define TG3_LOOPBACK_FAILED
 
#define BOUNDARY_SINGLE_CACHELINE   1
 
#define BOUNDARY_MULTI_CACHELINE   2
 
#define TEST_BUFFER_SIZE   0x2000
 
#define TG3_PM_OPS   NULL
 

Functions

 MODULE_AUTHOR ("David S. Miller ([email protected]) and Jeff Garzik ([email protected])")
 
 MODULE_DESCRIPTION ("Broadcom Tigon3 ethernet driver")
 
 MODULE_LICENSE ("GPL")
 
 MODULE_VERSION (DRV_MODULE_VERSION)
 
 MODULE_FIRMWARE (FIRMWARE_TG3)
 
 MODULE_FIRMWARE (FIRMWARE_TG3TSO)
 
 MODULE_FIRMWARE (FIRMWARE_TG3TSO5)
 
 module_param (tg3_debug, int, 0)
 
 MODULE_PARM_DESC (tg3_debug,"Tigon3 bitmapped debugging message enable value")
 
 MODULE_DEVICE_TABLE (pci, tg3_pci_tbl)
 
 module_init (tg3_init)
 
 module_exit (tg3_cleanup)
 

Macro Definition Documentation

#define ANEG_CFG_ACK   0x00000040

Definition at line 4495 of file tg3.c.

#define ANEG_CFG_FD   0x00002000

Definition at line 4501 of file tg3.c.

#define ANEG_CFG_HD   0x00004000

Definition at line 4500 of file tg3.c.

#define ANEG_CFG_INVAL   0x00001f06

Definition at line 4502 of file tg3.c.

#define ANEG_CFG_NP   0x00000080

Definition at line 4494 of file tg3.c.

#define ANEG_CFG_PS1   0x00008000

Definition at line 4499 of file tg3.c.

#define ANEG_CFG_PS2   0x00000001

Definition at line 4498 of file tg3.c.

#define ANEG_CFG_RF1   0x00000010

Definition at line 4497 of file tg3.c.

#define ANEG_CFG_RF2   0x00000020

Definition at line 4496 of file tg3.c.

#define ANEG_DONE   1

Definition at line 4506 of file tg3.c.

#define ANEG_FAILED   -1

Definition at line 4508 of file tg3.c.

#define ANEG_OK   0

Definition at line 4505 of file tg3.c.

#define ANEG_STATE_ABILITY_DETECT   6

Definition at line 4456 of file tg3.c.

#define ANEG_STATE_ABILITY_DETECT_INIT   5

Definition at line 4455 of file tg3.c.

#define ANEG_STATE_ACK_DETECT   8

Definition at line 4458 of file tg3.c.

#define ANEG_STATE_ACK_DETECT_INIT   7

Definition at line 4457 of file tg3.c.

#define ANEG_STATE_AN_ENABLE   1

Definition at line 4451 of file tg3.c.

#define ANEG_STATE_COMPLETE_ACK   10

Definition at line 4460 of file tg3.c.

#define ANEG_STATE_COMPLETE_ACK_INIT   9

Definition at line 4459 of file tg3.c.

#define ANEG_STATE_DISABLE_LINK_OK   4

Definition at line 4454 of file tg3.c.

#define ANEG_STATE_IDLE_DETECT   12

Definition at line 4462 of file tg3.c.

#define ANEG_STATE_IDLE_DETECT_INIT   11

Definition at line 4461 of file tg3.c.

#define ANEG_STATE_LINK_OK   13

Definition at line 4463 of file tg3.c.

#define ANEG_STATE_NEXT_PAGE_WAIT   15

Definition at line 4465 of file tg3.c.

#define ANEG_STATE_NEXT_PAGE_WAIT_INIT   14

Definition at line 4464 of file tg3.c.

#define ANEG_STATE_RESTART   3

Definition at line 4453 of file tg3.c.

#define ANEG_STATE_RESTART_INIT   2

Definition at line 4452 of file tg3.c.

#define ANEG_STATE_SETTLE_TIME   10000

Definition at line 4510 of file tg3.c.

#define ANEG_STATE_UNKNOWN   0

Definition at line 4450 of file tg3.c.

#define ANEG_TIMER_ENAB   2

Definition at line 4507 of file tg3.c.

#define BAR_0   0

Definition at line 62 of file tg3.c.

#define BAR_2   2

Definition at line 63 of file tg3.c.

#define BOUNDARY_MULTI_CACHELINE   2

Definition at line 15343 of file tg3.c.

#define BOUNDARY_SINGLE_CACHELINE   1

Definition at line 15342 of file tg3.c.

#define DRV_MODULE_NAME   "tg3"

Definition at line 91 of file tg3.c.

#define DRV_MODULE_RELDATE   "September 26, 2012"

Definition at line 96 of file tg3.c.

#define DRV_MODULE_VERSION   __stringify(TG3_MAJ_NUM) "." __stringify(TG3_MIN_NUM)

Definition at line 94 of file tg3.c.

#define ESTAT_ADD (   member)
Value:
estats->member = old_estats->member + \
get_stat64(&hw_stats->member)

Definition at line 10551 of file tg3.c.

#define FIRMWARE_TG3   "tigon/tg3.bin"

Definition at line 210 of file tg3.c.

#define FIRMWARE_TG3TSO   "tigon/tg3_tso.bin"

Definition at line 211 of file tg3.c.

#define FIRMWARE_TG3TSO5   "tigon/tg3_tso5.bin"

Definition at line 212 of file tg3.c.

#define MAX_WAIT_CNT   1000

Definition at line 7805 of file tg3.c.

#define MR_AN_COMPLETE   0x00000004

Definition at line 4470 of file tg3.c.

#define MR_AN_ENABLE   0x00000001

Definition at line 4468 of file tg3.c.

#define MR_LINK_OK   0x80000000

Definition at line 4484 of file tg3.c.

#define MR_LP_ADV_ASYM_PAUSE   0x00000200

Definition at line 4477 of file tg3.c.

#define MR_LP_ADV_FULL_DUPLEX   0x00000040

Definition at line 4474 of file tg3.c.

#define MR_LP_ADV_HALF_DUPLEX   0x00000080

Definition at line 4475 of file tg3.c.

#define MR_LP_ADV_NEXT_PAGE   0x00001000

Definition at line 4480 of file tg3.c.

#define MR_LP_ADV_REMOTE_FAULT1   0x00000400

Definition at line 4478 of file tg3.c.

#define MR_LP_ADV_REMOTE_FAULT2   0x00000800

Definition at line 4479 of file tg3.c.

#define MR_LP_ADV_SYM_PAUSE   0x00000100

Definition at line 4476 of file tg3.c.

#define MR_NP_LOADED   0x00000010

Definition at line 4472 of file tg3.c.

#define MR_NP_RX   0x00004000

Definition at line 4482 of file tg3.c.

#define MR_PAGE_RX   0x00000008

Definition at line 4471 of file tg3.c.

#define MR_RESTART_AN   0x00000002

Definition at line 4469 of file tg3.c.

#define MR_TOGGLE_RX   0x00002000

Definition at line 4481 of file tg3.c.

#define MR_TOGGLE_TX   0x00000020

Definition at line 4473 of file tg3.c.

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

Definition at line 158 of file tg3.c.

#define NVRAM_CMD_TIMEOUT   10000

Definition at line 3007 of file tg3.c.

#define NVRAM_SELFBOOT_DATA_SIZE   0x1c

Definition at line 11561 of file tg3.c.

#define NVRAM_SELFBOOT_FORMAT1_0_SIZE   0x14

Definition at line 11554 of file tg3.c.

#define NVRAM_SELFBOOT_FORMAT1_2_SIZE   0x18

Definition at line 11555 of file tg3.c.

#define NVRAM_SELFBOOT_FORMAT1_3_SIZE   0x1c

Definition at line 11556 of file tg3.c.

#define NVRAM_SELFBOOT_FORMAT1_4_SIZE   0x20

Definition at line 11557 of file tg3.c.

#define NVRAM_SELFBOOT_FORMAT1_5_SIZE   0x24

Definition at line 11558 of file tg3.c.

#define NVRAM_SELFBOOT_FORMAT1_6_SIZE   0x50

Definition at line 11559 of file tg3.c.

#define NVRAM_SELFBOOT_HW_SIZE   0x20

Definition at line 11560 of file tg3.c.

#define NVRAM_TEST_SIZE   0x100

Definition at line 11553 of file tg3.c.

#define PHY_BUSY_LOOPS   5000

Definition at line 1052 of file tg3.c.

#define RESET_KIND_INIT   1

Definition at line 99 of file tg3.c.

#define RESET_KIND_SHUTDOWN   0

Definition at line 98 of file tg3.c.

#define RESET_KIND_SUSPEND   2

Definition at line 100 of file tg3.c.

#define RX_CPU_SCRATCH_BASE   0x30000

Definition at line 3359 of file tg3.c.

#define RX_CPU_SCRATCH_SIZE   0x04000

Definition at line 3360 of file tg3.c.

#define TEST_BUFFER_SIZE   0x2000

Definition at line 15566 of file tg3.c.

#define TG3_COPPER_TIMEOUT_SEC   6

Definition at line 11743 of file tg3.c.

#define TG3_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 104 of file tg3.c.

#define TG3_DEF_RX_JUMBO_RING_PENDING   100

Definition at line 138 of file tg3.c.

#define TG3_DEF_RX_MODE   0

Definition at line 102 of file tg3.c.

#define TG3_DEF_RX_RING_PENDING   200

Definition at line 134 of file tg3.c.

#define TG3_DEF_TX_MODE   0

Definition at line 103 of file tg3.c.

#define TG3_DEF_TX_RING_PENDING   (TG3_TX_RING_SIZE - 1)

Definition at line 148 of file tg3.c.

#define TG3_DMA_BYTE_ENAB   64

Definition at line 160 of file tg3.c.

#define TG3_FL_5705   0x1
#define TG3_FL_NOT_5705   0x2
#define TG3_FL_NOT_5750   0x8
#define TG3_FL_NOT_5788   0x4
#define tg3_flag (   tp,
  flag 
)    _tg3_flag(TG3_FLAG_##flag, (tp)->tg3_flags)

Definition at line 84 of file tg3.c.

#define tg3_flag_clear (   tp,
  flag 
)    _tg3_flag_clear(TG3_FLAG_##flag, (tp)->tg3_flags)

Definition at line 88 of file tg3.c.

#define tg3_flag_set (   tp,
  flag 
)    _tg3_flag_set(TG3_FLAG_##flag, (tp)->tg3_flags)

Definition at line 86 of file tg3.c.

#define TG3_FW_EVENT_TIMEOUT_USEC   2500

Definition at line 1542 of file tg3.c.

#define TG3_FW_UPDATE_FREQ_SEC   (TG3_FW_UPDATE_TIMEOUT_SEC / 2)

Definition at line 208 of file tg3.c.

#define TG3_FW_UPDATE_TIMEOUT_SEC   5

Definition at line 207 of file tg3.c.

#define TG3_GPIO_MSG_ALL_DRVR_PRES_MASK
Value:

Definition at line 2595 of file tg3.c.

#define TG3_GPIO_MSG_ALL_NEED_VAUX_MASK
Value:

Definition at line 2601 of file tg3.c.

#define TG3_GPIO_MSG_DRVR_PRES   0x00000001

Definition at line 2591 of file tg3.c.

#define TG3_GPIO_MSG_MASK
Value:
TG3_GPIO_MSG_NEED_VAUX)

Definition at line 2593 of file tg3.c.

#define TG3_GPIO_MSG_NEED_VAUX   0x00000002

Definition at line 2592 of file tg3.c.

#define TG3_GRC_LCLCTL_PWRSW_DELAY   100

Definition at line 114 of file tg3.c.

#define TG3_JMB_LOOPBACK_FAILED   2

Definition at line 12309 of file tg3.c.

#define TG3_LOOPBACK_FAILED
Value:
TG3_JMB_LOOPBACK_FAILED | \
TG3_TSO_LOOPBACK_FAILED)

Definition at line 12311 of file tg3.c.

#define TG3_MAJ_NUM   3

Definition at line 92 of file tg3.c.

#define TG3_MAX_MTU (   tp)    (tg3_flag(tp, JUMBO_CAPABLE) ? 9000 : 1500)

Definition at line 124 of file tg3.c.

#define TG3_MIN_MTU   60

Definition at line 123 of file tg3.c.

#define TG3_MIN_NUM   125

Definition at line 93 of file tg3.c.

#define TG3_NUM_STATS   ARRAY_SIZE(ethtool_stats_keys)

Definition at line 400 of file tg3.c.

#define TG3_NUM_TEST   ARRAY_SIZE(ethtool_test_keys)

Definition at line 416 of file tg3.c.

#define TG3_PHY_AUXCTL_SMDSP_DISABLE (   tp)
Value:

Definition at line 1254 of file tg3.c.

#define TG3_PHY_AUXCTL_SMDSP_ENABLE (   tp)
Value:

Definition at line 1249 of file tg3.c.

#define TG3_PM_OPS   NULL

Definition at line 16419 of file tg3.c.

#define TG3_RAW_IP_ALIGN   2

Definition at line 205 of file tg3.c.

#define TG3_RX_COPY_THRESH (   tp)    TG3_RX_COPY_THRESHOLD

Definition at line 189 of file tg3.c.

#define TG3_RX_COPY_THRESHOLD   256

Definition at line 187 of file tg3.c.

#define TG3_RX_DMA_TO_MAP_SZ (   x)    ((x) + TG3_DMA_BYTE_ENAB)

Definition at line 165 of file tg3.c.

#define TG3_RX_JMB_BUFF_RING_SIZE (   tp)    (sizeof(struct ring_info) * TG3_RX_JMB_RING_SIZE(tp))

Definition at line 173 of file tg3.c.

#define TG3_RX_JMB_DMA_SZ   9046

Definition at line 163 of file tg3.c.

#define TG3_RX_JMB_MAP_SZ   TG3_RX_DMA_TO_MAP_SZ(TG3_RX_JMB_DMA_SZ)

Definition at line 168 of file tg3.c.

#define TG3_RX_JMB_RING_BYTES (   tp)    (sizeof(struct tg3_ext_rx_buffer_desc) * TG3_RX_JMB_RING_SIZE(tp))

Definition at line 152 of file tg3.c.

#define TG3_RX_JMB_RING_SIZE (   tp)
Value:
(tg3_flag(tp, LRG_PROD_RING_CAP) ? \
TG3_RX_JMB_MAX_SIZE_5717 : TG3_RX_JMB_MAX_SIZE_5700)

Definition at line 135 of file tg3.c.

#define TG3_RX_OFFSET (   tp)    (NET_SKB_PAD)

Definition at line 197 of file tg3.c.

#define TG3_RX_RCB_RING_BYTES (   tp)    (sizeof(struct tg3_rx_buffer_desc) * (tp->rx_ret_ring_mask + 1))

Definition at line 154 of file tg3.c.

#define TG3_RX_STD_BUFF_RING_SIZE (   tp)    (sizeof(struct ring_info) * TG3_RX_STD_RING_SIZE(tp))

Definition at line 170 of file tg3.c.

#define TG3_RX_STD_DMA_SZ   1536

Definition at line 162 of file tg3.c.

#define TG3_RX_STD_MAP_SZ   TG3_RX_DMA_TO_MAP_SZ(TG3_RX_STD_DMA_SZ)

Definition at line 167 of file tg3.c.

#define TG3_RX_STD_RING_BYTES (   tp)    (sizeof(struct tg3_rx_buffer_desc) * TG3_RX_STD_RING_SIZE(tp))

Definition at line 150 of file tg3.c.

#define TG3_RX_STD_RING_SIZE (   tp)
Value:
(tg3_flag(tp, LRG_PROD_RING_CAP) ? \
TG3_RX_STD_MAX_SIZE_5717 : TG3_RX_STD_MAX_SIZE_5700)

Definition at line 131 of file tg3.c.

#define TG3_SERDES_TIMEOUT_SEC   2

Definition at line 11742 of file tg3.c.

#define TG3_STAT_ADD32 (   PSTAT,
  REG 
)
Value:
do { u32 __val = tr32(REG); \
(PSTAT)->low += __val; \
if ((PSTAT)->low < __val) \
(PSTAT)->high += 1; \
} while (0)

Definition at line 9671 of file tg3.c.

#define TG3_STD_LOOPBACK_FAILED   1

Definition at line 12308 of file tg3.c.

#define TG3_TSO_IP_HDR_LEN   20

Definition at line 12079 of file tg3.c.

#define TG3_TSO_LOOPBACK_FAILED   4

Definition at line 12310 of file tg3.c.

#define TG3_TSO_MSS   500

Definition at line 12077 of file tg3.c.

#define TG3_TSO_TCP_HDR_LEN   20

Definition at line 12080 of file tg3.c.

#define TG3_TSO_TCP_OPT_LEN   12

Definition at line 12081 of file tg3.c.

#define TG3_TX_BD_DMA_MAX_2K   2048

Definition at line 202 of file tg3.c.

#define TG3_TX_BD_DMA_MAX_4K   4096

Definition at line 203 of file tg3.c.

#define TG3_TX_RING_BYTES
Value:
(sizeof(struct tg3_tx_buffer_desc) * \
TG3_TX_RING_SIZE)

Definition at line 156 of file tg3.c.

#define TG3_TX_RING_SIZE   512

Definition at line 147 of file tg3.c.

#define TG3_TX_TIMEOUT   (5 * HZ)

Definition at line 120 of file tg3.c.

#define TG3_TX_WAKEUP_THRESH (   tnapi)    ((tnapi)->tx_pending / 4)

Definition at line 201 of file tg3.c.

#define tr32 (   reg)    tp->read32(tp, reg)

Definition at line 569 of file tg3.c.

#define tr32_mailbox (   reg)    tp->read32_mbox(tp, reg)

Definition at line 564 of file tg3.c.

#define tw32 (   reg,
  val 
)    tp->write32(tp, reg, val)

Definition at line 566 of file tg3.c.

#define tw32_f (   reg,
  val 
)    _tw32_flush(tp, (reg), (val), 0)

Definition at line 567 of file tg3.c.

#define tw32_mailbox (   reg,
  val 
)    tp->write32_mbox(tp, reg, val)

Definition at line 560 of file tg3.c.

#define tw32_mailbox_f (   reg,
  val 
)    tw32_mailbox_flush(tp, (reg), (val))

Definition at line 561 of file tg3.c.

#define tw32_rx_mbox (   reg,
  val 
)    tp->write32_rx_mbox(tp, reg, val)

Definition at line 562 of file tg3.c.

#define tw32_tx_mbox (   reg,
  val 
)    tp->write32_tx_mbox(tp, reg, val)

Definition at line 563 of file tg3.c.

#define tw32_wait_f (   reg,
  val,
  us 
)    _tw32_flush(tp, (reg), (val), (us))

Definition at line 568 of file tg3.c.

#define TX_CPU_SCRATCH_BASE   0x34000

Definition at line 3361 of file tg3.c.

#define TX_CPU_SCRATCH_SIZE   0x04000

Definition at line 3362 of file tg3.c.

Function Documentation

MODULE_AUTHOR ( "David S. Miller ([email protected]) and Jeff Garzik ([email protected])"  )
MODULE_DESCRIPTION ( "Broadcom Tigon3 ethernet driver )
MODULE_DEVICE_TABLE ( pci  ,
tg3_pci_tbl   
)
module_exit ( tg3_cleanup  )
MODULE_FIRMWARE ( FIRMWARE_TG3  )
MODULE_FIRMWARE ( FIRMWARE_TG3TSO  )
MODULE_FIRMWARE ( FIRMWARE_TG3TSO5  )
module_init ( tg3_init  )
MODULE_LICENSE ( "GPL"  )
module_param ( tg3_debug  ,
int  ,
 
)
MODULE_PARM_DESC ( tg3_debug  ,
"Tigon3 bitmapped debugging message enable value  
)
MODULE_VERSION ( DRV_MODULE_VERSION  )

Variable Documentation

Definition at line 318 of file tg3.c.