Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Enumerations | Functions | Variables
atl1c.h File Reference
#include <linux/init.h>
#include <linux/interrupt.h>
#include <linux/types.h>
#include <linux/errno.h>
#include <linux/module.h>
#include <linux/pci.h>
#include <linux/netdevice.h>
#include <linux/etherdevice.h>
#include <linux/skbuff.h>
#include <linux/ioport.h>
#include <linux/slab.h>
#include <linux/list.h>
#include <linux/delay.h>
#include <linux/sched.h>
#include <linux/in.h>
#include <linux/ip.h>
#include <linux/ipv6.h>
#include <linux/udp.h>
#include <linux/mii.h>
#include <linux/io.h>
#include <linux/vmalloc.h>
#include <linux/pagemap.h>
#include <linux/tcp.h>
#include <linux/ethtool.h>
#include <linux/if_vlan.h>
#include <linux/workqueue.h>
#include <net/checksum.h>
#include <net/ip6_checksum.h>
#include "atl1c_hw.h"

Go to the source code of this file.

Data Structures

struct  atl1c_tpd_desc
 
struct  atl1c_tpd_ext_desc
 
struct  atl1c_recv_ret_status
 
struct  atl1c_rx_free_desc
 
struct  atl1c_hw_stats
 
struct  atl1c_hw
 
struct  atl1c_ring_header
 
struct  atl1c_buffer
 
struct  atl1c_tpd_ring
 
struct  atl1c_rfd_ring
 
struct  atl1c_rrd_ring
 
struct  atl1c_adapter
 

Macros

#define AT_WUFC_LNKC   0x00000001 /* Link Status Change Wakeup Enable */
 
#define AT_WUFC_MAG   0x00000002 /* Magic Packet Wakeup Enable */
 
#define AT_WUFC_EX   0x00000004 /* Directed Exact Wakeup Enable */
 
#define AT_WUFC_MC   0x00000008 /* Multicast Wakeup Enable */
 
#define AT_WUFC_BC   0x00000010 /* Broadcast Wakeup Enable */
 
#define AT_VLAN_TO_TAG(_vlan, _tag)
 
#define AT_TAG_TO_VLAN(_tag, _vlan)
 
#define SPEED_0   0xffff
 
#define HALF_DUPLEX   1
 
#define FULL_DUPLEX   2
 
#define AT_RX_BUF_SIZE   (ETH_FRAME_LEN + VLAN_HLEN + ETH_FCS_LEN)
 
#define MAX_JUMBO_FRAME_SIZE   (6*1024)
 
#define AT_MAX_RECEIVE_QUEUE   4
 
#define AT_DEF_RECEIVE_QUEUE   1
 
#define AT_MAX_TRANSMIT_QUEUE   2
 
#define AT_DMA_HI_ADDR_MASK   0xffffffff00000000ULL
 
#define AT_DMA_LO_ADDR_MASK   0x00000000ffffffffULL
 
#define AT_TX_WATCHDOG   (5 * HZ)
 
#define AT_MAX_INT_WORK   5
 
#define AT_TWSI_EEPROM_TIMEOUT   100
 
#define AT_HW_MAX_IDLE_DELAY   10
 
#define AT_SUSPEND_LINK_TIMEOUT   100
 
#define AT_ASPM_L0S_TIMER   6
 
#define AT_ASPM_L1_TIMER   12
 
#define AT_LCKDET_TIMER   12
 
#define ATL1C_PCIE_L0S_L1_DISABLE   0x01
 
#define ATL1C_PCIE_PHY_RESET   0x02
 
#define ATL1C_ASPM_L0s_ENABLE   0x0001
 
#define ATL1C_ASPM_L1_ENABLE   0x0002
 
#define AT_REGS_LEN   (74 * sizeof(u32))
 
#define AT_EEPROM_LEN   512
 
#define ATL1C_GET_DESC(R, i, type)   (&(((type *)((R)->desc))[i]))
 
#define ATL1C_RFD_DESC(R, i)   ATL1C_GET_DESC(R, i, struct atl1c_rx_free_desc)
 
#define ATL1C_TPD_DESC(R, i)   ATL1C_GET_DESC(R, i, struct atl1c_tpd_desc)
 
#define ATL1C_RRD_DESC(R, i)   ATL1C_GET_DESC(R, i, struct atl1c_recv_ret_status)
 
#define TPD_L4HDR_OFFSET_MASK   0x00FF
 
#define TPD_L4HDR_OFFSET_SHIFT   0
 
#define TPD_TCPHDR_OFFSET_MASK   0x00FF
 
#define TPD_TCPHDR_OFFSET_SHIFT   0
 
#define TPD_PLOADOFFSET_MASK   0x00FF
 
#define TPD_PLOADOFFSET_SHIFT   0
 
#define TPD_CCSUM_EN_MASK   0x0001
 
#define TPD_CCSUM_EN_SHIFT   8
 
#define TPD_IP_CSUM_MASK   0x0001
 
#define TPD_IP_CSUM_SHIFT   9
 
