Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions
qib_iba6120.c File Reference
#include <linux/interrupt.h>
#include <linux/pci.h>
#include <linux/delay.h>
#include <rdma/ib_verbs.h>
#include "qib.h"
#include "qib_6120_regs.h"

Go to the source code of this file.

Data Structures

struct  qib_chip_specific
 

Macros

#define KREG_IDX(regname)   (QIB_6120_##regname##_OFFS / sizeof(u64))
 
#define kr_extctrl   KREG_IDX(EXTCtrl)
 
#define kr_extstatus   KREG_IDX(EXTStatus)
 
#define kr_gpio_clear   KREG_IDX(GPIOClear)
 
#define kr_gpio_mask   KREG_IDX(GPIOMask)
 
#define kr_gpio_out   KREG_IDX(GPIOOut)
 
#define kr_gpio_status   KREG_IDX(GPIOStatus)
 
#define kr_rcvctrl   KREG_IDX(RcvCtrl)
 
#define kr_sendctrl   KREG_IDX(SendCtrl)
 
#define kr_partitionkey   KREG_IDX(RcvPartitionKey)
 
#define kr_hwdiagctrl   KREG_IDX(HwDiagCtrl)
 
#define kr_ibcstatus   KREG_IDX(IBCStatus)
 
#define kr_ibcctrl   KREG_IDX(IBCCtrl)
 
#define kr_sendbuffererror   KREG_IDX(SendBufErr0)
 
#define kr_rcvbthqp   KREG_IDX(RcvBTHQP)
 
#define kr_counterregbase   KREG_IDX(CntrRegBase)
 
#define kr_palign   KREG_IDX(PageAlign)
 
#define kr_rcvegrbase   KREG_IDX(RcvEgrBase)
 
#define kr_rcvegrcnt   KREG_IDX(RcvEgrCnt)
 
#define kr_rcvhdrcnt   KREG_IDX(RcvHdrCnt)
 
#define kr_rcvhdrentsize   KREG_IDX(RcvHdrEntSize)
 
#define kr_rcvhdrsize   KREG_IDX(RcvHdrSize)
 
#define kr_rcvtidbase   KREG_IDX(RcvTIDBase)
 
#define kr_rcvtidcnt   KREG_IDX(RcvTIDCnt)
 
#define kr_scratch   KREG_IDX(Scratch)
 
#define kr_sendctrl   KREG_IDX(SendCtrl)
 
#define kr_sendpioavailaddr   KREG_IDX(SendPIOAvailAddr)
 
#define kr_sendpiobufbase   KREG_IDX(SendPIOBufBase)
 
#define kr_sendpiobufcnt   KREG_IDX(SendPIOBufCnt)
 
#define kr_sendpiosize   KREG_IDX(SendPIOSize)
 
#define kr_sendregbase   KREG_IDX(SendRegBase)
 
#define kr_userregbase   KREG_IDX(UserRegBase)
 
#define kr_control   KREG_IDX(Control)
 
#define kr_intclear   KREG_IDX(IntClear)
 
#define kr_intmask   KREG_IDX(IntMask)
 
#define kr_intstatus   KREG_IDX(IntStatus)
 
#define kr_errclear   KREG_IDX(ErrClear)
 
#define kr_errmask   KREG_IDX(ErrMask)
 
#define kr_errstatus   KREG_IDX(ErrStatus)
 
#define kr_hwerrclear   KREG_IDX(HwErrClear)
 
#define kr_hwerrmask   KREG_IDX(HwErrMask)
 
#define kr_hwerrstatus   KREG_IDX(HwErrStatus)
 
#define kr_revision   KREG_IDX(Revision)
 
#define kr_portcnt   KREG_IDX(PortCnt)
 
#define kr_serdes_cfg0   KREG_IDX(SerdesCfg0)
 
#define kr_serdes_cfg1   (kr_serdes_cfg0 + 1)
 
#define kr_serdes_stat   KREG_IDX(SerdesStat)
 
#define kr_xgxs_cfg   KREG_IDX(XGXSCfg)
 
#define kr_rcvhdraddr   KREG_IDX(RcvHdrAddr0)
 
#define kr_rcvhdrtailaddr   KREG_IDX(RcvHdrTailAddr0)
 
#define CREG_IDX(regname)
 
#define cr_badformat   CREG_IDX(RxBadFormatCnt)
 
#define cr_erricrc   CREG_IDX(RxICRCErrCnt)
 
#define cr_errlink   CREG_IDX(RxLinkProblemCnt)
 
#define cr_errlpcrc   CREG_IDX(RxLPCRCErrCnt)
 
#define cr_errpkey   CREG_IDX(RxPKeyMismatchCnt)
 
#define cr_rcvflowctrl_err   CREG_IDX(RxFlowCtrlErrCnt)
 
#define cr_err_rlen   CREG_IDX(RxLenErrCnt)
 
#define cr_errslen   CREG_IDX(TxLenErrCnt)
 
#define cr_errtidfull   CREG_IDX(RxTIDFullErrCnt)
 
#define cr_errtidvalid   CREG_IDX(RxTIDValidErrCnt)
 
#define cr_errvcrc   CREG_IDX(RxVCRCErrCnt)
 
#define cr_ibstatuschange   CREG_IDX(IBStatusChangeCnt)
 
#define cr_lbint   CREG_IDX(LBIntCnt)
 
#define cr_invalidrlen   CREG_IDX(RxMaxMinLenErrCnt)
 
#define cr_invalidslen   CREG_IDX(TxMaxMinLenErrCnt)
 
#define cr_lbflowstall   CREG_IDX(LBFlowStallCnt)
 
#define cr_pktrcv   CREG_IDX(RxDataPktCnt)
 
#define cr_pktrcvflowctrl   CREG_IDX(RxFlowPktCnt)
 
#define cr_pktsend   CREG_IDX(TxDataPktCnt)
 
