#ifndef _HFI1_KERNEL_H
#define _HFI1_KERNEL_H
#include <linux/refcount.h>
#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 <linux/cdev.h>
#include <linux/delay.h>
#include <linux/kthread.h>
#include <linux/i2c.h>
#include <linux/i2c-algo-bit.h>
#include <linux/xarray.h>
#include <rdma/ib_hdrs.h>
#include <rdma/opa_addr.h>
#include <linux/rhashtable.h>
#include <rdma/rdma_vt.h>
#include "chip_registers.h"
#include "common.h"
#include "opfn.h"
#include "verbs.h"
#include "pio.h"
#include "chip.h"
#include "mad.h"
#include "qsfp.h"
#include "platform.h"
#include "affinity.h"
#include "msix.h"
#define HFI1_CHIP_VERS_MAJ …
#define HFI1_CHIP_VERS_MIN …
#define HFI1_OUI …
#define HFI1_OUI_LSB …
#define DROP_PACKET_OFF …
#define DROP_PACKET_ON …
#define NEIGHBOR_TYPE_HFI …
#define NEIGHBOR_TYPE_SWITCH …
#define HFI1_MAX_ACTIVE_WORKQUEUE_ENTRIES …
extern unsigned long hfi1_cap_mask;
#define HFI1_CAP_KGET_MASK(mask, cap) …
#define HFI1_CAP_UGET_MASK(mask, cap) …
#define HFI1_CAP_KGET(cap) …
#define HFI1_CAP_UGET(cap) …
#define HFI1_CAP_IS_KSET(cap) …
#define HFI1_CAP_IS_USET(cap) …
#define HFI1_MISC_GET() …
#define HFI1_ODR_MASK(rsn) …
#define HFI1_CTRL_CTXT …
#define NUM_CCE_ERR_STATUS_COUNTERS …
#define NUM_RCV_ERR_STATUS_COUNTERS …
#define NUM_MISC_ERR_STATUS_COUNTERS …
#define NUM_SEND_PIO_ERR_STATUS_COUNTERS …
#define NUM_SEND_DMA_ERR_STATUS_COUNTERS …
#define NUM_SEND_EGRESS_ERR_STATUS_COUNTERS …
#define NUM_SEND_ERR_STATUS_COUNTERS …
#define NUM_SEND_CTXT_ERR_STATUS_COUNTERS …
#define NUM_SEND_DMA_ENG_ERR_STATUS_COUNTERS …
struct hfi1_ib_stats { … };
extern struct hfi1_ib_stats hfi1_stats;
extern const struct pci_error_handlers hfi1_pci_err_handler;
extern int num_driver_cntrs;
#define HFI1_TRAFFIC_ACTIVE_THRESHOLD …
struct hfi1_opcode_stats_perctx;
struct ctxt_eager_bufs { … };
struct exp_tid_set { … };
struct hfi1_ctxtdata;
intr_handler;
rhf_rcv_function_ptr;
struct tid_queue { … };
struct hfi1_ctxtdata { … };
static inline u32 rcvhdrq_size(struct hfi1_ctxtdata *rcd)
{ … }
struct hfi1_packet { … };
#define HFI1_PKT_TYPE_9B …
#define HFI1_PKT_TYPE_16B …
#define OPA_16B_L4_MASK …
#define OPA_16B_SC_MASK …
#define OPA_16B_SC_SHIFT …
#define OPA_16B_LID_MASK …
#define OPA_16B_DLID_MASK …
#define OPA_16B_DLID_SHIFT …
#define OPA_16B_DLID_HIGH_SHIFT …
#define OPA_16B_SLID_MASK …
#define OPA_16B_SLID_SHIFT …
#define OPA_16B_SLID_HIGH_SHIFT …
#define OPA_16B_BECN_MASK …
#define OPA_16B_BECN_SHIFT …
#define OPA_16B_FECN_MASK …
#define OPA_16B_FECN_SHIFT …
#define OPA_16B_L2_MASK …
#define OPA_16B_L2_SHIFT …
#define OPA_16B_PKEY_MASK …
#define OPA_16B_PKEY_SHIFT …
#define OPA_16B_LEN_MASK …
#define OPA_16B_LEN_SHIFT …
#define OPA_16B_RC_MASK …
#define OPA_16B_RC_SHIFT …
#define OPA_16B_AGE_MASK …
#define OPA_16B_AGE_SHIFT …
#define OPA_16B_ENTROPY_MASK …
#define OPA_16B_L4_9B …
#define OPA_16B_L2_TYPE …
#define OPA_16B_L4_FM …
#define OPA_16B_L4_IB_LOCAL …
#define OPA_16B_L4_IB_GLOBAL …
#define OPA_16B_L4_ETHR …
#define OPA_16B_L4_FM_PAD …
#define OPA_16B_L4_FM_HLEN …
static inline u8 hfi1_16B_get_l4(struct hfi1_16b_header *hdr)
{ … }
static inline u8 hfi1_16B_get_sc(struct hfi1_16b_header *hdr)
{ … }
static inline u32 hfi1_16B_get_dlid(struct hfi1_16b_header *hdr)
{ … }
static inline u32 hfi1_16B_get_slid(struct hfi1_16b_header *hdr)
{ … }
static inline u8 hfi1_16B_get_becn(struct hfi1_16b_header *hdr)
{ … }
static inline u8 hfi1_16B_get_fecn(struct hfi1_16b_header *hdr)
{ … }
static inline u8 hfi1_16B_get_l2(struct hfi1_16b_header *hdr)
{ … }
static inline u16 hfi1_16B_get_pkey(struct hfi1_16b_header *hdr)
{ … }
static inline u8 hfi1_16B_get_rc(struct hfi1_16b_header *hdr)
{ … }
static inline u8 hfi1_16B_get_age(struct hfi1_16b_header *hdr)
{ … }
static inline u16 hfi1_16B_get_len(struct hfi1_16b_header *hdr)
{ … }
static inline u16 hfi1_16B_get_entropy(struct hfi1_16b_header *hdr)
{ … }
#define OPA_16B_MAKE_QW(low_dw, high_dw) …
#define OPA_16B_BTH_PAD_MASK …
static inline u8 hfi1_16B_bth_get_pad(struct ib_other_headers *ohdr)
{ … }
#define OPA_16B_MGMT_QPN_MASK …
static inline u32 hfi1_16B_get_dest_qpn(struct opa_16b_mgmt *mgmt)
{ … }
static inline u32 hfi1_16B_get_src_qpn(struct opa_16b_mgmt *mgmt)
{ … }
static inline void hfi1_16B_set_qpn(struct opa_16b_mgmt *mgmt,
u32 dest_qp, u32 src_qp)
{ … }
static inline struct ib_other_headers *
hfi1_get_rc_ohdr(struct hfi1_opa_header *opah)
{ … }
struct rvt_sge_state;
#define HFI1_IB_CFG_LIDLMC …
#define HFI1_IB_CFG_LWID_DG_ENB …
#define HFI1_IB_CFG_LWID_ENB …
#define HFI1_IB_CFG_LWID …
#define HFI1_IB_CFG_SPD_ENB …
#define HFI1_IB_CFG_SPD …
#define HFI1_IB_CFG_RXPOL_ENB …
#define HFI1_IB_CFG_LREV_ENB …
#define HFI1_IB_CFG_LINKLATENCY …
#define HFI1_IB_CFG_HRTBT …
#define HFI1_IB_CFG_OP_VLS …
#define HFI1_IB_CFG_VL_HIGH_CAP …
#define HFI1_IB_CFG_VL_LOW_CAP …
#define HFI1_IB_CFG_OVERRUN_THRESH …
#define HFI1_IB_CFG_PHYERR_THRESH …
#define HFI1_IB_CFG_LINKDEFAULT …
#define HFI1_IB_CFG_PKEYS …
#define HFI1_IB_CFG_MTU …
#define HFI1_IB_CFG_VL_HIGH_LIMIT …
#define HFI1_IB_CFG_PMA_TICKS …
#define HFI1_IB_CFG_PORT …
#define __HLS_UP_INIT_BP …
#define __HLS_UP_ARMED_BP …
#define __HLS_UP_ACTIVE_BP …
#define __HLS_DN_DOWNDEF_BP …
#define __HLS_DN_POLL_BP …
#define __HLS_DN_DISABLE_BP …
#define __HLS_DN_OFFLINE_BP …
#define __HLS_VERIFY_CAP_BP …
#define __HLS_GOING_UP_BP …
#define __HLS_GOING_OFFLINE_BP …
#define __HLS_LINK_COOLDOWN_BP …
#define HLS_UP_INIT …
#define HLS_UP_ARMED …
#define HLS_UP_ACTIVE …
#define HLS_DN_DOWNDEF …
#define HLS_DN_POLL …
#define HLS_DN_DISABLE …
#define HLS_DN_OFFLINE …
#define HLS_VERIFY_CAP …
#define HLS_GOING_UP …
#define HLS_GOING_OFFLINE …
#define HLS_LINK_COOLDOWN …
#define HLS_UP …
#define HLS_DOWN …
#define HLS_DEFAULT …
#define HFI1_DEFAULT_ACTIVE_MTU …
#define HFI1_DEFAULT_MAX_MTU …
#define DEFAULT_PKEY …
#define FM_TBL_VL_HIGH_ARB …
#define FM_TBL_VL_LOW_ARB …
#define FM_TBL_BUFFER_CONTROL …
#define FM_TBL_SC2VLNT …
#define FM_TBL_VL_PREEMPT_ELEMS …
#define FM_TBL_VL_PREEMPT_MATRIX …
#define HFI1_RCVCTRL_TAILUPD_ENB …
#define HFI1_RCVCTRL_TAILUPD_DIS …
#define HFI1_RCVCTRL_CTXT_ENB …
#define HFI1_RCVCTRL_CTXT_DIS …
#define HFI1_RCVCTRL_INTRAVAIL_ENB …
#define HFI1_RCVCTRL_INTRAVAIL_DIS …
#define HFI1_RCVCTRL_PKEY_ENB …
#define HFI1_RCVCTRL_PKEY_DIS …
#define HFI1_RCVCTRL_TIDFLOW_ENB …
#define HFI1_RCVCTRL_TIDFLOW_DIS …
#define HFI1_RCVCTRL_ONE_PKT_EGR_ENB …
#define HFI1_RCVCTRL_ONE_PKT_EGR_DIS …
#define HFI1_RCVCTRL_NO_RHQ_DROP_ENB …
#define HFI1_RCVCTRL_NO_RHQ_DROP_DIS …
#define HFI1_RCVCTRL_NO_EGR_DROP_ENB …
#define HFI1_RCVCTRL_NO_EGR_DROP_DIS …
#define HFI1_RCVCTRL_URGENT_ENB …
#define HFI1_RCVCTRL_URGENT_DIS …
#define HFI1_PART_ENFORCE_IN …
#define HFI1_PART_ENFORCE_OUT …
#define SYNTH_CNT_TIME …
#define CNTR_NORMAL …
#define CNTR_SYNTH …
#define CNTR_DISABLED …
#define CNTR_32BIT …
#define CNTR_VL …
#define CNTR_SDMA …
#define CNTR_INVALID_VL …
#define CNTR_MODE_W …
#define CNTR_MODE_R …
#define HFI1_MIN_VLS_SUPPORTED …
#define HFI1_MAX_VLS_SUPPORTED …
#define HFI1_GUIDS_PER_PORT …
#define HFI1_PORT_GUID_INDEX …
static inline void incr_cntr64(u64 *cntr)
{ … }
#define MAX_NAME_SIZE …
struct hfi1_msix_entry { … };
struct hfi1_msix_info { … };
struct cca_timer { … };
struct link_down_reason { … };
enum { … };
struct vl_arb_cache { … };
struct hfi1_pportdata { … };
opcode_handler;
hfi1_make_req;
extern const rhf_rcv_function_ptr normal_rhf_rcv_functions[];
extern const rhf_rcv_function_ptr netdev_rhf_rcv_functions[];
#define RHF_RCV_CONTINUE …
#define RHF_RCV_DONE …
#define RHF_RCV_REPROCESS …
struct rcv_array_data { … };
struct per_vl_data { … };
#define PER_VL_SEND_CONTEXTS …
struct err_info_rcvport { … };
struct err_info_constraint { … };
struct hfi1_temp { … };
struct hfi1_i2c_bus { … };
struct hfi1_asic_data { … };
#define NUM_MAP_ENTRIES …
#define NUM_MAP_REGS …
struct hfi1_vnic_data { … };
struct hfi1_vnic_vport_info;
struct sdma_engine;
struct sdma_vl_map;
#define BOARD_VERS_MAX …
#define SERIAL_MAX …
send_routine;
struct hfi1_netdev_rx;
struct hfi1_devdata { … };
#define dc8051_ver(a, b, c) …
#define dc8051_ver_maj(a) …
#define dc8051_ver_min(a) …
#define dc8051_ver_patch(a) …
#define PT_EXPECTED …
#define PT_EAGER …
#define PT_INVALID_FLUSH …
#define PT_INVALID …
struct tid_rb_node;
struct hfi1_filedata { … };
extern struct xarray hfi1_dev_table;
struct hfi1_devdata *hfi1_lookup(int unit);
static inline unsigned long uctxt_offset(struct hfi1_ctxtdata *uctxt)
{ … }
int hfi1_init(struct hfi1_devdata *dd, int reinit);
int hfi1_count_active_units(void);
int hfi1_diag_add(struct hfi1_devdata *dd);
void hfi1_diag_remove(struct hfi1_devdata *dd);
void handle_linkup_change(struct hfi1_devdata *dd, u32 linkup);
void handle_user_interrupt(struct hfi1_ctxtdata *rcd);
int hfi1_create_rcvhdrq(struct hfi1_devdata *dd, struct hfi1_ctxtdata *rcd);
int hfi1_setup_eagerbufs(struct hfi1_ctxtdata *rcd);
int hfi1_create_kctxts(struct hfi1_devdata *dd);
int hfi1_create_ctxtdata(struct hfi1_pportdata *ppd, int numa,
struct hfi1_ctxtdata **rcd);
void hfi1_free_ctxt(struct hfi1_ctxtdata *rcd);
void hfi1_init_pportdata(struct pci_dev *pdev, struct hfi1_pportdata *ppd,
struct hfi1_devdata *dd, u8 hw_pidx, u32 port);
void hfi1_free_ctxtdata(struct hfi1_devdata *dd, struct hfi1_ctxtdata *rcd);
int hfi1_rcd_put(struct hfi1_ctxtdata *rcd);
int hfi1_rcd_get(struct hfi1_ctxtdata *rcd);
struct hfi1_ctxtdata *hfi1_rcd_get_by_index_safe(struct hfi1_devdata *dd,
u16 ctxt);
struct hfi1_ctxtdata *hfi1_rcd_get_by_index(struct hfi1_devdata *dd, u16 ctxt);
int handle_receive_interrupt(struct hfi1_ctxtdata *rcd, int thread);
int handle_receive_interrupt_nodma_rtail(struct hfi1_ctxtdata *rcd, int thread);
int handle_receive_interrupt_dma_rtail(struct hfi1_ctxtdata *rcd, int thread);
int handle_receive_interrupt_napi_fp(struct hfi1_ctxtdata *rcd, int budget);
int handle_receive_interrupt_napi_sp(struct hfi1_ctxtdata *rcd, int budget);
void set_all_slowpath(struct hfi1_devdata *dd);
extern const struct pci_device_id hfi1_pci_tbl[];
void hfi1_make_ud_req_9B(struct rvt_qp *qp,
struct hfi1_pkt_state *ps,
struct rvt_swqe *wqe);
void hfi1_make_ud_req_16B(struct rvt_qp *qp,
struct hfi1_pkt_state *ps,
struct rvt_swqe *wqe);
#define RCV_PKT_OK …
#define RCV_PKT_LIMIT …
#define RCV_PKT_DONE …
static inline u32 hfi1_rcd_head(struct hfi1_ctxtdata *rcd)
{ … }
static inline void hfi1_set_rcd_head(struct hfi1_ctxtdata *rcd, u32 head)
{ … }
static inline __le32 *get_rhf_addr(struct hfi1_ctxtdata *rcd)
{ … }
static inline bool get_dma_rtail_setting(struct hfi1_ctxtdata *rcd)
{ … }
static inline u8 hfi1_seq_incr_wrap(u8 seq)
{ … }
static inline u8 hfi1_seq_cnt(struct hfi1_ctxtdata *rcd)
{ … }
static inline void hfi1_set_seq_cnt(struct hfi1_ctxtdata *rcd, u8 cnt)
{ … }
static inline bool last_rcv_seq(struct hfi1_ctxtdata *rcd, u32 seq)
{ … }
static inline bool hfi1_seq_incr(struct hfi1_ctxtdata *rcd, u32 seq)
{ … }
static inline u8 get_hdrqentsize(struct hfi1_ctxtdata *rcd)
{ … }
static inline u16 get_hdrq_cnt(struct hfi1_ctxtdata *rcd)
{ … }
static inline bool hfi1_is_slowpath(struct hfi1_ctxtdata *rcd)
{ … }
static inline bool hfi1_is_fastpath(struct hfi1_ctxtdata *rcd)
{ … }
static inline void hfi1_set_fast(struct hfi1_ctxtdata *rcd)
{ … }
int hfi1_reset_device(int);
void receive_interrupt_work(struct work_struct *work);
static inline int hfi1_9B_get_sc5(struct ib_header *hdr, u64 rhf)
{ … }
#define HFI1_JKEY_WIDTH …
#define HFI1_JKEY_MASK …
#define HFI1_ADMIN_JKEY_RANGE …
static inline u16 generate_jkey(kuid_t uid)
{ … }
static inline u32 active_egress_rate(struct hfi1_pportdata *ppd)
{ … }
static inline u32 egress_cycles(u32 len, u32 rate)
{ … }
void set_link_ipg(struct hfi1_pportdata *ppd);
void process_becn(struct hfi1_pportdata *ppd, u8 sl, u32 rlid, u32 lqpn,
u32 rqpn, u8 svc_type);
void return_cnp(struct hfi1_ibport *ibp, struct rvt_qp *qp, u32 remote_qpn,
u16 pkey, u32 slid, u32 dlid, u8 sc5,
const struct ib_grh *old_grh);
void return_cnp_16B(struct hfi1_ibport *ibp, struct rvt_qp *qp,
u32 remote_qpn, u16 pkey, u32 slid, u32 dlid,
u8 sc5, const struct ib_grh *old_grh);
hfi1_handle_cnp;
#define PKEY_CHECK_INVALID …
int egress_pkey_check(struct hfi1_pportdata *ppd, u32 slid, u16 pkey,
u8 sc5, int8_t s_pkey_index);
#define PACKET_EGRESS_TIMEOUT …
static inline void pause_for_credit_return(struct hfi1_devdata *dd)
{ … }
static inline u8 sc_to_vlt(struct hfi1_devdata *dd, u8 sc5)
{ … }
#define PKEY_MEMBER_MASK …
#define PKEY_LOW_15_MASK …
static inline int ingress_pkey_matches_entry(u16 pkey, u16 ent)
{ … }
static int ingress_pkey_table_search(struct hfi1_pportdata *ppd, u16 pkey)
{ … }
static void ingress_pkey_table_fail(struct hfi1_pportdata *ppd, u16 pkey,
u32 slid)
{ … }
static inline int ingress_pkey_check(struct hfi1_pportdata *ppd, u16 pkey,
u8 sc5, u8 idx, u32 slid, bool force)
{ … }
static inline int rcv_pkey_check(struct hfi1_pportdata *ppd, u16 pkey,
u8 sc5, u16 slid)
{ … }
#define OPA_MTU_0 …
#define OPA_MTU_256 …
#define OPA_MTU_512 …
#define OPA_MTU_1024 …
#define OPA_MTU_2048 …
#define OPA_MTU_4096 …
u32 lrh_max_header_bytes(struct hfi1_devdata *dd);
int mtu_to_enum(u32 mtu, int default_if_bad);
u16 enum_to_mtu(int mtu);
static inline int valid_ib_mtu(unsigned int mtu)
{ … }
static inline int valid_opa_max_mtu(unsigned int mtu)
{ … }
int set_mtu(struct hfi1_pportdata *ppd);
int hfi1_set_lid(struct hfi1_pportdata *ppd, u32 lid, u8 lmc);
void hfi1_disable_after_error(struct hfi1_devdata *dd);
int hfi1_set_uevent_bits(struct hfi1_pportdata *ppd, const int evtbit);
int hfi1_rcvbuf_validate(u32 size, u8 type, u16 *encode);
int fm_get_table(struct hfi1_pportdata *ppd, int which, void *t);
int fm_set_table(struct hfi1_pportdata *ppd, int which, void *t);
void set_up_vau(struct hfi1_devdata *dd, u8 vau);
void set_up_vl15(struct hfi1_devdata *dd, u16 vl15buf);
void reset_link_credits(struct hfi1_devdata *dd);
void assign_remote_cm_au_table(struct hfi1_devdata *dd, u8 vcu);
int set_buffer_control(struct hfi1_pportdata *ppd, struct buffer_control *bc);
static inline struct hfi1_devdata *dd_from_ppd(struct hfi1_pportdata *ppd)
{ … }
static inline struct hfi1_devdata *dd_from_dev(struct hfi1_ibdev *dev)
{ … }
static inline struct hfi1_devdata *dd_from_ibdev(struct ib_device *ibdev)
{ … }
static inline struct hfi1_pportdata *ppd_from_ibp(struct hfi1_ibport *ibp)
{ … }
static inline struct hfi1_ibdev *dev_from_rdi(struct rvt_dev_info *rdi)
{ … }
static inline struct hfi1_ibport *to_iport(struct ib_device *ibdev, u32 port)
{ … }
static inline struct hfi1_ibport *rcd_to_iport(struct hfi1_ctxtdata *rcd)
{ … }
static inline bool hfi1_may_ecn(struct hfi1_packet *pkt)
{ … }
bool hfi1_process_ecn_slowpath(struct rvt_qp *qp, struct hfi1_packet *pkt,
bool prescan);
static inline bool process_ecn(struct rvt_qp *qp, struct hfi1_packet *pkt)
{ … }
static inline u16 hfi1_get_pkey(struct hfi1_ibport *ibp, unsigned index)
{ … }
static inline __be64 get_sguid(struct hfi1_ibport *ibp, unsigned int index)
{ … }
static inline struct cc_state *get_cc_state(struct hfi1_pportdata *ppd)
{ … }
static inline
struct cc_state *get_cc_state_protected(struct hfi1_pportdata *ppd)
{ … }
#define HFI1_INITTED …
#define HFI1_PRESENT …
#define HFI1_FROZEN …
#define HFI1_HAS_SDMA_TIMEOUT …
#define HFI1_HAS_SEND_DMA …
#define HFI1_FORCED_FREEZE …
#define HFI1_SHUTDOWN …
#define HFI1_PBC_LENGTH_MASK …
#define HFI1_CTXT_BASE_UNINIT …
#define HFI1_CTXT_BASE_FAILED …
#define HFI1_CTXT_WAITING_RCV …
#define HFI1_CTXT_WAITING_URG …
int hfi1_init_dd(struct hfi1_devdata *dd);
void hfi1_free_devdata(struct hfi1_devdata *dd);
void hfi1_start_led_override(struct hfi1_pportdata *ppd, unsigned int timeon,
unsigned int timeoff);
void shutdown_led_override(struct hfi1_pportdata *ppd);
#define HFI1_CREDIT_RETURN_RATE …
#define DEFAULT_RCVHDRSIZE …
#define DEFAULT_RCVHDR_ENTSIZE …
bool hfi1_can_pin_pages(struct hfi1_devdata *dd, struct mm_struct *mm,
u32 nlocked, u32 npages);
int hfi1_acquire_user_pages(struct mm_struct *mm, unsigned long vaddr,
size_t npages, bool writable, struct page **pages);
void hfi1_release_user_pages(struct mm_struct *mm, struct page **p,
size_t npages, bool dirty);
static inline __le64 *hfi1_rcvhdrtail_kvaddr(const struct hfi1_ctxtdata *rcd)
{ … }
static inline void clear_rcvhdrtail(const struct hfi1_ctxtdata *rcd)
{ … }
static inline u32 get_rcvhdrtail(const struct hfi1_ctxtdata *rcd)
{ … }
static inline bool hfi1_packet_present(struct hfi1_ctxtdata *rcd)
{ … }
extern const char ib_hfi1_version[];
extern const struct attribute_group ib_hfi1_attr_group;
extern const struct attribute_group *hfi1_attr_port_groups[];
int hfi1_device_create(struct hfi1_devdata *dd);
void hfi1_device_remove(struct hfi1_devdata *dd);
int hfi1_verbs_register_sysfs(struct hfi1_devdata *dd);
void hfi1_verbs_unregister_sysfs(struct hfi1_devdata *dd);
int qsfp_dump(struct hfi1_pportdata *ppd, char *buf, int len);
int hfi1_pcie_init(struct hfi1_devdata *dd);
void hfi1_pcie_cleanup(struct pci_dev *pdev);
int hfi1_pcie_ddinit(struct hfi1_devdata *dd, struct pci_dev *pdev);
void hfi1_pcie_ddcleanup(struct hfi1_devdata *);
int pcie_speeds(struct hfi1_devdata *dd);
int restore_pci_variables(struct hfi1_devdata *dd);
int save_pci_variables(struct hfi1_devdata *dd);
int do_pcie_gen3_transition(struct hfi1_devdata *dd);
void tune_pcie_caps(struct hfi1_devdata *dd);
int parse_platform_config(struct hfi1_devdata *dd);
int get_platform_config_field(struct hfi1_devdata *dd,
enum platform_config_table_type_encoding
table_type, int table_index, int field_index,
u32 *data, u32 len);
struct pci_dev *get_pci_dev(struct rvt_dev_info *rdi);
static inline void flush_wc(void)
{ … }
void handle_eflags(struct hfi1_packet *packet);
void seqfile_dump_rcd(struct seq_file *s, struct hfi1_ctxtdata *rcd);
extern unsigned int hfi1_max_mtu;
extern unsigned int hfi1_cu;
extern unsigned int user_credit_return_threshold;
extern int num_user_contexts;
extern unsigned long n_krcvqs;
extern uint krcvqs[];
extern int krcvqsset;
extern uint loopback;
extern uint quick_linkup;
extern uint rcv_intr_timeout;
extern uint rcv_intr_count;
extern uint rcv_intr_dynamic;
extern ushort link_crc_mask;
extern struct mutex hfi1_mutex;
#define STATUS_TIMEOUT …
#define DRIVER_NAME …
#define HFI1_USER_MINOR_BASE …
#define HFI1_TRACE_MINOR …
#define HFI1_NMINORS …
#define PCI_VENDOR_ID_INTEL …
#define PCI_DEVICE_ID_INTEL0 …
#define PCI_DEVICE_ID_INTEL1 …
#define HFI1_PKT_USER_SC_INTEGRITY …
#define HFI1_PKT_KERNEL_SC_INTEGRITY …
static inline u64 hfi1_pkt_default_send_ctxt_mask(struct hfi1_devdata *dd,
u16 ctxt_type)
{ … }
static inline u64 hfi1_pkt_base_sdma_integrity(struct hfi1_devdata *dd)
{ … }
#define dd_dev_emerg(dd, fmt, ...) …
#define dd_dev_err(dd, fmt, ...) …
#define dd_dev_err_ratelimited(dd, fmt, ...) …
#define dd_dev_warn(dd, fmt, ...) …
#define dd_dev_warn_ratelimited(dd, fmt, ...) …
#define dd_dev_info(dd, fmt, ...) …
#define dd_dev_info_ratelimited(dd, fmt, ...) …
#define dd_dev_dbg(dd, fmt, ...) …
#define hfi1_dev_porterr(dd, port, fmt, ...) …
struct hfi1_hwerror_msgs { … };
void hfi1_format_hwerrors(u64 hwerrs,
const struct hfi1_hwerror_msgs *hwerrmsgs,
size_t nhwerrmsgs, char *msg, size_t lmsg);
#define USER_OPCODE_CHECK_VAL …
#define USER_OPCODE_CHECK_MASK …
#define OPCODE_CHECK_VAL_DISABLED …
#define OPCODE_CHECK_MASK_DISABLED …
static inline void hfi1_reset_cpu_counters(struct hfi1_devdata *dd)
{ … }
static inline void setextled(struct hfi1_devdata *dd, u32 on)
{ … }
static inline u32 i2c_target(u32 target)
{ … }
static inline u32 qsfp_resource(struct hfi1_devdata *dd)
{ … }
static inline bool is_integrated(struct hfi1_devdata *dd)
{ … }
static inline bool hfi1_need_drop(struct hfi1_devdata *dd)
{ … }
int hfi1_tempsense_rd(struct hfi1_devdata *dd, struct hfi1_temp *temp);
#define DD_DEV_ENTRY(dd) …
#define DD_DEV_ASSIGN(dd) …
static inline void hfi1_update_ah_attr(struct ib_device *ibdev,
struct rdma_ah_attr *attr)
{ … }
static inline bool hfi1_check_mcast(u32 lid)
{ … }
#define opa_get_lid(lid, format) …
static inline u32 __opa_get_lid(u32 lid, u8 format)
{ … }
static inline bool hfi1_is_16B_mcast(u32 lid)
{ … }
static inline void hfi1_make_opa_lid(struct rdma_ah_attr *attr)
{ … }
static inline u8 hfi1_get_packet_type(u32 lid)
{ … }
static inline bool hfi1_get_hdr_type(u32 lid, struct rdma_ah_attr *attr)
{ … }
static inline void hfi1_make_ext_grh(struct hfi1_packet *packet,
struct ib_grh *grh, u32 slid,
u32 dlid)
{ … }
static inline int hfi1_get_16b_padding(u32 hdr_size, u32 payload)
{ … }
static inline void hfi1_make_ib_hdr(struct ib_header *hdr,
u16 lrh0, u16 len,
u16 dlid, u16 slid)
{ … }
static inline void hfi1_make_16b_hdr(struct hfi1_16b_header *hdr,
u32 slid, u32 dlid,
u16 len, u16 pkey,
bool becn, bool fecn, u8 l4,
u8 sc)
{ … }
#endif