#define TPD_TCP_CSUM_MASK   0x0001
 
#define TPD_TCP_CSUM_SHIFT   10
 
#define TPD_UDP_CSUM_MASK   0x0001
 
#define TPD_UDP_CSUM_SHIFT   11
 
#define TPD_LSO_EN_MASK   0x0001 /* TCP Large Send Offload */
 
#define TPD_LSO_EN_SHIFT   12
 
#define TPD_LSO_VER_MASK   0x0001
 
#define TPD_LSO_VER_SHIFT   13 /* 0 : ipv4; 1 : ipv4/ipv6 */
 
#define TPD_CON_VTAG_MASK   0x0001
 
#define TPD_CON_VTAG_SHIFT   14
 
#define TPD_INS_VTAG_MASK   0x0001
 
#define TPD_INS_VTAG_SHIFT   15
 
#define TPD_IPV4_PACKET_MASK   0x0001 /* valid when LSO VER is 1 */
 
#define TPD_IPV4_PACKET_SHIFT   16
 
#define TPD_ETH_TYPE_MASK   0x0001
 
#define TPD_ETH_TYPE_SHIFT   17 /* 0 : 802.3 frame; 1 : Ethernet */
 
#define TPD_CCSUM_OFFSET_MASK   0x00FF
 
#define TPD_CCSUM_OFFSET_SHIFT   18
 
#define TPD_CCSUM_EPAD_MASK   0x0001
 
#define TPD_CCSUM_EPAD_SHIFT   30
 
#define TPD_MSS_MASK   0x1FFF
 
#define TPD_MSS_SHIFT   18
 
#define TPD_EOP_MASK   0x0001
 
#define TPD_EOP_SHIFT   31
 
#define RRS_RX_CSUM_MASK   0xFFFF
 
#define RRS_RX_CSUM_SHIFT   0
 
#define RRS_RX_RFD_CNT_MASK   0x000F
 
#define RRS_RX_RFD_CNT_SHIFT   16
 
#define RRS_RX_RFD_INDEX_MASK   0x0FFF
 
#define RRS_RX_RFD_INDEX_SHIFT   20
 
#define RRS_HEAD_LEN_MASK   0x00FF
 
#define RRS_HEAD_LEN_SHIFT   0
 
#define RRS_HDS_TYPE_MASK   0x0003
 
#define RRS_HDS_TYPE_SHIFT   8
 
#define RRS_CPU_NUM_MASK   0x0003
 
#define RRS_CPU_NUM_SHIFT   10
 
#define RRS_HASH_FLG_MASK   0x000F
 
#define RRS_HASH_FLG_SHIFT   12
 
#define RRS_HDS_TYPE_HEAD   1
 
#define RRS_HDS_TYPE_DATA   2
 
#define RRS_IS_NO_HDS_TYPE(flag)   ((((flag) >> (RRS_HDS_TYPE_SHIFT)) & RRS_HDS_TYPE_MASK) == 0)
 
#define RRS_IS_HDS_HEAD(flag)
 
#define RRS_IS_HDS_DATA(flag)
 
#define RRS_PKT_SIZE_MASK   0x3FFF
 
#define RRS_PKT_SIZE_SHIFT   0
 
#define RRS_ERR_L4_CSUM_MASK   0x0001
 
#define RRS_ERR_L4_CSUM_SHIFT   14
 
#define RRS_ERR_IP_CSUM_MASK   0x0001
 
#define RRS_ERR_IP_CSUM_SHIFT   15
 
#define RRS_VLAN_INS_MASK   0x0001
 
#define RRS_VLAN_INS_SHIFT   16
 
#define RRS_PROT_ID_MASK   0x0007
 
#define RRS_PROT_ID_SHIFT   17
 
#define RRS_RX_ERR_SUM_MASK   0x0001
 
#define RRS_RX_ERR_SUM_SHIFT   20
 
#define RRS_RX_ERR_CRC_MASK   0x0001
 
#define RRS_RX_ERR_CRC_SHIFT   21
 
#define RRS_RX_ERR_FAE_MASK   0x0001
 
#define RRS_RX_ERR_FAE_SHIFT   22
 
#define RRS_RX_ERR_TRUNC_MASK   0x0001
 
#define RRS_RX_ERR_TRUNC_SHIFT   23
 
#define RRS_RX_ERR_RUNC_MASK   0x0001
 
#define RRS_RX_ERR_RUNC_SHIFT   24
 
#define RRS_RX_ERR_ICMP_MASK   0x0001
 
#define RRS_RX_ERR_ICMP_SHIFT   25
 
#define RRS_PACKET_BCAST_MASK   0x0001
 
#define RRS_PACKET_BCAST_SHIFT   26
 
#define RRS_PACKET_MCAST_MASK   0x0001
 
#define RRS_PACKET_MCAST_SHIFT   27
 
#define RRS_PACKET_TYPE_MASK   0x0001
 
#define RRS_PACKET_TYPE_SHIFT   28
 
