Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Typedefs | Enumerations | Functions | Variables
qib.h File Reference
#include <linux/interrupt.h>
#include <linux/pci.h>
#include <linux/dma-mapping.h>
#include <linux/mutex.h>
#include <linux/list.h>
#include <linux/scatterlist.h>
#include <linux/slab.h>
#include <linux/io.h>
#include <linux/fs.h>
#include <linux/completion.h>
#include <linux/kref.h>
#include <linux/sched.h>
#include "qib_common.h"
#include "qib_verbs.h"

Go to the source code of this file.

Data Structures

struct  qlogic_ib_stats
 
struct  qib_eep_log_mask
 
struct  qib_ctxtdata
 
struct  qib_sdma_txreq
 
struct  qib_sdma_desc
 
struct  qib_verbs_txreq
 
struct  qib_msix_entry
 
struct  sdma_set_state_action
 
struct  qib_sdma_state
 
struct  xmit_wait
 
struct  xmit_wait::cache
 
struct  qib_pportdata
 
struct  diag_observer
 
struct  qib_devdata
 
struct  qib_filedata
 
struct  qib_hwerror_msgs
 

Macros

#define QIB_CHIP_VERS_MAJ   2U
 
#define QIB_CHIP_VERS_MIN   0U
 
#define QIB_OUI   0x001175
 
#define QIB_OUI_LSB   40
 
#define QIB_CHIP_SWVERSION   QIB_CHIP_VERS_MAJ
 
#define QIB_TRAFFIC_ACTIVE_THRESHOLD   (2000)
 
#define QIB_EEP_LOG_CNT   (4)
 
#define QIB_SDMA_TXREQ_F_USELARGEBUF   0x1
 
#define QIB_SDMA_TXREQ_F_HEADTOHOST   0x2
 
#define QIB_SDMA_TXREQ_F_INTREQ   0x4
 
#define QIB_SDMA_TXREQ_F_FREEBUF   0x8
 
#define QIB_SDMA_TXREQ_F_FREEDESC   0x10
 
#define QIB_SDMA_TXREQ_S_OK   0
 
#define QIB_SDMA_TXREQ_S_SENDERROR   1
 
#define QIB_SDMA_TXREQ_S_ABORTED   2
 
#define QIB_SDMA_TXREQ_S_SHUTDOWN   3
 
#define QIB_IB_CFG_LIDLMC   0 /* LID (LS16b) and Mask (MS16b) */
 
#define QIB_IB_CFG_LWID_ENB   2 /* allowed Link-width */
 
#define QIB_IB_CFG_LWID   3 /* currently active Link-width */
 
#define QIB_IB_CFG_SPD_ENB   4 /* allowed Link speeds */
 
#define QIB_IB_CFG_SPD   5 /* current Link spd */
 
#define QIB_IB_CFG_RXPOL_ENB   6 /* Auto-RX-polarity enable */
 
#define QIB_IB_CFG_LREV_ENB   7 /* Auto-Lane-reversal enable */
 
#define QIB_IB_CFG_LINKLATENCY   8 /* Link Latency (IB1.2 only) */
 
#define QIB_IB_CFG_HRTBT   9 /* IB heartbeat off/enable/auto; DDR/QDR only */
 
#define QIB_IB_CFG_OP_VLS   10 /* operational VLs */
 
#define QIB_IB_CFG_VL_HIGH_CAP   11 /* num of VL high priority weights */
 
#define QIB_IB_CFG_VL_LOW_CAP   12 /* num of VL low priority weights */
 
#define QIB_IB_CFG_OVERRUN_THRESH   13 /* IB overrun threshold */
 
#define QIB_IB_CFG_PHYERR_THRESH   14 /* IB PHY error threshold */
 
#define QIB_IB_CFG_LINKDEFAULT   15 /* IB link default (sleep/poll) */
 
#define QIB_IB_CFG_PKEYS   16 /* update partition keys */
 
#define QIB_IB_CFG_MTU   17 /* update MTU in IBC */
 
#define QIB_IB_CFG_LSTATE   18 /* update linkcmd and linkinitcmd in IBC */
 
#define QIB_IB_CFG_VL_HIGH_LIMIT   19
 
#define QIB_IB_CFG_PMA_TICKS   20 /* PMA sample tick resolution */
 
#define QIB_IB_CFG_PORT   21 /* switch port we are connected to */
 
#define IB_LINKCMD_DOWN   (0 << 16)
 
#define IB_LINKCMD_ARMED   (1 << 16)
 
#define IB_LINKCMD_ACTIVE   (2 << 16)
 
#define IB_LINKINITCMD_NOP   0
 
#define IB_LINKINITCMD_POLL   1
 
#define IB_LINKINITCMD_SLEEP   2
 
#define IB_LINKINITCMD_DISABLE   3
 
#define QIB_IB_LINKDOWN   0
 
#define QIB_IB_LINKARM   1
 
#define QIB_IB_LINKACTIVE   2
 
#define QIB_IB_LINKDOWN_ONLY   3
 
#define QIB_IB_LINKDOWN_SLEEP   4
 
#define QIB_IB_LINKDOWN_DISABLE   5
 
#define QIB_IB_SDR   1
 
#define QIB_IB_DDR   2
 
#define QIB_IB_QDR   4
 
#define QIB_DEFAULT_MTU   4096
 
#define QIB_MAX_IB_PORTS   2
 
#define QIB_IB_TBL_VL_HIGH_ARB   1 /* Get/set VL high priority weights */
 
#define QIB_IB_TBL_VL_LOW_ARB   2 /* Get/set VL low priority weights */
 
#define QIB_RCVCTRL_TAILUPD_ENB   0x01
 
#define QIB_RCVCTRL_TAILUPD_DIS   0x02
 
#define QIB_RCVCTRL_CTXT_ENB   0x04
 
#define QIB_RCVCTRL_CTXT_DIS   0x08
 
#define QIB_RCVCTRL_INTRAVAIL_ENB   0x10
 
#define QIB_RCVCTRL_INTRAVAIL_DIS   0x20
 
#define QIB_RCVCTRL_PKEY_ENB   0x40 /* Note, default is enabled */
 
#define QIB_RCVCTRL_PKEY_DIS   0x80
 
#define QIB_RCVCTRL_BP_ENB   0x0100
 
#define QIB_RCVCTRL_BP_DIS   0x0200
 
#define QIB_RCVCTRL_TIDFLOW_ENB   0x0400
 
#define QIB_RCVCTRL_TIDFLOW_DIS   0x0800
 
#define QIB_SENDCTRL_DISARM   (0x1000)
 
#define QIB_SENDCTRL_DISARM_BUF(bufn)   ((bufn) | QIB_SENDCTRL_DISARM)
 
#define QIB_SENDCTRL_AVAIL_DIS   (0x4000)
 
#define QIB_SENDCTRL_AVAIL_ENB   (0x8000)
 
#define QIB_SENDCTRL_AVAIL_BLIP   (0x10000)
 
#define QIB_SENDCTRL_SEND_DIS   (0x20000)
 
#define QIB_SENDCTRL_SEND_ENB   (0x40000)
 
#define QIB_SENDCTRL_FLUSH   (0x80000)
 
#define QIB_SENDCTRL_CLEAR   (0x100000)
 
#define QIB_SENDCTRL_DISARM_ALL   (0x200000)
 
#define QIBPORTCNTR_PKTSEND   0U
 
#define QIBPORTCNTR_WORDSEND   1U
 
#define QIBPORTCNTR_PSXMITDATA   2U
 
#define QIBPORTCNTR_PSXMITPKTS   3U
 
#define QIBPORTCNTR_PSXMITWAIT   4U
 
#define QIBPORTCNTR_SENDSTALL   5U
 
#define QIBPORTCNTR_PKTRCV   6U
 
#define QIBPORTCNTR_PSRCVDATA   7U
 
#define QIBPORTCNTR_PSRCVPKTS   8U
 
#define QIBPORTCNTR_RCVEBP   9U
 
#define QIBPORTCNTR_RCVOVFL   10U
 
#define QIBPORTCNTR_WORDRCV   11U
 
#define QIBPORTCNTR_RXLOCALPHYERR   12U
 
#define QIBPORTCNTR_RXVLERR   13U
 
#define QIBPORTCNTR_ERRICRC   14U
 
#define QIBPORTCNTR_ERRVCRC   15U
 
#define QIBPORTCNTR_ERRLPCRC   16U
 
#define QIBPORTCNTR_BADFORMAT   17U
 
