Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions | Variables
qib_qsfp.h File Reference

Go to the source code of this file.

Data Structures

struct  qib_qsfp_cache
 
struct  qib_qsfp_data
 

Macros

#define QSFP_DEV   0xA0
 
#define QSFP_PWR_LAG_MSEC   2000
 
#define QSFP_MODPRS_LAG_MSEC   20
 
#define QSFP_GPIO_MOD_SEL_N   (4)
 
#define QSFP_GPIO_MOD_PRS_N   (8)
 
#define QSFP_GPIO_INT_N   (0x10)
 
#define QSFP_GPIO_MOD_RST_N   (0x20)
 
#define QSFP_GPIO_LP_MODE   (0x40)
 
#define QSFP_GPIO_PORT2_SHIFT   5
 
#define QSFP_PAGESIZE   128
 
#define QSFP_MOD_ID_OFFS   128
 
#define QSFP_MOD_PWR_OFFS   129
 
#define QSFP_MOD_LEN_OFFS   146
 
#define QSFP_MOD_TECH_OFFS   147
 
#define QSFP_IS_ACTIVE(tech)   ((0xA2FF >> ((tech) >> 4)) & 1)
 
#define QSFP_IS_ACTIVE_FAR(tech)   ((0x32FF >> ((tech) >> 4)) & 1)
 
#define QSFP_HAS_ATTEN(tech)   ((0x4D00 >> ((tech) >> 4)) & 1)
 
#define QSFP_IS_CU(tech)   ((0xED00 >> ((tech) >> 4)) & 1)
 
#define QSFP_TECH_1490   9
 
#define QSFP_OUI(oui)
 
#define QSFP_OUI_AMPHENOL   0x415048
 
#define QSFP_OUI_FINISAR   0x009065
 
#define QSFP_OUI_GORE   0x002177
 
#define QSFP_VEND_OFFS   148
 
#define QSFP_VEND_LEN   16
 
#define QSFP_IBXCV_OFFS   164
 
#define QSFP_VOUI_OFFS   165
 
#define QSFP_VOUI_LEN   3
 
#define QSFP_PN_OFFS   168
 
#define QSFP_PN_LEN   16
 
#define QSFP_REV_OFFS   184
 
#define QSFP_REV_LEN   2
 
#define QSFP_ATTEN_OFFS   186
 
#define QSFP_ATTEN_LEN   2
 
#define QSFP_CC_OFFS   191
 
#define QSFP_SN_OFFS   196
 
#define QSFP_SN_LEN   16
 
#define QSFP_DATE_OFFS   212
 
#define QSFP_DATE_LEN   6
 
#define QSFP_LOT_OFFS   218
 
#define QSFP_LOT_LEN   2
 
#define QSFP_CC_EXT_OFFS   223
 
#define QSFP_PWR(pbyte)   (((pbyte) >> 6) & 3)
 
#define QSFP_ATTEN_SDR(attenarray)   (attenarray[0])
 
#define QSFP_ATTEN_DDR(attenarray)   (attenarray[1])
 

Functions

int qib_refresh_qsfp_cache (struct qib_pportdata *ppd, struct qib_qsfp_cache *cp)
 
int qib_qsfp_mod_present (struct qib_pportdata *ppd)
 
void qib_qsfp_init (struct qib_qsfp_data *qd, void(*fevent)(struct work_struct *))
 
void qib_qsfp_deinit (struct qib_qsfp_data *qd)
 

Variables

const char *const qib_qsfp_devtech [16]
 

Macro Definition Documentation

#define QSFP_ATTEN_DDR (   attenarray)    (attenarray[1])

Definition at line 173 of file qib_qsfp.h.

#define QSFP_ATTEN_LEN   2

Definition at line 117 of file qib_qsfp.h.

#define QSFP_ATTEN_OFFS   186

Definition at line 116 of file qib_qsfp.h.

#define QSFP_ATTEN_SDR (   attenarray)    (attenarray[0])

Definition at line 172 of file qib_qsfp.h.

#define QSFP_CC_EXT_OFFS   223

Definition at line 134 of file qib_qsfp.h.

#define QSFP_CC_OFFS   191

Definition at line 121 of file qib_qsfp.h.

#define QSFP_DATE_LEN   6

Definition at line 128 of file qib_qsfp.h.

#define QSFP_DATE_OFFS   212

Definition at line 127 of file qib_qsfp.h.

#define QSFP_DEV   0xA0

Definition at line 35 of file qib_qsfp.h.

#define QSFP_GPIO_INT_N   (0x10)

Definition at line 46 of file qib_qsfp.h.

#define QSFP_GPIO_LP_MODE   (0x40)

Definition at line 48 of file qib_qsfp.h.