#define cr_pktsendflow   CREG_IDX(TxFlowPktCnt)
 
#define cr_portovfl   CREG_IDX(RxP0HdrEgrOvflCnt)
 
#define cr_rcvebp   CREG_IDX(RxEBPCnt)
 
#define cr_rcvovfl   CREG_IDX(RxBufOvflCnt)
 
#define cr_senddropped   CREG_IDX(TxDroppedPktCnt)
 
#define cr_sendstall   CREG_IDX(TxFlowStallCnt)
 
#define cr_sendunderrun   CREG_IDX(TxUnderrunCnt)
 
#define cr_wordrcv   CREG_IDX(RxDwordCnt)
 
#define cr_wordsend   CREG_IDX(TxDwordCnt)
 
#define cr_txunsupvl   CREG_IDX(TxUnsupVLErrCnt)
 
#define cr_rxdroppkt   CREG_IDX(RxDroppedPktCnt)
 
#define cr_iblinkerrrecov   CREG_IDX(IBLinkErrRecoveryCnt)
 
#define cr_iblinkdown   CREG_IDX(IBLinkDownedCnt)
 
#define cr_ibsymbolerr   CREG_IDX(IBSymbolErrCnt)
 
#define SYM_RMASK(regname, fldname)
 
#define SYM_MASK(regname, fldname)
 
#define SYM_LSB(regname, fldname)   (QIB_6120_##regname##_##fldname##_LSB)
 
#define SYM_FIELD(value, regname, fldname)
 
#define ERR_MASK(fldname)   SYM_MASK(ErrMask, fldname##Mask)
 
#define HWE_MASK(fldname)   SYM_MASK(HwErrMask, fldname##Mask)
 
#define IB_6120_LT_STATE_DISABLED   0x00
 
#define IB_6120_LT_STATE_LINKUP   0x01
 
#define IB_6120_LT_STATE_POLLACTIVE   0x02
 
#define IB_6120_LT_STATE_POLLQUIET   0x03
 
#define IB_6120_LT_STATE_SLEEPDELAY   0x04
 
#define IB_6120_LT_STATE_SLEEPQUIET   0x05
 
#define IB_6120_LT_STATE_CFGDEBOUNCE   0x08
 
#define IB_6120_LT_STATE_CFGRCVFCFG   0x09
 
#define IB_6120_LT_STATE_CFGWAITRMT   0x0a
 
#define IB_6120_LT_STATE_CFGIDLE   0x0b
 
#define IB_6120_LT_STATE_RECOVERRETRAIN   0x0c
 
#define IB_6120_LT_STATE_RECOVERWAITRMT   0x0e
 
#define IB_6120_LT_STATE_RECOVERIDLE   0x0f
 
#define IB_6120_L_STATE_DOWN   0x0
 
#define IB_6120_L_STATE_INIT   0x1
 
#define IB_6120_L_STATE_ARM   0x2
 
#define IB_6120_L_STATE_ACTIVE   0x3
 
#define IB_6120_L_STATE_ACT_DEFER   0x4
 
#define QLOGIC_IB_IBCC_LINKINITCMD_DISABLE   1
 
#define QLOGIC_IB_IBCC_LINKINITCMD_POLL   2
 
#define QLOGIC_IB_IBCC_LINKINITCMD_SLEEP   3
 
#define QLOGIC_IB_IBCC_LINKINITCMD_SHIFT   16
 
#define QLOGIC_IB_IBCC_LINKCMD_DOWN   1 /* move to 0x11 */
 
#define QLOGIC_IB_IBCC_LINKCMD_ARMED   2 /* move to 0x21 */
 
#define QLOGIC_IB_IBCC_LINKCMD_ACTIVE   3 /* move to 0x31 */
 
#define QLOGIC_IB_IBCC_LINKCMD_SHIFT   18
 
#define QLOGIC_IB_C_RESET   1U
 
#define QLOGIC_IB_I_RCVURG_MASK   ((1U << 5) - 1)
 
#define QLOGIC_IB_I_RCVURG_SHIFT   0
 
#define QLOGIC_IB_I_RCVAVAIL_MASK   ((1U << 5) - 1)
 
#define QLOGIC_IB_I_RCVAVAIL_SHIFT   12
 
#define QLOGIC_IB_C_FREEZEMODE   0x00000002
 
#define QLOGIC_IB_C_LINKENABLE   0x00000004
 
#define QLOGIC_IB_I_ERROR   0x0000000080000000ULL
 
#define QLOGIC_IB_I_SPIOSENT   0x0000000040000000ULL
 
#define QLOGIC_IB_I_SPIOBUFAVAIL   0x0000000020000000ULL
 
#define QLOGIC_IB_I_GPIO   0x0000000010000000ULL
 
#define QLOGIC_IB_I_BITSEXTANT
 
#define QLOGIC_IB_HWE_PCIEMEMPARITYERR_MASK   0x000000000000003fULL
 
#define QLOGIC_IB_HWE_PCIEMEMPARITYERR_SHIFT   0
 
#define QLOGIC_IB_HWE_PCIEPOISONEDTLP   0x0000000010000000ULL
 
#define QLOGIC_IB_HWE_PCIECPLTIMEOUT   0x0000000020000000ULL
 
#define QLOGIC_IB_HWE_PCIEBUSPARITYXTLH   0x0000000040000000ULL
 
#define QLOGIC_IB_HWE_PCIEBUSPARITYXADM   0x0000000080000000ULL
 
#define QLOGIC_IB_HWE_PCIEBUSPARITYRADM   0x0000000100000000ULL
 
#define QLOGIC_IB_HWE_COREPLL_FBSLIP   0x0080000000000000ULL
 
#define QLOGIC_IB_HWE_COREPLL_RFSLIP   0x0100000000000000ULL
 
#define QLOGIC_IB_HWE_PCIE1PLLFAILED   0x0400000000000000ULL
 