#define QIBPORTCNTR_ERR_RLEN   18U
 
#define QIBPORTCNTR_IBSYMBOLERR   19U
 
#define QIBPORTCNTR_INVALIDRLEN   20U
 
#define QIBPORTCNTR_UNSUPVL   21U
 
#define QIBPORTCNTR_EXCESSBUFOVFL   22U
 
#define QIBPORTCNTR_ERRLINK   23U
 
#define QIBPORTCNTR_IBLINKDOWN   24U
 
#define QIBPORTCNTR_IBLINKERRRECOV   25U
 
#define QIBPORTCNTR_LLI   26U
 
#define QIBPORTCNTR_RXDROPPKT   27U
 
#define QIBPORTCNTR_VL15PKTDROP   28U
 
#define QIBPORTCNTR_ERRPKEY   29U
 
#define QIBPORTCNTR_KHDROVFL   30U
 
#define QIBPORTCNTR_PSINTERVAL   31U
 
#define QIBPORTCNTR_PSSTART   32U
 
#define QIBPORTCNTR_PSSTAT   33U
 
#define ACTIVITY_TIMER   5
 
#define MAX_NAME_SIZE   64
 
#define QIB_HOL_UP   0
 
#define QIB_HOL_INIT   1
 
#define QIB_SDMA_SENDCTRL_OP_ENABLE   (1U << 0)
 
#define QIB_SDMA_SENDCTRL_OP_INTENABLE   (1U << 1)
 
#define QIB_SDMA_SENDCTRL_OP_HALT   (1U << 2)
 
#define QIB_SDMA_SENDCTRL_OP_CLEANUP   (1U << 3)
 
#define QIB_SDMA_SENDCTRL_OP_DRAIN   (1U << 4)
 
#define TXCHK_CHG_TYPE_DIS1   3
 
#define TXCHK_CHG_TYPE_ENAB1   2
 
#define TXCHK_CHG_TYPE_KERN   1
 
#define TXCHK_CHG_TYPE_USER   0
 
#define QIB_CHASE_TIME   msecs_to_jiffies(145)
 
#define QIB_CHASE_DIS_TIME   msecs_to_jiffies(160)
 
#define ctxt_fp(fp)   (((struct qib_filedata *)(fp)->private_data)->rcd)
 
#define subctxt_fp(fp)   (((struct qib_filedata *)(fp)->private_data)->subctxt)
 
#define tidcursor_fp(fp)   (((struct qib_filedata *)(fp)->private_data)->tidcursor)
 
#define user_sdma_queue_fp(fp)   (((struct qib_filedata *)(fp)->private_data)->pq)
 
#define QIB_HAS_LINK_LATENCY   0x1 /* supports link latency (IB 1.2) */
 
#define QIB_INITTED   0x2 /* chip and driver up and initted */
 
#define QIB_DOING_RESET   0x4 /* in the middle of doing chip reset */
 
#define QIB_PRESENT   0x8 /* chip accesses can be done */
 
#define QIB_PIO_FLUSH_WC   0x10 /* Needs Write combining flush for PIO */
 
#define QIB_HAS_THRESH_UPDATE   0x40
 
#define QIB_HAS_SDMA_TIMEOUT   0x80
 
#define QIB_USE_SPCL_TRIG   0x100 /* SpecialTrigger launch enabled */
 
#define QIB_NODMA_RTAIL   0x200 /* rcvhdrtail register DMA enabled */
 
#define QIB_HAS_INTX   0x800 /* Supports INTx interrupts */
 
#define QIB_HAS_SEND_DMA   0x1000 /* Supports Send DMA */
 
#define QIB_HAS_VLSUPP   0x2000 /* Supports multiple VLs; PBC different */
 
#define QIB_HAS_HDRSUPP   0x4000 /* Supports header suppression */
 
#define QIB_BADINTR   0x8000 /* severe interrupt problems */
 
#define QIB_DCA_ENABLED   0x10000 /* Direct Cache Access enabled */
 
#define QIB_HAS_QSFP   0x20000 /* device (card instance) has QSFP */
 
#define QIBL_LINKV   0x1 /* IB link state valid */
 
#define QIBL_LINKDOWN   0x8 /* IB link is down */
 
#define QIBL_LINKINIT   0x10 /* IB link level is up */
 
#define QIBL_LINKARMED   0x20 /* IB link is ARMED */
 
#define QIBL_LINKACTIVE   0x40 /* IB link is ACTIVE */
 
#define QIBL_IB_AUTONEG_INPROG   0x1000 /* non-IBTA DDR/QDR neg active */
 
#define QIBL_IB_AUTONEG_FAILED   0x2000 /* non-IBTA DDR/QDR neg failed */
 
#define QIBL_IB_LINK_DISABLED
 
#define QIBL_IB_FORCE_NOTIFY   0x8000 /* force notify on next ib change */
 
#define QIB_PBC_LENGTH_MASK   ((1 << 11) - 1)
 
#define QIB_CTXT_WAITING_RCV   2
 
#define QIB_CTXT_MASTER_UNINIT   4
 
#define QIB_CTXT_WAITING_URG   5
 
#define QIB_TWSI_NO_DEV   0xFF
 
#define QIB_LED_PHYS   1 /* Physical (linktraining) GREEN LED */
 
#define QIB_LED_LOG   2 /* Logical (link) YELLOW LED */
 
#define QIB_DFLT_RCVHDRSIZE   9
 
#define QIB_RCVHDR_ENTSIZE   32
 
#define qib_flush_wc()   wmb() /* no reorder around wc flush */
 
#define STATUS_TIMEOUT   60
 
#define QIB_DRV_NAME   "ib_qib"
 
#define QIB_USER_MINOR_BASE   0
 
#define QIB_TRACE_MINOR   127
 
#define QIB_DIAGPKT_MINOR   128
 
#define QIB_DIAG_MINOR_BASE   129
 
#define QIB_NMINORS   255
 
#define PCI_VENDOR_ID_PATHSCALE   0x1fc1
 
#define PCI_VENDOR_ID_QLOGIC   0x1077
 
#define PCI_DEVICE_ID_QLOGIC_IB_6120   0x10
 
#define PCI_DEVICE_ID_QLOGIC_IB_7220   0x7220
 
#define PCI_DEVICE_ID_QLOGIC_IB_7322   0x7322
 
#define qib_early_err(dev, fmt,...)
 
#define qib_dev_err(dd, fmt,...)
 
#define qib_dev_porterr(dd, port, fmt,...)
 
#define qib_devinfo(pcidev, fmt,...)
 
#define QLOGIC_IB_HWE_MSG(a, b)   { .mask = a, .msg = b }
 

Typedefs

typedef int(* diag_hook )(struct qib_devdata *dd, const struct diag_observer *op, u32 offs, u64 *data, u64 mask, int only_32)
 

Enumerations

enum  qib_sdma_states {
  qib_sdma_state_s00_hw_down, qib_sdma_state_s10_hw_start_up_wait, qib_sdma_state_s20_idle, qib_sdma_state_s30_sw_clean_up_wait,
  qib_sdma_state_s40_hw_clean_up_wait, qib_sdma_state_s50_hw_halt_wait, qib_sdma_state_s99_running
}
 
enum  qib_sdma_events {
  qib_sdma_event_e00_go_hw_down, qib_sdma_event_e10_go_hw_start, qib_sdma_event_e20_hw_started, qib_sdma_event_e30_go_running,
  qib_sdma_event_e40_sw_cleaned, qib_sdma_event_e50_hw_cleaned, qib_sdma_event_e60_hw_halted, qib_sdma_event_e70_go_idle,
  qib_sdma_event_e7220_err_halted, qib_sdma_event_e7322_err_halted, qib_sdma_event_e90_timer_tick
}
 

Functions

int qib_register_observer (struct qib_devdata *dd, const struct diag_observer *op)
 
struct qib_devdataqib_lookup (int unit)
 
int qib_init (struct qib_devdata *, int)
 
int init_chip_wc_pat (struct qib_devdata *dd, u32)
 
int qib_enable_wc (struct qib_devdata *dd)
 
void qib_disable_wc (struct qib_devdata *dd)
 
int qib_count_units (int *npresentp, int *nupp)
 
int qib_count_active_units (void)
 
int qib_cdev_init (int minor, const char *name, const struct file_operations *fops, struct cdev **cdevp, struct device **devp)
 
void qib_cdev_cleanup (struct cdev **cdevp, struct device **devp)
 