#define RRS_FIFO_FULL_MASK   0x0001
 
#define RRS_FIFO_FULL_SHIFT   29
 
#define RRS_802_3_LEN_ERR_MASK   0x0001
 
#define RRS_802_3_LEN_ERR_SHIFT   30
 
#define RRS_RXD_UPDATED_MASK   0x0001
 
#define RRS_RXD_UPDATED_SHIFT   31
 
#define RRS_ERR_L4_CSUM   0x00004000
 
#define RRS_ERR_IP_CSUM   0x00008000
 
#define RRS_VLAN_INS   0x00010000
 
#define RRS_RX_ERR_SUM   0x00100000
 
#define RRS_RX_ERR_CRC   0x00200000
 
#define RRS_802_3_LEN_ERR   0x40000000
 
#define RRS_RXD_UPDATED   0x80000000
 
#define RRS_PACKET_TYPE_802_3   1
 
#define RRS_PACKET_TYPE_ETH   0
 
#define RRS_PACKET_IS_ETH(word)
 
#define RRS_RXD_IS_VALID(word)   ((((word) >> RRS_RXD_UPDATED_SHIFT) & RRS_RXD_UPDATED_MASK) == 1)
 
#define RRS_PACKET_PROT_IS_IPV4_ONLY(word)   ((((word) >> RRS_PROT_ID_SHIFT) & RRS_PROT_ID_MASK) == 1)
 
#define RRS_PACKET_PROT_IS_IPV6_ONLY(word)   ((((word) >> RRS_PROT_ID_SHIFT) & RRS_PROT_ID_MASK) == 6)
 
#define MEDIA_TYPE_AUTO_SENSOR   0
 
#define MEDIA_TYPE_100M_FULL   1
 
#define MEDIA_TYPE_100M_HALF   2
 
#define MEDIA_TYPE_10M_FULL   3
 
#define MEDIA_TYPE_10M_HALF   4
 
#define ATL1C_INTR_CLEAR_ON_READ   0x0001
 
#define ATL1C_INTR_MODRT_ENABLE   0x0002
 
#define ATL1C_CMB_ENABLE   0x0004
 
#define ATL1C_SMB_ENABLE   0x0010
 
#define ATL1C_TXQ_MODE_ENHANCE   0x0020
 
#define ATL1C_RX_IPV6_CHKSUM   0x0040
 
#define ATL1C_ASPM_L0S_SUPPORT   0x0080
 
#define ATL1C_ASPM_L1_SUPPORT   0x0100
 
#define ATL1C_ASPM_CTRL_MON   0x0200
 
#define ATL1C_HIB_DISABLE   0x0400
 
#define ATL1C_APS_MODE_ENABLE   0x0800
 
#define ATL1C_LINK_EXT_SYNC   0x1000
 
#define ATL1C_CLK_GATING_EN   0x2000
 
#define ATL1C_FPGA_VERSION   0x8000
 
#define ATL1C_LINK_CAP_1000M   0x0001
 
#define ATL1C_BUFFER_FREE   0x0001
 
#define ATL1C_BUFFER_BUSY   0x0002
 
#define ATL1C_BUFFER_STATE_MASK   0x0003
 
#define ATL1C_PCIMAP_SINGLE   0x0004
 
#define ATL1C_PCIMAP_PAGE   0x0008
 
#define ATL1C_PCIMAP_TYPE_MASK   0x000C
 
#define ATL1C_PCIMAP_TODEVICE   0x0010
 
#define ATL1C_PCIMAP_FROMDEVICE   0x0020
 
#define ATL1C_PCIMAP_DIRECTION_MASK   0x0030
 
#define ATL1C_SET_BUFFER_STATE(buff, state)
 
#define ATL1C_SET_PCIMAP_TYPE(buff, type, direction)
 
#define __AT_TESTING   0x0001
 
#define __AT_RESETTING   0x0002
 
#define __AT_DOWN   0x0003
 
#define ATL1C_WORK_EVENT_RESET   0
 
#define ATL1C_WORK_EVENT_LINK_CHANGE   1
 
#define AT_WRITE_REG(a, reg, value)
 
#define AT_WRITE_FLUSH(a)
 
#define AT_READ_REG(a, reg, pdata)
 
#define AT_WRITE_REGB(a, reg, value)
 
#define AT_READ_REGB(a, reg)
 
#define AT_WRITE_REGW(a, reg, value)
 
#define AT_READ_REGW(a, reg, pdata)
 
#define AT_WRITE_REG_ARRAY(a, reg, offset, value)
 
#define AT_READ_REG_ARRAY(a, reg, offset)
 

Enumerations

enum  atl1c_dma_order { atl1c_dma_ord_in = 1, atl1c_dma_ord_enh = 2, atl1c_dma_ord_out = 4 }
 
enum  atl1c_dma_rcb { atl1c_rcb_64 = 0, atl1c_rcb_128 = 1 }
 
enum  atl1c_mac_speed { atl1c_mac_speed_0 = 0, atl1c_mac_speed_10_100 = 1, atl1c_mac_speed_1000 = 2 }
 