#define QLOGIC_IB_HWE_PCIE0PLLFAILED   0x0800000000000000ULL
 
#define QLOGIC_IB_HWE_SERDESPLLFAILED   0x1000000000000000ULL
 
#define QLOGIC_IB_EXTS_FREQSEL   0x2
 
#define QLOGIC_IB_EXTS_SERDESSEL   0x4
 
#define QLOGIC_IB_EXTS_MEMBIST_ENDTEST   0x0000000000004000
 
#define QLOGIC_IB_EXTS_MEMBIST_FOUND   0x0000000000008000
 
#define QLOGIC_IB_XGXS_RESET   0x5ULL
 
#define _QIB_GPIO_SDA_NUM   1
 
#define _QIB_GPIO_SCL_NUM   0
 
#define GPIO_RXUVL_BIT   3
 
#define GPIO_OVRUN_BIT   4
 
#define GPIO_LLI_BIT   5
 
#define GPIO_ERRINTR_MASK   0x38
 
#define QLOGIC_IB_RT_BUFSIZE_MASK   0xe0000000ULL
 
#define QLOGIC_IB_RT_BUFSIZE_SHIFTVAL(tid)   ((((tid) & QLOGIC_IB_RT_BUFSIZE_MASK) >> 29) + 11 - 1)
 
#define QLOGIC_IB_RT_BUFSIZE(tid)   (1 << QLOGIC_IB_RT_BUFSIZE_SHIFTVAL(tid))
 
#define QLOGIC_IB_RT_IS_VALID(tid)
 
#define QLOGIC_IB_RT_ADDR_MASK   0x1FFFFFFFULL /* 29 bits valid */
 
#define QLOGIC_IB_RT_ADDR_SHIFT   10
 
#define QLOGIC_IB_R_INTRAVAIL_SHIFT   16
 
#define QLOGIC_IB_R_TAILUPD_SHIFT   31
 
#define IBA6120_R_PKEY_DIS_SHIFT   30
 
#define PBC_6120_VL15_SEND_CTRL   (1ULL << 31) /* pbc; VL15; link_buf only */
 
#define IBCBUSFRSPCPARITYERR   HWE_MASK(IBCBusFromSPCParityErr)
 
#define IBCBUSTOSPCPARITYERR   HWE_MASK(IBCBusToSPCParityErr)
 
#define SYM_MASK_BIT(regname, fldname, bit)
 
#define TXEMEMPARITYERR_PIOBUF   SYM_MASK_BIT(HwErrMask, TXEMemParityErrMask, 0)
 
#define TXEMEMPARITYERR_PIOPBC   SYM_MASK_BIT(HwErrMask, TXEMemParityErrMask, 1)
 
#define TXEMEMPARITYERR_PIOLAUNCHFIFO   SYM_MASK_BIT(HwErrMask, TXEMemParityErrMask, 2)
 
#define RXEMEMPARITYERR_RCVBUF   SYM_MASK_BIT(HwErrMask, RXEMemParityErrMask, 0)
 
#define RXEMEMPARITYERR_LOOKUPQ   SYM_MASK_BIT(HwErrMask, RXEMemParityErrMask, 1)
 
#define RXEMEMPARITYERR_EXPTID   SYM_MASK_BIT(HwErrMask, RXEMemParityErrMask, 2)
 
#define RXEMEMPARITYERR_EAGERTID   SYM_MASK_BIT(HwErrMask, RXEMemParityErrMask, 3)
 
#define RXEMEMPARITYERR_FLAGBUF   SYM_MASK_BIT(HwErrMask, RXEMemParityErrMask, 4)
 
#define RXEMEMPARITYERR_DATAINFO   SYM_MASK_BIT(HwErrMask, RXEMemParityErrMask, 5)
 
#define RXEMEMPARITYERR_HDRINFO   SYM_MASK_BIT(HwErrMask, RXEMemParityErrMask, 6)
 
#define TXE_PIO_PARITY   (TXEMEMPARITYERR_PIOBUF | TXEMEMPARITYERR_PIOPBC)
 
#define _QIB_PLL_FAIL
 
#define IB_HWE_BITSEXTANT
 
#define IB_E_BITSEXTANT
 
#define QLOGIC_IB_E_PKTERRS
 
#define E_SUM_PKTERRS
 
#define E_SUM_ERRS
 
#define E_SPKT_ERRS_IGNORE
 
#define E_SUM_LINK_PKTERRS
 
#define _PORT_VIRT_FLAG   0x8000 /* "virtual", need adjustments */
 

Functions

int __attribute__ ((weak))
 
struct qib_devdataqib_init_iba6120_funcs (struct pci_dev *pdev, const struct pci_device_id *ent)
 

Macro Definition Documentation

#define _PORT_VIRT_FLAG   0x8000 /* "virtual", need adjustments */

Definition at line 2477 of file qib_iba6120.c.

#define _QIB_GPIO_SCL_NUM   0

Definition at line 455 of file qib_iba6120.c.

#define _QIB_GPIO_SDA_NUM   1

Definition at line 454 of file qib_iba6120.c.

#define _QIB_PLL_FAIL
Value:
QLOGIC_IB_HWE_COREPLL_RFSLIP)

Definition at line 563 of file qib_iba6120.c.

#define cr_badformat   CREG_IDX(RxBadFormatCnt)

Definition at line 117 of file qib_iba6120.c.

#define cr_err_rlen   CREG_IDX(RxLenErrCnt)

Definition at line 123 of file qib_iba6120.c.

#define cr_erricrc   CREG_IDX(RxICRCErrCnt)

Definition at line 118 of file qib_iba6120.c.

#define cr_errlink   CREG_IDX(RxLinkProblemCnt)

Definition at line 119 of file qib_iba6120.c.

#define cr_errlpcrc   CREG_IDX(RxLPCRCErrCnt)