int qib_dev_init (void)
 
void qib_dev_cleanup (void)
 
int qib_diag_add (struct qib_devdata *)
 
void qib_diag_remove (struct qib_devdata *)
 
void qib_handle_e_ibstatuschanged (struct qib_pportdata *, u64)
 
void qib_sdma_update_tail (struct qib_pportdata *, u16)
 
int qib_decode_err (struct qib_devdata *dd, char *buf, size_t blen, u64 err)
 
void qib_bad_intrstatus (struct qib_devdata *)
 
void qib_handle_urcv (struct qib_devdata *, u64)
 
void qib_chip_cleanup (struct qib_devdata *)
 
void qib_chip_done (void)
 
int qib_unordered_wc (void)
 
void qib_pio_copy (void __iomem *to, const void *from, size_t count)
 
void qib_disarm_piobufs (struct qib_devdata *, unsigned, unsigned)
 
int qib_disarm_piobufs_ifneeded (struct qib_ctxtdata *)
 
void qib_disarm_piobufs_set (struct qib_devdata *, unsigned long *, unsigned)
 
void qib_cancel_sends (struct qib_pportdata *)
 
int qib_create_rcvhdrq (struct qib_devdata *, struct qib_ctxtdata *)
 
int qib_setup_eagerbufs (struct qib_ctxtdata *)
 
void qib_set_ctxtcnt (struct qib_devdata *)
 
int qib_create_ctxts (struct qib_devdata *dd)
 
struct qib_ctxtdataqib_create_ctxtdata (struct qib_pportdata *, u32)
 
void qib_init_pportdata (struct qib_pportdata *, struct qib_devdata *, u8, u8)
 
void qib_free_ctxtdata (struct qib_devdata *, struct qib_ctxtdata *)
 
u32 qib_kreceive (struct qib_ctxtdata *, u32 *, u32 *)
 
int qib_reset_device (int)
 
int qib_wait_linkstate (struct qib_pportdata *, u32, int)
 
int qib_set_linkstate (struct qib_pportdata *, u8)
 
int qib_set_mtu (struct qib_pportdata *, u16)
 
int qib_set_lid (struct qib_pportdata *, u32, u8)
 
void qib_hol_down (struct qib_pportdata *)
 
void qib_hol_init (struct qib_pportdata *)
 
void qib_hol_up (struct qib_pportdata *)
 
void qib_hol_event (unsigned long)
 
void qib_disable_after_error (struct qib_devdata *)
 
int qib_set_uevent_bits (struct qib_pportdata *, const int)
 
void qib_free_data (struct qib_ctxtdata *dd)
 
void qib_chg_pioavailkernel (struct qib_devdata *, unsigned, unsigned, u32, struct qib_ctxtdata *)
 
struct qib_devdataqib_init_iba7322_funcs (struct pci_dev *, const struct pci_device_id *)
 
struct qib_devdataqib_init_iba7220_funcs (struct pci_dev *, const struct pci_device_id *)
 
struct qib_devdataqib_init_iba6120_funcs (struct pci_dev *, const struct pci_device_id *)
 
void qib_free_devdata (struct qib_devdata *)
 
struct qib_devdataqib_alloc_devdata (struct pci_dev *pdev, size_t extra)
 
int qib_twsi_reset (struct qib_devdata *dd)
 
int qib_twsi_blk_rd (struct qib_devdata *dd, int dev, int addr, void *buffer, int len)
 
int qib_twsi_blk_wr (struct qib_devdata *dd, int dev, int addr, const void *buffer, int len)
 
void qib_get_eeprom_info (struct qib_devdata *)
 
int qib_update_eeprom_log (struct qib_devdata *dd)
 
void qib_inc_eeprom_err (struct qib_devdata *dd, u32 eidx, u32 incr)
 
void qib_dump_lookup_output_queue (struct qib_devdata *)
 
void qib_force_pio_avail_update (struct qib_devdata *)
 
void qib_clear_symerror_on_linkup (unsigned long opaque)
 
void qib_set_led_override (struct qib_pportdata *ppd, unsigned int val)
 
int qib_setup_sdma (struct qib_pportdata *)
 
void qib_teardown_sdma (struct qib_pportdata *)
 
void __qib_sdma_intr (struct qib_pportdata *)
 
void qib_sdma_intr (struct qib_pportdata *)
 
int qib_sdma_verbs_send (struct qib_pportdata *, struct qib_sge_state *, u32, struct qib_verbs_txreq *)
 
int qib_sdma_make_progress (struct qib_pportdata *dd)
 
int qib_sdma_running (struct qib_pportdata *)
 
void __qib_sdma_process_event (struct qib_pportdata *, enum qib_sdma_events)
 
void qib_sdma_process_event (struct qib_pportdata *, enum qib_sdma_events)
 
int qib_get_user_pages (unsigned long, size_t, struct page **)
 
void qib_release_user_pages (struct page **, size_t)
 
int qib_eeprom_read (struct qib_devdata *, u8, void *, int)
 
int qib_eeprom_write (struct qib_devdata *, u8, const void *, int)
 
u32 __iomemqib_getsendbuf_range (struct qib_devdata *, u32 *, u32, u32)
 
void qib_sendbuf_done (struct qib_devdata *, unsigned)
 
int qib_device_create (struct qib_devdata *)
 
void qib_device_remove (struct qib_devdata *)
 
int qib_create_port_files (struct ib_device *ibdev, u8 port_num, struct kobject *kobj)
 
int qib_verbs_register_sysfs (struct qib_devdata *)
 
void qib_verbs_unregister_sysfs (struct qib_devdata *)
 
int qib_qsfp_dump (struct qib_pportdata *ppd, char *buf, int len)
 
int __init qib_init_qibfs (void)
 
int __exit qib_exit_qibfs (void)
 
int qibfs_add (struct qib_devdata *)
 
int qibfs_remove (struct qib_devdata *)
 
int qib_pcie_init (struct pci_dev *, const struct pci_device_id *)
 
int qib_pcie_ddinit (struct qib_devdata *, struct pci_dev *, const struct pci_device_id *)
 
void qib_pcie_ddcleanup (struct qib_devdata *)
 
int qib_pcie_params (struct qib_devdata *, u32, u32 *, struct qib_msix_entry *)
 
int qib_reinit_intr (struct qib_devdata *)
 
void qib_enable_intx (struct pci_dev *)
 
void qib_nomsi (struct qib_devdata *)
 
void qib_nomsix (struct qib_devdata *)
 
void qib_pcie_getcmd (struct qib_devdata *, u16 *, u8 *, u8 *)
 
void qib_pcie_reenable (struct qib_devdata *, u16, u8, u8)
 
dma_addr_t qib_map_page (struct pci_dev *, struct page *, unsigned long, size_t, int)
 
const charqib_get_unit_name (int unit)
 
void qib_format_hwerrors (u64 hwerrs, const struct qib_hwerror_msgs *hwerrmsgs, size_t nhwerrmsgs, char *msg, size_t lmsg)
 

Variables

struct qlogic_ib_stats qib_stats
 
struct pci_error_handlers qib_pci_err_handler
 
struct pci_driver qib_driver
 
charqib_sdma_state_names []
 
charqib_sdma_event_names []
 
struct list_head qib_dev_list
 
spinlock_t qib_devs_lock
 
u32 qib_cpulist_count
 
unsigned longqib_cpulist
 
unsigned qib_wc_pat
 
unsigned qib_cc_table_size
 
const char ib_qib_version []
 
unsigned qib_ibmtu
 
ushort qib_cfgctxts
 
ushort qib_num_cfg_vls
 
ushort qib_mini_init
 
unsigned qib_n_krcv_queues
 
unsigned qib_sdma_fetch_arb
 
unsigned qib_compat_ddr_negotiate
 
int qib_special_trigger
 
struct mutex qib_mutex
 

Macro Definition Documentation

#define ACTIVITY_TIMER   5

Definition at line 428 of file qib.h.

#define ctxt_fp (   fp)    (((struct qib_filedata *)(fp)->private_data)->rcd)

Definition at line 1175 of file qib.h.

#define IB_LINKCMD_ACTIVE   (2 << 16)

Definition at line 306 of file qib.h.

#define IB_LINKCMD_ARMED   (1 << 16)

Definition at line 305 of file qib.h.

#define IB_LINKCMD_DOWN   (0 << 16)

Definition at line 304 of file qib.h.

#define IB_LINKINITCMD_DISABLE   3

Definition at line 310 of file qib.h.