#define QSFP_GPIO_MOD_PRS_N   (8)

Definition at line 45 of file qib_qsfp.h.

#define QSFP_GPIO_MOD_RST_N   (0x20)

Definition at line 47 of file qib_qsfp.h.

#define QSFP_GPIO_MOD_SEL_N   (4)

Definition at line 44 of file qib_qsfp.h.

#define QSFP_GPIO_PORT2_SHIFT   5

Definition at line 49 of file qib_qsfp.h.

#define QSFP_HAS_ATTEN (   tech)    ((0x4D00 >> ((tech) >> 4)) & 1)

Definition at line 86 of file qib_qsfp.h.

#define QSFP_IBXCV_OFFS   164

Definition at line 101 of file qib_qsfp.h.

#define QSFP_IS_ACTIVE (   tech)    ((0xA2FF >> ((tech) >> 4)) & 1)

Definition at line 82 of file qib_qsfp.h.

#define QSFP_IS_ACTIVE_FAR (   tech)    ((0x32FF >> ((tech) >> 4)) & 1)

Definition at line 84 of file qib_qsfp.h.

#define QSFP_IS_CU (   tech)    ((0xED00 >> ((tech) >> 4)) & 1)

Definition at line 88 of file qib_qsfp.h.

#define QSFP_LOT_LEN   2

Definition at line 131 of file qib_qsfp.h.

#define QSFP_LOT_OFFS   218

Definition at line 130 of file qib_qsfp.h.

#define QSFP_MOD_ID_OFFS   128

Definition at line 61 of file qib_qsfp.h.

#define QSFP_MOD_LEN_OFFS   146

Definition at line 74 of file qib_qsfp.h.

#define QSFP_MOD_PWR_OFFS   129

Definition at line 66 of file qib_qsfp.h.

#define QSFP_MOD_TECH_OFFS   147

Definition at line 79 of file qib_qsfp.h.

#define QSFP_MODPRS_LAG_MSEC   20

Definition at line 37 of file qib_qsfp.h.

#define QSFP_OUI (   oui)
Value:
(((unsigned)oui[0] << 16) | ((unsigned)oui[1] << 8) | \
oui[2])

Definition at line 91 of file qib_qsfp.h.

#define QSFP_OUI_AMPHENOL   0x415048

Definition at line 93 of file qib_qsfp.h.

#define QSFP_OUI_FINISAR   0x009065

Definition at line 94 of file qib_qsfp.h.

#define QSFP_OUI_GORE   0x002177

Definition at line 95 of file qib_qsfp.h.

#define QSFP_PAGESIZE   128

Definition at line 51 of file qib_qsfp.h.

#define QSFP_PN_LEN   16

Definition at line 107 of file qib_qsfp.h.

#define QSFP_PN_OFFS   168

Definition at line 106 of file qib_qsfp.h.

#define QSFP_PWR (   pbyte)    (((pbyte) >> 6) & 3)

Definition at line 171 of file qib_qsfp.h.

#define QSFP_PWR_LAG_MSEC   2000

Definition at line 36 of file qib_qsfp.h.

#define QSFP_REV_LEN   2

Definition at line 110 of file qib_qsfp.h.

#define QSFP_REV_OFFS   184

Definition at line 109 of file qib_qsfp.h.

#define QSFP_SN_LEN   16

Definition at line 125 of file qib_qsfp.h.

#define QSFP_SN_OFFS   196

Definition at line 124 of file qib_qsfp.h.

#define QSFP_TECH_1490   9

Definition at line 89 of file qib_qsfp.h.

#define QSFP_VEND_LEN   16

Definition at line 99 of file qib_qsfp.h.

#define QSFP_VEND_OFFS   148

Definition at line 98 of file qib_qsfp.h.

#define QSFP_VOUI_LEN   3

Definition at line 104 of file qib_qsfp.h.

#define QSFP_VOUI_OFFS   165

Definition at line 103 of file qib_qsfp.h.

Function Documentation

void qib_qsfp_deinit ( struct qib_qsfp_data qd)

Definition at line 486 of file qib_qsfp.c.

void qib_qsfp_init ( struct qib_qsfp_data qd,
void(*)(struct work_struct *)  fevent 
)

Definition at line 458 of file qib_qsfp.c.

int qib_qsfp_mod_present ( struct qib_pportdata ppd)

Definition at line 441 of file qib_qsfp.c.

int qib_refresh_qsfp_cache ( struct qib_pportdata ppd,
struct qib_qsfp_cache cp 
)

Definition at line 271 of file qib_qsfp.c.

Variable Documentation

const char* const qib_qsfp_devtech[16]

Definition at line 429 of file qib_qsfp.c.