enum  atl1c_dma_req_block {
  atl1c_dma_req_128 = 0, atl1c_dma_req_256 = 1, atl1c_dma_req_512 = 2, atl1c_dma_req_1024 = 3,
  atl1c_dma_req_2048 = 4, atl1c_dma_req_4096 = 5
}
 
enum  atl1c_nic_type {
  athr_l1c = 0, athr_l2c = 1, athr_l2c_b, athr_l2c_b2,
  athr_l1d, athr_l1d_2
}
 
enum  atl1c_trans_queue { atl1c_trans_normal = 0, atl1c_trans_high = 1 }
 

Functions

void atl1c_reinit_locked (struct atl1c_adapter *adapter)
 
s32 atl1c_reset_hw (struct atl1c_hw *hw)
 
void atl1c_set_ethtool_ops (struct net_device *netdev)
 

Variables

char atl1c_driver_name []
 
char atl1c_driver_version []
 

Macro Definition Documentation

#define __AT_DOWN   0x0003

Definition at line 531 of file atl1c.h.

#define __AT_RESETTING   0x0002

Definition at line 530 of file atl1c.h.

#define __AT_TESTING   0x0001

Definition at line 529 of file atl1c.h.

#define AT_ASPM_L0S_TIMER   6

Definition at line 91 of file atl1c.h.

#define AT_ASPM_L1_TIMER   12

Definition at line 92 of file atl1c.h.

#define AT_DEF_RECEIVE_QUEUE   1

Definition at line 79 of file atl1c.h.

#define AT_DMA_HI_ADDR_MASK   0xffffffff00000000ULL

Definition at line 82 of file atl1c.h.

#define AT_DMA_LO_ADDR_MASK   0x00000000ffffffffULL

Definition at line 83 of file atl1c.h.

#define AT_EEPROM_LEN   512

Definition at line 102 of file atl1c.h.

#define AT_HW_MAX_IDLE_DELAY   10

Definition at line 88 of file atl1c.h.

#define AT_LCKDET_TIMER   12

Definition at line 93 of file atl1c.h.

#define AT_MAX_INT_WORK   5

Definition at line 86 of file atl1c.h.

#define AT_MAX_RECEIVE_QUEUE   4

Definition at line 78 of file atl1c.h.

#define AT_MAX_TRANSMIT_QUEUE   2

Definition at line 80 of file atl1c.h.

#define AT_READ_REG (   a,
  reg,
  pdata 
)
Value:
do { \
if (unlikely((a)->hibernate)) { \
readl((a)->hw_addr + reg); \
*(u32 *)pdata = readl((a)->hw_addr + reg); \
} else { \
*(u32 *)pdata = readl((a)->hw_addr + reg); \
} \
} while (0)

Definition at line 564 of file atl1c.h.

#define AT_READ_REG_ARRAY (   a,
  reg,
  offset 
)
Value:
( \
readl(((a)->hw_addr + reg) + ((offset) << 2)))

Definition at line 594 of file atl1c.h.

#define AT_READ_REGB (   a,
  reg 
)
Value:
(\
readb((a)->hw_addr + reg))

Definition at line 576 of file atl1c.h.

#define AT_READ_REGW (   a,
  reg,
  pdata 
)
Value:
do { \
if (unlikely((a)->hibernate)) { \
readw((a)->hw_addr + reg); \
*(u16 *)pdata = readw((a)->hw_addr + reg); \
} else { \
*(u16 *)pdata = readw((a)->hw_addr + reg); \
} \
} while (0)

Definition at line 582 of file atl1c.h.

#define AT_REGS_LEN   (74 * sizeof(u32))

Definition at line 101 of file atl1c.h.

#define AT_RX_BUF_SIZE   (ETH_FRAME_LEN + VLAN_HLEN + ETH_FCS_LEN)

Definition at line 75 of file atl1c.h.

#define AT_SUSPEND_LINK_TIMEOUT   100

Definition at line 89 of file atl1c.h.

#define AT_TAG_TO_VLAN (   _tag,
  _vlan 
)
Value:
_vlan = ((((_tag) >> 8) & 0xFF) |\
(((_tag) & 0xFF) << 8))

Definition at line 67 of file atl1c.h.

#define AT_TWSI_EEPROM_TIMEOUT   100

Definition at line 87 of file atl1c.h.

#define AT_TX_WATCHDOG   (5 * HZ)

Definition at line 85 of file atl1c.h.

#define AT_VLAN_TO_TAG (   _vlan,
  _tag 
)
Value:
_tag = ((((_vlan) >> 8) & 0xFF) |\
(((_vlan) & 0xFF) << 8))

Definition at line 63 of file atl1c.h.

#define AT_WRITE_FLUSH (   a)
Value:
(\
readl((a)->hw_addr))

Definition at line 561 of file atl1c.h.

#define AT_WRITE_REG (   a,
  reg,
  value 
)
Value:
( \
writel((value), ((a)->hw_addr + reg)))