#define IB_LINKINITCMD_NOP   0

Definition at line 307 of file qib.h.

#define IB_LINKINITCMD_POLL   1

Definition at line 308 of file qib.h.

#define IB_LINKINITCMD_SLEEP   2

Definition at line 309 of file qib.h.

#define MAX_NAME_SIZE   64

Definition at line 430 of file qib.h.

#define PCI_DEVICE_ID_QLOGIC_IB_6120   0x10

Definition at line 1462 of file qib.h.

#define PCI_DEVICE_ID_QLOGIC_IB_7220   0x7220

Definition at line 1463 of file qib.h.

#define PCI_DEVICE_ID_QLOGIC_IB_7322   0x7322

Definition at line 1464 of file qib.h.

#define PCI_VENDOR_ID_PATHSCALE   0x1fc1

Definition at line 1460 of file qib.h.

#define PCI_VENDOR_ID_QLOGIC   0x1077

Definition at line 1461 of file qib.h.

#define QIB_BADINTR   0x8000 /* severe interrupt problems */

Definition at line 1229 of file qib.h.

#define QIB_CHASE_DIS_TIME   msecs_to_jiffies(160)

Definition at line 1097 of file qib.h.

#define QIB_CHASE_TIME   msecs_to_jiffies(145)

Definition at line 1096 of file qib.h.

#define QIB_CHIP_SWVERSION   QIB_CHIP_VERS_MAJ

Definition at line 93 of file qib.h.

#define QIB_CHIP_VERS_MAJ   2U

Definition at line 59 of file qib.h.

#define QIB_CHIP_VERS_MIN   0U

Definition at line 62 of file qib.h.

#define QIB_CTXT_MASTER_UNINIT   4

Definition at line 1255 of file qib.h.

#define QIB_CTXT_WAITING_RCV   2

Definition at line 1253 of file qib.h.

#define QIB_CTXT_WAITING_URG   5

Definition at line 1257 of file qib.h.

#define QIB_DCA_ENABLED   0x10000 /* Direct Cache Access enabled */

Definition at line 1230 of file qib.h.

#define QIB_DEFAULT_MTU   4096

Definition at line 333 of file qib.h.