Definition at line 120 of file qib_iba6120.c.

#define cr_errpkey   CREG_IDX(RxPKeyMismatchCnt)

Definition at line 121 of file qib_iba6120.c.

#define cr_errslen   CREG_IDX(TxLenErrCnt)

Definition at line 124 of file qib_iba6120.c.

#define cr_errtidfull   CREG_IDX(RxTIDFullErrCnt)

Definition at line 125 of file qib_iba6120.c.

#define cr_errtidvalid   CREG_IDX(RxTIDValidErrCnt)

Definition at line 126 of file qib_iba6120.c.

#define cr_errvcrc   CREG_IDX(RxVCRCErrCnt)

Definition at line 127 of file qib_iba6120.c.

#define cr_iblinkdown   CREG_IDX(IBLinkDownedCnt)

Definition at line 148 of file qib_iba6120.c.

#define cr_iblinkerrrecov   CREG_IDX(IBLinkErrRecoveryCnt)

Definition at line 147 of file qib_iba6120.c.

#define cr_ibstatuschange   CREG_IDX(IBStatusChangeCnt)

Definition at line 128 of file qib_iba6120.c.

#define cr_ibsymbolerr   CREG_IDX(IBSymbolErrCnt)

Definition at line 149 of file qib_iba6120.c.

#define cr_invalidrlen   CREG_IDX(RxMaxMinLenErrCnt)

Definition at line 130 of file qib_iba6120.c.

#define cr_invalidslen   CREG_IDX(TxMaxMinLenErrCnt)

Definition at line 131 of file qib_iba6120.c.

#define cr_lbflowstall   CREG_IDX(LBFlowStallCnt)

Definition at line 132 of file qib_iba6120.c.

#define cr_lbint   CREG_IDX(LBIntCnt)

Definition at line 129 of file qib_iba6120.c.

#define cr_pktrcv   CREG_IDX(RxDataPktCnt)

Definition at line 133 of file qib_iba6120.c.

#define cr_pktrcvflowctrl   CREG_IDX(RxFlowPktCnt)

Definition at line 134 of file qib_iba6120.c.

#define cr_pktsend   CREG_IDX(TxDataPktCnt)

Definition at line 135 of file qib_iba6120.c.

#define cr_pktsendflow   CREG_IDX(TxFlowPktCnt)

Definition at line 136 of file qib_iba6120.c.

#define cr_portovfl   CREG_IDX(RxP0HdrEgrOvflCnt)

Definition at line 137 of file qib_iba6120.c.

#define cr_rcvebp   CREG_IDX(RxEBPCnt)

Definition at line 138 of file qib_iba6120.c.

#define cr_rcvflowctrl_err   CREG_IDX(RxFlowCtrlErrCnt)

Definition at line 122 of file qib_iba6120.c.

#define cr_rcvovfl   CREG_IDX(RxBufOvflCnt)

Definition at line 139 of file qib_iba6120.c.

#define cr_rxdroppkt   CREG_IDX(RxDroppedPktCnt)

Definition at line 146 of file qib_iba6120.c.

#define cr_senddropped   CREG_IDX(TxDroppedPktCnt)

Definition at line 140 of file qib_iba6120.c.

#define cr_sendstall   CREG_IDX(TxFlowStallCnt)

Definition at line 141 of file qib_iba6120.c.

#define cr_sendunderrun   CREG_IDX(TxUnderrunCnt)

Definition at line 142 of file qib_iba6120.c.

#define cr_txunsupvl   CREG_IDX(TxUnsupVLErrCnt)

Definition at line 145 of file qib_iba6120.c.

#define cr_wordrcv   CREG_IDX(RxDwordCnt)

Definition at line 143 of file qib_iba6120.c.

#define cr_wordsend   CREG_IDX(TxDwordCnt)

Definition at line 144 of file qib_iba6120.c.

#define CREG_IDX (   regname)
Value:
((QIB_6120_##regname##_OFFS - \
QIB_6120_LBIntCnt_OFFS) / sizeof(u64))

Definition at line 114 of file qib_iba6120.c.

#define E_SPKT_ERRS_IGNORE
Value:
(ERR_MASK(SendDroppedDataPktErr) | \
ERR_MASK(SendDroppedSmpPktErr) | \
ERR_MASK(SendMaxPktLenErr) | ERR_MASK(SendMinPktLenErr) | \
ERR_MASK(SendPktLenErr))

Definition at line 639 of file qib_iba6120.c.

#define E_SUM_ERRS
Value:
(ERR_MASK(SendPioArmLaunchErr) | \
ERR_MASK(SendUnexpectedPktNumErr) | \
ERR_MASK(SendDroppedDataPktErr) | \
ERR_MASK(SendDroppedSmpPktErr) | \
ERR_MASK(SendMaxPktLenErr) | ERR_MASK(SendUnsupportedVLErr) | \
ERR_MASK(SendMinPktLenErr) | ERR_MASK(SendPktLenErr) | \
ERR_MASK(InvalidAddrErr))

Definition at line 624 of file qib_iba6120.c.

#define E_SUM_LINK_PKTERRS
Value:
(ERR_MASK(SendDroppedDataPktErr) | \
ERR_MASK(SendDroppedSmpPktErr) | \
ERR_MASK(SendMinPktLenErr) | ERR_MASK(SendPktLenErr) | \
ERR_MASK(RcvShortPktLenErr) | ERR_MASK(RcvMinPktLenErr) | \
ERR_MASK(RcvUnexpectedCharErr))

Definition at line 651 of file qib_iba6120.c.

#define E_SUM_PKTERRS
Value:
(ERR_MASK(RcvHdrLenErr) | ERR_MASK(RcvBadTidErr) | \
ERR_MASK(RcvBadVersionErr) | ERR_MASK(RcvHdrErr) | \
ERR_MASK(RcvLongPktLenErr) | ERR_MASK(RcvShortPktLenErr) | \
ERR_MASK(RcvMaxPktLenErr) | ERR_MASK(RcvMinPktLenErr) | \
ERR_MASK(RcvFormatErr) | ERR_MASK(RcvUnsupportedVLErr) | \
ERR_MASK(RcvUnexpectedCharErr) | ERR_MASK(RcvEBPErr))