Definition at line 558 of file atl1c.h.

#define AT_WRITE_REG_ARRAY (   a,
  reg,
  offset,
  value 
)
Value:
( \
writel((value), (((a)->hw_addr + reg) + ((offset) << 2))))

Definition at line 591 of file atl1c.h.

#define AT_WRITE_REGB (   a,
  reg,
  value 
)
Value:
(\
writeb((value), ((a)->hw_addr + reg)))

Definition at line 573 of file atl1c.h.

#define AT_WRITE_REGW (   a,
  reg,
  value 
)
Value:
(\
writew((value), ((a)->hw_addr + reg)))

Definition at line 579 of file atl1c.h.

#define AT_WUFC_BC   0x00000010 /* Broadcast Wakeup Enable */

Definition at line 61 of file atl1c.h.

#define AT_WUFC_EX   0x00000004 /* Directed Exact Wakeup Enable */

Definition at line 59 of file atl1c.h.

#define AT_WUFC_LNKC   0x00000001 /* Link Status Change Wakeup Enable */

Definition at line 57 of file atl1c.h.

#define AT_WUFC_MAG   0x00000002 /* Magic Packet Wakeup Enable */

Definition at line 58 of file atl1c.h.

#define AT_WUFC_MC   0x00000008 /* Multicast Wakeup Enable */

Definition at line 60 of file atl1c.h.

#define ATL1C_APS_MODE_ENABLE   0x0800

Definition at line 418 of file atl1c.h.

#define ATL1C_ASPM_CTRL_MON   0x0200

Definition at line 416 of file atl1c.h.

#define ATL1C_ASPM_L0s_ENABLE   0x0001

Definition at line 98 of file atl1c.h.

#define ATL1C_ASPM_L0S_SUPPORT   0x0080

Definition at line 414 of file atl1c.h.

#define ATL1C_ASPM_L1_ENABLE   0x0002

Definition at line 99 of file atl1c.h.

#define ATL1C_ASPM_L1_SUPPORT   0x0100

Definition at line 415 of file atl1c.h.

#define ATL1C_BUFFER_BUSY   0x0002

Definition at line 461 of file atl1c.h.

#define ATL1C_BUFFER_FREE   0x0001

Definition at line 460 of file atl1c.h.

#define ATL1C_BUFFER_STATE_MASK   0x0003

Definition at line 462 of file atl1c.h.

#define ATL1C_CLK_GATING_EN   0x2000

Definition at line 420 of file atl1c.h.

#define ATL1C_CMB_ENABLE   0x0004

Definition at line 410 of file atl1c.h.

#define ATL1C_FPGA_VERSION   0x8000

Definition at line 421 of file atl1c.h.

#define ATL1C_GET_DESC (   R,
  i,
  type 
)    (&(((type *)((R)->desc))[i]))

Definition at line 104 of file atl1c.h.

#define ATL1C_HIB_DISABLE   0x0400

Definition at line 417 of file atl1c.h.

#define ATL1C_INTR_CLEAR_ON_READ   0x0001

Definition at line 408 of file atl1c.h.

#define ATL1C_INTR_MODRT_ENABLE   0x0002

Definition at line 409 of file atl1c.h.

#define ATL1C_LINK_CAP_1000M   0x0001

Definition at line 423 of file atl1c.h.

#define ATL1C_LINK_EXT_SYNC   0x1000

Definition at line 419 of file atl1c.h.

#define ATL1C_PCIE_L0S_L1_DISABLE   0x01

Definition at line 95 of file atl1c.h.

#define ATL1C_PCIE_PHY_RESET   0x02

Definition at line 96 of file atl1c.h.

#define ATL1C_PCIMAP_DIRECTION_MASK   0x0030

Definition at line 470 of file atl1c.h.

#define ATL1C_PCIMAP_FROMDEVICE   0x0020

Definition at line 469 of file atl1c.h.

#define ATL1C_PCIMAP_PAGE   0x0008

Definition at line 465 of file atl1c.h.

#define ATL1C_PCIMAP_SINGLE   0x0004

Definition at line 464 of file atl1c.h.

#define ATL1C_PCIMAP_TODEVICE   0x0010

Definition at line 468 of file atl1c.h.

#define ATL1C_PCIMAP_TYPE_MASK   0x000C

Definition at line 466 of file atl1c.h.

#define ATL1C_RFD_DESC (   R,
  i 
)    ATL1C_GET_DESC(R, i, struct atl1c_rx_free_desc)

Definition at line 105 of file atl1c.h.

#define ATL1C_RRD_DESC (   R,
  i 
)    ATL1C_GET_DESC(R, i, struct atl1c_recv_ret_status)

Definition at line 107 of file atl1c.h.

#define ATL1C_RX_IPV6_CHKSUM   0x0040

Definition at line 413 of file atl1c.h.

#define ATL1C_SET_BUFFER_STATE (   buff,
  state 
)
Value:
do { \
((buff)->flags) &= ~ATL1C_BUFFER_STATE_MASK; \
((buff)->flags) |= (state); \
} while (0)