#define qib_dev_err (   dd,
  fmt,
  ... 
)
Value:
do { \
dev_err(&(dd)->pcidev->dev, "%s: " fmt, \
qib_get_unit_name((dd)->unit), ##__VA_ARGS__); \
} while (0)

Definition at line 1480 of file qib.h.

#define qib_dev_porterr (   dd,
  port,
  fmt,
  ... 
)
Value:
do { \
dev_err(&(dd)->pcidev->dev, "%s: IB%u:%u " fmt, \
##__VA_ARGS__); \
} while (0)

Definition at line 1486 of file qib.h.

#define qib_devinfo (   pcidev,
  fmt,
  ... 
)
Value:
do { \
dev_info(&(pcidev)->dev, fmt, ##__VA_ARGS__); \
} while (0)

Definition at line 1493 of file qib.h.

#define QIB_DFLT_RCVHDRSIZE   9

Definition at line 1329 of file qib.h.

#define QIB_DIAG_MINOR_BASE   129

Definition at line 1457 of file qib.h.

#define QIB_DIAGPKT_MINOR   128

Definition at line 1456 of file qib.h.

#define QIB_DOING_RESET   0x4 /* in the middle of doing chip reset */

Definition at line 1218 of file qib.h.

#define QIB_DRV_NAME   "ib_qib"

Definition at line 1453 of file qib.h.

#define qib_early_err (   dev,
  fmt,
  ... 
)
Value:
do { \
dev_err(dev, fmt, ##__VA_ARGS__); \
} while (0)

Definition at line 1475 of file qib.h.

#define QIB_EEP_LOG_CNT   (4)

Definition at line 108 of file qib.h.

#define qib_flush_wc ( )    wmb() /* no reorder around wc flush */

Definition at line 1435 of file qib.h.

#define QIB_HAS_HDRSUPP   0x4000 /* Supports header suppression */

Definition at line 1228 of file qib.h.

#define QIB_HAS_INTX   0x800 /* Supports INTx interrupts */

Definition at line 1225 of file qib.h.

#define QIB_HAS_LINK_LATENCY   0x1 /* supports link latency (IB 1.2) */

Definition at line 1216 of file qib.h.

#define QIB_HAS_QSFP   0x20000 /* device (card instance) has QSFP */

Definition at line 1231 of file qib.h.

#define QIB_HAS_SDMA_TIMEOUT   0x80

Definition at line 1222 of file qib.h.

#define QIB_HAS_SEND_DMA   0x1000 /* Supports Send DMA */

Definition at line 1226 of file qib.h.

#define QIB_HAS_THRESH_UPDATE   0x40

Definition at line 1221 of file qib.h.

#define QIB_HAS_VLSUPP   0x2000 /* Supports multiple VLs; PBC different */

Definition at line 1227 of file qib.h.

#define QIB_HOL_INIT   1

Definition at line 1082 of file qib.h.

#define QIB_HOL_UP   0

Definition at line 1081 of file qib.h.

#define QIB_IB_CFG_HRTBT   9 /* IB heartbeat off/enable/auto; DDR/QDR only */

Definition at line 285 of file qib.h.

#define QIB_IB_CFG_LIDLMC   0 /* LID (LS16b) and Mask (MS16b) */

Definition at line 277 of file qib.h.

#define QIB_IB_CFG_LINKDEFAULT   15 /* IB link default (sleep/poll) */

Definition at line 291 of file qib.h.

#define QIB_IB_CFG_LINKLATENCY   8 /* Link Latency (IB1.2 only) */

Definition at line 284 of file qib.h.

#define QIB_IB_CFG_LREV_ENB   7 /* Auto-Lane-reversal enable */

Definition at line 283 of file qib.h.

#define QIB_IB_CFG_LSTATE   18 /* update linkcmd and linkinitcmd in IBC */

Definition at line 294 of file qib.h.

#define QIB_IB_CFG_LWID   3 /* currently active Link-width */

Definition at line 279 of file qib.h.

#define QIB_IB_CFG_LWID_ENB   2 /* allowed Link-width */

Definition at line 278 of file qib.h.

#define QIB_IB_CFG_MTU   17 /* update MTU in IBC */

Definition at line 293 of file qib.h.

#define QIB_IB_CFG_OP_VLS   10 /* operational VLs */

Definition at line 286 of file qib.h.

#define QIB_IB_CFG_OVERRUN_THRESH   13 /* IB overrun threshold */

Definition at line 289 of file qib.h.

#define QIB_IB_CFG_PHYERR_THRESH   14 /* IB PHY error threshold */

Definition at line 290 of file qib.h.

#define QIB_IB_CFG_PKEYS   16 /* update partition keys */

Definition at line 292 of file qib.h.

#define QIB_IB_CFG_PMA_TICKS   20 /* PMA sample tick resolution */

Definition at line 296 of file qib.h.

#define QIB_IB_CFG_PORT   21 /* switch port we are connected to */

Definition at line 297 of file qib.h.

#define QIB_IB_CFG_RXPOL_ENB   6 /* Auto-RX-polarity enable */

Definition at line 282 of file qib.h.

#define QIB_IB_CFG_SPD   5 /* current Link spd */

Definition at line 281 of file qib.h.

#define QIB_IB_CFG_SPD_ENB   4 /* allowed Link speeds */

Definition at line 280 of file qib.h.

#define QIB_IB_CFG_VL_HIGH_CAP   11 /* num of VL high priority weights */

Definition at line 287 of file qib.h.

#define QIB_IB_CFG_VL_HIGH_LIMIT   19

Definition at line 295 of file qib.h.

#define QIB_IB_CFG_VL_LOW_CAP   12 /* num of VL low priority weights */

Definition at line 288 of file qib.h.

#define QIB_IB_DDR   2

Definition at line 330 of file qib.h.

#define QIB_IB_LINKACTIVE   2

Definition at line 317 of file qib.h.

#define QIB_IB_LINKARM   1

Definition at line 316 of file qib.h.

#define QIB_IB_LINKDOWN   0

Definition at line 315 of file qib.h.

#define QIB_IB_LINKDOWN_DISABLE   5

Definition at line 320 of file qib.h.

#define QIB_IB_LINKDOWN_ONLY   3

Definition at line 318 of file qib.h.

#define QIB_IB_LINKDOWN_SLEEP   4

Definition at line 319 of file qib.h.

#define QIB_IB_QDR   4

Definition at line 331 of file qib.h.

#define QIB_IB_SDR   1

Definition at line 329 of file qib.h.

#define QIB_IB_TBL_VL_HIGH_ARB   1 /* Get/set VL high priority weights */

Definition at line 341 of file qib.h.

#define QIB_IB_TBL_VL_LOW_ARB   2 /* Get/set VL low priority weights */

Definition at line 342 of file qib.h.

#define QIB_INITTED   0x2 /* chip and driver up and initted */

Definition at line 1217 of file qib.h.

#define QIB_LED_LOG   2 /* Logical (link) YELLOW LED */

Definition at line 1292 of file qib.h.

#define QIB_LED_PHYS   1 /* Physical (linktraining) GREEN LED */

Definition at line 1291 of file qib.h.

#define QIB_MAX_IB_PORTS   2

Definition at line 336 of file qib.h.

#define QIB_NMINORS   255

Definition at line 1458 of file qib.h.

#define QIB_NODMA_RTAIL   0x200 /* rcvhdrtail register DMA enabled */

Definition at line 1224 of file qib.h.

#define QIB_OUI   0x001175

Definition at line 65 of file qib.h.

#define QIB_OUI_LSB   40

Definition at line 66 of file qib.h.

#define QIB_PBC_LENGTH_MASK   ((1 << 11) - 1)

Definition at line 1248 of file qib.h.

#define QIB_PIO_FLUSH_WC   0x10 /* Needs Write combining flush for PIO */

Definition at line 1220 of file qib.h.

#define QIB_PRESENT   0x8 /* chip accesses can be done */

Definition at line 1219 of file qib.h.

#define QIB_RCVCTRL_BP_DIS   0x0200

Definition at line 358 of file qib.h.

#define QIB_RCVCTRL_BP_ENB   0x0100

Definition at line 357 of file qib.h.

#define QIB_RCVCTRL_CTXT_DIS   0x08

Definition at line 352 of file qib.h.

#define QIB_RCVCTRL_CTXT_ENB   0x04

Definition at line 351 of file qib.h.

#define QIB_RCVCTRL_INTRAVAIL_DIS   0x20

Definition at line 354 of file qib.h.

#define QIB_RCVCTRL_INTRAVAIL_ENB   0x10

Definition at line 353 of file qib.h.

#define QIB_RCVCTRL_PKEY_DIS   0x80

Definition at line 356 of file qib.h.

#define QIB_RCVCTRL_PKEY_ENB   0x40 /* Note, default is enabled */

Definition at line 355 of file qib.h.

#define QIB_RCVCTRL_TAILUPD_DIS   0x02

Definition at line 350 of file qib.h.

#define QIB_RCVCTRL_TAILUPD_ENB   0x01

Definition at line 349 of file qib.h.

#define QIB_RCVCTRL_TIDFLOW_DIS   0x0800

Definition at line 360 of file qib.h.

#define QIB_RCVCTRL_TIDFLOW_ENB   0x0400

Definition at line 359 of file qib.h.

#define QIB_RCVHDR_ENTSIZE   32

Definition at line 1342 of file qib.h.

#define QIB_SDMA_SENDCTRL_OP_CLEANUP   (1U << 3)

Definition at line 1087 of file qib.h.

#define QIB_SDMA_SENDCTRL_OP_DRAIN   (1U << 4)

Definition at line 1088 of file qib.h.

#define QIB_SDMA_SENDCTRL_OP_ENABLE   (1U << 0)

Definition at line 1084 of file qib.h.

#define QIB_SDMA_SENDCTRL_OP_HALT   (1U << 2)

Definition at line 1086 of file qib.h.

#define QIB_SDMA_SENDCTRL_OP_INTENABLE   (1U << 1)

Definition at line 1085 of file qib.h.

#define QIB_SDMA_TXREQ_F_FREEBUF   0x8

Definition at line 264 of file qib.h.

#define QIB_SDMA_TXREQ_F_FREEDESC   0x10

Definition at line 265 of file qib.h.

#define QIB_SDMA_TXREQ_F_HEADTOHOST   0x2

Definition at line 262 of file qib.h.

#define QIB_SDMA_TXREQ_F_INTREQ   0x4

Definition at line 263 of file qib.h.

#define QIB_SDMA_TXREQ_F_USELARGEBUF   0x1

Definition at line 261 of file qib.h.

#define QIB_SDMA_TXREQ_S_ABORTED   2

Definition at line 269 of file qib.h.

#define QIB_SDMA_TXREQ_S_OK   0

Definition at line 267 of file qib.h.

#define QIB_SDMA_TXREQ_S_SENDERROR   1

Definition at line 268 of file qib.h.

#define QIB_SDMA_TXREQ_S_SHUTDOWN   3

Definition at line 270 of file qib.h.

#define QIB_SENDCTRL_AVAIL_BLIP   (0x10000)

Definition at line 374 of file qib.h.

#define QIB_SENDCTRL_AVAIL_DIS   (0x4000)

Definition at line 372 of file qib.h.

#define QIB_SENDCTRL_AVAIL_ENB   (0x8000)

Definition at line 373 of file qib.h.

#define QIB_SENDCTRL_CLEAR   (0x100000)

Definition at line 378 of file qib.h.

#define QIB_SENDCTRL_DISARM   (0x1000)

Definition at line 369 of file qib.h.

#define QIB_SENDCTRL_DISARM_ALL   (0x200000)

Definition at line 379 of file qib.h.

#define QIB_SENDCTRL_DISARM_BUF (   bufn)    ((bufn) | QIB_SENDCTRL_DISARM)

Definition at line 370 of file qib.h.

#define QIB_SENDCTRL_FLUSH   (0x80000)

Definition at line 377 of file qib.h.

#define QIB_SENDCTRL_SEND_DIS   (0x20000)

Definition at line 375 of file qib.h.

#define QIB_SENDCTRL_SEND_ENB   (0x40000)

Definition at line 376 of file qib.h.

#define QIB_TRACE_MINOR   127

Definition at line 1455 of file qib.h.

#define QIB_TRAFFIC_ACTIVE_THRESHOLD   (2000)

Definition at line 100 of file qib.h.

#define QIB_TWSI_NO_DEV   0xFF

Definition at line 1272 of file qib.h.

#define QIB_USE_SPCL_TRIG   0x100 /* SpecialTrigger launch enabled */

Definition at line 1223 of file qib.h.

#define QIB_USER_MINOR_BASE   0

Definition at line 1454 of file qib.h.

#define QIBL_IB_AUTONEG_FAILED   0x2000 /* non-IBTA DDR/QDR neg failed */

Definition at line 1243 of file qib.h.

#define QIBL_IB_AUTONEG_INPROG   0x1000 /* non-IBTA DDR/QDR neg active */

Definition at line 1242 of file qib.h.

#define QIBL_IB_FORCE_NOTIFY   0x8000 /* force notify on next ib change */

Definition at line 1245 of file qib.h.

#define QIBL_IB_LINK_DISABLED
Value:
0x4000 /* Linkdown-disable forced,
* Do not try to bring up */

Definition at line 1244 of file qib.h.

#define QIBL_LINKACTIVE   0x40 /* IB link is ACTIVE */

Definition at line 1240 of file qib.h.

#define QIBL_LINKARMED   0x20 /* IB link is ARMED */

Definition at line 1239 of file qib.h.

#define QIBL_LINKDOWN   0x8 /* IB link is down */

Definition at line 1237 of file qib.h.

#define QIBL_LINKINIT   0x10 /* IB link level is up */

Definition at line 1238 of file qib.h.

#define QIBL_LINKV   0x1 /* IB link state valid */

Definition at line 1236 of file qib.h.

#define QIBPORTCNTR_BADFORMAT   17U

Definition at line 407 of file qib.h.

#define QIBPORTCNTR_ERR_RLEN   18U

Definition at line 408 of file qib.h.

#define QIBPORTCNTR_ERRICRC   14U

Definition at line 404 of file qib.h.

#define QIBPORTCNTR_ERRLINK   23U

Definition at line 413 of file qib.h.

#define QIBPORTCNTR_ERRLPCRC   16U

Definition at line 406 of file qib.h.

#define QIBPORTCNTR_ERRPKEY   29U

Definition at line 420 of file qib.h.

#define QIBPORTCNTR_ERRVCRC   15U

Definition at line 405 of file qib.h.

#define QIBPORTCNTR_EXCESSBUFOVFL   22U

Definition at line 412 of file qib.h.

#define QIBPORTCNTR_IBLINKDOWN   24U

Definition at line 414 of file qib.h.

#define QIBPORTCNTR_IBLINKERRRECOV   25U

Definition at line 415 of file qib.h.

#define QIBPORTCNTR_IBSYMBOLERR   19U

Definition at line 409 of file qib.h.

#define QIBPORTCNTR_INVALIDRLEN   20U

Definition at line 410 of file qib.h.

#define QIBPORTCNTR_KHDROVFL   30U

Definition at line 421 of file qib.h.

#define QIBPORTCNTR_LLI   26U

Definition at line 416 of file qib.h.

#define QIBPORTCNTR_PKTRCV   6U

Definition at line 395 of file qib.h.

#define QIBPORTCNTR_PKTSEND   0U

Definition at line 388 of file qib.h.

#define QIBPORTCNTR_PSINTERVAL   31U

Definition at line 423 of file qib.h.

#define QIBPORTCNTR_PSRCVDATA   7U

Definition at line 396 of file qib.h.

#define QIBPORTCNTR_PSRCVPKTS   8U

Definition at line 397 of file qib.h.

#define QIBPORTCNTR_PSSTART   32U

Definition at line 424 of file qib.h.

#define QIBPORTCNTR_PSSTAT   33U

Definition at line 425 of file qib.h.

#define QIBPORTCNTR_PSXMITDATA   2U

Definition at line 390 of file qib.h.

#define QIBPORTCNTR_PSXMITPKTS   3U

Definition at line 391 of file qib.h.

#define QIBPORTCNTR_PSXMITWAIT   4U

Definition at line 392 of file qib.h.

#define QIBPORTCNTR_RCVEBP   9U

Definition at line 398 of file qib.h.

#define QIBPORTCNTR_RCVOVFL   10U

Definition at line 399 of file qib.h.

#define QIBPORTCNTR_RXDROPPKT   27U

Definition at line 418 of file qib.h.

#define QIBPORTCNTR_RXLOCALPHYERR   12U

Definition at line 402 of file qib.h.

#define QIBPORTCNTR_RXVLERR   13U

Definition at line 403 of file qib.h.

#define QIBPORTCNTR_SENDSTALL   5U

Definition at line 393 of file qib.h.

#define QIBPORTCNTR_UNSUPVL   21U

Definition at line 411 of file qib.h.

#define QIBPORTCNTR_VL15PKTDROP   28U

Definition at line 419 of file qib.h.

#define QIBPORTCNTR_WORDRCV   11U

Definition at line 400 of file qib.h.

#define QIBPORTCNTR_WORDSEND   1U

Definition at line 389 of file qib.h.

#define QLOGIC_IB_HWE_MSG (   a,
  b 
)    { .mask = a, .msg = b }