Definition at line 615 of file qib_iba6120.c.

#define ERR_MASK (   fldname)    SYM_MASK(ErrMask, fldname##Mask)

Definition at line 161 of file qib_iba6120.c.

#define GPIO_ERRINTR_MASK   0x38

Definition at line 461 of file qib_iba6120.c.

#define GPIO_LLI_BIT   5

Definition at line 460 of file qib_iba6120.c.

#define GPIO_OVRUN_BIT   4

Definition at line 459 of file qib_iba6120.c.

#define GPIO_RXUVL_BIT   3

Definition at line 458 of file qib_iba6120.c.

#define HWE_MASK (   fldname)    SYM_MASK(HwErrMask, fldname##Mask)

Definition at line 162 of file qib_iba6120.c.

#define IB_6120_L_STATE_ACT_DEFER   0x4

Definition at line 184 of file qib_iba6120.c.

#define IB_6120_L_STATE_ACTIVE   0x3

Definition at line 183 of file qib_iba6120.c.

#define IB_6120_L_STATE_ARM   0x2

Definition at line 182 of file qib_iba6120.c.

#define IB_6120_L_STATE_DOWN   0x0

Definition at line 180 of file qib_iba6120.c.

#define IB_6120_L_STATE_INIT   0x1

Definition at line 181 of file qib_iba6120.c.

#define IB_6120_LT_STATE_CFGDEBOUNCE   0x08

Definition at line 171 of file qib_iba6120.c.

#define IB_6120_LT_STATE_CFGIDLE   0x0b

Definition at line 174 of file qib_iba6120.c.

#define IB_6120_LT_STATE_CFGRCVFCFG   0x09

Definition at line 172 of file qib_iba6120.c.

#define IB_6120_LT_STATE_CFGWAITRMT   0x0a

Definition at line 173 of file qib_iba6120.c.

#define IB_6120_LT_STATE_DISABLED   0x00

Definition at line 165 of file qib_iba6120.c.

#define IB_6120_LT_STATE_LINKUP   0x01

Definition at line 166 of file qib_iba6120.c.

#define IB_6120_LT_STATE_POLLACTIVE   0x02

Definition at line 167 of file qib_iba6120.c.

#define IB_6120_LT_STATE_POLLQUIET   0x03

Definition at line 168 of file qib_iba6120.c.

#define IB_6120_LT_STATE_RECOVERIDLE   0x0f

Definition at line 177 of file qib_iba6120.c.

#define IB_6120_LT_STATE_RECOVERRETRAIN   0x0c

Definition at line 175 of file qib_iba6120.c.

#define IB_6120_LT_STATE_RECOVERWAITRMT   0x0e

Definition at line 176 of file qib_iba6120.c.

#define IB_6120_LT_STATE_SLEEPDELAY   0x04

Definition at line 169 of file qib_iba6120.c.

#define IB_6120_LT_STATE_SLEEPQUIET   0x05

Definition at line 170 of file qib_iba6120.c.

#define IB_E_BITSEXTANT
Value:
(ERR_MASK(RcvFormatErr) | ERR_MASK(RcvVCRCErr) | \
ERR_MASK(RcvICRCErr) | ERR_MASK(RcvMinPktLenErr) | \
ERR_MASK(RcvMaxPktLenErr) | ERR_MASK(RcvLongPktLenErr) | \
ERR_MASK(RcvShortPktLenErr) | ERR_MASK(RcvUnexpectedCharErr) | \
ERR_MASK(RcvUnsupportedVLErr) | ERR_MASK(RcvEBPErr) | \
ERR_MASK(RcvIBFlowErr) | ERR_MASK(RcvBadVersionErr) | \
ERR_MASK(RcvEgrFullErr) | ERR_MASK(RcvHdrFullErr) | \
ERR_MASK(RcvBadTidErr) | ERR_MASK(RcvHdrLenErr) | \
ERR_MASK(RcvHdrErr) | ERR_MASK(RcvIBLostLinkErr) | \
ERR_MASK(SendMinPktLenErr) | ERR_MASK(SendMaxPktLenErr) | \
ERR_MASK(SendUnderRunErr) | ERR_MASK(SendPktLenErr) | \
ERR_MASK(SendDroppedSmpPktErr) | \
ERR_MASK(SendDroppedDataPktErr) | \
ERR_MASK(SendPioArmLaunchErr) | \
ERR_MASK(SendUnexpectedPktNumErr) | \
ERR_MASK(SendUnsupportedVLErr) | ERR_MASK(IBStatusChanged) | \
ERR_MASK(InvalidAddrErr) | ERR_MASK(ResetNegated) | \
ERR_MASK(HardwareErr))

Definition at line 586 of file qib_iba6120.c.

#define IB_HWE_BITSEXTANT
Value:
(HWE_MASK(RXEMemParityErr) | \
HWE_MASK(TXEMemParityErr) | \
QLOGIC_IB_HWE_PCIEMEMPARITYERR_SHIFT) | \
HWE_MASK(PowerOnBISTFailed) | \
QLOGIC_IB_HWE_COREPLL_FBSLIP | \
QLOGIC_IB_HWE_COREPLL_RFSLIP | \
QLOGIC_IB_HWE_SERDESPLLFAILED | \
HWE_MASK(IBCBusToSPCParityErr) | \
HWE_MASK(IBCBusFromSPCParityErr))

Definition at line 567 of file qib_iba6120.c.

#define IBA6120_R_PKEY_DIS_SHIFT   30

Definition at line 476 of file qib_iba6120.c.