Definition at line 474 of file atl1c.h.

#define ATL1C_SET_PCIMAP_TYPE (   buff,
  type,
  direction 
)
Value:
do { \
((buff)->flags) &= ~ATL1C_PCIMAP_TYPE_MASK; \
((buff)->flags) |= (type); \
((buff)->flags) |= (direction); \
} while (0)

Definition at line 479 of file atl1c.h.

#define ATL1C_SMB_ENABLE   0x0010

Definition at line 411 of file atl1c.h.

#define ATL1C_TPD_DESC (   R,
  i 
)    ATL1C_GET_DESC(R, i, struct atl1c_tpd_desc)

Definition at line 106 of file atl1c.h.

#define ATL1C_TXQ_MODE_ENHANCE   0x0020

Definition at line 412 of file atl1c.h.

#define ATL1C_WORK_EVENT_LINK_CHANGE   1

Definition at line 534 of file atl1c.h.

#define ATL1C_WORK_EVENT_RESET   0

Definition at line 533 of file atl1c.h.

#define FULL_DUPLEX   2

Definition at line 73 of file atl1c.h.

#define HALF_DUPLEX   1

Definition at line 72 of file atl1c.h.

#define MAX_JUMBO_FRAME_SIZE   (6*1024)

Definition at line 76 of file atl1c.h.

#define MEDIA_TYPE_100M_FULL   1

Definition at line 395 of file atl1c.h.

#define MEDIA_TYPE_100M_HALF   2

Definition at line 396 of file atl1c.h.

#define MEDIA_TYPE_10M_FULL   3

Definition at line 397 of file atl1c.h.

#define MEDIA_TYPE_10M_HALF   4

Definition at line 398 of file atl1c.h.

#define MEDIA_TYPE_AUTO_SENSOR   0

Definition at line 394 of file atl1c.h.

#define RRS_802_3_LEN_ERR   0x40000000

Definition at line 242 of file atl1c.h.

#define RRS_802_3_LEN_ERR_MASK   0x0001

Definition at line 232 of file atl1c.h.

#define RRS_802_3_LEN_ERR_SHIFT   30

Definition at line 233 of file atl1c.h.

#define RRS_CPU_NUM_MASK   0x0003

Definition at line 182 of file atl1c.h.

#define RRS_CPU_NUM_SHIFT   10

Definition at line 183 of file atl1c.h.

#define RRS_ERR_IP_CSUM   0x00008000

Definition at line 238 of file atl1c.h.

#define RRS_ERR_IP_CSUM_MASK   0x0001

Definition at line 206 of file atl1c.h.

#define RRS_ERR_IP_CSUM_SHIFT   15

Definition at line 207 of file atl1c.h.

#define RRS_ERR_L4_CSUM   0x00004000

Definition at line 237 of file atl1c.h.

#define RRS_ERR_L4_CSUM_MASK   0x0001

Definition at line 204 of file atl1c.h.

#define RRS_ERR_L4_CSUM_SHIFT   14

Definition at line 205 of file atl1c.h.

#define RRS_FIFO_FULL_MASK   0x0001

Definition at line 230 of file atl1c.h.

#define RRS_FIFO_FULL_SHIFT   29

Definition at line 231 of file atl1c.h.

#define RRS_HASH_FLG_MASK   0x000F

Definition at line 184 of file atl1c.h.

#define RRS_HASH_FLG_SHIFT   12

Definition at line 185 of file atl1c.h.

#define RRS_HDS_TYPE_DATA   2

Definition at line 188 of file atl1c.h.

#define RRS_HDS_TYPE_HEAD   1

Definition at line 187 of file atl1c.h.

#define RRS_HDS_TYPE_MASK   0x0003

Definition at line 180 of file atl1c.h.

#define RRS_HDS_TYPE_SHIFT   8

Definition at line 181 of file atl1c.h.

#define RRS_HEAD_LEN_MASK   0x00FF

Definition at line 178 of file atl1c.h.

#define RRS_HEAD_LEN_SHIFT   0

Definition at line 179 of file atl1c.h.

#define RRS_IS_HDS_DATA (   flag)
Value:
RRS_HDS_TYPE_DATA)

Definition at line 197 of file atl1c.h.

#define RRS_IS_HDS_HEAD (   flag)
Value:
RRS_HDS_TYPE_HEAD)

Definition at line 193 of file atl1c.h.

#define RRS_IS_NO_HDS_TYPE (   flag)    ((((flag) >> (RRS_HDS_TYPE_SHIFT)) & RRS_HDS_TYPE_MASK) == 0)

Definition at line 190 of file atl1c.h.

#define RRS_PACKET_BCAST_MASK   0x0001

Definition at line 224 of file atl1c.h.

#define RRS_PACKET_BCAST_SHIFT   26

Definition at line 225 of file atl1c.h.

#define RRS_PACKET_IS_ETH (   word)
Value:

Definition at line 247 of file atl1c.h.