Definition at line 1507 of file qib.h.

#define STATUS_TIMEOUT   60

Definition at line 1451 of file qib.h.

#define subctxt_fp (   fp)    (((struct qib_filedata *)(fp)->private_data)->subctxt)

Definition at line 1177 of file qib.h.

#define tidcursor_fp (   fp)    (((struct qib_filedata *)(fp)->private_data)->tidcursor)

Definition at line 1179 of file qib.h.

#define TXCHK_CHG_TYPE_DIS1   3

Definition at line 1091 of file qib.h.

#define TXCHK_CHG_TYPE_ENAB1   2

Definition at line 1092 of file qib.h.

#define TXCHK_CHG_TYPE_KERN   1

Definition at line 1093 of file qib.h.

#define TXCHK_CHG_TYPE_USER   0

Definition at line 1094 of file qib.h.

#define user_sdma_queue_fp (   fp)    (((struct qib_filedata *)(fp)->private_data)->pq)

Definition at line 1181 of file qib.h.

Typedef Documentation

typedef int(* diag_hook)(struct qib_devdata *dd, const struct diag_observer *op, u32 offs, u64 *data, u64 mask, int only_32)

Definition at line 686 of file qib.h.

Enumeration Type Documentation

Enumerator:
qib_sdma_event_e00_go_hw_down 
qib_sdma_event_e10_go_hw_start 
qib_sdma_event_e20_hw_started 
qib_sdma_event_e30_go_running 
qib_sdma_event_e40_sw_cleaned 
qib_sdma_event_e50_hw_cleaned 
qib_sdma_event_e60_hw_halted 
qib_sdma_event_e70_go_idle 
qib_sdma_event_e7220_err_halted 
qib_sdma_event_e7322_err_halted 
qib_sdma_event_e90_timer_tick 

Definition at line 456 of file qib.h.

Enumerator:
qib_sdma_state_s00_hw_down 
qib_sdma_state_s10_hw_start_up_wait 
qib_sdma_state_s20_idle 
qib_sdma_state_s30_sw_clean_up_wait 
qib_sdma_state_s40_hw_clean_up_wait 
qib_sdma_state_s50_hw_halt_wait 
qib_sdma_state_s99_running 

Definition at line 446 of file qib.h.

Function Documentation

void __qib_sdma_intr ( struct qib_pportdata )

Definition at line 424 of file qib_sdma.c.

void __qib_sdma_process_event ( struct qib_pportdata ,
enum  qib_sdma_events 
)

Definition at line 726 of file qib_sdma.c.

int init_chip_wc_pat ( struct qib_devdata dd,
u32   
)

Definition at line 1649 of file qib_init.c.

struct qib_devdata* qib_alloc_devdata ( struct pci_dev pdev,
size_t  extra 
)
read

Definition at line 1057 of file qib_init.c.

void qib_bad_intrstatus ( struct qib_devdata )

Definition at line 217 of file qib_intr.c.

void qib_cancel_sends ( struct qib_pportdata )

Definition at line 456 of file qib_tx.c.

void qib_cdev_cleanup ( struct cdev **  cdevp,
struct device **  devp 
)

Definition at line 2227 of file qib_file_ops.c.

int qib_cdev_init ( int  minor,
const char name,
const struct file_operations fops,
struct cdev **  cdevp,
struct device **  devp 
)

Definition at line 2183 of file qib_file_ops.c.

void qib_chg_pioavailkernel ( struct qib_devdata dd,
unsigned  start,
unsigned  len,
u32  avail,
struct qib_ctxtdata rcd 
)

qib_chg_pioavailkernel - change which send buffers are available for kernel : the qlogic_ib device : the starting send buffer number : the number of send buffers : true if the buffers are available for kernel use, false otherwise

Definition at line 384 of file qib_tx.c.

void qib_chip_cleanup ( struct qib_devdata )
void qib_chip_done ( void  )
void qib_clear_symerror_on_linkup ( unsigned long  opaque)

Definition at line 174 of file qib_intr.c.

int qib_count_active_units ( void  )

Definition at line 95 of file qib_driver.c.

int qib_count_units ( int npresentp,
int nupp 
)

Definition at line 124 of file qib_driver.c.

struct qib_ctxtdata* qib_create_ctxtdata ( struct qib_pportdata ,
u32   
)
read

Definition at line 164 of file qib_init.c.

int qib_create_ctxts ( struct qib_devdata dd)

Definition at line 120 of file qib_init.c.

int qib_create_port_files ( struct ib_device ibdev,
u8  port_num,
struct kobject kobj 
)

Definition at line 702 of file qib_sysfs.c.

int qib_create_rcvhdrq ( struct qib_devdata dd,
struct qib_ctxtdata rcd 
)

qib_create_rcvhdrq - create a receive header queue : the qlogic_ib device : the context data

This must be contiguous memory (from an i/o perspective), and must be DMA'able (which means for some systems, it will go through an IOMMU, or be forced into a low address range).

Definition at line 1490 of file qib_init.c.

int qib_decode_err ( struct qib_devdata dd,
char buf,
size_t  blen,
u64  err 
)
void qib_dev_cleanup ( void  )

Definition at line 2266 of file qib_file_ops.c.

int qib_dev_init ( void  )

Definition at line 2245 of file qib_file_ops.c.

int qib_device_create ( struct qib_devdata )

Definition at line 2310 of file qib_file_ops.c.

void qib_device_remove ( struct qib_devdata )

Definition at line 2325 of file qib_file_ops.c.

int qib_diag_add ( struct qib_devdata )

Definition at line 160 of file qib_diag.c.

void qib_diag_remove ( struct qib_devdata )

Definition at line 183 of file qib_diag.c.

void qib_disable_after_error ( struct qib_devdata )

Definition at line 1108 of file qib_init.c.