#define IBCBUSFRSPCPARITYERR   HWE_MASK(IBCBusFromSPCParityErr)

Definition at line 480 of file qib_iba6120.c.

#define IBCBUSTOSPCPARITYERR   HWE_MASK(IBCBusToSPCParityErr)

Definition at line 481 of file qib_iba6120.c.

#define kr_control   KREG_IDX(Control)

Definition at line 93 of file qib_iba6120.c.

#define kr_counterregbase   KREG_IDX(CntrRegBase)

Definition at line 76 of file qib_iba6120.c.

#define kr_errclear   KREG_IDX(ErrClear)

Definition at line 97 of file qib_iba6120.c.

#define kr_errmask   KREG_IDX(ErrMask)

Definition at line 98 of file qib_iba6120.c.

#define kr_errstatus   KREG_IDX(ErrStatus)

Definition at line 99 of file qib_iba6120.c.

#define kr_extctrl   KREG_IDX(EXTCtrl)

Definition at line 62 of file qib_iba6120.c.

#define kr_extstatus   KREG_IDX(EXTStatus)

Definition at line 63 of file qib_iba6120.c.

#define kr_gpio_clear   KREG_IDX(GPIOClear)

Definition at line 64 of file qib_iba6120.c.

#define kr_gpio_mask   KREG_IDX(GPIOMask)

Definition at line 65 of file qib_iba6120.c.

#define kr_gpio_out   KREG_IDX(GPIOOut)

Definition at line 66 of file qib_iba6120.c.

#define kr_gpio_status   KREG_IDX(GPIOStatus)

Definition at line 67 of file qib_iba6120.c.

#define kr_hwdiagctrl   KREG_IDX(HwDiagCtrl)

Definition at line 71 of file qib_iba6120.c.

#define kr_hwerrclear   KREG_IDX(HwErrClear)

Definition at line 100 of file qib_iba6120.c.

#define kr_hwerrmask   KREG_IDX(HwErrMask)

Definition at line 101 of file qib_iba6120.c.

#define kr_hwerrstatus   KREG_IDX(HwErrStatus)

Definition at line 102 of file qib_iba6120.c.

#define kr_ibcctrl   KREG_IDX(IBCCtrl)

Definition at line 73 of file qib_iba6120.c.

#define kr_ibcstatus   KREG_IDX(IBCStatus)

Definition at line 72 of file qib_iba6120.c.

#define kr_intclear   KREG_IDX(IntClear)

Definition at line 94 of file qib_iba6120.c.

#define kr_intmask   KREG_IDX(IntMask)

Definition at line 95 of file qib_iba6120.c.

#define kr_intstatus   KREG_IDX(IntStatus)

Definition at line 96 of file qib_iba6120.c.

#define kr_palign   KREG_IDX(PageAlign)

Definition at line 77 of file qib_iba6120.c.

#define kr_partitionkey   KREG_IDX(RcvPartitionKey)

Definition at line 70 of file qib_iba6120.c.

#define kr_portcnt   KREG_IDX(PortCnt)

Definition at line 104 of file qib_iba6120.c.

#define kr_rcvbthqp   KREG_IDX(RcvBTHQP)

Definition at line 75 of file qib_iba6120.c.

#define kr_rcvctrl   KREG_IDX(RcvCtrl)

Definition at line 68 of file qib_iba6120.c.

#define kr_rcvegrbase   KREG_IDX(RcvEgrBase)

Definition at line 78 of file qib_iba6120.c.

#define kr_rcvegrcnt   KREG_IDX(RcvEgrCnt)

Definition at line 79 of file qib_iba6120.c.

#define kr_rcvhdraddr   KREG_IDX(RcvHdrAddr0)

Definition at line 111 of file qib_iba6120.c.

#define kr_rcvhdrcnt   KREG_IDX(RcvHdrCnt)

Definition at line 80 of file qib_iba6120.c.

#define kr_rcvhdrentsize   KREG_IDX(RcvHdrEntSize)

Definition at line 81 of file qib_iba6120.c.

#define kr_rcvhdrsize   KREG_IDX(RcvHdrSize)

Definition at line 82 of file qib_iba6120.c.

#define kr_rcvhdrtailaddr   KREG_IDX(RcvHdrTailAddr0)

Definition at line 112 of file qib_iba6120.c.

#define kr_rcvtidbase   KREG_IDX(RcvTIDBase)

Definition at line 83 of file qib_iba6120.c.

#define kr_rcvtidcnt   KREG_IDX(RcvTIDCnt)

Definition at line 84 of file qib_iba6120.c.

#define kr_revision   KREG_IDX(Revision)

Definition at line 103 of file qib_iba6120.c.

#define kr_scratch   KREG_IDX(Scratch)

Definition at line 85 of file qib_iba6120.c.

#define kr_sendbuffererror   KREG_IDX(SendBufErr0)

Definition at line 74 of file qib_iba6120.c.

#define kr_sendctrl   KREG_IDX(SendCtrl)

Definition at line 86 of file qib_iba6120.c.

#define kr_sendctrl   KREG_IDX(SendCtrl)

Definition at line 86 of file qib_iba6120.c.

#define kr_sendpioavailaddr   KREG_IDX(SendPIOAvailAddr)

Definition at line 87 of file qib_iba6120.c.

#define kr_sendpiobufbase   KREG_IDX(SendPIOBufBase)

Definition at line 88 of file qib_iba6120.c.

#define kr_sendpiobufcnt   KREG_IDX(SendPIOBufCnt)

Definition at line 89 of file qib_iba6120.c.

#define kr_sendpiosize   KREG_IDX(SendPIOSize)

Definition at line 90 of file qib_iba6120.c.

#define kr_sendregbase   KREG_IDX(SendRegBase)

Definition at line 91 of file qib_iba6120.c.

#define kr_serdes_cfg0   KREG_IDX(SerdesCfg0)

