iPXE
|
Mellanox Arbel Infiniband HCA. More...
#include <stdint.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <strings.h>
#include <unistd.h>
#include <errno.h>
#include <byteswap.h>
#include <ipxe/io.h>
#include <ipxe/pci.h>
#include <ipxe/pcibackup.h>
#include <ipxe/malloc.h>
#include <ipxe/umalloc.h>
#include <ipxe/iobuf.h>
#include <ipxe/netdevice.h>
#include <ipxe/infiniband.h>
#include <ipxe/ib_smc.h>
#include "arbel.h"
Go to the source code of this file.
Functions | |
FILE_LICENCE (GPL2_OR_LATER_OR_UBDL) | |
static int | arbel_bitmask_alloc (arbel_bitmask_t *bits, unsigned int bits_len) |
Allocate offset within usage bitmask. More... | |
static void | arbel_bitmask_free (arbel_bitmask_t *bits, int bit) |
Free offset within usage bitmask. More... | |
static int | arbel_cmd_wait (struct arbel *arbel, struct arbelprm_hca_command_register *hcr) |
Wait for Arbel command completion. More... | |
static int | arbel_cmd (struct arbel *arbel, unsigned long command, unsigned int op_mod, const void *in, unsigned int in_mod, void *out) |
Issue HCA command. More... | |
static int | arbel_cmd_query_dev_lim (struct arbel *arbel, struct arbelprm_query_dev_lim *dev_lim) |
static int | arbel_cmd_query_fw (struct arbel *arbel, struct arbelprm_query_fw *fw) |
static int | arbel_cmd_init_hca (struct arbel *arbel, const struct arbelprm_init_hca *init_hca) |
static int | arbel_cmd_close_hca (struct arbel *arbel) |
static int | arbel_cmd_init_ib (struct arbel *arbel, unsigned int port, const struct arbelprm_init_ib *init_ib) |
static int | arbel_cmd_close_ib (struct arbel *arbel, unsigned int port) |
static int | arbel_cmd_sw2hw_mpt (struct arbel *arbel, unsigned int index, const struct arbelprm_mpt *mpt) |
static int | arbel_cmd_map_eq (struct arbel *arbel, unsigned long index_map, const struct arbelprm_event_mask *mask) |
static int | arbel_cmd_sw2hw_eq (struct arbel *arbel, unsigned int index, const struct arbelprm_eqc *eqctx) |
static int | arbel_cmd_hw2sw_eq (struct arbel *arbel, unsigned int index, struct arbelprm_eqc *eqctx) |
static int | arbel_cmd_sw2hw_cq (struct arbel *arbel, unsigned long cqn, const struct arbelprm_completion_queue_context *cqctx) |
static int | arbel_cmd_hw2sw_cq (struct arbel *arbel, unsigned long cqn, struct arbelprm_completion_queue_context *cqctx) |
static int | arbel_cmd_query_cq (struct arbel *arbel, unsigned long cqn, struct arbelprm_completion_queue_context *cqctx) |
static int | arbel_cmd_rst2init_qpee (struct arbel *arbel, unsigned long qpn, const struct arbelprm_qp_ee_state_transitions *ctx) |
static int | arbel_cmd_init2rtr_qpee (struct arbel *arbel, unsigned long qpn, const struct arbelprm_qp_ee_state_transitions *ctx) |
static int | arbel_cmd_rtr2rts_qpee (struct arbel *arbel, unsigned long qpn, const struct arbelprm_qp_ee_state_transitions *ctx) |
static int | arbel_cmd_rts2rts_qpee (struct arbel *arbel, unsigned long qpn, const struct arbelprm_qp_ee_state_transitions *ctx) |
static int | arbel_cmd_2rst_qpee (struct arbel *arbel, unsigned long qpn) |
static int | arbel_cmd_query_qpee (struct arbel *arbel, unsigned long qpn, struct arbelprm_qp_ee_state_transitions *ctx) |
static int | arbel_cmd_conf_special_qp (struct arbel *arbel, unsigned int qp_type, unsigned long base_qpn) |
static int | arbel_cmd_mad_ifc (struct arbel *arbel, unsigned int port, union arbelprm_mad *mad) |
static int | arbel_cmd_read_mgm (struct arbel *arbel, unsigned int index, struct arbelprm_mgm_entry *mgm) |
static int | arbel_cmd_write_mgm (struct arbel *arbel, unsigned int index, const struct arbelprm_mgm_entry *mgm) |
static int | arbel_cmd_mgid_hash (struct arbel *arbel, const union ib_gid *gid, struct arbelprm_mgm_hash *hash) |
static int | arbel_cmd_run_fw (struct arbel *arbel) |
static int | arbel_cmd_disable_lam (struct arbel *arbel) |
static int | arbel_cmd_enable_lam (struct arbel *arbel, struct arbelprm_access_lam *lam) |
static int | arbel_cmd_unmap_icm (struct arbel *arbel, unsigned int page_count, const struct arbelprm_scalar_parameter *offset) |
static int | arbel_cmd_map_icm (struct arbel *arbel, const struct arbelprm_virtual_physical_mapping *map) |
static int | arbel_cmd_unmap_icm_aux (struct arbel *arbel) |
static int | arbel_cmd_map_icm_aux (struct arbel *arbel, const struct arbelprm_virtual_physical_mapping *map) |
static int | arbel_cmd_set_icm_size (struct arbel *arbel, const struct arbelprm_scalar_parameter *icm_size, struct arbelprm_scalar_parameter *icm_aux_size) |
static int | arbel_cmd_unmap_fa (struct arbel *arbel) |
static int | arbel_cmd_map_fa (struct arbel *arbel, const struct arbelprm_virtual_physical_mapping *map) |
static int | arbel_mad (struct ib_device *ibdev, union ib_mad *mad) |
Issue management datagram. More... | |
static int | arbel_dump_cqctx (struct arbel *arbel, struct ib_completion_queue *cq) |
Dump completion queue context (for debugging only) More... | |
static int | arbel_create_cq (struct ib_device *ibdev, struct ib_completion_queue *cq) |
Create completion queue. More... | |
static void | arbel_destroy_cq (struct ib_device *ibdev, struct ib_completion_queue *cq) |
Destroy completion queue. More... | |
static int | arbel_alloc_qpn (struct ib_device *ibdev, struct ib_queue_pair *qp) |
Assign queue pair number. More... | |
static void | arbel_free_qpn (struct ib_device *ibdev, struct ib_queue_pair *qp) |
Free queue pair number. More... | |
static unsigned int | arbel_rate (struct ib_address_vector *av) |
Calculate transmission rate. More... | |
static int | arbel_dump_qpctx (struct arbel *arbel, struct ib_queue_pair *qp) |
Dump queue pair context (for debugging only) More... | |
static int | arbel_create_send_wq (struct arbel_send_work_queue *arbel_send_wq, unsigned int num_wqes) |
Create send work queue. More... | |
static int | arbel_create_recv_wq (struct arbel_recv_work_queue *arbel_recv_wq, unsigned int num_wqes, enum ib_queue_pair_type type) |
Create receive work queue. More... | |
static int | arbel_create_qp (struct ib_device *ibdev, struct ib_queue_pair *qp) |
Create queue pair. More... | |
static int | arbel_modify_qp (struct ib_device *ibdev, struct ib_queue_pair *qp) |
Modify queue pair. More... | |
static void | arbel_destroy_qp (struct ib_device *ibdev, struct ib_queue_pair *qp) |
Destroy queue pair. More... | |
static void | arbel_ring_doorbell (struct arbel *arbel, union arbelprm_doorbell_register *db_reg, unsigned int offset) |
Ring doorbell register in UAR. More... | |
static size_t | arbel_fill_ud_send_wqe (struct ib_device *ibdev, struct ib_queue_pair *qp __unused, struct ib_address_vector *dest, struct io_buffer *iobuf, union arbel_send_wqe *wqe) |
Construct UD send work queue entry. More... | |
static size_t | arbel_fill_mlx_send_wqe (struct ib_device *ibdev, struct ib_queue_pair *qp, struct ib_address_vector *dest, struct io_buffer *iobuf, union arbel_send_wqe *wqe) |
Construct MLX send work queue entry. More... | |
static size_t | arbel_fill_rc_send_wqe (struct ib_device *ibdev, struct ib_queue_pair *qp __unused, struct ib_address_vector *dest __unused, struct io_buffer *iobuf, union arbel_send_wqe *wqe) |
Construct RC send work queue entry. More... | |
static int | arbel_post_send (struct ib_device *ibdev, struct ib_queue_pair *qp, struct ib_address_vector *dest, struct io_buffer *iobuf) |
Post send work queue entry. More... | |
static int | arbel_post_recv (struct ib_device *ibdev, struct ib_queue_pair *qp, struct io_buffer *iobuf) |
Post receive work queue entry. More... | |
static int | arbel_complete (struct ib_device *ibdev, struct ib_completion_queue *cq, union arbelprm_completion_entry *cqe) |
Handle completion. More... | |
static void | arbel_poll_cq (struct ib_device *ibdev, struct ib_completion_queue *cq) |
Poll completion queue. More... | |
static int | arbel_create_eq (struct arbel *arbel) |
Create event queue. More... | |
static void | arbel_destroy_eq (struct arbel *arbel) |
Destroy event queue. More... | |
static void | arbel_event_port_state_change (struct arbel *arbel, union arbelprm_event_entry *eqe) |
Handle port state event. More... | |
static void | arbel_poll_eq (struct ib_device *ibdev) |
Poll event queue. More... | |
static int | arbel_map_vpm (struct arbel *arbel, int(*map)(struct arbel *arbel, const struct arbelprm_virtual_physical_mapping *), uint64_t va, physaddr_t pa, size_t len) |
Map virtual to physical address for firmware usage. More... | |
static int | arbel_start_firmware (struct arbel *arbel) |
Start firmware running. More... | |
static void | arbel_stop_firmware (struct arbel *arbel) |
Stop firmware running. More... | |
static int | arbel_get_limits (struct arbel *arbel) |
Get device limits. More... | |
static size_t | icm_align (size_t icm_offset, size_t len) |
Align ICM table. More... | |
static int | arbel_alloc_icm (struct arbel *arbel, struct arbelprm_init_hca *init_hca) |
Allocate ICM. More... | |
static void | arbel_free_icm (struct arbel *arbel) |
Free ICM. More... | |
static void | arbel_reset (struct arbel *arbel) |
Reset device. More... | |
static int | arbel_setup_mpt (struct arbel *arbel) |
Set up memory protection table. More... | |
static int | arbel_configure_special_qps (struct arbel *arbel) |
Configure special queue pairs. More... | |
static int | arbel_start (struct arbel *arbel, int running) |
Start Arbel device. More... | |
static void | arbel_stop (struct arbel *arbel) |
Stop Arbel device. More... | |
static int | arbel_open (struct arbel *arbel) |
Open Arbel device. More... | |
static void | arbel_close (struct arbel *arbel) |
Close Arbel device. More... | |
static int | arbel_ib_open (struct ib_device *ibdev) |
Initialise Infiniband link. More... | |
static void | arbel_ib_close (struct ib_device *ibdev) |
Close Infiniband link. More... | |
static int | arbel_inform_sma (struct ib_device *ibdev, union ib_mad *mad) |
Inform embedded subnet management agent of a received MAD. More... | |
static int | arbel_mcast_attach (struct ib_device *ibdev, struct ib_queue_pair *qp, union ib_gid *gid) |
Attach to multicast group. More... | |
static void | arbel_mcast_detach (struct ib_device *ibdev, struct ib_queue_pair *qp __unused, union ib_gid *gid) |
Detach from multicast group. More... | |
static struct arbel * | arbel_alloc (void) |
Allocate Arbel device. More... | |
static void | arbel_free (struct arbel *arbel) |
Free Arbel device. More... | |
static int | arbel_probe (struct pci_device *pci) |
Probe PCI device. More... | |
static void | arbel_remove (struct pci_device *pci) |
Remove PCI device. More... | |
Variables | |
static uint8_t | arbel_qp_st [] |
Queue pair transport service type map. More... | |
static const union ib_gid | arbel_no_gid |
GID used for GID-less send work queue entries. More... | |
static size_t(* | arbel_fill_send_wqe [])(struct ib_device *ibdev, struct ib_queue_pair *qp, struct ib_address_vector *dest, struct io_buffer *iobuf, union arbel_send_wqe *wqe) |
Work queue entry constructors. More... | |
static struct ib_device_operations | arbel_ib_operations |
Arbel Infiniband operations. More... | |
static struct pci_device_id | arbel_nics [] |
struct pci_driver arbel_driver | __pci_driver |
Mellanox Arbel Infiniband HCA.
Definition in file arbel.c.
FILE_LICENCE | ( | GPL2_OR_LATER_OR_UBDL | ) |
|
static |
Allocate offset within usage bitmask.
bits | Usage bitmask |
bits_len | Length of usage bitmask |
bit | First free bit within bitmask, or negative error |
Definition at line 69 of file arbel.c.
References bit, bits, and ENFILE.
Referenced by arbel_alloc_qpn(), and arbel_create_cq().
|
static |
Free offset within usage bitmask.
bits | Usage bitmask |
bit | Bit within bitmask |
Definition at line 93 of file arbel.c.
Referenced by arbel_create_cq(), arbel_destroy_cq(), and arbel_free_qpn().
|
static |
Wait for Arbel command completion.
arbel | Arbel device |
rc | Return status code |
Definition at line 114 of file arbel.c.
References ARBEL_HCR_MAX_WAIT_MS, ARBEL_HCR_REG, arbel::config, EBUSY, mdelay(), MLX_GET, and readl().
Referenced by arbel_cmd().
|
static |
Issue HCA command.
arbel | Arbel device |
command | Command opcode, flags and input/output lengths |
op_mod | Opcode modifier (0 if no modifier applicable) |
in | Input parameters |
in_mod | Input modifier (0 if no modifier applicable) |
out | Output parameters |
rc | Return status code |
Definition at line 139 of file arbel.c.
References arbel_cmd_wait(), ARBEL_HCR_BASE, ARBEL_HCR_IN_LEN, ARBEL_HCR_IN_MBOX, ARBEL_HCR_OPCODE, ARBEL_HCR_OUT_LEN, ARBEL_HCR_OUT_MBOX, ARBEL_HCR_REG, ARBEL_MBOX_SIZE, assert(), barrier, arbel::config, DBGC, DBGC2, DBGC2_HDA, DBGC_HD, EIO, in, arbel::mailbox_in, arbel::mailbox_out, memcpy(), memset(), MLX_FILL_1, MLX_FILL_3, MLX_FILL_H, MLX_GET, opcode, out, rc, readl(), status, virt_to_bus(), virt_to_phys(), and writel().
Referenced by arbel_cmd_2rst_qpee(), arbel_cmd_close_hca(), arbel_cmd_close_ib(), arbel_cmd_conf_special_qp(), arbel_cmd_disable_lam(), arbel_cmd_enable_lam(), arbel_cmd_hw2sw_cq(), arbel_cmd_hw2sw_eq(), arbel_cmd_init2rtr_qpee(), arbel_cmd_init_hca(), arbel_cmd_init_ib(), arbel_cmd_mad_ifc(), arbel_cmd_map_eq(), arbel_cmd_map_fa(), arbel_cmd_map_icm(), arbel_cmd_map_icm_aux(), arbel_cmd_mgid_hash(), arbel_cmd_query_cq(), arbel_cmd_query_dev_lim(), arbel_cmd_query_fw(), arbel_cmd_query_qpee(), arbel_cmd_read_mgm(), arbel_cmd_rst2init_qpee(), arbel_cmd_rtr2rts_qpee(), arbel_cmd_rts2rts_qpee(), arbel_cmd_run_fw(), arbel_cmd_set_icm_size(), arbel_cmd_sw2hw_cq(), arbel_cmd_sw2hw_eq(), arbel_cmd_sw2hw_mpt(), arbel_cmd_unmap_fa(), arbel_cmd_unmap_icm(), arbel_cmd_unmap_icm_aux(), and arbel_cmd_write_mgm().
|
inlinestatic |
Definition at line 237 of file arbel.c.
References arbel_cmd(), ARBEL_HCR_OUT_CMD, ARBEL_HCR_QUERY_DEV_LIM, and NULL.
Referenced by arbel_get_limits().
|
inlinestatic |
Definition at line 246 of file arbel.c.
References arbel_cmd(), ARBEL_HCR_OUT_CMD, ARBEL_HCR_QUERY_FW, and NULL.
Referenced by arbel_start_firmware().
|
inlinestatic |
Definition at line 254 of file arbel.c.
References arbel_cmd(), ARBEL_HCR_IN_CMD, ARBEL_HCR_INIT_HCA, and NULL.
Referenced by arbel_start().
|
inlinestatic |
Definition at line 263 of file arbel.c.
References arbel_cmd(), ARBEL_HCR_CLOSE_HCA, ARBEL_HCR_VOID_CMD, and NULL.
Referenced by arbel_start(), and arbel_stop().
|
inlinestatic |
Definition at line 270 of file arbel.c.
References arbel_cmd(), ARBEL_HCR_IN_CMD, ARBEL_HCR_INIT_IB, NULL, and port.
Referenced by arbel_ib_open().
|
inlinestatic |
Definition at line 279 of file arbel.c.
References arbel_cmd(), ARBEL_HCR_CLOSE_IB, ARBEL_HCR_VOID_CMD, NULL, and port.
Referenced by arbel_ib_close().
|
inlinestatic |
Definition at line 286 of file arbel.c.
References arbel_cmd(), ARBEL_HCR_IN_CMD, ARBEL_HCR_SW2HW_MPT, index, and NULL.
Referenced by arbel_setup_mpt().
|
inlinestatic |
Definition at line 295 of file arbel.c.
References arbel_cmd(), ARBEL_HCR_IN_CMD, ARBEL_HCR_MAP_EQ, and NULL.
Referenced by arbel_create_eq(), and arbel_destroy_eq().
|
inlinestatic |
Definition at line 304 of file arbel.c.
References arbel_cmd(), ARBEL_HCR_IN_CMD, ARBEL_HCR_SW2HW_EQ, index, and NULL.
Referenced by arbel_create_eq().
|
inlinestatic |
Definition at line 313 of file arbel.c.
References arbel_cmd(), ARBEL_HCR_HW2SW_EQ, ARBEL_HCR_OUT_CMD, index, and NULL.
Referenced by arbel_create_eq(), and arbel_destroy_eq().
|
inlinestatic |
Definition at line 322 of file arbel.c.
References arbel_cmd(), ARBEL_HCR_IN_CMD, ARBEL_HCR_SW2HW_CQ, cqn, and NULL.
Referenced by arbel_create_cq().
|
inlinestatic |
Definition at line 331 of file arbel.c.
References arbel_cmd(), ARBEL_HCR_HW2SW_CQ, ARBEL_HCR_OUT_CMD, cqn, and NULL.
Referenced by arbel_destroy_cq().
|
inlinestatic |
Definition at line 340 of file arbel.c.
References arbel_cmd(), ARBEL_HCR_OUT_CMD, ARBEL_HCR_QUERY_CQ, cqn, and NULL.
Referenced by arbel_dump_cqctx().
|
inlinestatic |
Definition at line 349 of file arbel.c.
References arbel_cmd(), ARBEL_HCR_IN_CMD, ARBEL_HCR_RST2INIT_QPEE, ctx, NULL, and qpn.
Referenced by arbel_create_qp().
|
inlinestatic |
Definition at line 358 of file arbel.c.
References arbel_cmd(), ARBEL_HCR_IN_CMD, ARBEL_HCR_INIT2RTR_QPEE, ctx, NULL, and qpn.
Referenced by arbel_modify_qp().
|
inlinestatic |
Definition at line 367 of file arbel.c.
References arbel_cmd(), ARBEL_HCR_IN_CMD, ARBEL_HCR_RTR2RTS_QPEE, ctx, NULL, and qpn.
Referenced by arbel_modify_qp().
|
inlinestatic |
Definition at line 376 of file arbel.c.
References arbel_cmd(), ARBEL_HCR_IN_CMD, ARBEL_HCR_RTS2RTS_QPEE, ctx, NULL, and qpn.
Referenced by arbel_modify_qp().
|
inlinestatic |
Definition at line 385 of file arbel.c.
References arbel_cmd(), ARBEL_HCR_2RST_QPEE, ARBEL_HCR_VOID_CMD, NULL, and qpn.
Referenced by arbel_create_qp(), and arbel_destroy_qp().
|
inlinestatic |
Definition at line 392 of file arbel.c.
References arbel_cmd(), ARBEL_HCR_OUT_CMD, ARBEL_HCR_QUERY_QPEE, ctx, NULL, and qpn.
Referenced by arbel_dump_qpctx().
|
inlinestatic |
Definition at line 401 of file arbel.c.
References arbel_cmd(), ARBEL_HCR_CONF_SPECIAL_QP, ARBEL_HCR_VOID_CMD, and NULL.
Referenced by arbel_configure_special_qps().
|
inlinestatic |
Definition at line 409 of file arbel.c.
References arbel_cmd(), ARBEL_HCR_INOUT_CMD, ARBEL_HCR_MAD_IFC, mad, and port.
Referenced by arbel_mad().
|
inlinestatic |
Definition at line 419 of file arbel.c.
References arbel_cmd(), ARBEL_HCR_OUT_CMD, ARBEL_HCR_READ_MGM, index, and NULL.
Referenced by arbel_mcast_attach().
|
inlinestatic |
Definition at line 428 of file arbel.c.
References arbel_cmd(), ARBEL_HCR_IN_CMD, ARBEL_HCR_WRITE_MGM, index, and NULL.
Referenced by arbel_mcast_attach(), and arbel_mcast_detach().
|
inlinestatic |
Definition at line 437 of file arbel.c.
References arbel_cmd(), ARBEL_HCR_INOUT_CMD, ARBEL_HCR_MGID_HASH, gid, and hash.
Referenced by arbel_mcast_attach(), and arbel_mcast_detach().
|
inlinestatic |
Definition at line 447 of file arbel.c.
References arbel_cmd(), ARBEL_HCR_RUN_FW, ARBEL_HCR_VOID_CMD, and NULL.
Referenced by arbel_start_firmware().
|
inlinestatic |
Definition at line 454 of file arbel.c.
References arbel_cmd(), ARBEL_HCR_DISABLE_LAM, ARBEL_HCR_VOID_CMD, and NULL.
|
inlinestatic |
Definition at line 461 of file arbel.c.
References arbel_cmd(), ARBEL_HCR_ENABLE_LAM, ARBEL_HCR_OUT_CMD, and NULL.
Referenced by arbel_start_firmware().
|
inlinestatic |
Definition at line 469 of file arbel.c.
References arbel_cmd(), ARBEL_HCR_IN_CMD, ARBEL_HCR_UNMAP_ICM, NULL, and offset.
Referenced by arbel_alloc_icm(), and arbel_free_icm().
|
inlinestatic |
Definition at line 478 of file arbel.c.
References arbel_cmd(), ARBEL_HCR_IN_CMD, ARBEL_HCR_MAP_ICM, map, and NULL.
Referenced by arbel_alloc_icm().
|
inlinestatic |
Definition at line 487 of file arbel.c.
References arbel_cmd(), ARBEL_HCR_UNMAP_ICM_AUX, ARBEL_HCR_VOID_CMD, and NULL.
Referenced by arbel_alloc_icm(), and arbel_free_icm().
|
inlinestatic |
Definition at line 494 of file arbel.c.
References arbel_cmd(), ARBEL_HCR_IN_CMD, ARBEL_HCR_MAP_ICM_AUX, map, and NULL.
Referenced by arbel_alloc_icm().
|
inlinestatic |
Definition at line 503 of file arbel.c.
References arbel_cmd(), ARBEL_HCR_INOUT_CMD, and ARBEL_HCR_SET_ICM_SIZE.
Referenced by arbel_alloc_icm().
|
inlinestatic |
Definition at line 514 of file arbel.c.
References arbel_cmd(), ARBEL_HCR_UNMAP_FA, ARBEL_HCR_VOID_CMD, and NULL.
Referenced by arbel_start_firmware(), and arbel_stop_firmware().
|
inlinestatic |
Definition at line 521 of file arbel.c.
References arbel_cmd(), ARBEL_HCR_IN_CMD, ARBEL_HCR_MAP_FA, map, and NULL.
Referenced by arbel_start_firmware().
Issue management datagram.
ibdev | Infiniband device |
mad | Management datagram |
rc | Return status code |
Definition at line 543 of file arbel.c.
References arbel_cmd_mad_ifc(), DBGC, EIO, ib_mad::hdr, ib_get_drvdata(), arbel::ibdev, mad, arbelprm_mad::mad, memcpy(), ntohs, ib_device::port, rc, static_assert, ib_mad_hdr::status, and strerror().
Referenced by arbel_event_port_state_change(), arbel_ib_open(), arbel_inform_sma(), arbel_poll_eq(), and arbel_probe().
|
static |
Dump completion queue context (for debugging only)
arbel | Arbel device |
cq | Completion queue |
rc | Return status code |
Definition at line 588 of file arbel.c.
References arbel_cmd_query_cq(), ib_completion_queue::cqn, DBGC, DBGC_HDA, memset(), rc, and strerror().
|
static |
Create completion queue.
ibdev | Infiniband device |
cq | Completion queue |
rc | Return status code |
Definition at line 611 of file arbel.c.
References arbel_bitmask_alloc(), arbel_bitmask_free(), arbel_cmd_sw2hw_cq(), arbel_cq_arm_doorbell_idx(), arbel_cq_ci_doorbell_idx(), ARBEL_GLOBAL_PD, ARBEL_MAX_CQS, ARBEL_UAR_RES_CQ_ARM, ARBEL_UAR_RES_CQ_CI, ARBEL_UAR_RES_NONE, arbel_completion_queue::arm_doorbell_idx, barrier, c_eqn, arbel_completion_queue::ci_doorbell_idx, arbelprm_doorbell_record::cq_arm, arbelprm_doorbell_record::cq_ci, arbel::cq_inuse, arbel_completion_queue::cqe, arbel_completion_queue::cqe_size, cqn, ib_completion_queue::cqn, arbel::db_rec, DBGC, ENOMEM, arbel::eq, arbel_event_queue::eqn, fls, free, free_phys(), ib_cq_set_drvdata(), ib_get_drvdata(), arbel::ibdev, arbel::limits, arbel::lkey, malloc_phys(), memset(), MLX_FILL_1, MLX_FILL_2, MLX_FILL_H, arbelprm_completion_entry::normal, ib_completion_queue::num_cqes, owner, rc, arbel_dev_limits::reserved_cqs, arbel_dev_limits::reserved_uars, st, strerror(), virt_to_bus(), virt_to_phys(), and zalloc().
|
static |
Destroy completion queue.
ibdev | Infiniband device |
cq | Completion queue |
Definition at line 715 of file arbel.c.
References arbel_bitmask_free(), arbel_cmd_hw2sw_cq(), ARBEL_UAR_RES_NONE, arbel_completion_queue::arm_doorbell_idx, arbel_completion_queue::ci_doorbell_idx, arbelprm_doorbell_record::cq_arm, arbelprm_doorbell_record::cq_ci, arbel::cq_inuse, arbel_completion_queue::cqe, arbel_completion_queue::cqe_size, ib_completion_queue::cqn, arbel::db_rec, DBGC, free, free_phys(), ib_cq_get_drvdata(), ib_cq_set_drvdata(), ib_get_drvdata(), arbel::ibdev, arbel::limits, MLX_FILL_1, NULL, rc, arbel_dev_limits::reserved_cqs, and strerror().
|
static |
Assign queue pair number.
ibdev | Infiniband device |
qp | Queue pair |
rc | Return status code |
Definition at line 764 of file arbel.c.
References arbel_bitmask_alloc(), ARBEL_MAX_QPS, ARBEL_PORT_BASE, ARBEL_QPN_RANDOM_MASK, DBGC, ENOTSUP, ib_get_drvdata(), IB_QPT_GSI, IB_QPT_RC, IB_QPT_SMI, IB_QPT_UD, arbel::ibdev, ib_device::port, qp, arbel::qp_inuse, arbel::qpn_base, random(), and arbel::special_qpn_base.
Referenced by arbel_create_qp().
|
static |
Free queue pair number.
ibdev | Infiniband device |
qp | Queue pair |
Definition at line 806 of file arbel.c.
References arbel_bitmask_free(), ARBEL_QPN_RANDOM_MASK, ib_get_drvdata(), arbel::ibdev, qp, arbel::qp_inuse, and arbel::qpn_base.
Referenced by arbel_create_qp(), and arbel_destroy_qp().
|
static |
Calculate transmission rate.
av | Address vector |
arbel_rate | Arbel rate |
Definition at line 822 of file arbel.c.
References IB_RATE_120, IB_RATE_2_5, and ib_address_vector::rate.
Referenced by arbel_fill_mlx_send_wqe(), arbel_fill_ud_send_wqe(), and arbel_modify_qp().
|
static |
Dump queue pair context (for debugging only)
arbel | Arbel device |
qp | Queue pair |
rc | Return status code |
Definition at line 843 of file arbel.c.
References arbel_cmd_query_qpee(), DBGC, DBGC_HDA, memset(), qp, rc, and strerror().
|
static |
Create send work queue.
arbel_send_wq | Send work queue |
num_wqes | Number of work queue entries |
rc | Return status code |
Definition at line 866 of file arbel.c.
References ENOMEM, malloc_phys(), memset(), MLX_FILL_1, arbel_send_wqe::next, virt_to_bus(), arbel_send_work_queue::wqe, and arbel_send_work_queue::wqe_size.
Referenced by arbel_create_qp().
|
static |
Create receive work queue.
arbel_recv_wq | Receive work queue |
num_wqes | Number of work queue entries |
type | Queue pair type |
rc | Return status code |
Definition at line 903 of file arbel.c.
References ARBEL_INVALID_LKEY, data, arbelprm_recv_wqe::data, ENOMEM, free_phys(), arbel_recv_work_queue::grh, arbel_recv_work_queue::grh_size, IB_QPT_GSI, IB_QPT_SMI, IB_QPT_UD, malloc_phys(), memset(), MLX_FILL_1, arbelprm_recv_wqe::next, offsetof, rc, arbel_recv_wqe::recv, recv, type, typeof(), virt_to_bus(), arbel_recv_work_queue::wqe, and arbel_recv_work_queue::wqe_size.
Referenced by arbel_create_qp().
|
static |
Create queue pair.
ibdev | Infiniband device |
qp | Queue pair |
rc | Return status code |
Definition at line 971 of file arbel.c.
References arbel_alloc_qpn(), arbel_cmd_2rst_qpee(), arbel_cmd_rst2init_qpee(), arbel_create_recv_wq(), arbel_create_send_wq(), arbel_free_qpn(), ARBEL_GLOBAL_PD, ARBEL_PM_STATE_MIGRATED, arbel_qp_st, ARBEL_QP_ST_INIT, arbel_recv_doorbell_idx(), arbel_send_doorbell_idx(), ARBEL_UAR_RES_NONE, ARBEL_UAR_RES_RQ, ARBEL_UAR_RES_SQ, arbel::db_rec, DBG, DBGC, arbel_send_work_queue::doorbell_idx, arbel_recv_work_queue::doorbell_idx, ENOMEM, ENOTSUP, fls, free, free_phys(), arbel_recv_work_queue::grh, arbel_recv_work_queue::grh_size, ib_get_drvdata(), ib_qp_set_drvdata(), IB_QPT_RC, arbel::ibdev, arbel::limits, arbel::lkey, memset(), MLX_FILL_1, MLX_FILL_2, MLX_FILL_3, MLX_FILL_4, MLX_FILL_H, ib_device::port, arbelprm_doorbell_record::qp, qp, rc, arbel_queue_pair::recv, arbel_dev_limits::reserved_uars, arbel_queue_pair::send, arbel_queue_pair::state, strerror(), virt_to_bus(), virt_to_phys(), arbel_send_work_queue::wqe, arbel_recv_work_queue::wqe, arbel_send_work_queue::wqe_size, arbel_recv_work_queue::wqe_size, and zalloc().
|
static |
Modify queue pair.
ibdev | Infiniband device |
qp | Queue pair |
rc | Return status code |
Definition at line 1124 of file arbel.c.
References arbel_cmd_init2rtr_qpee(), arbel_cmd_rtr2rts_qpee(), arbel_cmd_rts2rts_qpee(), ARBEL_MTU_2048, ARBEL_QP_ST_RTR, ARBEL_QP_ST_RTS, ARBEL_QPEE_OPT_PARAM_QKEY, ARBEL_QPN_RANDOM_MASK, arbel_rate(), ARBEL_RETRY_MAX, DBGC, ib_get_drvdata(), ib_qp_get_drvdata(), arbel::ibdev, arbel::limits, memcpy(), memset(), MLX_FILL_1, MLX_FILL_2, opt_param_mask, qp, rc, arbel_dev_limits::reserved_rdbs, arbel::special_qpn_base, arbel_queue_pair::state, and strerror().
|
static |
Destroy queue pair.
ibdev | Infiniband device |
qp | Queue pair |
Definition at line 1211 of file arbel.c.
References arbel_cmd_2rst_qpee(), arbel_free_qpn(), ARBEL_UAR_RES_NONE, arbel::db_rec, DBGC, arbel_send_work_queue::doorbell_idx, arbel_recv_work_queue::doorbell_idx, free, free_phys(), arbel_recv_work_queue::grh, arbel_recv_work_queue::grh_size, ib_get_drvdata(), ib_qp_get_drvdata(), ib_qp_set_drvdata(), arbel::ibdev, MLX_FILL_1, NULL, qp, arbelprm_doorbell_record::qp, rc, arbel_queue_pair::recv, arbel_queue_pair::send, strerror(), arbel_send_work_queue::wqe, arbel_recv_work_queue::wqe, arbel_send_work_queue::wqe_size, and arbel_recv_work_queue::wqe_size.
|
static |
Ring doorbell register in UAR.
arbel | Arbel device |
db_reg | Doorbell register structure |
offset | Address of doorbell |
Definition at line 1259 of file arbel.c.
References barrier, DBGC2, arbelprm_doorbell_register::dword, ntohl, offset, arbel::uar, virt_to_phys(), and writel().
Referenced by arbel_post_send().
|
static |
Construct UD send work queue entry.
ibdev | Infiniband device |
qp | Queue pair |
dest | Destination address vector |
iobuf | I/O buffer |
wqe | Send work queue entry |
nds | Work queue entry size |
Definition at line 1288 of file arbel.c.
References ARBEL_GLOBAL_PD, arbel_no_gid, arbel_rate(), byte_count, arbelprm_ud_send_wqe::ctrl, arbelprm_ud_send_wqe::data, data, io_buffer::data, dest, gid, ib_get_drvdata(), arbel::ibdev, iob_len(), arbel::lkey, memcpy(), MLX_FILL_1, MLX_FILL_2, MLX_FILL_H, offsetof, ib_device::port, typeof(), arbelprm_ud_send_wqe::ud, arbel_send_wqe::ud, and virt_to_bus().
|
static |
Construct MLX send work queue entry.
ibdev | Infiniband device |
qp | Queue pair |
dest | Destination address vector |
iobuf | I/O buffer |
wqe | Send work queue entry |
nds | Work queue entry size |
Definition at line 1332 of file arbel.c.
References arbel_rate(), byte_count, c, arbelprm_mlx_send_wqe::ctrl, arbelprm_mlx_send_wqe::data, data, io_buffer::data, dest, headers, arbelprm_mlx_send_wqe::headers, ib_get_drvdata(), ib_push(), IB_QPN_SMI, arbel::ibdev, iob_len(), iob_populate(), iob_reserve, arbel::lkey, arbel_send_wqe::mlx, MLX_FILL_1, MLX_FILL_5, MLX_FILL_H, offsetof, qp, rlid, typeof(), and virt_to_bus().
|
static |
Construct RC send work queue entry.
ibdev | Infiniband device |
qp | Queue pair |
dest | Destination address vector |
iobuf | I/O buffer |
wqe | Send work queue entry |
nds | Work queue entry size |
Definition at line 1382 of file arbel.c.
References byte_count, arbelprm_rc_send_wqe::ctrl, arbelprm_rc_send_wqe::data, data, io_buffer::data, ib_get_drvdata(), arbel::ibdev, iob_len(), arbel::lkey, MLX_FILL_1, MLX_FILL_H, offsetof, arbel_send_wqe::rc, typeof(), and virt_to_bus().
|
static |
Post send work queue entry.
ibdev | Infiniband device |
qp | Queue pair |
dest | Destination address vector |
iobuf | I/O buffer |
rc | Return status code |
Definition at line 1423 of file arbel.c.
References ARBEL_DB_POST_SND_OFFSET, arbel_fill_send_wqe, ARBEL_OPCODE_SEND, arbel_ring_doorbell(), assert(), barrier, arbel::db_rec, DBGC, DBGCP, DBGCP_HDA, dest, arbel_send_work_queue::doorbell_idx, ENOBUFS, ib_get_drvdata(), ib_qp_get_drvdata(), arbel::ibdev, ib_work_queue::iobufs, memset(), MLX_FILL_1, MLX_FILL_2, MLX_FILL_3, MLX_FILL_4, MLX_SET, arbel_send_wqe::next, ib_work_queue::next_idx, NULL, ib_work_queue::num_wqes, arbelprm_doorbell_record::qp, qp, qpn, arbelprm_doorbell_register::send, arbel_queue_pair::send, virt_to_phys(), arbel_send_work_queue::wqe, and wqe_counter.
|
static |
Post receive work queue entry.
ibdev | Infiniband device |
qp | Queue pair |
iobuf | I/O buffer |
rc | Return status code |
Definition at line 1498 of file arbel.c.
References barrier, byte_count, data, io_buffer::data, arbelprm_recv_wqe::data, arbel::db_rec, DBGC, arbel_recv_work_queue::doorbell_idx, ENOBUFS, grh, arbel_recv_work_queue::grh, ib_get_drvdata(), ib_qp_get_drvdata(), arbel::ibdev, iob_tailroom(), ib_work_queue::iobufs, arbel::lkey, MLX_FILL_1, MLX_FILL_H, ib_work_queue::next_idx, ib_work_queue::num_wqes, arbelprm_doorbell_record::qp, qp, arbel_recv_wqe::recv, arbel_queue_pair::recv, virt_to_bus(), and arbel_recv_work_queue::wqe.
|
static |
Handle completion.
ibdev | Infiniband device |
cq | Completion queue |
cqe | Hardware completion queue entry |
rc | Return status code |
Definition at line 1556 of file arbel.c.
References ARBEL_INVALID_LKEY, ARBEL_OPCODE_RECV_ERROR, ARBEL_OPCODE_SEND_ERROR, assert(), byte_cnt, byte_count, ib_completion_queue::cqn, io_buffer::data, arbelprm_recv_wqe::data, DBGC, DBGC_HDA, DBGCP, DBGCP_HDA, ib_global_route_header::dgid, EINVAL, EIO, arbelprm_completion_entry::error, ib_address_vector::gid, ib_address_vector::gid_present, grh, arbel_recv_work_queue::grh, ib_complete_recv(), ib_complete_send(), ib_find_wq(), ib_get_drvdata(), ib_qp_get_drvdata(), IB_QPT_GSI, IB_QPT_RC, IB_QPT_SMI, IB_QPT_UD, arbel::ibdev, iob_put, iob_tailroom(), ib_work_queue::iobufs, len, ib_address_vector::lid, memcpy(), memset(), MLX_FILL_1, MLX_GET, arbelprm_completion_entry::normal, NULL, opcode, qp, ib_work_queue::qp, qpn, ib_address_vector::qpn, rc, arbel_recv_wqe::recv, recv, arbel_queue_pair::recv, rlid, send, arbel_queue_pair::send, ib_global_route_header::sgid, sl, ib_address_vector::sl, syndrome, virt_to_bus(), virt_to_phys(), arbel_send_work_queue::wqe, and arbel_recv_work_queue::wqe.
Referenced by arbel_poll_cq().
|
static |
Poll completion queue.
ibdev | Infiniband device |
cq | Completion queue |
Definition at line 1694 of file arbel.c.
References arbel_complete(), barrier, arbel_completion_queue::ci_doorbell_idx, arbelprm_doorbell_record::cq_ci, arbel_completion_queue::cqe, ib_completion_queue::cqn, arbel::db_rec, DBGC, DBGC_HD, ib_cq_get_drvdata(), ib_get_drvdata(), arbel::ibdev, MLX_FILL_1, MLX_GET, ib_completion_queue::next_idx, arbelprm_completion_entry::normal, ib_completion_queue::num_cqes, owner, rc, and strerror().
|
static |
Create event queue.
arbel | Arbel device |
rc | Return status code |
Definition at line 1744 of file arbel.c.
References arbel_cmd_hw2sw_eq(), arbel_cmd_map_eq(), arbel_cmd_sw2hw_eq(), ARBEL_DB_EQ_OFFSET, ARBEL_GLOBAL_PD, ARBEL_MAP_EQ, ARBEL_NUM_EQES, barrier, DBGC, arbel_event_queue::doorbell, ENOMEM, arbel::eq, arbel::eq_ci_doorbells, arbel_event_queue::eqe, arbel_event_queue::eqe_size, arbel_event_queue::eqn, fls, free_phys(), arbelprm_event_entry::generic, arbel::limits, lkey, arbel::lkey, malloc_phys(), memset(), MLX_FILL_1, MLX_FILL_H, owner, rc, arbel_dev_limits::reserved_eqs, st, strerror(), and virt_to_phys().
Referenced by arbel_start().
|
static |
Destroy event queue.
arbel | Arbel device |
Definition at line 1820 of file arbel.c.
References arbel_cmd_hw2sw_eq(), arbel_cmd_map_eq(), ARBEL_UNMAP_EQ, DBGC, arbel::eq, arbel_event_queue::eqe, arbel_event_queue::eqe_size, arbel_event_queue::eqn, free_phys(), memset(), MLX_FILL_1, port_state_change, rc, and strerror().
Referenced by arbel_start(), and arbel_stop().
|
static |
Handle port state event.
arbel | Arbel device |
eqe | Port state change event queue entry |
Definition at line 1857 of file arbel.c.
References arbel_mad(), ARBEL_NUM_PORTS, data, DBGC, arbelprm_event_entry::generic, ib_smc_update(), arbel::ibdev, MLX_GET, port, and arbelprm_event_entry::port_state_change.
Referenced by arbel_poll_eq().
|
static |
Poll event queue.
ibdev | Infiniband device |
Definition at line 1884 of file arbel.c.
References ARBEL_EV_PORT_STATE_CHANGE, arbel_event_port_state_change(), arbel_mad(), ARBEL_NUM_EQES, barrier, ci, arbelprm_eq_doorbell_register::ci, DBGC, DBGC_HDA, DBGCP, DBGCP_HDA, arbel_event_queue::doorbell, arbelprm_eq_doorbell_register::dword, arbel::eq, arbel_event_queue::eqe, arbel_event_queue::eqn, arbelprm_event_entry::generic, ib_get_drvdata(), ib_is_open(), IB_PORT_STATE_DOWN, ib_smc_update(), arbel::ibdev, MLX_FILL_1, MLX_GET, arbel_event_queue::next_idx, owner, ib_device::port_state, virt_to_phys(), and writel().
|
static |
Map virtual to physical address for firmware usage.
arbel | Arbel device |
map | Mapping function |
va | Virtual address |
pa | Physical address |
len | Length of region |
rc | Return status code |
Definition at line 1959 of file arbel.c.
References ARBEL_PAGE_SIZE, assert(), DBG_DISABLE, DBG_ENABLE, DBGC, DBGLVL_EXTRA, DBGLVL_LOG, end, fls, high, len, low, map, memset(), MLX_FILL_1, MLX_FILL_2, MLX_FILL_H, rc, size, start, and strerror().
Referenced by arbel_alloc_icm(), and arbel_start_firmware().
|
static |
Start firmware running.
arbel | Arbel device |
rc | Return status code |
Definition at line 2038 of file arbel.c.
References arbel_cmd_enable_lam(), arbel_cmd_map_fa(), arbel_cmd_query_fw(), arbel_cmd_run_fw(), arbel_cmd_unmap_fa(), arbel_map_vpm(), ARBEL_PAGE_SIZE, assert(), DBGC, ENOMEM, arbel::eq_ci_doorbells, arbel::firmware_area, arbel::firmware_len, MLX_GET, arbel::pci, pci_ioremap(), rc, strerror(), umalloc(), and user_to_phys().
Referenced by arbel_probe(), and arbel_start().
|
static |
Stop firmware running.
arbel | Arbel device |
Definition at line 2115 of file arbel.c.
References arbel_cmd_unmap_fa(), DBGC, arbel::firmware_area, rc, strerror(), and UNULL.
Referenced by arbel_probe(), arbel_start(), and arbel_stop().
|
static |
Get device limits.
arbel | Arbel device |
rc | Return status code |
Definition at line 2140 of file arbel.c.
References arbel_cmd_query_dev_lim(), ARBEL_PAGE_SIZE, ARBEL_RDB_ENTRY_SIZE, arbel_dev_limits::cqc_entry_size, DBGC, arbel_dev_limits::eec_entry_size, arbel_dev_limits::eeec_entry_size, arbel_dev_limits::eqc_entry_size, arbel_dev_limits::eqpc_entry_size, arbel::limits, MLX_GET, arbel_dev_limits::mpt_entry_size, arbel_dev_limits::mtt_entry_size, arbel_dev_limits::qpc_entry_size, rc, arbel_dev_limits::reserved_cqs, arbel_dev_limits::reserved_ees, arbel_dev_limits::reserved_eqs, arbel_dev_limits::reserved_mrws, arbel_dev_limits::reserved_mtts, arbel_dev_limits::reserved_qps, arbel_dev_limits::reserved_rdbs, arbel_dev_limits::reserved_srqs, arbel_dev_limits::reserved_uars, arbel_dev_limits::srqc_entry_size, strerror(), and arbel_dev_limits::uar_scratch_entry_size.
Referenced by arbel_probe().
|
static |
Allocate ICM.
arbel | Arbel device |
init_hca | INIT_HCA structure to fill in |
rc | Return status code |
Definition at line 2224 of file arbel.c.
References arbel_cmd_map_icm(), arbel_cmd_map_icm_aux(), arbel_cmd_set_icm_size(), arbel_cmd_unmap_icm(), arbel_cmd_unmap_icm_aux(), ARBEL_GROUP_SEPARATOR_DOORBELL, ARBEL_LOG_MULTICAST_HASH_SIZE, arbel_map_vpm(), ARBEL_MAX_CQS, ARBEL_MAX_EQS, ARBEL_MAX_QPS, ARBEL_PAGE_SIZE, ARBEL_RDB_ENTRY_SIZE, ARBEL_RSVD_SPECIAL_QPS, ARBEL_UAR_RES_GROUP_SEP, assert(), arbel_dev_limits::cqc_entry_size, arbel::db_rec, arbel::db_rec_offset, DBGC, arbel_dev_limits::eec_entry_size, arbel_dev_limits::eeec_entry_size, ENOMEM, arbel_dev_limits::eqc_entry_size, arbel_dev_limits::eqpc_entry_size, fls, free_phys(), arbel::icm, icm_align(), arbel::icm_aux_len, arbel::icm_len, len, arbel::limits, malloc_phys(), memset(), MLX_FILL_1, MLX_FILL_2, MLX_GET, arbel_dev_limits::mpt_entry_size, arbel_dev_limits::mtt_entry_size, NULL, arbelprm_doorbell_record::qp, arbel_dev_limits::qpc_entry_size, rc, arbel_dev_limits::reserved_cqs, arbel_dev_limits::reserved_ees, arbel_dev_limits::reserved_eqs, arbel_dev_limits::reserved_mrws, arbel_dev_limits::reserved_mtts, arbel_dev_limits::reserved_qps, arbel_dev_limits::reserved_rdbs, arbel_dev_limits::reserved_srqs, arbel_dev_limits::reserved_uars, arbel_dev_limits::srqc_entry_size, strerror(), arbel_dev_limits::uar_scratch_entry_size, umalloc(), user_to_phys(), value, and virt_to_phys().
Referenced by arbel_start().
|
static |
Free ICM.
arbel | Arbel device |
Definition at line 2529 of file arbel.c.
References arbel_cmd_unmap_icm(), arbel_cmd_unmap_icm_aux(), ARBEL_PAGE_SIZE, arbel::db_rec, arbel::db_rec_offset, free_phys(), arbel::icm_len, memset(), MLX_FILL_1, NULL, and value.
Referenced by arbel_start(), and arbel_stop().
|
static |
Reset device.
arbel | Arbel device |
Definition at line 2555 of file arbel.c.
References ARBEL_RESET_MAGIC, ARBEL_RESET_OFFSET, ARBEL_RESET_WAIT_TIME_MS, arbel::config, mdelay(), arbel::pci, pci_backup(), PCI_CONFIG_BACKUP_ALL, PCI_CONFIG_BACKUP_EXCLUDE, pci_read_config_word(), pci_restore(), PCI_VENDOR_ID, vendor, and writel().
Referenced by arbel_probe(), and arbel_stop().
|
static |
Set up memory protection table.
arbel | Arbel device |
rc | Return status code |
Definition at line 2582 of file arbel.c.
References arbel_cmd_sw2hw_mpt(), ARBEL_GLOBAL_PD, ARBEL_MKEY_PREFIX, DBGC, key, arbel::limits, arbel::lkey, memset(), MLX_FILL_1, MLX_FILL_2, MLX_FILL_7, rc, arbel_dev_limits::reserved_mrws, and strerror().
Referenced by arbel_start().
|
static |
Configure special queue pairs.
arbel | Arbel device |
rc | Return status code |
Definition at line 2623 of file arbel.c.
References arbel_cmd_conf_special_qp(), ARBEL_NUM_SPECIAL_QPS, DBGC, arbel::limits, arbel::qpn_base, rc, arbel_dev_limits::reserved_qps, arbel::special_qpn_base, and strerror().
Referenced by arbel_start().
|
static |
Start Arbel device.
arbel | Arbel device |
running | Firmware is already running |
rc | Return status code |
Definition at line 2661 of file arbel.c.
References arbel_alloc_icm(), arbel_cmd_close_hca(), arbel_cmd_init_hca(), arbel_configure_special_qps(), arbel_create_eq(), arbel_destroy_eq(), arbel_free_icm(), ARBEL_NUM_PORTS, arbel_setup_mpt(), arbel_start_firmware(), arbel_stop_firmware(), DBGC, arbel::ibdev, if(), arbel::lkey, memset(), rc, ib_device::rdma_key, and strerror().
Referenced by arbel_open(), and arbel_probe().
|
static |
Stop Arbel device.
arbel | Arbel device |
Definition at line 2718 of file arbel.c.
References arbel_cmd_close_hca(), arbel_destroy_eq(), arbel_free_icm(), arbel_reset(), and arbel_stop_firmware().
Referenced by arbel_close(), and arbel_probe().
|
static |
Open Arbel device.
arbel | Arbel device |
rc | Return status code |
Definition at line 2732 of file arbel.c.
References arbel_start(), arbel::open_count, and rc.
Referenced by arbel_ib_open().
|
static |
Close Arbel device.
arbel | Arbel device |
Definition at line 2752 of file arbel.c.
References arbel_stop(), assert(), and arbel::open_count.
Referenced by arbel_ib_close(), and arbel_ib_open().
|
static |
Initialise Infiniband link.
ibdev | Infiniband device |
rc | Return status code |
Definition at line 2776 of file arbel.c.
References arbel_close(), arbel_cmd_init_ib(), arbel_mad(), ARBEL_MTU_2048, arbel_open(), DBGC, ib_get_drvdata(), ib_smc_update(), arbel::ibdev, memset(), MLX_FILL_1, MLX_FILL_3, ib_device::port, rc, and strerror().
|
static |
Close Infiniband link.
ibdev | Infiniband device |
Definition at line 2816 of file arbel.c.
References arbel_close(), arbel_cmd_close_ib(), DBGC, ib_get_drvdata(), arbel::ibdev, ib_device::port, rc, and strerror().
Inform embedded subnet management agent of a received MAD.
ibdev | Infiniband device |
mad | MAD |
rc | Return status code |
Definition at line 2838 of file arbel.c.
References arbel_mad(), ib_smc_update(), arbel::ibdev, mad, and rc.
|
static |
Attach to multicast group.
ibdev | Infiniband device |
qp | Queue pair |
gid | Multicast GID |
rc | Return status code |
Definition at line 2866 of file arbel.c.
References arbel_cmd_mgid_hash(), arbel_cmd_read_mgm(), arbel_cmd_write_mgm(), DBGC, EBUSY, gid, hash, ib_get_drvdata(), arbel::ibdev, index, memcpy(), MLX_FILL_2, MLX_GET, qp, rc, and strerror().
|
static |
Detach from multicast group.
ibdev | Infiniband device |
qp | Queue pair |
gid | Multicast GID |
Definition at line 2921 of file arbel.c.
References arbel_cmd_mgid_hash(), arbel_cmd_write_mgm(), DBGC, gid, hash, ib_get_drvdata(), arbel::ibdev, index, memset(), MLX_GET, rc, and strerror().
|
static |
Allocate Arbel device.
arbel | Arbel device |
Definition at line 2978 of file arbel.c.
References ARBEL_MBOX_ALIGN, ARBEL_MBOX_SIZE, free, free_phys(), arbel::mailbox_in, arbel::mailbox_out, malloc_phys(), NULL, and zalloc().
Referenced by arbel_probe().
|
static |
Free Arbel device.
arbel | Arbel device |
Definition at line 3010 of file arbel.c.
References ARBEL_MBOX_SIZE, arbel::firmware_area, free, free_phys(), arbel::icm, arbel::mailbox_in, arbel::mailbox_out, and ufree().
Referenced by arbel_probe(), and arbel_remove().
|
static |
Probe PCI device.
pci | PCI device |
id | PCI ID |
rc | Return status code |
Definition at line 3026 of file arbel.c.
References adjust_pci_device(), alloc_ibdev(), arbel_alloc(), arbel_free(), arbel_get_limits(), arbel_ib_operations, arbel_mad(), ARBEL_NUM_PORTS, ARBEL_PCI_CONFIG_BAR, ARBEL_PCI_CONFIG_BAR_SIZE, ARBEL_PCI_UAR_BAR, ARBEL_PCI_UAR_IDX, ARBEL_PCI_UAR_SIZE, ARBEL_PORT_BASE, arbel_reset(), arbel_start(), arbel_start_firmware(), arbel_stop(), arbel_stop_firmware(), arbel::config, DBGC, pci_device::dev, ib_device::dev, ENOMEM, ib_set_drvdata(), ib_smc_init(), arbel::ibdev, ibdev_put(), iounmap(), ib_device::op, arbel::open_count, arbel::pci, pci_bar_start(), pci_ioremap(), pci_set_drvdata(), ib_device::port, ib_device::ports, rc, register_ibdev(), strerror(), arbel::uar, and unregister_ibdev().
|
static |
Remove PCI device.
pci | PCI device |
Definition at line 3128 of file arbel.c.
References arbel_free(), ARBEL_NUM_PORTS, arbel::config, arbel::ibdev, ibdev_put(), iounmap(), arbel::pci, pci_get_drvdata(), arbel::uar, and unregister_ibdev().
|
static |
Queue pair transport service type map.
Definition at line 828 of file arbel.c.
Referenced by arbel_create_qp().
|
static |
GID used for GID-less send work queue entries.
Definition at line 1274 of file arbel.c.
Referenced by arbel_fill_ud_send_wqe().
|
static |
Work queue entry constructors.
Definition at line 1403 of file arbel.c.
Referenced by arbel_post_send().
|
static |
Arbel Infiniband operations.
Definition at line 2948 of file arbel.c.
Referenced by arbel_probe().
|
static |
struct pci_driver arbel_driver __pci_driver |