#define RRS_PACKET_MCAST_MASK   0x0001

Definition at line 226 of file atl1c.h.

#define RRS_PACKET_MCAST_SHIFT   27

Definition at line 227 of file atl1c.h.

#define RRS_PACKET_PROT_IS_IPV4_ONLY (   word)    ((((word) >> RRS_PROT_ID_SHIFT) & RRS_PROT_ID_MASK) == 1)

Definition at line 253 of file atl1c.h.

#define RRS_PACKET_PROT_IS_IPV6_ONLY (   word)    ((((word) >> RRS_PROT_ID_SHIFT) & RRS_PROT_ID_MASK) == 6)

Definition at line 255 of file atl1c.h.

#define RRS_PACKET_TYPE_802_3   1

Definition at line 245 of file atl1c.h.

#define RRS_PACKET_TYPE_ETH   0

Definition at line 246 of file atl1c.h.

#define RRS_PACKET_TYPE_MASK   0x0001

Definition at line 228 of file atl1c.h.

#define RRS_PACKET_TYPE_SHIFT   28

Definition at line 229 of file atl1c.h.

#define RRS_PKT_SIZE_MASK   0x3FFF

Definition at line 202 of file atl1c.h.

#define RRS_PKT_SIZE_SHIFT   0

Definition at line 203 of file atl1c.h.

#define RRS_PROT_ID_MASK   0x0007

Definition at line 210 of file atl1c.h.

#define RRS_PROT_ID_SHIFT   17

Definition at line 211 of file atl1c.h.

#define RRS_RX_CSUM_MASK   0xFFFF

Definition at line 170 of file atl1c.h.

#define RRS_RX_CSUM_SHIFT   0

Definition at line 171 of file atl1c.h.

#define RRS_RX_ERR_CRC   0x00200000

Definition at line 241 of file atl1c.h.

#define RRS_RX_ERR_CRC_MASK   0x0001

Definition at line 214 of file atl1c.h.

#define RRS_RX_ERR_CRC_SHIFT   21

Definition at line 215 of file atl1c.h.

#define RRS_RX_ERR_FAE_MASK   0x0001

Definition at line 216 of file atl1c.h.

#define RRS_RX_ERR_FAE_SHIFT   22

Definition at line 217 of file atl1c.h.

#define RRS_RX_ERR_ICMP_MASK   0x0001

Definition at line 222 of file atl1c.h.

#define RRS_RX_ERR_ICMP_SHIFT   25

Definition at line 223 of file atl1c.h.

#define RRS_RX_ERR_RUNC_MASK   0x0001

Definition at line 220 of file atl1c.h.

#define RRS_RX_ERR_RUNC_SHIFT   24

Definition at line 221 of file atl1c.h.

#define RRS_RX_ERR_SUM   0x00100000

Definition at line 240 of file atl1c.h.

#define RRS_RX_ERR_SUM_MASK   0x0001

Definition at line 212 of file atl1c.h.

#define RRS_RX_ERR_SUM_SHIFT   20

Definition at line 213 of file atl1c.h.

#define RRS_RX_ERR_TRUNC_MASK   0x0001

Definition at line 218 of file atl1c.h.

#define RRS_RX_ERR_TRUNC_SHIFT   23

Definition at line 219 of file atl1c.h.

#define RRS_RX_RFD_CNT_MASK   0x000F

Definition at line 172 of file atl1c.h.

#define RRS_RX_RFD_CNT_SHIFT   16

Definition at line 173 of file atl1c.h.

#define RRS_RX_RFD_INDEX_MASK   0x0FFF

Definition at line 174 of file atl1c.h.

#define RRS_RX_RFD_INDEX_SHIFT   20

Definition at line 175 of file atl1c.h.

#define RRS_RXD_IS_VALID (   word)    ((((word) >> RRS_RXD_UPDATED_SHIFT) & RRS_RXD_UPDATED_MASK) == 1)

Definition at line 250 of file atl1c.h.

#define RRS_RXD_UPDATED   0x80000000

Definition at line 243 of file atl1c.h.

#define RRS_RXD_UPDATED_MASK   0x0001

Definition at line 234 of file atl1c.h.

#define RRS_RXD_UPDATED_SHIFT   31

Definition at line 235 of file atl1c.h.

#define RRS_VLAN_INS   0x00010000

Definition at line 239 of file atl1c.h.

#define RRS_VLAN_INS_MASK   0x0001

Definition at line 208 of file atl1c.h.

#define RRS_VLAN_INS_SHIFT   16

Definition at line 209 of file atl1c.h.

#define SPEED_0   0xffff

Definition at line 71 of file atl1c.h.

#define TPD_CCSUM_EN_MASK   0x0001

Definition at line 122 of file atl1c.h.

#define TPD_CCSUM_EN_SHIFT   8

Definition at line 123 of file atl1c.h.

#define TPD_CCSUM_EPAD_MASK   0x0001

Definition at line 146 of file atl1c.h.

#define TPD_CCSUM_EPAD_SHIFT   30

