Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Enumerations | Functions
ehea.h File Reference
#include <linux/module.h>
#include <linux/ethtool.h>
#include <linux/vmalloc.h>
#include <linux/if_vlan.h>
#include <asm/ibmebus.h>
#include <asm/io.h>

Go to the source code of this file.

Data Structures

struct  ehea_page
 
struct  hw_queue
 
struct  h_epa
 
struct  h_epa_user
 
struct  h_epas
 
struct  ehea_dir_bmap
 
struct  ehea_top_bmap
 
struct  ehea_bmap
 
struct  ehea_qp_init_attr
 
struct  ehea_eq_attr
 
struct  ehea_eq
 
struct  ehea_qp
 
struct  ehea_cq_attr
 
struct  ehea_cq
 
struct  ehea_mr
 
struct  port_stats
 
struct  ehea_q_skb_arr
 
struct  ehea_port_res
 
struct  ehea_adapter
 
struct  ehea_mc_list
 
struct  ehea_fw_handle_entry
 
struct  ehea_fw_handle_array
 
struct  ehea_bcmc_reg_entry
 
struct  ehea_bcmc_reg_array
 
struct  ehea_port
 
struct  port_res_cfg
 

Macros

#define DRV_NAME   "ehea"
 
#define DRV_VERSION   "EHEA_0107"
 
#define DLPAR_PORT_ADD_REM   1
 
#define DLPAR_MEM_ADD   2
 
#define DLPAR_MEM_REM   4
 
#define EHEA_CAPABILITIES   (DLPAR_PORT_ADD_REM | DLPAR_MEM_ADD | DLPAR_MEM_REM)
 
#define EHEA_MSG_DEFAULT
 
#define EHEA_MAX_ENTRIES_RQ1   32767
 
#define EHEA_MAX_ENTRIES_RQ2   16383
 
#define EHEA_MAX_ENTRIES_RQ3   16383
 
#define EHEA_MAX_ENTRIES_SQ   32767
 
#define EHEA_MIN_ENTRIES_QP   127
 
#define EHEA_SMALL_QUEUES
 
#define EHEA_MAX_CQE_COUNT   1023
 
#define EHEA_DEF_ENTRIES_SQ   1023
 
#define EHEA_DEF_ENTRIES_RQ1   1023
 
#define EHEA_DEF_ENTRIES_RQ2   1023
 
#define EHEA_DEF_ENTRIES_RQ3   511
 
#define EHEA_MAX_ENTRIES_EQ   20
 
#define EHEA_SG_SQ   2
 
#define EHEA_SG_RQ1   1
 
#define EHEA_SG_RQ2   0
 
#define EHEA_SG_RQ3   0
 
#define EHEA_MAX_PACKET_SIZE   9022 /* for jumbo frames */
 
#define EHEA_RQ2_PKT_SIZE   2048
 
#define EHEA_L_PKT_SIZE   256 /* low latency */
 
#define EHEA_PD_ID   0xaabcdeff
 
#define EHEA_RQ2_THRESHOLD   1
 
#define EHEA_RQ3_THRESHOLD   4 /* use RQ3 threshold of 2048 bytes */
 
#define EHEA_SPEED_10G   10000
 
#define EHEA_SPEED_1G   1000
 
#define EHEA_SPEED_100M   100
 
#define EHEA_SPEED_10M   10
 
#define EHEA_SPEED_AUTONEG   0
 
#define EHEA_BCMC_SCOPE_ALL   0x08
 
#define EHEA_BCMC_SCOPE_SINGLE   0x00
 
#define EHEA_BCMC_MULTICAST   0x04
 
#define EHEA_BCMC_BROADCAST   0x00
 
#define EHEA_BCMC_UNTAGGED   0x02
 
#define EHEA_BCMC_TAGGED   0x00
 
#define EHEA_BCMC_VLANID_ALL   0x01
 
#define EHEA_BCMC_VLANID_SINGLE   0x00
 
#define EHEA_CACHE_LINE   128
 
#define EHEA_MR_ACC_CTRL   0x00800000
 
#define EHEA_BUSMAP_START   0x8000000000000000ULL
 
#define EHEA_INVAL_ADDR   0xFFFFFFFFFFFFFFFFULL
 
#define EHEA_DIR_INDEX_SHIFT   13 /* 8k Entries in 64k block */
 
#define EHEA_TOP_INDEX_SHIFT   (EHEA_DIR_INDEX_SHIFT * 2)
 
#define EHEA_MAP_ENTRIES   (1 << EHEA_DIR_INDEX_SHIFT)
 
#define EHEA_MAP_SIZE   (0x10000) /* currently fixed map size */
 
#define EHEA_INDEX_MASK   (EHEA_MAP_ENTRIES - 1)
 
#define EHEA_WATCH_DOG_TIMEOUT   10*HZ
 
#define EHEA_BMASK(pos, length)   (((pos) << 16) + (length))
 
#define EHEA_BMASK_IBM(from, to)   (((63 - to) << 16) + ((to) - (from) + 1))
 
#define EHEA_BMASK_SHIFTPOS(mask)   (((mask) >> 16) & 0xffff)
 