Definition at line 105 of file qib_iba6120.c.

#define kr_serdes_cfg1   (kr_serdes_cfg0 + 1)

Definition at line 106 of file qib_iba6120.c.

#define kr_serdes_stat   KREG_IDX(SerdesStat)

Definition at line 107 of file qib_iba6120.c.

#define kr_userregbase   KREG_IDX(UserRegBase)

Definition at line 92 of file qib_iba6120.c.

#define kr_xgxs_cfg   KREG_IDX(XGXSCfg)

Definition at line 108 of file qib_iba6120.c.

#define KREG_IDX (   regname)    (QIB_6120_##regname##_OFFS / sizeof(u64))

Definition at line 59 of file qib_iba6120.c.

#define PBC_6120_VL15_SEND_CTRL   (1ULL << 31) /* pbc; VL15; link_buf only */

Definition at line 478 of file qib_iba6120.c.

#define QLOGIC_IB_C_FREEZEMODE   0x00000002

Definition at line 417 of file qib_iba6120.c.

#define QLOGIC_IB_C_LINKENABLE   0x00000004

Definition at line 418 of file qib_iba6120.c.

#define QLOGIC_IB_C_RESET   1U

Definition at line 409 of file qib_iba6120.c.

#define QLOGIC_IB_E_PKTERRS
Value:
( \
ERR_MASK(SendPktLenErr) | \
ERR_MASK(SendDroppedDataPktErr) | \
ERR_MASK(RcvVCRCErr) | \
ERR_MASK(RcvICRCErr) | \
ERR_MASK(RcvShortPktLenErr) | \
ERR_MASK(RcvEBPErr))

Definition at line 606 of file qib_iba6120.c.

#define QLOGIC_IB_EXTS_FREQSEL   0x2

Definition at line 446 of file qib_iba6120.c.

#define QLOGIC_IB_EXTS_MEMBIST_ENDTEST   0x0000000000004000

Definition at line 448 of file qib_iba6120.c.

#define QLOGIC_IB_EXTS_MEMBIST_FOUND   0x0000000000008000

Definition at line 449 of file qib_iba6120.c.

#define QLOGIC_IB_EXTS_SERDESSEL   0x4

Definition at line 447 of file qib_iba6120.c.

#define QLOGIC_IB_HWE_COREPLL_FBSLIP   0x0080000000000000ULL

Definition at line 438 of file qib_iba6120.c.

#define QLOGIC_IB_HWE_COREPLL_RFSLIP   0x0100000000000000ULL

Definition at line 439 of file qib_iba6120.c.

#define QLOGIC_IB_HWE_PCIE0PLLFAILED   0x0800000000000000ULL

Definition at line 441 of file qib_iba6120.c.

#define QLOGIC_IB_HWE_PCIE1PLLFAILED   0x0400000000000000ULL

Definition at line 440 of file qib_iba6120.c.

#define QLOGIC_IB_HWE_PCIEBUSPARITYRADM   0x0000000100000000ULL

Definition at line 437 of file qib_iba6120.c.

#define QLOGIC_IB_HWE_PCIEBUSPARITYXADM   0x0000000080000000ULL

Definition at line 436 of file qib_iba6120.c.

#define QLOGIC_IB_HWE_PCIEBUSPARITYXTLH   0x0000000040000000ULL

Definition at line 435 of file qib_iba6120.c.

#define QLOGIC_IB_HWE_PCIECPLTIMEOUT   0x0000000020000000ULL

Definition at line 434 of file qib_iba6120.c.

#define QLOGIC_IB_HWE_PCIEMEMPARITYERR_MASK   0x000000000000003fULL

Definition at line 431 of file qib_iba6120.c.

#define QLOGIC_IB_HWE_PCIEMEMPARITYERR_SHIFT   0

Definition at line 432 of file qib_iba6120.c.

#define QLOGIC_IB_HWE_PCIEPOISONEDTLP   0x0000000010000000ULL

Definition at line 433 of file qib_iba6120.c.

#define QLOGIC_IB_HWE_SERDESPLLFAILED   0x1000000000000000ULL

Definition at line 442 of file qib_iba6120.c.

#define QLOGIC_IB_I_BITSEXTANT
Value:

Definition at line 423 of file qib_iba6120.c.

#define QLOGIC_IB_I_ERROR   0x0000000080000000ULL

Definition at line 419 of file qib_iba6120.c.

#define QLOGIC_IB_I_GPIO   0x0000000010000000ULL

Definition at line 422 of file qib_iba6120.c.

#define QLOGIC_IB_I_RCVAVAIL_MASK   ((1U << 5) - 1)

Definition at line 414 of file qib_iba6120.c.

#define QLOGIC_IB_I_RCVAVAIL_SHIFT   12

Definition at line 415 of file qib_iba6120.c.

#define QLOGIC_IB_I_RCVURG_MASK   ((1U << 5) - 1)

Definition at line 412 of file qib_iba6120.c.

#define QLOGIC_IB_I_RCVURG_SHIFT   0

Definition at line 413 of file qib_iba6120.c.

#define QLOGIC_IB_I_SPIOBUFAVAIL   0x0000000020000000ULL

Definition at line 421 of file qib_iba6120.c.

#define QLOGIC_IB_I_SPIOSENT   0x0000000040000000ULL

Definition at line 420 of file qib_iba6120.c.

#define QLOGIC_IB_IBCC_LINKCMD_ACTIVE   3 /* move to 0x31 */

Definition at line 283 of file qib_iba6120.c.

#define QLOGIC_IB_IBCC_LINKCMD_ARMED   2 /* move to 0x21 */

Definition at line 282 of file qib_iba6120.c.

#define QLOGIC_IB_IBCC_LINKCMD_DOWN   1 /* move to 0x11 */

Definition at line 281 of file qib_iba6120.c.

#define QLOGIC_IB_IBCC_LINKCMD_SHIFT   18