void qib_disable_wc ( struct qib_devdata dd)

qib_disable_wc - disable write combining for MMIO writes to the device : qlogic_ib device

Definition at line 142 of file qib_wc_x86_64.c.

void qib_disarm_piobufs ( struct qib_devdata dd,
unsigned  first,
unsigned  cnt 
)

qib_disarm_piobufs - cancel a range of PIO buffers : the qlogic_ib device : the first PIO buffer to cancel : the number of PIO buffers to cancel

Cancel a range of PIO buffers. Used at user process close, in case it died while writing to a PIO buffer.

Definition at line 61 of file qib_tx.c.

int qib_disarm_piobufs_ifneeded ( struct qib_ctxtdata )

Definition at line 80 of file qib_tx.c.

void qib_disarm_piobufs_set ( struct qib_devdata ,
unsigned long ,
unsigned   
)

Definition at line 171 of file qib_tx.c.

void qib_dump_lookup_output_queue ( struct qib_devdata )
int qib_eeprom_read ( struct qib_devdata dd,
u8  eeprom_offset,
void buff,
int  len 
)

qib_eeprom_read - receives bytes from the eeprom via I2C : the qlogic_ib device : address to read from : where to store result : number of bytes to receive

Definition at line 53 of file qib_eeprom.c.

int qib_eeprom_write ( struct qib_devdata dd,
u8  eeprom_offset,
const void buff,
int  len 
)

qib_eeprom_write - writes data to the eeprom via I2C : the qlogic_ib device : where to place data : data to write : number of bytes to write

Definition at line 100 of file qib_eeprom.c.

void qib_enable_intx ( struct pci_dev )

Definition at line 418 of file qib_pcie.c.

int qib_enable_wc ( struct qib_devdata dd)

qib_enable_wc - enable write combining for MMIO writes to the device : qlogic_ib device

Nothing to do on PowerPC, so just return without error.

qib_enable_wc - enable write combining for MMIO writes to the device : qlogic_ib device

This routine is x86_64-specific; it twiddles the CPU's MTRRs to enable write combining.

Definition at line 46 of file qib_wc_ppc64.c.

int __exit qib_exit_qibfs ( void  )

Definition at line 613 of file qib_fs.c.

void qib_force_pio_avail_update ( struct qib_devdata )

Definition at line 512 of file qib_tx.c.

void qib_format_hwerrors ( u64  hwerrs,
const struct qib_hwerror_msgs hwerrmsgs,
size_t  nhwerrmsgs,
char msg,
size_t  msgl 
)

qib_format_hwerrors - format hardware error messages for display hardware errors bit vector hardware error descriptions number of hwerrmsgs message buffer message buffer length

Definition at line 62 of file qib_intr.c.

void qib_free_ctxtdata ( struct qib_devdata dd,
struct qib_ctxtdata rcd 
)

qib_free_ctxtdata - free a context's allocated data : the qlogic_ib device : the ctxtdata structure

free up any allocated data for a context This should not touch anything that would affect a simultaneous re-allocation of context data, because it is called after qib_mutex is released (and can be called from reinit as well). It should never change any chip state, or global driver state.

Definition at line 909 of file qib_init.c.

void qib_free_data ( struct qib_ctxtdata dd)
void qib_free_devdata ( struct qib_devdata )

Definition at line 1037 of file qib_init.c.

void qib_get_eeprom_info ( struct qib_devdata dd)

qib_get_eeprom_info- get the GUID et al. from the TSWI EEPROM device : the qlogic_ib device

We have the capability to use the nguid field, and get the guid from the first chip's flash, to use for all of them.

Definition at line 144 of file qib_eeprom.c.

const char* qib_get_unit_name ( int  unit)

Definition at line 84 of file qib_driver.c.

int qib_get_user_pages ( unsigned long  start_page,
size_t  num_pages,
struct page **  p 
)

qib_get_user_pages - lock user pages into memory : the start page : the number of pages : the output page structures

This function takes a given start page (page aligned user virtual address) and pins it and the following specified number of pages. For now, num_pages is always 1, but that will probably change at some point (because caller is doing expected sends on a single virtually contiguous buffer, so we can do all pages at once).

Definition at line 132 of file qib_user_pages.c.

u32 __iomem* qib_getsendbuf_range ( struct qib_devdata ,
u32 ,
u32  ,
u32   
)

Definition at line 284 of file qib_tx.c.

void qib_handle_e_ibstatuschanged ( struct qib_pportdata ,
u64   
)

Definition at line 83 of file qib_intr.c.

void qib_handle_urcv ( struct qib_devdata ,
u64   
)

Definition at line 190 of file qib_intr.c.

void qib_hol_down ( struct qib_pportdata )

Definition at line 517 of file qib_tx.c.

void qib_hol_event ( unsigned  long)

Definition at line 554 of file qib_tx.c.

void qib_hol_init ( struct qib_pportdata )

Definition at line 532 of file qib_tx.c.

void qib_hol_up ( struct qib_pportdata )

Definition at line 546 of file qib_tx.c.

void qib_inc_eeprom_err ( struct qib_devdata dd,
u32  eidx,
u32  incr 
)

qib_inc_eeprom_err - increment one of the four error counters that are logged to EEPROM. : the qlogic_ib device : 0..3, the counter to increment : how much to add

Each counter is 8-bits, and saturates at 255 (0xFF). They are copied to the EEPROM (aka flash) whenever qib_update_eeprom_log() is called, but it can only be called in a context that allows sleep. This function can be called even at interrupt level.

Definition at line 445 of file qib_eeprom.c.

int qib_init ( struct qib_devdata dd,
int  reinit 
)

qib_init - do the actual initialization sequence on the chip : the qlogic_ib device : reinitializing, so don't allocate new memory

Do the actual initialization sequence on the chip. This is done both from the init routine called from the PCI infrastructure, and when we reset the chip, or detect that it was reset internally, or it's administratively re-enabled.

Memory allocation here and in called routines is only done in the first case (reinit == 0). We have to be careful, because even without memory allocation, we need to re-write all the chip registers TIDs, etc. after the reset or enable has completed.

Definition at line 621 of file qib_init.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.

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

qib_init_iba7220_funcs - set up the chip-specific function pointers : the pci_dev for qlogic_ib device : pci_device_id struct for this dev

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

Definition at line 4530 of file qib_iba7220.c.

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

qib_init_iba7322_funcs - set up the chip-specific function pointers : the pci_dev for qlogic_ib device : pci_device_id struct for this dev

Also allocates, inits, and returns the devdata struct for this device instance

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

Definition at line 6824 of file qib_iba7322.c.

void qib_init_pportdata ( struct qib_pportdata ,
struct qib_devdata ,
u8  ,
u8   
)

Definition at line 207 of file qib_init.c.

int __init qib_init_qibfs ( void  )

Definition at line 608 of file qib_fs.c.

u32 qib_kreceive ( struct qib_ctxtdata ,
u32 ,
u32  
)

Definition at line 444 of file qib_driver.c.

struct qib_devdata* qib_lookup ( int  unit)
read

Definition at line 784 of file qib_init.c.

dma_addr_t qib_map_page ( struct pci_dev hwdev,
struct page page,
unsigned long  offset,
size_t  size,
int  direction 
)

qib_map_page - a safety wrapper around pci_map_page()

A dma_addr of all 0's is interpreted by the chip as "disabled". Unfortunately, it can also be a valid dma_addr returned on some architectures.

The powerpc iommu assigns dma_addrs in ascending order, so we don't have to bother with retries or mapping a dummy page to insure we don't just get the same mapping again.

I'm sure we won't be so lucky with other iommu's, so FIXME.

Definition at line 101 of file qib_user_pages.c.

void qib_nomsi ( struct qib_devdata )

Definition at line 400 of file qib_pcie.c.

void qib_nomsix ( struct qib_devdata )

Definition at line 409 of file qib_pcie.c.

void qib_pcie_ddcleanup ( struct qib_devdata )

Definition at line 177 of file qib_pcie.c.

int qib_pcie_ddinit ( struct qib_devdata ,
struct pci_dev ,
const struct pci_device_id  
)

Definition at line 135 of file qib_pcie.c.

void qib_pcie_getcmd ( struct qib_devdata ,
u16 ,
u8 ,
u8  
)

Definition at line 451 of file qib_pcie.c.

int qib_pcie_init ( struct pci_dev ,
const struct pci_device_id  
)

Definition at line 63 of file qib_pcie.c.