#define EHEA_BMASK_MASK(mask)   (0xffffffffffffffffULL >> ((64 - (mask)) & 0xffff))
 
#define EHEA_BMASK_SET(mask, value)   ((EHEA_BMASK_MASK(mask) & ((u64)(value))) << EHEA_BMASK_SHIFTPOS(mask))
 
#define EHEA_BMASK_GET(mask, value)   (EHEA_BMASK_MASK(mask) & (((u64)(value)) >> EHEA_BMASK_SHIFTPOS(mask)))
 
#define EHEA_IRQ_NAME_SIZE   20
 
#define EHEA_MAX_PORTS   16
 
#define EHEA_NUM_PORTRES_FW_HANDLES
 
#define EHEA_NUM_PORT_FW_HANDLES   1 /* EQ handle */
 
#define EHEA_NUM_ADAPTER_FW_HANDLES   2 /* MR handle, NEQ handle */
 
#define EHEA_PORT_UP   1
 
#define EHEA_PORT_DOWN   0
 
#define EHEA_PHY_LINK_UP   1
 
#define EHEA_PHY_LINK_DOWN   0
 
#define EHEA_MAX_PORT_RES   16
 

Enumerations

enum  ehea_flag_bits { __EHEA_STOP_XFER, __EHEA_DISABLE_PORT_RESET }
 

Functions

void ehea_dump (void *adr, int len, char *msg)
 
void ehea_set_ethtool_ops (struct net_device *netdev)
 
int ehea_sense_port_attr (struct ehea_port *port)
 
int ehea_set_portspeed (struct ehea_port *port, u32 port_speed)
 

Macro Definition Documentation

#define DLPAR_MEM_ADD   2

Definition at line 45 of file ehea.h.

#define DLPAR_MEM_REM   4

Definition at line 46 of file ehea.h.

#define DLPAR_PORT_ADD_REM   1

Definition at line 44 of file ehea.h.

#define DRV_NAME   "ehea"

Definition at line 40 of file ehea.h.

#define DRV_VERSION   "EHEA_0107"

Definition at line 41 of file ehea.h.

#define EHEA_BCMC_BROADCAST   0x00

Definition at line 103 of file ehea.h.

#define EHEA_BCMC_MULTICAST   0x04

Definition at line 102 of file ehea.h.

#define EHEA_BCMC_SCOPE_ALL   0x08

Definition at line 100 of file ehea.h.

#define EHEA_BCMC_SCOPE_SINGLE   0x00

Definition at line 101 of file ehea.h.

#define EHEA_BCMC_TAGGED   0x00

Definition at line 105 of file ehea.h.

#define EHEA_BCMC_UNTAGGED   0x02

Definition at line 104 of file ehea.h.

#define EHEA_BCMC_VLANID_ALL   0x01

Definition at line 106 of file ehea.h.

#define EHEA_BCMC_VLANID_SINGLE   0x00

Definition at line 107 of file ehea.h.

#define EHEA_BMASK (   pos,
  length 
)    (((pos) << 16) + (length))

Definition at line 129 of file ehea.h.

#define EHEA_BMASK_GET (   mask,
  value 
)    (EHEA_BMASK_MASK(mask) & (((u64)(value)) >> EHEA_BMASK_SHIFTPOS(mask)))

Definition at line 141 of file ehea.h.

#define EHEA_BMASK_IBM (   from,
  to 
)    (((63 - to) << 16) + ((to) - (from) + 1))

Definition at line 131 of file ehea.h.

#define EHEA_BMASK_MASK (   mask)    (0xffffffffffffffffULL >> ((64 - (mask)) & 0xffff))

Definition at line 135 of file ehea.h.

#define EHEA_BMASK_SET (   mask,
  value 
)    ((EHEA_BMASK_MASK(mask) & ((u64)(value))) << EHEA_BMASK_SHIFTPOS(mask))

Definition at line 138 of file ehea.h.

#define EHEA_BMASK_SHIFTPOS (   mask)    (((mask) >> 16) & 0xffff)

Definition at line 133 of file ehea.h.

#define EHEA_BUSMAP_START   0x8000000000000000ULL

Definition at line 114 of file ehea.h.

#define EHEA_CACHE_LINE   128

Definition at line 109 of file ehea.h.

#define EHEA_CAPABILITIES   (DLPAR_PORT_ADD_REM | DLPAR_MEM_ADD | DLPAR_MEM_REM)

Definition at line 47 of file ehea.h.

#define EHEA_DEF_ENTRIES_RQ1   1023

Definition at line 63 of file ehea.h.

#define EHEA_DEF_ENTRIES_RQ2   1023

Definition at line 64 of file ehea.h.

#define EHEA_DEF_ENTRIES_RQ3   511

Definition at line 65 of file ehea.h.

#define EHEA_DEF_ENTRIES_SQ   1023

Definition at line 62 of file ehea.h.

#define EHEA_DIR_INDEX_SHIFT   13 /* 8k Entries in 64k block */

Definition at line 116 of file ehea.h.

#define EHEA_INDEX_MASK   (EHEA_MAP_ENTRIES - 1)

