iPXE
|
#include <errno.h>
#include <strings.h>
#include <ipxe/malloc.h>
#include <ipxe/umalloc.h>
#include <ipxe/infiniband.h>
#include <ipxe/ib_smc.h>
#include <ipxe/iobuf.h>
#include <ipxe/netdevice.h>
#include "flexboot_nodnic.h"
#include <ipxe/ethernet.h>
#include <ipxe/if_ether.h>
#include <usr/ifmgmt.h>
#include <ipxe/in.h>
#include <byteswap.h>
#include "mlx_utils/include/public/mlx_pci_gw.h"
#include <config/general.h>
#include <ipxe/ipoib.h>
#include "mlx_nodnic/include/mlx_port.h"
#include "nodnic_shomron_prm.h"
#include "golan.h"
#include "mlx_utils/include/public/mlx_bail.h"
#include "mlx_utils/mlx_lib/mlx_link_speed/mlx_link_speed.h"
Go to the source code of this file.
Data Structures | |
struct | golan_page |
struct | mbox |
Macros | |
#define | DEVICE_IS_CIB(device) ( device == 0x1011 ) |
#define | GOLAN_CHECK_RC_AND_CMD_STATUS(_lable) |
#define | GOLAN_PRINT_RC_AND_CMD_STATUS golan_check_rc_and_cmd_status ( cmd, rc ) |
#define | CTRL_SIG_SZ (sizeof(mailbox->mblock) - sizeof(mailbox->mblock.bdata) - 2) |
#define | SHOMRON_GENERATE_CQE 0x3 |
#define | SHOMRON_INLINE_HEADERS_SIZE ETH_HLEN |
#define | SHOMRON_INLINE_HEADERS_OFFSET 32 |
#define | FLEXBOOT_NODNIC_OPCODE_CQ_SEND 0 |
#define | FLEXBOOT_NODNIC_OPCODE_CQ_RECV 2 |
#define | FLEXBOOT_NODNIC_OPCODE_CQ_SEND_ERR 13 |
#define | FLEXBOOT_NODNIC_OPCODE_CQ_RECV_ERR 14 |
Functions | |
FILE_LICENCE (GPL2_OR_LATER) | |
static void | golan_free_fw_areas (struct golan *golan) |
static int | golan_init_fw_areas (struct golan *golan) |
static int | golan_check_rc_and_cmd_status (struct golan_cmd_layout *cmd, int rc) |
static uint32_t | ilog2 (uint32_t mem) |
static u8 | xor8_buf (void *buf, int len) |
static const char * | cmd_status_str (u8 status) |
static uint16_t | fw_rev_maj (struct golan *golan) |
static u16 | fw_rev_min (struct golan *golan) |
static u16 | fw_rev_sub (struct golan *golan) |
static u16 | cmdif_rev (struct golan *golan) |
static struct golan_cmd_layout * | get_cmd (struct golan *golan, int idx) |
static void | golan_calc_sig (struct golan *golan, uint32_t cmd_idx, uint32_t inbox_idx, uint32_t outbox_idx) |
static void | show_out_status (uint32_t *out) |
static uint32_t | is_command_finished (struct golan *golan, int idx) |
Check if CMD has finished. More... | |
static int | golan_cmd_wait (struct golan *golan, int idx, const char *command) |
Wait for Golan command completion. More... | |
static void | send_command (struct golan *golan) |
Notify the HW that commands are ready. More... | |
static int | send_command_and_wait (struct golan *golan, uint32_t cmd_idx, uint32_t inbox_idx, uint32_t outbox_idx, const char *command) |
static struct golan_cmd_layout * | write_cmd (struct golan *golan, int idx, uint16_t opcode, uint16_t opmod, uint16_t inbox_idx, uint16_t outbox_idx, uint16_t inlen, uint16_t outlen) |
Prepare a FW command, In - comamnd idx (Must be valid) writes the command parameters. More... | |
static int | golan_core_enable_hca (struct golan *golan) |
static void | golan_disable_hca (struct golan *golan) |
static int | golan_set_hca_cap (struct golan *golan) |
static int | golan_qry_hca_cap (struct golan *golan) |
static int | golan_take_pages (struct golan *golan, uint32_t pages, __be16 func_id) |
static int | golan_provide_pages (struct golan *golan, uint32_t pages, __be16 func_id, struct golan_firmware_area *fw_area) |
static int | golan_handle_pages (struct golan *golan, enum golan_qry_pages_mode qry, enum golan_manage_pages_mode mode) |
static int | golan_set_access_reg (struct golan *golan, uint32_t reg) |
static void | golan_cmd_uninit (struct golan *golan) |
static int | golan_cmd_init (struct golan *golan) |
Initialise Golan Command Q parameters – Alocate a 4kb page for the Command Q – Read the stride and log num commands available – Write the address to cmdq_phy_addr in iseg. More... | |
static int | golan_hca_init (struct golan *golan) |
static void | golan_teardown_hca (struct golan *golan, enum golan_teardown op_mod) |
static int | golan_alloc_uar (struct golan *golan) |
static void | golan_dealloc_uar (struct golan *golan) |
static void | golan_eq_update_ci (struct golan_event_queue *eq, int arm) |
static int | golan_create_eq (struct golan *golan) |
static void | golan_destory_eq (struct golan *golan) |
static int | golan_alloc_pd (struct golan *golan) |
static void | golan_dealloc_pd (struct golan *golan) |
static int | golan_create_mkey (struct golan *golan) |
static void | golan_destroy_mkey (struct golan *golan) |
static void | golan_pci_init (struct golan *golan) |
Initialise Golan PCI parameters. More... | |
static struct golan * | golan_alloc () |
static int | golan_create_cq (struct ib_device *ibdev, struct ib_completion_queue *cq) |
Create completion queue. More... | |
static void | golan_destroy_cq (struct ib_device *ibdev, struct ib_completion_queue *cq) |
Destroy completion queue. More... | |
static void | golan_cq_clean (struct ib_completion_queue *cq) |
static int | golan_qp_type_to_st (enum ib_queue_pair_type type) |
static int | golan_create_qp_aux (struct ib_device *ibdev, struct ib_queue_pair *qp, int *qpn) |
static int | golan_create_qp (struct ib_device *ibdev, struct ib_queue_pair *qp) |
Create queue pair. More... | |
static int | golan_modify_qp_rst_to_init (struct ib_device *ibdev, struct ib_queue_pair *qp __attribute__((unused)), struct golan_modify_qp_mbox_in_data *in) |
static int | golan_modify_qp_init_to_rtr (struct ib_device *ibdev __attribute__((unused)), struct ib_queue_pair *qp __attribute__((unused)), struct golan_modify_qp_mbox_in_data *in) |
static int | golan_modify_qp_rtr_to_rts (struct ib_device *ibdev __attribute__((unused)), struct ib_queue_pair *qp __attribute__((unused)), struct golan_modify_qp_mbox_in_data *in __attribute__((unused))) |
static int | golan_modify_qp_to_rst (struct ib_device *ibdev, struct ib_queue_pair *qp) |
static int | golan_modify_qp (struct ib_device *ibdev, struct ib_queue_pair *qp) |
static void | golan_destroy_qp (struct ib_device *ibdev, struct ib_queue_pair *qp) |
Destroy queue pair. More... | |
static unsigned int | golan_rate (enum ib_rate rate) |
Calculate transmission rate. More... | |
static int | golan_post_send (struct ib_device *ibdev, struct ib_queue_pair *qp, struct ib_address_vector *av, struct io_buffer *iobuf) |
Post send work queue entry. More... | |
static int | golan_post_recv (struct ib_device *ibdev, struct ib_queue_pair *qp, struct io_buffer *iobuf) |
Post receive work queue entry. More... | |
static int | golan_query_vport_context (struct ib_device *ibdev) |
static int | golan_query_vport_gid (struct ib_device *ibdev) |
static int | golan_query_vport_pkey (struct ib_device *ibdev) |
static int | golan_get_ib_info (struct ib_device *ibdev) |
static int | golan_complete (struct ib_device *ibdev, struct ib_completion_queue *cq, struct golan_cqe64 *cqe64) |
static int | golan_is_hw_ownership (struct ib_completion_queue *cq, struct golan_cqe64 *cqe64) |
static void | golan_poll_cq (struct ib_device *ibdev, struct ib_completion_queue *cq) |
static const char * | golan_eqe_type_str (u8 type) |
static const char * | golan_eqe_port_subtype_str (u8 subtype) |
static int | golan_ib_update (struct ib_device *ibdev) |
Update Infiniband parameters using Commands. More... | |
static void | golan_handle_port_event (struct golan *golan, struct golan_eqe *eqe) |
static struct golan_eqe * | golan_next_eqe_sw (struct golan_event_queue *eq) |
static void | golan_poll_eq (struct ib_device *ibdev) |
Poll event queue. More... | |
static int | golan_mcast_attach (struct ib_device *ibdev, struct ib_queue_pair *qp, union ib_gid *gid) |
Attach to multicast group. More... | |
static void | golan_mcast_detach (struct ib_device *ibdev, struct ib_queue_pair *qp, union ib_gid *gid) |
Detach from multicast group. More... | |
static int | golan_inform_sma (struct ib_device *ibdev, union ib_mad *mad) |
Inform embedded subnet management agent of a received MAD. More... | |
static int | golan_register_ibdev (struct golan_port *port) |
static void | golan_bring_down (struct golan *golan) |
static int | golan_set_link_speed (struct golan *golan) |
static int | golan_bring_up (struct golan *golan) |
static void | golan_ib_close (struct ib_device *ibdev) |
Close Infiniband link. More... | |
static int | golan_ib_open (struct ib_device *ibdev) |
Initialise Infiniband link. More... | |
static int | golan_probe_normal (struct pci_device *pci) |
static void | golan_remove_normal (struct pci_device *pci) |
static mlx_status | shomron_tx_uar_send_db (struct ib_device *ibdev, struct nodnic_send_wqbb *wqbb) |
static mlx_status | shomron_fill_eth_send_wqe (struct ib_device *ibdev, struct ib_queue_pair *qp, struct ib_address_vector *av __attribute__((unused)), struct io_buffer *iobuf, struct nodnic_send_wqbb *wqbb, unsigned long wqe_index) |
static mlx_status | shomron_fill_completion (void *cqe, struct cqe_data *cqe_data) |
static mlx_status | shomron_cqe_set_owner (void *cq, unsigned int num_cqes) |
static mlx_size | shomron_get_cqe_size () |
static int | shomron_nodnic_is_supported (struct pci_device *pci) |
static int | golan_probe (struct pci_device *pci) |
static void | golan_remove (struct pci_device *pci) |
Variables | |
const char * | golan_qp_state_as_string [] |
static int(* | golan_modify_qp_methods [])(struct ib_device *ibdev, struct ib_queue_pair *qp, struct golan_modify_qp_mbox_in_data *in) |
static struct ib_device_operations | golan_ib_operations |
Golan Infiniband operations. More... | |
struct flexboot_nodnic_callbacks | shomron_nodnic_callbacks |
static struct pci_device_id | golan_nics [] |
struct pci_driver golan_driver | __pci_driver |
#define GOLAN_CHECK_RC_AND_CMD_STATUS | ( | _lable | ) |
#define GOLAN_PRINT_RC_AND_CMD_STATUS golan_check_rc_and_cmd_status ( cmd, rc ) |
#define CTRL_SIG_SZ (sizeof(mailbox->mblock) - sizeof(mailbox->mblock.bdata) - 2) |
#define SHOMRON_GENERATE_CQE 0x3 |
#define SHOMRON_INLINE_HEADERS_SIZE ETH_HLEN |
#define SHOMRON_INLINE_HEADERS_OFFSET 32 |
#define FLEXBOOT_NODNIC_OPCODE_CQ_SEND 0 |
#define FLEXBOOT_NODNIC_OPCODE_CQ_RECV 2 |
#define FLEXBOOT_NODNIC_OPCODE_CQ_SEND_ERR 13 |
#define FLEXBOOT_NODNIC_OPCODE_CQ_RECV_ERR 14 |
FILE_LICENCE | ( | GPL2_OR_LATER | ) |
|
static |
Definition at line 58 of file golan.c.
References golan_firmware_area::area, golan::fw_areas, GOLAN_FW_AREAS_NUM, ufree(), and UNULL.
Referenced by golan_probe_normal(), and golan_remove_normal().
|
static |
Definition at line 69 of file golan.c.
References golan_firmware_area::area, EINVAL, golan::fw_areas, GOLAN_FW_AREAS_NUM, rc, and UNULL.
Referenced by golan_probe_normal().
|
inlinestatic |
Definition at line 98 of file golan.c.
References be32_to_cpu, cmd, DBG, EBUSY, rc, golan_outbox_hdr::status, and golan_outbox_hdr::syndrome.
Definition at line 128 of file golan.c.
References fls.
Referenced by golan_create_cq(), golan_create_eq(), golan_create_qp_aux(), golan_is_hw_ownership(), and golan_next_eqe_sw().
|
inlinestatic |
|
inlinestatic |
Definition at line 147 of file golan.c.
References status.
Referenced by golan_cmd_wait(), golan_provide_pages(), and golan_take_pages().
Definition at line 171 of file golan.c.
References be32_to_cpu, golan_hca_init_seg::fw_rev, golan::iseg, and readl().
Definition at line 176 of file golan.c.
References be32_to_cpu, golan_hca_init_seg::fw_rev, golan::iseg, and readl().
Definition at line 181 of file golan.c.
References be32_to_cpu, golan_hca_init_seg::cmdif_rev_fw_sub, golan::iseg, and readl().
Definition at line 186 of file golan.c.
References be32_to_cpu, golan_hca_init_seg::cmdif_rev_fw_sub, golan::iseg, and readl().
|
inlinestatic |
Definition at line 192 of file golan.c.
References golan_cmdq_md::addr, golan::cmd, and golan_cmdq_md::log_stride.
Referenced by golan_calc_sig(), golan_provide_pages(), golan_take_pages(), is_command_finished(), and write_cmd().
|
inlinestatic |
Definition at line 197 of file golan.c.
References cmd, golan_cmd_prot_block::ctrl_sig, CTRL_SIG_SZ, get_cmd(), GET_INBOX, GET_OUTBOX, mbox::mblock, NO_MBOX, NULL, golan_cmd_prot_block::rsvd0, golan_cmd_prot_block::token, and xor8_buf().
Referenced by send_command_and_wait().
|
inlinestatic |
Check if CMD has finished.
Definition at line 228 of file golan.c.
References CMD_OWNER_HW, get_cmd(), golan_cmd_layout::status_own, and wmb().
Referenced by golan_cmd_wait().
|
inlinestatic |
Wait for Golan command completion.
golan | Golan device |
rc | Return status code |
Definition at line 240 of file golan.c.
References golan::cmd_bm, CMD_STATUS, cmd_status_str(), DBGC, EBUSY, GOLAN_HCR_MAX_WAIT_MS, is_command_finished(), mdelay(), rc, and rmb.
Referenced by send_command_and_wait().
|
inlinestatic |
Notify the HW that commands are ready.
Definition at line 265 of file golan.c.
References golan::cmd_bm, golan_hca_init_seg::cmd_dbell, cpu_to_be32, golan::iseg, wmb(), and writel().
Referenced by send_command_and_wait().
|
inlinestatic |
Definition at line 271 of file golan.c.
References golan_calc_sig(), golan_cmd_wait(), and send_command().
Referenced by golan_alloc_pd(), golan_alloc_uar(), golan_core_enable_hca(), golan_create_cq(), golan_create_eq(), golan_create_mkey(), golan_create_qp_aux(), golan_dealloc_pd(), golan_dealloc_uar(), golan_destory_eq(), golan_destroy_cq(), golan_destroy_mkey(), golan_destroy_qp(), golan_disable_hca(), golan_handle_pages(), golan_hca_init(), golan_mcast_attach(), golan_mcast_detach(), golan_modify_qp(), golan_modify_qp_to_rst(), golan_provide_pages(), golan_qry_hca_cap(), golan_query_vport_context(), golan_query_vport_gid(), golan_query_vport_pkey(), golan_set_hca_cap(), golan_take_pages(), and golan_teardown_hca().
|
inlinestatic |
Prepare a FW command, In - comamnd idx (Must be valid) writes the command parameters.
Definition at line 284 of file golan.c.
References assert(), cmd, golan::cmd_bm, CMD_OWNER_HW, cpu_to_be16, cpu_to_be32, get_cmd(), GET_INBOX, GET_OUTBOX, GOLAN_PCI_CMD_XPORT, hdr, inlen, MAILBOX_SIZE, memset(), NO_MBOX, NULL, opcode, golan_inbox_hdr::opcode, opmod, golan_inbox_hdr::opmod, outlen, token, and VIRT_2_BE64_BUS.
Referenced by golan_alloc_pd(), golan_alloc_uar(), golan_core_enable_hca(), golan_create_cq(), golan_create_eq(), golan_create_mkey(), golan_create_qp_aux(), golan_dealloc_pd(), golan_dealloc_uar(), golan_destory_eq(), golan_destroy_cq(), golan_destroy_mkey(), golan_destroy_qp(), golan_disable_hca(), golan_handle_pages(), golan_hca_init(), golan_mcast_attach(), golan_mcast_detach(), golan_modify_qp(), golan_modify_qp_to_rst(), golan_provide_pages(), golan_qry_hca_cap(), golan_query_vport_context(), golan_query_vport_gid(), golan_query_vport_pkey(), golan_set_access_reg(), golan_set_hca_cap(), golan_take_pages(), and golan_teardown_hca().
|
inlinestatic |
Definition at line 319 of file golan.c.
References cmd, DBGC, DEF_CMD_IDX, GOLAN_CMD_OP_ENABLE_HCA, GOLAN_PRINT_RC_AND_CMD_STATUS, NO_MBOX, rc, send_command_and_wait(), and write_cmd().
Referenced by golan_bring_up().
|
inlinestatic |
Definition at line 336 of file golan.c.
References cmd, DEF_CMD_IDX, GOLAN_CMD_OP_DISABLE_HCA, GOLAN_PRINT_RC_AND_CMD_STATUS, NO_MBOX, rc, send_command_and_wait(), and write_cmd().
Referenced by golan_bring_down(), and golan_bring_up().
|
inlinestatic |
Definition at line 349 of file golan.c.
References be32_to_cpu, golan::caps, cmd, DBGC, DEF_CMD_IDX, golan_hca_cap::flags, GEN_MBOX, GET_INBOX, GOLAN_CMD_OP_SET_HCA_CAP, GOLAN_DEV_CAP_FLAG_CMDIF_CSUM, GOLAN_LOG_MAX_QP, GOLAN_PRINT_RC_AND_CMD_STATUS, golan_hca_cap::log_max_qp, golan_hca_cap::log_pg_sz, memcpy(), NO_MBOX, rc, send_command_and_wait(), golan_hca_cap::uar_page_sz, golan_hca_cap::uar_sz, and write_cmd().
Referenced by golan_bring_up().
|
inlinestatic |
Definition at line 378 of file golan.c.
References golan::caps, cmd, DEF_CMD_IDX, GEN_MBOX, GET_OUTBOX, GOLAN_CHECK_RC_AND_CMD_STATUS, GOLAN_CMD_OP_QUERY_HCA_CAP, memcpy(), NO_MBOX, rc, send_command_and_wait(), and write_cmd().
Referenced by golan_bring_up().
Definition at line 398 of file golan.c.
References be32_to_cpu, cmd, cmd_status_str(), CMD_SYND, cpu_to_be32, DBGC, EBUSY, func_id, get_cmd(), GOLAN_CMD_OP_MANAGE_PAGES, GOLAN_PAGES_TAKE, GOLAN_PAS_SIZE, in, MAX_PASE_MBOX, MEM_CMD_IDX, MEM_MBOX, min, rc, send_command_and_wait(), status_own, and write_cmd().
Referenced by golan_handle_pages().
|
inlinestatic |
Definition at line 445 of file golan.c.
References addr, golan_firmware_area::area, assert(), be32_to_cpu, cmd, cmd_status_str(), CMD_SYND, cpu_to_be32, golan_cmd_prot_block::data, DBGC, EBUSY, ENOMEM, func_id, get_cmd(), GET_INBOX, GOLAN_CMD_OP_MANAGE_PAGES, GOLAN_PAGE_MASK, GOLAN_PAGE_SIZE, GOLAN_PAGES_GIVE, GOLAN_PAS_SIZE, in, MANAGE_PAGES_PSA_OFFSET, MAX_PASE_MBOX, mbox::mblock, MEM_CMD_IDX, MEM_MBOX, min, golan_firmware_area::npages, rc, send_command_and_wait(), status_own, golan::total_dma_pages, umalloc(), UNULL, user_to_phys(), USR_2_BE64_BUS, and write_cmd().
Referenced by golan_handle_pages().
|
inlinestatic |
Definition at line 523 of file golan.c.
References be32_to_cpu, cmd, DBGC, func_id, golan::fw_areas, GOLAN_CHECK_RC_AND_CMD_STATUS, GOLAN_CMD_OP_QUERY_PAGES, GOLAN_PAGES_GIVE, golan_provide_pages(), golan_take_pages(), MEM_CMD_IDX, NO_MBOX, num_pages, QRY_PAGES_OUT, rc, send_command_and_wait(), golan::total_dma_pages, and write_cmd().
Referenced by golan_bring_down(), and golan_bring_up().
Definition at line 572 of file golan.c.
References cpu_to_be16, cpu_to_be32, DBGC, GOLAN_CMD_OP_QUERY_PAGES, in, NO_MBOX, and write_cmd().
|
inlinestatic |
Definition at line 586 of file golan.c.
References golan_cmdq_md::addr, golan::cmd, free_phys(), GOLAN_PAGE_SIZE, golan_mboxes::inbox, golan::mboxes, and golan_mboxes::outbox.
Referenced by golan_bring_down(), and golan_bring_up().
|
inlinestatic |
Initialise Golan Command Q parameters – Alocate a 4kb page for the Command Q – Read the stride and log num commands available – Write the address to cmdq_phy_addr in iseg.
golan | Golan device |
Definition at line 600 of file golan.c.
References golan_cmdq_md::addr, be32_to_cpu, golan::cmd, golan_hca_init_seg::cmdq_addr_h, golan_hca_init_seg::cmdq_addr_l_sz, cpu_to_be32, DBGC, ENOMEM, free_phys(), GOLAN_PAGE_SIZE, golan_mboxes::inbox, golan::iseg, golan_cmdq_md::log_stride, malloc_phys(), golan::mboxes, golan_mboxes::outbox, rc, readl(), golan_cmdq_md::size, virt_to_bus(), wmb(), and writel().
Referenced by golan_bring_up().
|
inlinestatic |
Definition at line 642 of file golan.c.
References cmd, DBGC, DEF_CMD_IDX, GOLAN_CMD_OP_INIT_HCA, GOLAN_PRINT_RC_AND_CMD_STATUS, NO_MBOX, rc, send_command_and_wait(), and write_cmd().
Referenced by golan_bring_up().
|
inlinestatic |
Definition at line 659 of file golan.c.
References cmd, DBGC, DEF_CMD_IDX, GOLAN_CMD_OP_TEARDOWN_HCA, GOLAN_PRINT_RC_AND_CMD_STATUS, NO_MBOX, rc, send_command_and_wait(), and write_cmd().
Referenced by golan_bring_down(), and golan_bring_up().
|
inlinestatic |
Definition at line 677 of file golan.c.
References be32_to_cpu, cmd, DBGC, DEF_CMD_IDX, GOLAN_CHECK_RC_AND_CMD_STATUS, GOLAN_CMD_OP_ALLOC_UAR, GOLAN_HCA_BAR, GOLAN_PAGE_SHIFT, GOLAN_PAGE_SIZE, golan_uar::index, NO_MBOX, out, golan::pci, pci_bar_start(), pci_ioremap(), golan_uar::phys, rc, send_command_and_wait(), golan::uar, golan_uar::virt, and write_cmd().
Referenced by golan_bring_up().
|
static |
Definition at line 706 of file golan.c.
References cmd, cpu_to_be32, DBGC, DEF_CMD_IDX, GOLAN_CMD_OP_DEALLOC_UAR, GOLAN_PRINT_RC_AND_CMD_STATUS, golan_uar::index, NO_MBOX, rc, send_command_and_wait(), golan::uar, uarn, and write_cmd().
Referenced by golan_bring_down(), and golan_bring_up().
|
static |
Definition at line 727 of file golan.c.
References addr, golan_event_queue::cons_index, cpu_to_be32, golan_event_queue::doorbell, golan_event_queue::eqn, val, wmb(), and writel().
Referenced by golan_create_eq(), and golan_poll_eq().
|
static |
Definition at line 736 of file golan.c.
References cmd, golan_event_queue::cons_index, cpu_to_be32, cpu_to_be64, DBGC, DEF_CMD_IDX, golan_event_queue::doorbell, ENOMEM, golan::eq, golan_event_queue::eqes, golan_event_queue::eqn, free_phys(), GEN_MBOX, GET_INBOX, GOLAN_CHECK_RC_AND_CMD_STATUS, GOLAN_CMD_OP_CREATE_EQ, GOLAN_EQ_DOORBELL_OFFSET, GOLAN_EQ_UNARMED, golan_eq_update_ci(), GOLAN_EQE_HW_OWNERSHIP, GOLAN_EVENT_TYPE_PORT_CHANGE, GOLAN_NUM_EQES, GOLAN_PAGE_SIZE, GOLAN_PAS_SIZE, ilog2(), in, golan_uar::index, malloc_phys(), NO_MBOX, out, golan_eqe::owner, rc, send_command_and_wait(), golan_event_queue::size, golan::uar, golan_uar::virt, VIRT_2_BE64_BUS, and write_cmd().
Referenced by golan_bring_up().
|
static |
Definition at line 790 of file golan.c.
References cmd, DBGC, DEF_CMD_IDX, golan::eq, golan_event_queue::eqes, eqn, golan_event_queue::eqn, free_phys(), GOLAN_CMD_OP_DESTROY_EQ, GOLAN_MBOX_IN, GOLAN_PAGE_SIZE, GOLAN_PRINT_RC_AND_CMD_STATUS, in, NO_MBOX, rc, send_command_and_wait(), and write_cmd().
Referenced by golan_bring_down(), and golan_bring_up().
|
static |
Definition at line 815 of file golan.c.
References be32_to_cpu, cmd, DBGC, DEF_CMD_IDX, GOLAN_CHECK_RC_AND_CMD_STATUS, GOLAN_CMD_OP_ALLOC_PD, NO_MBOX, out, golan::pdn, rc, send_command_and_wait(), and write_cmd().
Referenced by golan_bring_up().
|
static |
Definition at line 840 of file golan.c.
References cmd, cpu_to_be32, DBGC, DEF_CMD_IDX, GOLAN_CMD_OP_DEALLOC_PD, GOLAN_PRINT_RC_AND_CMD_STATUS, NO_MBOX, pdn, golan::pdn, rc, send_command_and_wait(), and write_cmd().
Referenced by golan_bring_down(), and golan_bring_up().
|
static |
Definition at line 861 of file golan.c.
References be32_to_cpu, cmd, cpu_to_be32, DBGC, DEF_CMD_IDX, GEN_MBOX, GET_INBOX, GOLAN_CHECK_RC_AND_CMD_STATUS, GOLAN_CMD_OP_CREATE_MKEY, GOLAN_CREATE_MKEY_SEG_QPN_BIT, GOLAN_IB_ACCESS_LOCAL_READ, GOLAN_IB_ACCESS_LOCAL_WRITE, GOLAN_MKEY_LEN64, in, golan::mkey, NO_MBOX, out, golan::pdn, rc, send_command_and_wait(), and write_cmd().
Referenced by golan_bring_up().
|
static |
Definition at line 892 of file golan.c.
References cmd, cpu_to_be32, DBGC, DEF_CMD_IDX, GOLAN_CMD_OP_DESTROY_MKEY, GOLAN_PRINT_RC_AND_CMD_STATUS, mkey, golan::mkey, NO_MBOX, rc, send_command_and_wait(), and write_cmd().
Referenced by golan_bring_down(), and golan_bring_up().
|
inlinestatic |
Initialise Golan PCI parameters.
golan | Golan device |
Definition at line 917 of file golan.c.
References adjust_pci_device(), GOLAN_HCA_BAR, GOLAN_PCI_CONFIG_BAR_SIZE, golan::iseg, golan::pci, pci_bar_start(), and pci_ioremap().
Referenced by golan_probe_normal().
|
inlinestatic |
Definition at line 929 of file golan.c.
References NULL, and zalloc().
Referenced by golan_probe_normal().
|
static |
Create completion queue.
ibdev | Infiniband device |
cq | Completion queue |
rc | Return status code |
Definition at line 948 of file golan.c.
References be32_to_cpu, cmd, cpu_to_be16, cpu_to_be32, golan_completion_queue::cqes, ib_completion_queue::cqn, DBGC, DEF_CMD_IDX, golan_completion_queue::doorbell_record, ENOMEM, golan::eq, golan_event_queue::eqn, free, free_phys(), GEN_MBOX, GET_INBOX, GOLAN_CHECK_RC_AND_CMD_STATUS, GOLAN_CMD_OP_CREATE_CQ, GOLAN_CQ_DB_RECORD_SIZE, GOLAN_CQE_HW_OWNERSHIP, GOLAN_CQE_OPCODE_BIT, GOLAN_CQE_OPCODE_NOT_VALID, GOLAN_CQE_SIZE_64, GOLAN_PAGE_SIZE, GOLAN_PAS_SIZE, ib_cq_set_drvdata(), ib_get_drvdata(), ilog2(), in, golan_uar::index, malloc_phys(), NO_MBOX, ib_completion_queue::num_cqes, golan_cqe64::op_own, out, rc, send_command_and_wait(), golan_completion_queue::size, golan::uar, VIRT_2_BE64_BUS, write_cmd(), and zalloc().
|
static |
Destroy completion queue.
ibdev | Infiniband device |
cq | Completion queue |
Definition at line 1027 of file golan.c.
References cmd, cpu_to_be32, golan_completion_queue::cqes, cqn, ib_completion_queue::cqn, DBGC, DEF_CMD_IDX, golan_completion_queue::doorbell_record, free, free_phys(), GOLAN_CMD_OP_DESTROY_CQ, GOLAN_CQ_DB_RECORD_SIZE, GOLAN_PAGE_SIZE, GOLAN_PRINT_RC_AND_CMD_STATUS, ib_cq_get_drvdata(), ib_cq_set_drvdata(), ib_get_drvdata(), NO_MBOX, NULL, rc, send_command_and_wait(), and write_cmd().
|
static |
Definition at line 1055 of file golan.c.
References ib_poll_cq(), and ib_completion_queue::ibdev.
Referenced by golan_destroy_qp().
|
static |
Definition at line 1060 of file golan.c.
References EINVAL, GOLAN_QP_ST_QP0, GOLAN_QP_ST_QP1, GOLAN_QP_ST_RC, GOLAN_QP_ST_UD, IB_QPT_ETH, IB_QPT_GSI, IB_QPT_RC, IB_QPT_SMI, IB_QPT_UD, and type.
Referenced by golan_create_qp_aux().
|
static |
Definition at line 1084 of file golan.c.
References be16_to_cpu, be32_to_cpu, golan::caps, cmd, cpu_to_be16, cpu_to_be32, data, golan_recv_wqe_ud::data, DBGC, DEF_CMD_IDX, golan_queue_pair::doorbell_qpn, golan_queue_pair::doorbell_record, EINVAL, ENOMEM, free, free_phys(), GEN_MBOX, GET_INBOX, GOLAN_CHECK_RC_AND_CMD_STATUS, GOLAN_CMD_OP_CREATE_QP, GOLAN_IB_QPS_RESET, GOLAN_INVALID_LKEY, GOLAN_PAGE_SIZE, GOLAN_PAS_SIZE, GOLAN_QP_CTX_PM_STATE_BIT, GOLAN_QP_CTX_RQ_SIZE_BIT, GOLAN_QP_CTX_SQ_SIZE_BIT, GOLAN_QP_CTX_ST_BIT, GOLAN_QP_PM_MIGRATED, golan_qp_type_to_st(), GOLAN_RECV_WQE_SIZE, GOLAN_SEND_WQE_BB_SIZE, golan_recv_wq::grh, golan_recv_wq::grh_size, ib_get_drvdata(), ib_qp_set_drvdata(), IB_QPT_GSI, IB_QPT_SMI, IB_QPT_UD, ilog2(), in, golan_uar::index, golan_hca_cap::log_max_qp_sz, malloc_phys(), golan_hca_cap::max_wqe_sz_rq, golan_hca_cap::max_wqe_sz_sq, memset(), NO_MBOX, out, golan::pdn, qp, qpn, rc, golan_queue_pair::rq, send_command_and_wait(), golan_recv_wq::size, golan_send_wq::size, golan_queue_pair::size, golan_queue_pair::sq, golan_queue_pair::state, golan::uar, VIRT_2_BE64_BUS, golan_recv_wq::wqes, golan_send_wq::wqes, golan_queue_pair::wqes, write_cmd(), and zalloc().
Referenced by golan_create_qp().
|
static |
Create queue pair.
ibdev | Infiniband device |
qp | Queue pair |
rc | Return status code |
Definition at line 1235 of file golan.c.
References DBG, EINVAL, golan_create_qp_aux(), IB_QPT_ETH, IB_QPT_GSI, IB_QPT_RC, IB_QPT_SMI, IB_QPT_UD, qp, qpn, and rc.
|
static |
Definition at line 1262 of file golan.c.
References cpu_to_be32, GOLAN_QP_CTX_PM_STATE_BIT, GOLAN_QP_PM_MIGRATED, in, ib_device::port, qp, and rc.
|
static |
|
static |
|
static |
Definition at line 1299 of file golan.c.
References cmd, cpu_to_be32, DBGC, DEF_CMD_IDX, GOLAN_CHECK_RC_AND_CMD_STATUS, GOLAN_CMD_OP_2RST_QP, GOLAN_IB_QPS_RESET, ib_get_drvdata(), ib_qp_get_drvdata(), NO_MBOX, qp, qpn, rc, send_command_and_wait(), golan_queue_pair::state, and write_cmd().
Referenced by golan_destroy_qp().
|
static |
Definition at line 1336 of file golan.c.
References cmd, cpu_to_be32, DBGC, DEF_CMD_IDX, GEN_MBOX, GET_INBOX, GOLAN_CHECK_RC_AND_CMD_STATUS, GOLAN_CMD_OP_INIT2RTR_QP, GOLAN_CMD_OP_RST2INIT_QP, GOLAN_CMD_OP_RTR2RTS_QP, GOLAN_IB_QPS_RTS, golan_modify_qp_methods, golan_qp_state_as_string, ib_get_drvdata(), ib_qp_get_drvdata(), in, NO_MBOX, qp, qpn, rc, send_command_and_wait(), golan_queue_pair::state, and write_cmd().
|
static |
Destroy queue pair.
ibdev | Infiniband device |
qp | Queue pair |
Definition at line 1390 of file golan.c.
References cmd, cpu_to_be32, DBGC, DEF_CMD_IDX, golan_queue_pair::doorbell_record, free, free_phys(), GOLAN_CMD_OP_DESTROY_QP, golan_cq_clean(), GOLAN_IB_QPS_RESET, golan_modify_qp_to_rst(), GOLAN_PAGE_SIZE, GOLAN_PRINT_RC_AND_CMD_STATUS, ib_get_drvdata(), ib_qp_get_drvdata(), ib_qp_set_drvdata(), NO_MBOX, NULL, qp, qpn, rc, send_command_and_wait(), golan_queue_pair::state, golan_queue_pair::wqes, and write_cmd().
|
static |
Calculate transmission rate.
av | Address vector |
golan_rate | Golan rate |
Definition at line 1438 of file golan.c.
References IB_RATE_120, and IB_RATE_2_5.
Referenced by golan_post_send().
|
static |
Post send work queue entry.
ibdev | Infiniband device |
qp | Queue pair |
av | Address vector |
iobuf | I/O buffer |
rc | Return status code |
Definition at line 1451 of file golan.c.
References ib_gid::bytes, cpu_to_be16, cpu_to_be32, ctrl, golan_send_wqe_ud::ctrl, data, io_buffer::data, golan_send_wqe_ud::data, golan_send_wqe_ud::datagram, DB_BUFFER0_EVEN_OFFSET, DB_BUFFER0_ODD_OFFSET, DBGC, golan_queue_pair::doorbell_qpn, golan_queue_pair::doorbell_record, golan_av::dqp_dct, ENOMEM, golan_av::fl_mlid, ib_address_vector::gid, ib_address_vector::gid_present, golan_rate(), GOLAN_SEND_OPCODE, GOLAN_SEND_UD_WQE_SIZE, GOLAN_WQE_CTRL_WQE_IDX_BIT, GOLAN_WQEBBS_PER_SEND_UD_WQE, golan_av::grh_gid_fl, ib_get_drvdata(), ib_qp_get_drvdata(), iob_len(), golan_av::key, ib_address_vector::lid, ib_device::lid, memcpy(), memset(), golan::mkey, golan_send_wq::next_idx, NULL, ib_address_vector::qkey, golan_av::qkey, qp, ib_address_vector::qpn, ib_address_vector::rate, golan_av::rgid, golan_av::rlid, golan_qp_db::send_db, ib_address_vector::sl, golan_queue_pair::sq, golan_av::stat_rate_sl, golan::uar, golan_send_wqe::ud, golan_uar::virt, VIRT_2_BE64_BUS, wmb(), golan_send_wq::wqes, and writeq().
|
static |
Post receive work queue entry.
ibdev | Infiniband device |
qp | Queue pair |
iobuf | I/O buffer |
rc | Return status code |
Definition at line 1527 of file golan.c.
References cpu_to_be16, cpu_to_be32, data, io_buffer::data, golan_recv_wqe_ud::data, DBGC, golan_queue_pair::doorbell_record, ENOMEM, grh, golan_recv_wq::grh, ib_get_drvdata(), ib_qp_get_drvdata(), iob_tailroom(), ib_work_queue::iobufs, memset(), golan::mkey, ib_work_queue::next_idx, ib_work_queue::num_wqes, qp, golan_qp_db::recv_db, golan_queue_pair::rq, VIRT_2_BE64_BUS, wmb(), and golan_recv_wq::wqes.
|
static |
Definition at line 1575 of file golan.c.
References be16_to_cpu, cmd, context_data, DBGC, DEF_CMD_IDX, ib_guid::dwords, GEN_MBOX, GET_OUTBOX, GOLAN_CHECK_RC_AND_CMD_STATUS, GOLAN_CMD_OP_QUERY_HCA_VPORT_CONTEXT, GOLAN_MBOX_IN, ib_get_drvdata(), in, ib_device::lid, golan_query_hca_vport_context_data::lid, ib_device::node_guid, golan_query_hca_vport_context_data::node_guid, ib_device::port, ib_device::port_state, golan_query_hca_vport_context_data::port_state, rc, send_command_and_wait(), ib_device::sm_lid, golan_query_hca_vport_context_data::sm_lid, ib_device::sm_sl, golan_query_hca_vport_context_data::sm_sl, u8, and write_cmd().
Referenced by golan_get_ib_info().
|
static |
Definition at line 1609 of file golan.c.
References cmd, DBGC, DEF_CMD_IDX, GEN_MBOX, GET_OUTBOX, ib_device::gid, GOLAN_CHECK_RC_AND_CMD_STATUS, GOLAN_CMD_OP_QUERY_HCA_VPORT_GID, GOLAN_MBOX_IN, ib_get_drvdata(), in, memcpy(), ib_device::port, rc, send_command_and_wait(), u8, and write_cmd().
Referenced by golan_get_ib_info().
|
static |
Definition at line 1637 of file golan.c.
References golan::caps, cmd, DBGC, DEF_CMD_IDX, GEN_MBOX, GOLAN_CHECK_RC_AND_CMD_STATUS, GOLAN_CMD_OP_QUERY_HCA_VPORT_PKEY, GOLAN_MBOX_IN, ib_get_drvdata(), in, golan_hca_cap::pkey_table_size, ib_device::port, rc, send_command_and_wait(), u8, and write_cmd().
Referenced by golan_get_ib_info().
|
static |
Definition at line 1662 of file golan.c.
References DBG, golan_query_vport_context(), golan_query_vport_gid(), golan_query_vport_pkey(), and rc.
Referenced by golan_ib_update(), and golan_register_ibdev().
|
static |
Definition at line 1690 of file golan.c.
References assert(), be16_to_cpu, be32_to_cpu, golan_cqe64::byte_cnt, ib_completion_queue::cqn, DBGC, DBGC2, ib_global_route_header::dgid, EINVAL, golan_cqe64::flags_rqpn, ib_address_vector::gid, ib_address_vector::gid_present, GOLAN_CQE_OPCODE_BIT, GOLAN_CQE_REQ, GOLAN_CQE_REQ_ERR, GOLAN_CQE_RESP_ERR, GOLAN_WQEBBS_PER_SEND_UD_WQE, grh, golan_recv_wq::grh, golan_err_cqe::hw_syndrom, ib_complete_recv(), ib_complete_send(), ib_find_wq(), ib_get_drvdata(), ib_qp_get_drvdata(), IB_QPT_ETH, IB_QPT_GSI, IB_QPT_RC, IB_QPT_SMI, IB_QPT_UD, iob_put, iob_tailroom(), ib_work_queue::iobufs, len, ib_address_vector::lid, memcpy(), memset(), NULL, ib_work_queue::num_wqes, golan_cqe64::op_own, opcode, qp, ib_work_queue::qp, qpn, ib_address_vector::qpn, golan_queue_pair::rq, ib_global_route_header::sgid, ib_address_vector::sl, golan_cqe64::slid, golan_cqe64::sop_drop_qpn, golan_err_cqe::syndrome, golan_err_cqe::vendor_err_synd, and golan_cqe64::wqe_counter.
Referenced by golan_poll_cq().
|
static |
Definition at line 1809 of file golan.c.
References GOLAN_CQE_OWNER_MASK, ilog2(), ib_completion_queue::next_idx, ib_completion_queue::num_cqes, and golan_cqe64::op_own.
Referenced by golan_poll_cq().
|
static |
Definition at line 1815 of file golan.c.
References cpu_to_be32, golan_completion_queue::cqes, ib_completion_queue::cqn, DBGC, DBGC2, golan_completion_queue::doorbell_record, golan_complete(), GOLAN_CQE_OPCODE_BIT, GOLAN_CQE_OPCODE_NOT_VALID, golan_is_hw_ownership(), ib_cq_get_drvdata(), ib_get_drvdata(), ib_completion_queue::next_idx, ib_completion_queue::num_cqes, golan_cqe64::op_own, rc, and rmb.
|
static |
Definition at line 1855 of file golan.c.
References GOLAN_EVENT_TYPE_CMD, GOLAN_EVENT_TYPE_COMM_EST, GOLAN_EVENT_TYPE_COMP, GOLAN_EVENT_TYPE_CQ_ERROR, GOLAN_EVENT_TYPE_DB_BF_CONGESTION, GOLAN_EVENT_TYPE_GPIO_EVENT, GOLAN_EVENT_TYPE_INTERNAL_ERROR, GOLAN_EVENT_TYPE_PAGE_REQUEST, GOLAN_EVENT_TYPE_PATH_MIG, GOLAN_EVENT_TYPE_PATH_MIG_FAILED, GOLAN_EVENT_TYPE_PORT_CHANGE, GOLAN_EVENT_TYPE_REMOTE_CONFIG, GOLAN_EVENT_TYPE_SQ_DRAINED, GOLAN_EVENT_TYPE_SRQ_CATAS_ERROR, GOLAN_EVENT_TYPE_SRQ_LAST_WQE, GOLAN_EVENT_TYPE_SRQ_RQ_LIMIT, GOLAN_EVENT_TYPE_STALL_EVENT, GOLAN_EVENT_TYPE_WQ_ACCESS_ERROR, GOLAN_EVENT_TYPE_WQ_CATAS_ERROR, GOLAN_EVENT_TYPE_WQ_INVAL_REQ_ERROR, and type.
Referenced by golan_handle_port_event(), and golan_poll_eq().
|
static |
Definition at line 1903 of file golan.c.
References GOLAN_PORT_CHANGE_SUBTYPE_ACTIVE, GOLAN_PORT_CHANGE_SUBTYPE_CLIENT_REREG, GOLAN_PORT_CHANGE_SUBTYPE_DOWN, GOLAN_PORT_CHANGE_SUBTYPE_GUID, GOLAN_PORT_CHANGE_SUBTYPE_INITIALIZED, GOLAN_PORT_CHANGE_SUBTYPE_LID, GOLAN_PORT_CHANGE_SUBTYPE_PKEY, and subtype.
Referenced by golan_handle_port_event().
|
static |
Update Infiniband parameters using Commands.
ibdev | Infiniband device |
rc | Return status code |
Definition at line 1931 of file golan.c.
References golan_get_ib_info(), ib_link_state_changed(), and rc.
Referenced by golan_handle_port_event(), and golan_ib_open().
Definition at line 1944 of file golan.c.
References golan_eqe::data, DBGC, golan_eqe_port_subtype_str(), golan_eqe_type_str(), golan_ib_update(), GOLAN_PORT_CHANGE_SUBTYPE_ACTIVE, GOLAN_PORT_CHANGE_SUBTYPE_CLIENT_REREG, GOLAN_PORT_CHANGE_SUBTYPE_DOWN, GOLAN_PORT_CHANGE_SUBTYPE_GUID, GOLAN_PORT_CHANGE_SUBTYPE_INITIALIZED, GOLAN_PORT_CHANGE_SUBTYPE_LID, GOLAN_PORT_CHANGE_SUBTYPE_PKEY, ib_is_open(), golan_port::ibdev, port, golan_eqe_port_state::port, ev_data::port, golan::ports, golan_eqe::sub_type, and golan_eqe::type.
Referenced by golan_poll_eq().
|
static |
Definition at line 1976 of file golan.c.
References golan_event_queue::cons_index, golan_event_queue::eqes, GOLAN_NUM_EQES, ilog2(), NULL, and golan_eqe::owner.
Referenced by golan_poll_eq().
|
static |
Poll event queue.
ibdev | Infiniband device |
Definition at line 1989 of file golan.c.
References be32_to_cpu, golan_event_queue::cons_index, ev_data::cq_err, cqn, golan_eqe_cq_err::cqn, golan_eqe::data, DBGC, golan::eq, golan_event_queue::eqn, GOLAN_EQ_UNARMED, golan_eq_update_ci(), golan_eqe_type_str(), GOLAN_EVENT_TYPE_CMD, GOLAN_EVENT_TYPE_COMM_EST, GOLAN_EVENT_TYPE_COMP, GOLAN_EVENT_TYPE_CQ_ERROR, GOLAN_EVENT_TYPE_PATH_MIG, GOLAN_EVENT_TYPE_PATH_MIG_FAILED, GOLAN_EVENT_TYPE_PORT_CHANGE, GOLAN_EVENT_TYPE_SQ_DRAINED, GOLAN_EVENT_TYPE_SRQ_CATAS_ERROR, GOLAN_EVENT_TYPE_SRQ_LAST_WQE, GOLAN_EVENT_TYPE_SRQ_RQ_LIMIT, GOLAN_EVENT_TYPE_WQ_ACCESS_ERROR, GOLAN_EVENT_TYPE_WQ_CATAS_ERROR, GOLAN_EVENT_TYPE_WQ_INVAL_REQ_ERROR, golan_handle_port_event(), golan_next_eqe_sw(), GOLAN_NUM_EQES, ib_get_drvdata(), rmb, golan_eqe_cq_err::syndrome, and golan_eqe::type.
|
static |
Attach to multicast group.
ibdev | Infiniband device |
qp | Queue pair |
gid | Multicast GID |
rc | Return status code |
Definition at line 2074 of file golan.c.
References cmd, cpu_to_be32, DBGC, DEF_CMD_IDX, EFAULT, GEN_MBOX, GET_INBOX, gid, GOLAN_CHECK_RC_AND_CMD_STATUS, GOLAN_CMD_OP_ATTACH_TO_MCG, ib_get_drvdata(), memcpy(), NO_MBOX, NULL, qp, qpn, rc, send_command_and_wait(), and write_cmd().
|
static |
Detach from multicast group.
ibdev | Infiniband device |
qp | Queue pair |
gid | Multicast GID |
rc | Return status code |
Definition at line 2114 of file golan.c.
References cmd, cpu_to_be32, DBGC, DEF_CMD_IDX, GEN_MBOX, GET_INBOX, gid, GOLAN_CMD_OP_DETACH_FROM_MCG, GOLAN_PRINT_RC_AND_CMD_STATUS, ib_get_drvdata(), memcpy(), NO_MBOX, qp, qpn, rc, send_command_and_wait(), and write_cmd().
|
static |
Definition at line 2153 of file golan.c.
References DBG, golan_get_ib_info(), ipoib_netdev(), port, ib_device::port, rc, and register_ibdev().
Referenced by golan_probe_normal().
|
inlinestatic |
Definition at line 2171 of file golan.c.
References DBGC, golan::flags, golan_cmd_uninit(), golan_dealloc_pd(), golan_dealloc_uar(), golan_destory_eq(), golan_destroy_mkey(), golan_disable_hca(), golan_handle_pages(), GOLAN_OPEN, GOLAN_PAGES_TAKE, GOLAN_REG_PAGES, GOLAN_TEARDOWN_GRACEFUL, and golan_teardown_hca().
Referenced by golan_ib_close(), and golan_probe_normal().
|
static |
Definition at line 2192 of file golan.c.
References golan::caps, free_mlx_utils(), init_mlx_utils(), LINK_SPEED_IB, LINK_SPEED_SDR, MLX_CHECK_STATUS, mlx_set_link_speed(), golan_hca_cap::num_ports, golan::pci, status, and golan::utils.
Referenced by golan_bring_up().
|
inlinestatic |
Definition at line 2215 of file golan.c.
References DBGC, golan::flags, golan_alloc_pd(), golan_alloc_uar(), GOLAN_BOOT_PAGES, golan_cmd_init(), golan_cmd_uninit(), golan_core_enable_hca(), golan_create_eq(), golan_create_mkey(), golan_dealloc_pd(), golan_dealloc_uar(), golan_destory_eq(), golan_destroy_mkey(), golan_disable_hca(), golan_handle_pages(), golan_hca_init(), GOLAN_INIT_PAGES, GOLAN_OPEN, GOLAN_PAGES_GIVE, GOLAN_PAGES_TAKE, golan_qry_hca_cap(), golan_set_hca_cap(), golan_set_link_speed(), GOLAN_TEARDOWN_GRACEFUL, golan_teardown_hca(), out, and rc.
Referenced by golan_ib_open(), and golan_probe_normal().
|
static |
Close Infiniband link.
ibdev | Infiniband device |
Definition at line 2291 of file golan.c.
References DBG, golan_bring_down(), ib_get_drvdata(), and NULL.
|
static |
Initialise Infiniband link.
ibdev | Infiniband device |
rc | Return status code |
Definition at line 2308 of file golan.c.
References DBG, EINVAL, golan_bring_up(), golan_ib_update(), ib_get_drvdata(), and NULL.
|
static |
Definition at line 2341 of file golan.c.
References alloc_ibdev(), golan::caps, DBGC, pci_device::dev, ib_device::dev, pci_device::device, DEVICE_IS_CIB, ENOMEM, free, free_mlx_utils(), golan_alloc(), golan_bring_down(), golan_bring_up(), golan_free_fw_areas(), golan_ib_operations, golan_init_fw_areas(), golan_pci_init(), GOLAN_PORT_BASE, golan_register_ibdev(), ib_set_drvdata(), golan_port::ibdev, ibdev_put(), init_mlx_utils(), iounmap(), golan::iseg, golan_hca_cap::num_ports, ib_device::op, golan::pci, pci_set_drvdata(), port, ib_device::port, golan::ports, ib_device::ports, rc, unregister_ibdev(), golan::utils, and golan_port::vep_number.
Referenced by golan_probe().
|
static |
Definition at line 2429 of file golan.c.
References golan::caps, DBGC, pci_device::device, DEVICE_IS_CIB, free, free_mlx_utils(), golan_free_fw_areas(), golan_port::ibdev, ibdev_put(), iounmap(), golan::iseg, golan_port::netdev, netdev_nullify(), golan_hca_cap::num_ports, golan::pci, pci_get_drvdata(), port, golan::ports, unregister_ibdev(), and golan::utils.
Referenced by golan_remove().
|
static |
Definition at line 2457 of file golan.c.
References ctrl, shomron_nodnic_eth_send_wqe::ctrl, DB_BUFFER0_EVEN_OFFSET, DB_BUFFER0_ODD_OFFSET, DBG, flexboot_nodnic::device_priv, ib_get_drvdata(), MLX_FAILED, MLX_GET, MLX_SUCCESS, status, _nodnic_device_priv::uar, _nodnic_uar_priv::virt, wmb(), and writeq().
|
static |
Definition at line 2479 of file golan.c.
References byte_count, cpu_to_be16, io_buffer::data, DBG, flexboot_nodnic::device_priv, ds, FLEXBOOT_NODNIC_OPCODE_SEND, ib_get_drvdata(), ib_qp_get_drvdata(), flexboot_nodnic_port::ibdev, iob_len(), iob_pull, _nodnic_device_priv::lkey, memcpy(), memset(), MLX_FILL_1, MLX_FILL_2, MLX_FILL_H, MLX_SUCCESS, nodnic_port_get_qpn(), flexboot_nodnic_queue_pair::nodnic_queue_pair, nodnic_send_ring::nodnic_ring, NULL, opcode, port, flexboot_nodnic::port, ib_device::port, qp, qpn, _nodnic_qp::send, SHOMRON_GENERATE_CQE, SHOMRON_INLINE_HEADERS_OFFSET, SHOMRON_INLINE_HEADERS_SIZE, status, and virt_to_bus().
|
static |
Definition at line 2533 of file golan.c.
References byte_cnt, cqe_data::byte_cnt, shomronprm_completion_entry::error, FLEXBOOT_NODNIC_OPCODE_CQ_RECV_ERR, FLEXBOOT_NODNIC_OPCODE_CQ_SEND, FLEXBOOT_NODNIC_OPCODE_CQ_SEND_ERR, cqe_data::is_error, cqe_data::is_send, MLX_GET, shomronprm_completion_entry::normal, opcode, owner, cqe_data::owner, qpn, cqe_data::qpn, srqn, syndrome, cqe_data::syndrome, TRUE, cqe_data::vendor_err_syndrome, wqe_counter, and cqe_data::wqe_counter.
|
static |
|
static |
Definition at line 2590 of file golan.c.
References pci_device::device, DEVICE_IS_CIB, and flexboot_nodnic_is_supported().
Referenced by golan_probe(), and golan_remove().
|
static |
Definition at line 2598 of file golan.c.
References DBG, EINVAL, ENOTSUP, flexboot_nodnic_probe(), golan_probe_normal(), NULL, rc, shomron_nodnic_callbacks, and shomron_nodnic_is_supported().
|
static |
Definition at line 2622 of file golan.c.
References DBG, flexboot_nodnic_remove(), golan_remove_normal(), and shomron_nodnic_is_supported().
const char* golan_qp_state_as_string[] |
Definition at line 88 of file golan.c.
Referenced by golan_modify_qp().
|
static |
Definition at line 1327 of file golan.c.
Referenced by golan_modify_qp().
|
static |
Golan Infiniband operations.
Definition at line 2323 of file golan.c.
Referenced by golan_probe_normal().
struct flexboot_nodnic_callbacks shomron_nodnic_callbacks |
Definition at line 2581 of file golan.c.
Referenced by golan_probe().
|
static |
struct pci_driver golan_driver __pci_driver |