int qib_pcie_params ( struct qib_devdata ,
u32  ,
u32 ,
struct qib_msix_entry  
)

Definition at line 272 of file qib_pcie.c.

void qib_pcie_reenable ( struct qib_devdata ,
u16  ,
u8  ,
u8   
)

Definition at line 458 of file qib_pcie.c.

void qib_pio_copy ( void __iomem to,
const void from,
size_t  count 
)

qib_pio_copy - copy data to MMIO space, in multiples of 32-bits : destination, in MMIO space (must be 64-bit aligned) : source (must be 64-bit aligned) : number of 32-bit quantities to copy

Copy data from kernel space to MMIO space, in multiples of 32 bits at a time. Order of access is not guaranteed, nor is a memory barrier performed afterwards.

Definition at line 45 of file qib_pio_copy.c.

int qib_qsfp_dump ( struct qib_pportdata ppd,
char buf,
int  len 
)

Definition at line 496 of file qib_qsfp.c.

int qib_register_observer ( struct qib_devdata dd,
const struct diag_observer op 
)

Definition at line 688 of file qib_diag.c.

int qib_reinit_intr ( struct qib_devdata )

Definition at line 350 of file qib_pcie.c.

void qib_release_user_pages ( struct page **  ,
size_t   
)

Definition at line 146 of file qib_user_pages.c.

int qib_reset_device ( int  unit)

qib_reset_device - reset the chip if possible : the device to reset

Whether or not reset is successful, we attempt to re-initialize the chip (that is, much like a driver unload/reload). We clear the INITTED flag so that the various entry points will fail until we reinitialize. For now, we only allow this if no user contexts are open that use chip resources

Definition at line 752 of file qib_driver.c.

void qib_sdma_intr ( struct qib_pportdata )

Definition at line 413 of file qib_sdma.c.

int qib_sdma_make_progress ( struct qib_pportdata dd)

Definition at line 348 of file qib_sdma.c.

void qib_sdma_process_event ( struct qib_pportdata ,
enum  qib_sdma_events 
)

Definition at line 711 of file qib_sdma.c.

int qib_sdma_running ( struct qib_pportdata )

Definition at line 488 of file qib_sdma.c.

void qib_sdma_update_tail ( struct qib_pportdata ,
u16   
)
int qib_sdma_verbs_send ( struct qib_pportdata ,
struct qib_sge_state ,
u32  ,
struct qib_verbs_txreq  
)

Definition at line 527 of file qib_sdma.c.

void qib_sendbuf_done ( struct qib_devdata ,
unsigned   
)

Definition at line 366 of file qib_tx.c.

void qib_set_ctxtcnt ( struct qib_devdata )

Definition at line 101 of file qib_init.c.

void qib_set_led_override ( struct qib_pportdata ppd,
unsigned int  val 
)

Definition at line 701 of file qib_driver.c.

int qib_set_lid ( struct qib_pportdata ,
u32  ,
u8   
)

Definition at line 651 of file qib_driver.c.

int qib_set_linkstate ( struct qib_pportdata ,
u8   
)

Definition at line 196 of file qib_driver.c.

int qib_set_mtu ( struct qib_pportdata ppd,
u16  arg 
)

qib_set_mtu - set the MTU : the perport data

  • : the new MTU

We can handle "any" incoming size, the issue here is whether we need to restrict our outgoing size. For now, we don't do any sanity checking on this, and we don't deal with what happens to programs that are already running when the size changes. NOTE: changing the MTU will usually cause the IBC to go back to link INIT state...

Definition at line 612 of file qib_driver.c.

int qib_set_uevent_bits ( struct qib_pportdata ,
const int   
)

Definition at line 1912 of file qib_file_ops.c.

int qib_setup_eagerbufs ( struct qib_ctxtdata rcd)

allocate eager buffers, both kernel and user contexts. : the context we are setting up.

Allocate the eager TID buffers and program them into hip. They are no longer completely contiguous, we do multiple allocation calls. Otherwise we get the OOM code involved, by asking for too much per call, with disastrous results on some kernels.

Definition at line 1560 of file qib_init.c.

int qib_setup_sdma ( struct qib_pportdata )

Definition at line 430 of file qib_sdma.c.

void qib_teardown_sdma ( struct qib_pportdata )

Definition at line 474 of file qib_sdma.c.

int qib_twsi_blk_rd ( struct qib_devdata dd,
int  dev,
int  addr,
void buffer,
int  len 
)

Definition at line 354 of file qib_twsi.c.

int qib_twsi_blk_wr ( struct qib_devdata dd,
int  dev,
int  addr,
const void buffer,
int  len 
)

Definition at line 432 of file qib_twsi.c.

int qib_twsi_reset ( struct qib_devdata dd)

qib_twsi_reset - reset I2C communication : the qlogic_ib device

Definition at line 262 of file qib_twsi.c.

int qib_unordered_wc ( void  )

qib_unordered_wc - indicate whether write combining is unordered

Because our performance depends on our ability to do write combining mmio writes in the most efficient way, we need to know if we are on a processor that may reorder stores when write combining.

qib_unordered_wc - indicate whether write combining is ordered

Because our performance depends on our ability to do write combining mmio writes in the most efficient way, we need to know if we are on an Intel or AMD x86_64 processor. AMD x86_64 processors flush WC buffers out in the order completed, and so no special flushing is required to get correct ordering. Intel processors, however, will flush write buffers out in "random" orders, and so explicit ordering is needed at times.

Definition at line 59 of file qib_wc_ppc64.c.

int qib_update_eeprom_log ( struct qib_devdata dd)

qib_update_eeprom_log - copy active-time and error counters to eeprom : the qlogic_ib device

Although the time is kept as seconds in the qib_devdata struct, it is rounded to hours for re-write, as we have only 16 bits in EEPROM. First-cut code reads whole (expected) struct qib_flash, modifies, re-writes. Future direction: read/write only what we need, assuming that the EEPROM had to have been "good enough" for driver init, and if not, we aren't making it worse.

Definition at line 297 of file qib_eeprom.c.

int qib_verbs_register_sysfs ( struct qib_devdata )

Definition at line 803 of file qib_sysfs.c.

void qib_verbs_unregister_sysfs ( struct qib_devdata )

Definition at line 820 of file qib_sysfs.c.

int qib_wait_linkstate ( struct qib_pportdata ppd,
u32  state,
int  msecs 
)

qib_wait_linkstate - wait for an IB link state change to occur : the qlogic_ib device : the state to wait for : the number of milliseconds to wait

wait up to msecs milliseconds for IB link state change to occur for now, take the easy polling route. Currently used only by qib_set_linkstate. Returns 0 if state reached, otherwise -ETIMEDOUT state can have multiple states set, for any of several transitions.

Definition at line 168 of file qib_driver.c.

int qibfs_add ( struct qib_devdata )

Definition at line 572 of file qib_fs.c.

int qibfs_remove ( struct qib_devdata )

Definition at line 591 of file qib_fs.c.

Variable Documentation

const char ib_qib_version[]

Definition at line 49 of file qib_driver.c.

unsigned qib_cc_table_size

Definition at line 79 of file qib_init.c.

ushort qib_cfgctxts

Definition at line 63 of file qib_init.c.

unsigned qib_compat_ddr_negotiate

Definition at line 59 of file qib_driver.c.

unsigned long* qib_cpulist

Definition at line 98 of file qib_init.c.

u32 qib_cpulist_count

Definition at line 97 of file qib_init.c.

struct list_head qib_dev_list
spinlock_t qib_devs_lock
struct pci_driver qib_driver

Definition at line 1153 of file qib_init.c.

unsigned qib_ibmtu

Definition at line 55 of file qib_driver.c.

ushort qib_mini_init

Definition at line 71 of file qib_init.c.

struct mutex qib_mutex
unsigned qib_n_krcv_queues

Definition at line 75 of file qib_init.c.

ushort qib_num_cfg_vls

Definition at line 106 of file qib_iba7322.c.

struct pci_error_handlers qib_pci_err_handler

Definition at line 748 of file qib_pcie.c.

char* qib_sdma_event_names[]

Definition at line 67 of file qib_sdma.c.

unsigned qib_sdma_fetch_arb

Definition at line 48 of file qib_tx.c.

char* qib_sdma_state_names[]

Definition at line 57 of file qib_sdma.c.

int qib_special_trigger

Definition at line 570 of file qib_iba7220.c.

Definition at line 82 of file qib_driver.c.

unsigned qib_wc_pat

Definition at line 88 of file qib_init.c.