Definition at line 120 of file ehea.h.

#define EHEA_INVAL_ADDR   0xFFFFFFFFFFFFFFFFULL

Definition at line 115 of file ehea.h.

#define EHEA_IRQ_NAME_SIZE   20

Definition at line 340 of file ehea.h.

#define EHEA_L_PKT_SIZE   256 /* low latency */

Definition at line 83 of file ehea.h.

#define EHEA_MAP_ENTRIES   (1 << EHEA_DIR_INDEX_SHIFT)

Definition at line 118 of file ehea.h.

#define EHEA_MAP_SIZE   (0x10000) /* currently fixed map size */

Definition at line 119 of file ehea.h.

#define EHEA_MAX_CQE_COUNT   1023

Definition at line 61 of file ehea.h.

#define EHEA_MAX_ENTRIES_EQ   20

Definition at line 74 of file ehea.h.

#define EHEA_MAX_ENTRIES_RQ1   32767

Definition at line 52 of file ehea.h.

#define EHEA_MAX_ENTRIES_RQ2   16383

Definition at line 53 of file ehea.h.

#define EHEA_MAX_ENTRIES_RQ3   16383

Definition at line 54 of file ehea.h.

#define EHEA_MAX_ENTRIES_SQ   32767

Definition at line 55 of file ehea.h.

#define EHEA_MAX_PACKET_SIZE   9022 /* for jumbo frames */

Definition at line 81 of file ehea.h.

#define EHEA_MAX_PORT_RES   16

Definition at line 438 of file ehea.h.

#define EHEA_MAX_PORTS   16

Definition at line 384 of file ehea.h.

#define EHEA_MIN_ENTRIES_QP   127

Definition at line 56 of file ehea.h.

#define EHEA_MR_ACC_CTRL   0x00800000

Definition at line 112 of file ehea.h.

#define EHEA_MSG_DEFAULT
Value:

Definition at line 49 of file ehea.h.

#define EHEA_NUM_ADAPTER_FW_HANDLES   2 /* MR handle, NEQ handle */

Definition at line 388 of file ehea.h.

#define EHEA_NUM_PORT_FW_HANDLES   1 /* EQ handle */

Definition at line 387 of file ehea.h.

#define EHEA_NUM_PORTRES_FW_HANDLES
Value:
6 /* QP handle, SendCQ handle,
RecvCQ handle, EQ handle,
SendMR handle, RecvMR handle */

Definition at line 386 of file ehea.h.

#define EHEA_PD_ID   0xaabcdeff

Definition at line 88 of file ehea.h.

#define EHEA_PHY_LINK_DOWN   0

Definition at line 437 of file ehea.h.

#define EHEA_PHY_LINK_UP   1

Definition at line 436 of file ehea.h.

#define EHEA_PORT_DOWN   0

Definition at line 435 of file ehea.h.

#define EHEA_PORT_UP   1

Definition at line 434 of file ehea.h.

#define EHEA_RQ2_PKT_SIZE   2048

Definition at line 82 of file ehea.h.

#define EHEA_RQ2_THRESHOLD   1

Definition at line 90 of file ehea.h.

#define EHEA_RQ3_THRESHOLD   4 /* use RQ3 threshold of 2048 bytes */

Definition at line 91 of file ehea.h.

#define EHEA_SG_RQ1   1

Definition at line 77 of file ehea.h.

#define EHEA_SG_RQ2   0

Definition at line 78 of file ehea.h.

#define EHEA_SG_RQ3   0

Definition at line 79 of file ehea.h.

#define EHEA_SG_SQ   2

Definition at line 76 of file ehea.h.

#define EHEA_SMALL_QUEUES

Definition at line 58 of file ehea.h.

#define EHEA_SPEED_100M   100

Definition at line 95 of file ehea.h.

#define EHEA_SPEED_10G   10000

Definition at line 93 of file ehea.h.

#define EHEA_SPEED_10M   10

Definition at line 96 of file ehea.h.

#define EHEA_SPEED_1G   1000

Definition at line 94 of file ehea.h.

#define EHEA_SPEED_AUTONEG   0

Definition at line 97 of file ehea.h.

#define EHEA_TOP_INDEX_SHIFT   (EHEA_DIR_INDEX_SHIFT * 2)

Definition at line 117 of file ehea.h.

#define EHEA_WATCH_DOG_TIMEOUT   10*HZ

Definition at line 123 of file ehea.h.

Enumeration Type Documentation

Enumerator:
__EHEA_STOP_XFER 
__EHEA_DISABLE_PORT_RESET 

Definition at line 479 of file ehea.h.

Function Documentation

void ehea_dump ( void adr,
int  len,
char msg 
)

Definition at line 125 of file ehea_main.c.

int ehea_sense_port_attr ( struct ehea_port port)

Definition at line 988 of file ehea_main.c.

void ehea_set_ethtool_ops ( struct net_device netdev)

Definition at line 279 of file ehea_ethtool.c.

int ehea_set_portspeed ( struct ehea_port port,
u32  port_speed 
)

Definition at line 1074 of file ehea_main.c.