Definition at line 147 of file atl1c.h.

#define TPD_CCSUM_OFFSET_MASK   0x00FF

Definition at line 144 of file atl1c.h.

#define TPD_CCSUM_OFFSET_SHIFT   18

Definition at line 145 of file atl1c.h.

#define TPD_CON_VTAG_MASK   0x0001

Definition at line 134 of file atl1c.h.

#define TPD_CON_VTAG_SHIFT   14

Definition at line 135 of file atl1c.h.

#define TPD_EOP_MASK   0x0001

Definition at line 153 of file atl1c.h.

#define TPD_EOP_SHIFT   31

Definition at line 154 of file atl1c.h.

#define TPD_ETH_TYPE_MASK   0x0001

Definition at line 140 of file atl1c.h.

#define TPD_ETH_TYPE_SHIFT   17 /* 0 : 802.3 frame; 1 : Ethernet */

Definition at line 141 of file atl1c.h.

#define TPD_INS_VTAG_MASK   0x0001

Definition at line 136 of file atl1c.h.

#define TPD_INS_VTAG_SHIFT   15

Definition at line 137 of file atl1c.h.

#define TPD_IP_CSUM_MASK   0x0001

Definition at line 124 of file atl1c.h.

#define TPD_IP_CSUM_SHIFT   9

Definition at line 125 of file atl1c.h.

#define TPD_IPV4_PACKET_MASK   0x0001 /* valid when LSO VER is 1 */

Definition at line 138 of file atl1c.h.

#define TPD_IPV4_PACKET_SHIFT   16

Definition at line 139 of file atl1c.h.

#define TPD_L4HDR_OFFSET_MASK   0x00FF

Definition at line 110 of file atl1c.h.

#define TPD_L4HDR_OFFSET_SHIFT   0

Definition at line 111 of file atl1c.h.

#define TPD_LSO_EN_MASK   0x0001 /* TCP Large Send Offload */

Definition at line 130 of file atl1c.h.

#define TPD_LSO_EN_SHIFT   12

Definition at line 131 of file atl1c.h.

#define TPD_LSO_VER_MASK   0x0001

Definition at line 132 of file atl1c.h.

#define TPD_LSO_VER_SHIFT   13 /* 0 : ipv4; 1 : ipv4/ipv6 */

Definition at line 133 of file atl1c.h.

#define TPD_MSS_MASK   0x1FFF

Definition at line 150 of file atl1c.h.

#define TPD_MSS_SHIFT   18

Definition at line 151 of file atl1c.h.

#define TPD_PLOADOFFSET_MASK   0x00FF

Definition at line 118 of file atl1c.h.

#define TPD_PLOADOFFSET_SHIFT   0

Definition at line 119 of file atl1c.h.

#define TPD_TCP_CSUM_MASK   0x0001

Definition at line 126 of file atl1c.h.

#define TPD_TCP_CSUM_SHIFT   10

Definition at line 127 of file atl1c.h.

#define TPD_TCPHDR_OFFSET_MASK   0x00FF

Definition at line 114 of file atl1c.h.

#define TPD_TCPHDR_OFFSET_SHIFT   0

Definition at line 115 of file atl1c.h.

#define TPD_UDP_CSUM_MASK   0x0001

Definition at line 128 of file atl1c.h.

#define TPD_UDP_CSUM_SHIFT   11

Definition at line 129 of file atl1c.h.

Enumeration Type Documentation

Enumerator:
atl1c_dma_ord_in 
atl1c_dma_ord_enh 
atl1c_dma_ord_out 

Definition at line 272 of file atl1c.h.

Enumerator:
atl1c_rcb_64 
atl1c_rcb_128 

Definition at line 278 of file atl1c.h.

Enumerator:
atl1c_dma_req_128 
atl1c_dma_req_256 
atl1c_dma_req_512 
atl1c_dma_req_1024 
atl1c_dma_req_2048 
atl1c_dma_req_4096 

Definition at line 289 of file atl1c.h.

Enumerator:
atl1c_mac_speed_0 
atl1c_mac_speed_10_100 
atl1c_mac_speed_1000 

Definition at line 283 of file atl1c.h.

Enumerator:
athr_l1c 
athr_l2c 
athr_l2c_b 
athr_l2c_b2 
athr_l1d 
athr_l1d_2 

Definition at line 299 of file atl1c.h.

Enumerator:
atl1c_trans_normal 
atl1c_trans_high 

Definition at line 308 of file atl1c.h.

Function Documentation

void atl1c_reinit_locked ( struct atl1c_adapter adapter)

Definition at line 238 of file atl1c_main.c.

s32 atl1c_reset_hw ( struct atl1c_hw hw)
void atl1c_set_ethtool_ops ( struct net_device netdev)

Definition at line 306 of file atl1c_ethtool.c.

Variable Documentation

char atl1c_driver_name[]

Definition at line 25 of file atl1c_main.c.

char atl1c_driver_version[]

Definition at line 26 of file atl1c_main.c.