Definition at line 284 of file qib_iba6120.c.

#define QLOGIC_IB_IBCC_LINKINITCMD_DISABLE   1

Definition at line 274 of file qib_iba6120.c.

#define QLOGIC_IB_IBCC_LINKINITCMD_POLL   2

Definition at line 276 of file qib_iba6120.c.

#define QLOGIC_IB_IBCC_LINKINITCMD_SHIFT   16

Definition at line 279 of file qib_iba6120.c.

#define QLOGIC_IB_IBCC_LINKINITCMD_SLEEP   3

Definition at line 278 of file qib_iba6120.c.

#define QLOGIC_IB_R_INTRAVAIL_SHIFT   16

Definition at line 474 of file qib_iba6120.c.

#define QLOGIC_IB_R_TAILUPD_SHIFT   31

Definition at line 475 of file qib_iba6120.c.

#define QLOGIC_IB_RT_ADDR_MASK   0x1FFFFFFFULL /* 29 bits valid */

Definition at line 471 of file qib_iba6120.c.

#define QLOGIC_IB_RT_ADDR_SHIFT   10

Definition at line 472 of file qib_iba6120.c.

#define QLOGIC_IB_RT_BUFSIZE (   tid)    (1 << QLOGIC_IB_RT_BUFSIZE_SHIFTVAL(tid))

Definition at line 467 of file qib_iba6120.c.

#define QLOGIC_IB_RT_BUFSIZE_MASK   0xe0000000ULL

Definition at line 464 of file qib_iba6120.c.

#define QLOGIC_IB_RT_BUFSIZE_SHIFTVAL (   tid)    ((((tid) & QLOGIC_IB_RT_BUFSIZE_MASK) >> 29) + 11 - 1)

Definition at line 465 of file qib_iba6120.c.

#define QLOGIC_IB_RT_IS_VALID (   tid)
Value:

Definition at line 468 of file qib_iba6120.c.

#define QLOGIC_IB_XGXS_RESET   0x5ULL

Definition at line 452 of file qib_iba6120.c.

#define RXEMEMPARITYERR_DATAINFO   SYM_MASK_BIT(HwErrMask, RXEMemParityErrMask, 5)

Definition at line 503 of file qib_iba6120.c.

#define RXEMEMPARITYERR_EAGERTID   SYM_MASK_BIT(HwErrMask, RXEMemParityErrMask, 3)

Definition at line 499 of file qib_iba6120.c.

#define RXEMEMPARITYERR_EXPTID   SYM_MASK_BIT(HwErrMask, RXEMemParityErrMask, 2)

Definition at line 497 of file qib_iba6120.c.

#define RXEMEMPARITYERR_FLAGBUF   SYM_MASK_BIT(HwErrMask, RXEMemParityErrMask, 4)

Definition at line 501 of file qib_iba6120.c.

#define RXEMEMPARITYERR_HDRINFO   SYM_MASK_BIT(HwErrMask, RXEMemParityErrMask, 6)

Definition at line 505 of file qib_iba6120.c.

#define RXEMEMPARITYERR_LOOKUPQ   SYM_MASK_BIT(HwErrMask, RXEMemParityErrMask, 1)

Definition at line 495 of file qib_iba6120.c.

#define RXEMEMPARITYERR_RCVBUF   SYM_MASK_BIT(HwErrMask, RXEMemParityErrMask, 0)

Definition at line 493 of file qib_iba6120.c.

#define SYM_FIELD (   value,
  regname,
  fldname 
)
Value:
((u64) \
(((value) >> SYM_LSB(regname, fldname)) & \
SYM_RMASK(regname, fldname)))

Definition at line 158 of file qib_iba6120.c.

#define SYM_LSB (   regname,
  fldname 
)    (QIB_6120_##regname##_##fldname##_LSB)

Definition at line 156 of file qib_iba6120.c.

#define SYM_MASK (   regname,
  fldname 
)
Value:
((u64) \
QIB_6120_##regname##_##fldname##_RMASK << \
QIB_6120_##regname##_##fldname##_LSB)

Definition at line 153 of file qib_iba6120.c.

#define SYM_MASK_BIT (   regname,
  fldname,
  bit 
)
Value:
((u64) \
((1ULL << (SYM_LSB(regname, fldname) + (bit)))))

Definition at line 483 of file qib_iba6120.c.

#define SYM_RMASK (   regname,
  fldname 
)
Value:
((u64) \
QIB_6120_##regname##_##fldname##_RMASK)

Definition at line 151 of file qib_iba6120.c.

#define TXE_PIO_PARITY   (TXEMEMPARITYERR_PIOBUF | TXEMEMPARITYERR_PIOPBC)

Definition at line 562 of file qib_iba6120.c.

#define TXEMEMPARITYERR_PIOBUF   SYM_MASK_BIT(HwErrMask, TXEMemParityErrMask, 0)

Definition at line 486 of file qib_iba6120.c.

#define TXEMEMPARITYERR_PIOLAUNCHFIFO   SYM_MASK_BIT(HwErrMask, TXEMemParityErrMask, 2)

Definition at line 490 of file qib_iba6120.c.

#define TXEMEMPARITYERR_PIOPBC   SYM_MASK_BIT(HwErrMask, TXEMemParityErrMask, 1)

Definition at line 488 of file qib_iba6120.c.

Function Documentation

int __attribute__ ( (weak)  )
read

Definition at line 2038 of file qib_iba6120.c.

struct qib_devdata* qib_init_iba6120_funcs ( struct pci_dev pdev,
const struct pci_device_id ent 
)
read

qib_init_iba6120_funcs - set up the chip-specific function pointers : pci_dev of the qlogic_ib device : pci_device_id matching this chip

This is global, and is called directly at init to set up the chip-specific function pointers for later use.

It also allocates/partially-inits the qib_devdata struct for this device.

Definition at line 3483 of file qib_iba6120.c.