iPXE
|
#include <mii.h>
#include <stdio.h>
#include <errno.h>
#include <unistd.h>
#include <byteswap.h>
#include <ipxe/pci.h>
#include <ipxe/iobuf.h>
#include <ipxe/timer.h>
#include <ipxe/malloc.h>
#include <ipxe/if_ether.h>
#include <ipxe/ethernet.h>
#include <ipxe/netdevice.h>
#include "bnxt.h"
#include "bnxt_dbg.h"
Go to the source code of this file.
Macros | |
#define | bnxt_down_chip(bp) bnxt_hwrm_run ( bring_down_chip, bp ) |
#define | bnxt_up_chip(bp) bnxt_hwrm_run ( bring_up_chip, bp ) |
#define | bnxt_down_nic(bp) bnxt_hwrm_run ( bring_down_nic, bp ) |
#define | bnxt_up_nic(bp) bnxt_hwrm_run ( bring_up_nic, bp ) |
Typedefs | |
typedef int(* | hwrm_func_t) (struct bnxt *bp) |
Functions | |
FILE_LICENCE (GPL2_ONLY) | |
static void | bnxt_service_cq (struct net_device *dev) |
static void | bnxt_tx_complete (struct net_device *dev, u16 hw_idx) |
static void | bnxt_adv_cq_index (struct bnxt *bp, u16 cnt) |
static int | bnxt_rx_complete (struct net_device *dev, struct rx_pkt_cmpl *rx) |
void | bnxt_link_evt (struct bnxt *bp, struct hwrm_async_event_cmpl *evt) |
u8 | bnxt_is_pci_vf (struct pci_device *pdev) |
Check if Virtual Function. More... | |
static void | bnxt_down_pci (struct bnxt *bp) |
static void * | bnxt_pci_base (struct pci_device *pdev, unsigned int reg) |
static int | bnxt_get_pci_info (struct bnxt *bp) |
static int | bnxt_get_device_address (struct bnxt *bp) |
static void | bnxt_set_link (struct bnxt *bp) |
static void | dev_p5_db (struct bnxt *bp, u32 idx, u32 xid, u32 flag) |
static void | dev_p7_db (struct bnxt *bp, u32 idx, u32 xid, u32 flag, u32 epoch, u32 toggle) |
static void | bnxt_db_nq (struct bnxt *bp) |
static void | bnxt_db_cq (struct bnxt *bp) |
static void | bnxt_db_rx (struct bnxt *bp, u32 idx) |
static void | bnxt_db_tx (struct bnxt *bp, u32 idx) |
void | bnxt_add_vlan (struct io_buffer *iob, u16 vlan) |
static u16 | bnxt_get_pkt_vlan (char *src) |
static u16 | bnxt_get_rx_vlan (struct rx_pkt_cmpl *rx_cmp, struct rx_pkt_cmpl_hi *rx_cmp_hi) |
int | bnxt_vlan_drop (struct bnxt *bp, u16 rx_vlan) |
static u32 | bnxt_tx_avail (struct bnxt *bp) |
void | bnxt_set_txq (struct bnxt *bp, int entry, dma_addr_t mapping, int len) |
int | bnxt_free_rx_iob (struct bnxt *bp) |
static void | bnxt_set_rx_desc (u8 *buf, struct io_buffer *iob, u16 cid, u32 idx) |
static int | bnxt_alloc_rx_iob (struct bnxt *bp, u16 cons_id, u16 iob_idx) |
int | bnxt_post_rx_buffers (struct bnxt *bp) |
u8 | bnxt_rx_drop (struct bnxt *bp, struct io_buffer *iob, struct rx_pkt_cmpl *rx_cmp, struct rx_pkt_cmpl_hi *rx_cmp_hi, u16 rx_len) |
void | bnxt_rx_process (struct net_device *dev, struct bnxt *bp, struct rx_pkt_cmpl *rx_cmp, struct rx_pkt_cmpl_hi *rx_cmp_hi) |
void | bnxt_mm_init (struct bnxt *bp, const char *func) |
void | bnxt_mm_nic (struct bnxt *bp) |
void | bnxt_free_mem (struct bnxt *bp) |
int | bnxt_alloc_mem (struct bnxt *bp) |
static void | hwrm_init (struct bnxt *bp, struct input *req, u16 cmd, u16 len) |
static void | hwrm_write_req (struct bnxt *bp, void *req, u32 cnt) |
static void | short_hwrm_cmd_req (struct bnxt *bp, u16 len) |
static int | wait_resp (struct bnxt *bp, u32 tmo, u16 len, const char *func) |
static int | bnxt_hwrm_ver_get (struct bnxt *bp) |
static int | bnxt_hwrm_func_resource_qcaps (struct bnxt *bp) |
static u32 | bnxt_set_ring_info (struct bnxt *bp) |
static void | bnxt_hwrm_assign_resources (struct bnxt *bp) |
static int | bnxt_hwrm_func_qcaps_req (struct bnxt *bp) |
static int | bnxt_hwrm_func_qcfg_req (struct bnxt *bp) |
static int | bnxt_hwrm_port_phy_qcaps_req (struct bnxt *bp) |
static int | bnxt_hwrm_func_reset_req (struct bnxt *bp) |
static int | bnxt_hwrm_func_cfg_req (struct bnxt *bp) |
static int | bnxt_hwrm_func_drv_rgtr (struct bnxt *bp) |
static int | bnxt_hwrm_func_drv_unrgtr (struct bnxt *bp) |
static int | bnxt_hwrm_set_async_event (struct bnxt *bp) |
static int | bnxt_hwrm_cfa_l2_filter_alloc (struct bnxt *bp) |
static int | bnxt_hwrm_cfa_l2_filter_free (struct bnxt *bp) |
u32 | set_rx_mask (u32 rx_mask) |
static int | bnxt_hwrm_set_rx_mask (struct bnxt *bp, u32 rx_mask) |
static int | bnxt_hwrm_port_phy_qcfg (struct bnxt *bp, u16 idx) |
static int | bnxt_hwrm_nvm_get_variable_req (struct bnxt *bp, u16 data_len, u16 option_num, u16 dimensions, u16 index_0) |
static int | bnxt_get_link_speed (struct bnxt *bp) |
static int | bnxt_get_vlan (struct bnxt *bp) |
static int | bnxt_hwrm_backing_store_qcfg (struct bnxt *bp) |
static int | bnxt_hwrm_backing_store_cfg (struct bnxt *bp) |
static int | bnxt_hwrm_queue_qportcfg (struct bnxt *bp) |
static int | bnxt_hwrm_port_mac_cfg (struct bnxt *bp) |
static int | bnxt_hwrm_port_phy_cfg (struct bnxt *bp) |
static int | bnxt_query_phy_link (struct bnxt *bp) |
static int | bnxt_get_phy_link (struct bnxt *bp) |
static int | bnxt_hwrm_stat_ctx_alloc (struct bnxt *bp) |
static int | bnxt_hwrm_stat_ctx_free (struct bnxt *bp) |
static int | bnxt_hwrm_ring_free_grp (struct bnxt *bp) |
static int | bnxt_hwrm_ring_alloc_grp (struct bnxt *bp) |
int | bnxt_hwrm_ring_free (struct bnxt *bp, u16 ring_id, u8 ring_type) |
static int | bnxt_hwrm_ring_alloc (struct bnxt *bp, u8 type) |
static int | bnxt_hwrm_ring_alloc_cq (struct bnxt *bp) |
static int | bnxt_hwrm_ring_alloc_tx (struct bnxt *bp) |
static int | bnxt_hwrm_ring_alloc_rx (struct bnxt *bp) |
static int | bnxt_hwrm_ring_free_cq (struct bnxt *bp) |
static int | bnxt_hwrm_ring_free_tx (struct bnxt *bp) |
static int | bnxt_hwrm_ring_free_rx (struct bnxt *bp) |
static int | bnxt_hwrm_ring_alloc_nq (struct bnxt *bp) |
static int | bnxt_hwrm_ring_free_nq (struct bnxt *bp) |
static int | bnxt_hwrm_vnic_alloc (struct bnxt *bp) |
static int | bnxt_hwrm_vnic_free (struct bnxt *bp) |
static int | bnxt_hwrm_vnic_cfg (struct bnxt *bp) |
static int | bnxt_set_rx_mask (struct bnxt *bp) |
static int | bnxt_reset_rx_mask (struct bnxt *bp) |
int | bnxt_hwrm_run (hwrm_func_t cmds[], struct bnxt *bp) |
static int | bnxt_open (struct net_device *dev) |
static void | bnxt_tx_adjust_pkt (struct bnxt *bp, struct io_buffer *iob) |
static int | bnxt_tx (struct net_device *dev, struct io_buffer *iob) |
static void | bnxt_adv_nq_index (struct bnxt *bp, u16 cnt) |
static void | bnxt_service_nq (struct net_device *dev) |
static void | bnxt_poll (struct net_device *dev) |
static void | bnxt_close (struct net_device *dev) |
static int | bnxt_init_one (struct pci_device *pci) |
static void | bnxt_remove_one (struct pci_device *pci) |
Variables | |
static struct pci_device_id | bnxt_nics [] |
hwrm_func_t | bring_down_chip [] |
hwrm_func_t | bring_down_nic [] |
hwrm_func_t | bring_up_chip [] |
hwrm_func_t | bring_up_nic [] |
static struct net_device_operations | bnxt_netdev_ops |
struct pci_driver bnxt_pci_driver | __pci_driver |
#define bnxt_down_chip | ( | bp | ) | bnxt_hwrm_run ( bring_down_chip, bp ) |
#define bnxt_up_chip | ( | bp | ) | bnxt_hwrm_run ( bring_up_chip, bp ) |
#define bnxt_down_nic | ( | bp | ) | bnxt_hwrm_run ( bring_down_nic, bp ) |
#define bnxt_up_nic | ( | bp | ) | bnxt_hwrm_run ( bring_up_nic, bp ) |
FILE_LICENCE | ( | GPL2_ONLY | ) |
|
static |
Definition at line 2221 of file bnxt.c.
References BD_NOW, bnxt_adv_cq_index(), bnxt_db_cq(), bnxt_link_evt(), bnxt_rx_complete(), bnxt_tx_complete(), bp, CMPL_BASE_TYPE_HWRM_ASYNC_EVENT, CMPL_BASE_TYPE_MASK, CMPL_BASE_TYPE_RX_L2, CMPL_BASE_TYPE_RX_L2_V3, CMPL_BASE_TYPE_STAT_EJECT, CMPL_BASE_TYPE_TX_L2, CMPL_BASE_V, bnxt::dev, done, dump_cq, dump_evt, cmpl_base::info3_v, NO_MORE_CQ_BD_TO_SERVICE, net_device::priv, SERVICE_NEXT_CQ_BD, tx, and cmpl_base::type.
Referenced by bnxt_poll().
|
static |
Definition at line 362 of file bnxt.c.
References bp, io_buffer::data, dbg_tx_done, bnxt::dev, dump_tx_stat, iob_len(), netdev_tx_complete(), NEXT_IDX, and net_device::priv.
Referenced by bnxt_service_cq().
Definition at line 505 of file bnxt.c.
References bp.
Referenced by bnxt_rx_process(), and bnxt_service_cq().
|
static |
Definition at line 543 of file bnxt.c.
References bnxt_rx_process(), bp, bnxt::dev, rx_pkt_cmpl_hi::errors_v2, NO_MORE_CQ_BD_TO_SERVICE, net_device::priv, RX_PKT_CMPL_V2, and SERVICE_NEXT_CQ_BD.
Referenced by bnxt_service_cq().
void bnxt_link_evt | ( | struct bnxt * | bp, |
struct hwrm_async_event_cmpl * | evt | ||
) |
Definition at line 2205 of file bnxt.c.
References ASYNC_EVENT_CMPL_EVENT_ID_LINK_STATUS_CHANGE, bnxt_set_link(), bp, dbg_link_status, hwrm_async_event_cmpl::event_data1, hwrm_async_event_cmpl::event_id, STATUS_LINK_ACTIVE, and STATUS_LINK_DOWN.
Referenced by bnxt_service_cq(), and bnxt_service_nq().
u8 bnxt_is_pci_vf | ( | struct pci_device * | pdev | ) |
Check if Virtual Function.
Definition at line 91 of file bnxt.c.
References BNXT_FLAG_PCI_VF, pci_device_id::driver_data, FLAG_TEST, and pci_device::id.
Referenced by bnxt_get_pci_info().
|
static |
Definition at line 99 of file bnxt.c.
References bp, DBGP, iounmap(), and NULL.
Referenced by bnxt_close(), bnxt_init_one(), and bnxt_remove_one().
|
static |
Definition at line 116 of file bnxt.c.
References pci_bar_size(), pci_bar_start(), pci_ioremap(), and reg.
Referenced by bnxt_close(), and bnxt_get_pci_info().
|
static |
Definition at line 125 of file bnxt.c.
References bnxt_is_pci_vf(), bnxt_pci_base(), bp, dbg_pci, DBGP, PCI_BASE_ADDRESS_0, PCI_BASE_ADDRESS_2, PCI_BASE_ADDRESS_4, PCI_COMMAND, PCI_COMMAND_INTX_DISABLE, pci_read_byte, pci_read_word16, PCI_SUBSYSTEM_ID, PCI_SUBSYSTEM_VENDOR_ID, pci_write_word, PCICFG_ME_REGISTER, and STATUS_SUCCESS.
Referenced by bnxt_init_one().
|
static |
Definition at line 163 of file bnxt.c.
References bp, DBGP, net_device::dev, EINVAL, ETH_ALEN, is_valid_ether_addr(), memcpy(), and STATUS_SUCCESS.
|
static |
Definition at line 177 of file bnxt.c.
References bp, netdev_link_down(), netdev_link_up(), and STATUS_LINK_ACTIVE.
Referenced by bnxt_get_phy_link(), and bnxt_link_evt().
Definition at line 185 of file bnxt.c.
References bp, DB_OFFSET_PF, DB_OFFSET_VF, DBC_MSG_IDX, DBC_MSG_XID, flag, val, and write64.
Referenced by bnxt_db_cq(), bnxt_db_nq(), bnxt_db_rx(), and bnxt_db_tx().
|
static |
Definition at line 200 of file bnxt.c.
References bp, DBC_MSG_EPCH, DBC_MSG_IDX, DBC_MSG_TOGGLE, DBC_MSG_XID, flag, val, and write64.
Referenced by bnxt_db_cq(), bnxt_db_nq(), bnxt_db_rx(), and bnxt_db_tx().
|
static |
Definition at line 214 of file bnxt.c.
References BNXT_FLAG_IS_CHIP_P5, BNXT_FLAG_IS_CHIP_P7, bp, CMPL_DOORBELL_KEY_CMPL, DBC_DBC_TYPE_NQ_ARM, dev_p5_db(), dev_p7_db(), FLAG_TEST, and write32.
Referenced by bnxt_service_nq().
|
static |
Definition at line 227 of file bnxt.c.
References BNXT_FLAG_IS_CHIP_P5, BNXT_FLAG_IS_CHIP_P7, bp, CQ_DOORBELL_KEY_IDX, DBC_DBC_TYPE_CQ_ARMALL, dev_p5_db(), dev_p7_db(), FLAG_TEST, and write32.
Referenced by bnxt_service_cq().
Definition at line 241 of file bnxt.c.
References BNXT_FLAG_IS_CHIP_P5, BNXT_FLAG_IS_CHIP_P7, bp, DBC_DBC_TYPE_SRQ, dev_p5_db(), dev_p7_db(), FLAG_TEST, RX_DOORBELL_KEY_RX, and write32.
Referenced by bnxt_post_rx_buffers().
Definition at line 252 of file bnxt.c.
References BNXT_FLAG_IS_CHIP_P5, BNXT_FLAG_IS_CHIP_P7, bp, DBC_DBC_TYPE_SQ, dev_p5_db(), dev_p7_db(), FLAG_TEST, TX_DOORBELL_KEY_TX, and write32.
Referenced by bnxt_tx().
Definition at line 264 of file bnxt.c.
References BYTE_SWAP_S, io_buffer::data, ETHERTYPE_VLAN, iob_len(), iob_put, len, MAC_HDR_SIZE, memmove(), src, and VLAN_HDR_SIZE.
Referenced by bnxt_rx_drop(), and bnxt_tx_adjust_pkt().
|
static |
Definition at line 278 of file bnxt.c.
References BYTE_SWAP_S, ETHERTYPE_VLAN, MAC_HDR_SIZE, and src.
Referenced by bnxt_tx_adjust_pkt().
|
static |
Definition at line 285 of file bnxt.c.
References rx_pkt_cmpl_hi::flags2, rx_pkt_v3_cmpl_hi::flags2, rx_pkt_v3_cmpl::flags_type, rx_pkt_cmpl_hi::metadata, rx_pkt_v3_cmpl_hi::metadata0, RX_PKT_CMPL_FLAGS2_META_FORMAT_VLAN, RX_PKT_CMPL_METADATA_VID_MASK, RX_PKT_V3_CMPL_HI_FLAGS2_META_FORMAT_ACT_REC_PTR, RX_PKT_V3_CMPL_HI_METADATA0_VID_MASK, RX_PKT_V3_CMPL_TYPE_MASK, and RX_PKT_V3_CMPL_TYPE_RX_L2_V3.
Referenced by bnxt_rx_drop().
void bnxt_set_txq | ( | struct bnxt * | bp, |
int | entry, | ||
dma_addr_t | mapping, | ||
int | len | ||
) |
Definition at line 342 of file bnxt.c.
References dma_addr64_t::addr, BD_NOW, bp, tx_bd_short::dma, tx_bd_short::flags_type, len, tx_bd_short::len, tx_bd_short::opaque, TX_BD_FLAGS, TX_BD_SHORT_FLAGS_LHINT_GTE2K, TX_BD_SHORT_FLAGS_LHINT_LT1K, TX_BD_SHORT_FLAGS_LHINT_LT2K, TX_BD_SHORT_FLAGS_LHINT_LT512, and u32.
Referenced by bnxt_tx().
int bnxt_free_rx_iob | ( | struct bnxt * | bp | ) |
Definition at line 375 of file bnxt.c.
References bp, DBGP, FLAG_RESET, FLAG_TEST, free_iob(), NULL, STATUS_SUCCESS, and VALID_RX_IOB.
Definition at line 395 of file bnxt.c.
References io_buffer::data, desc, MAX_ETHERNET_PACKET_BUFFER_SIZE, RX_PROD_PKT_BD_TYPE_RX_PROD_PKT, and virt_to_bus().
Referenced by bnxt_alloc_rx_iob().
Definition at line 408 of file bnxt.c.
References alloc_iob(), BNXT_RX_STD_DMA_SZ, bnxt_set_rx_desc(), bp, dbg_alloc_rx_iob, DBGP, and ENOMEM.
Referenced by bnxt_post_rx_buffers().
int bnxt_post_rx_buffers | ( | struct bnxt * | bp | ) |
Definition at line 425 of file bnxt.c.
References bnxt_alloc_rx_iob(), bnxt_db_rx(), bp, dbg_alloc_rx_iob_fail, dbg_rx_cid, FLAG_SET, NEXT_IDX, STATUS_SUCCESS, and VALID_RX_IOB.
Referenced by bnxt_rx_process().
u8 bnxt_rx_drop | ( | struct bnxt * | bp, |
struct io_buffer * | iob, | ||
struct rx_pkt_cmpl * | rx_cmp, | ||
struct rx_pkt_cmpl_hi * | rx_cmp_hi, | ||
u16 | rx_len | ||
) |
Definition at line 455 of file bnxt.c.
References bnxt_add_vlan(), bnxt_get_rx_vlan(), bnxt_vlan_drop(), bp, io_buffer::data, dbg_rx_vlan, rx_pkt_cmpl_hi::errors_v2, rx_pkt_v3_cmpl_hi::errors_v2, rx_pkt_cmpl_hi::flags2, rx_pkt_v3_cmpl::flags_type, if(), iob_put, rx_pkt_cmpl_hi::metadata, RX_PKT_CMPL_ERRORS_BUFFER_ERROR_SFT, RX_PKT_V3_CMPL_HI_ERRORS_BUFFER_ERROR_SFT, RX_PKT_V3_CMPL_TYPE_MASK, and RX_PKT_V3_CMPL_TYPE_RX_L2_V3.
Referenced by bnxt_rx_process().
void bnxt_rx_process | ( | struct net_device * | dev, |
struct bnxt * | bp, | ||
struct rx_pkt_cmpl * | rx_cmp, | ||
struct rx_pkt_cmpl_hi * | rx_cmp_hi | ||
) |
Definition at line 519 of file bnxt.c.
References assert(), bnxt_adv_cq_index(), bnxt_post_rx_buffers(), bnxt_rx_drop(), bp, io_buffer::data, dbg_rx_stat, dbg_rxp, dump_rx_bd, EINVAL, rx_pkt_cmpl::len, netdev_rx(), netdev_rx_err(), NULL, and rx_pkt_cmpl::opaque.
Referenced by bnxt_rx_complete().
void bnxt_mm_init | ( | struct bnxt * | bp, |
const char * | func | ||
) |
Definition at line 563 of file bnxt.c.
References bp, dbg_mem, DBGP, DMA_BUFFER_SIZE, HWRM_MAX_REQ_LEN, LINK_DEFAULT_TIMEOUT, MAX_CQ_DESC_CNT, MAX_ETHERNET_PACKET_BUFFER_SIZE, MAX_NQ_DESC_CNT, MAX_RX_DESC_CNT, MAX_TX_DESC_CNT, memset(), NUM_RX_BUFFERS, REQ_BUFFER_SIZE, RESP_BUFFER_SIZE, STATUS_LINK_DOWN, and virt_to_bus().
Referenced by bnxt_alloc_mem().
void bnxt_mm_nic | ( | struct bnxt * | bp | ) |
Definition at line 584 of file bnxt.c.
References bp, CQ_RING_BUFFER_SIZE, DBGP, HWRM_MAX_REQ_LEN, LINK_DEFAULT_TIMEOUT, MAX_CQ_DESC_CNT, MAX_ETHERNET_PACKET_BUFFER_SIZE, MAX_NQ_DESC_CNT, MAX_RX_DESC_CNT, MAX_TX_DESC_CNT, memset(), NQ_RING_BUFFER_SIZE, NUM_RX_BUFFERS, RX_RING_BUFFER_SIZE, STATUS_LINK_DOWN, and TX_RING_BUFFER_SIZE.
Referenced by bnxt_open().
void bnxt_free_mem | ( | struct bnxt * | bp | ) |
Definition at line 616 of file bnxt.c.
References bp, CQ_RING_BUFFER_SIZE, DBGP, DMA_BUFFER_SIZE, free_phys(), NQ_RING_BUFFER_SIZE, NULL, REQ_BUFFER_SIZE, RESP_BUFFER_SIZE, RX_RING_BUFFER_SIZE, and TX_RING_BUFFER_SIZE.
Referenced by bnxt_alloc_mem(), bnxt_init_one(), and bnxt_remove_one().
int bnxt_alloc_mem | ( | struct bnxt * | bp | ) |
Definition at line 659 of file bnxt.c.
References BNXT_DMA_ALIGNMENT, bnxt_free_mem(), bnxt_mm_init(), bp, CQ_RING_BUFFER_SIZE, DBGP, DMA_ALIGN_4K, DMA_BUFFER_SIZE, ENOMEM, malloc_phys(), NQ_RING_BUFFER_SIZE, REQ_BUFFER_SIZE, RESP_BUFFER_SIZE, RX_RING_BUFFER_SIZE, STATUS_SUCCESS, test_if, and TX_RING_BUFFER_SIZE.
Referenced by bnxt_init_one().
Definition at line 686 of file bnxt.c.
References bp, cmd, input::cmpl_ring, HWRM_NA_SIGNATURE, len, memset(), input::req_type, input::resp_addr, input::seq_id, input::target_id, and u16.
Referenced by bnxt_hwrm_backing_store_cfg(), bnxt_hwrm_backing_store_qcfg(), bnxt_hwrm_cfa_l2_filter_alloc(), bnxt_hwrm_cfa_l2_filter_free(), bnxt_hwrm_func_cfg_req(), bnxt_hwrm_func_drv_rgtr(), bnxt_hwrm_func_drv_unrgtr(), bnxt_hwrm_func_qcaps_req(), bnxt_hwrm_func_qcfg_req(), bnxt_hwrm_func_reset_req(), bnxt_hwrm_func_resource_qcaps(), bnxt_hwrm_nvm_get_variable_req(), bnxt_hwrm_port_mac_cfg(), bnxt_hwrm_port_phy_cfg(), bnxt_hwrm_port_phy_qcaps_req(), bnxt_hwrm_port_phy_qcfg(), bnxt_hwrm_queue_qportcfg(), bnxt_hwrm_ring_alloc(), bnxt_hwrm_ring_alloc_grp(), bnxt_hwrm_ring_free(), bnxt_hwrm_ring_free_grp(), bnxt_hwrm_set_async_event(), bnxt_hwrm_set_rx_mask(), bnxt_hwrm_stat_ctx_alloc(), bnxt_hwrm_stat_ctx_free(), bnxt_hwrm_ver_get(), bnxt_hwrm_vnic_alloc(), bnxt_hwrm_vnic_cfg(), and bnxt_hwrm_vnic_free().
Definition at line 696 of file bnxt.c.
References bp, GRC_COM_CHAN_BASE, GRC_COM_CHAN_TRIG, and write32.
Referenced by short_hwrm_cmd_req(), and wait_resp().
Definition at line 707 of file bnxt.c.
References bp, dbg_short_cmd, hwrm_write_req(), len, mdelay(), memset(), hwrm_short_input::req_addr, hwrm_short_input::req_type, SHORT_REQ_SIGNATURE_SHORT_CMD, hwrm_short_input::signature, hwrm_short_input::size, and u16.
Referenced by wait_resp().
Definition at line 722 of file bnxt.c.
References bp, dbg_hw_cmd, HWRM_CMD_DEFAULT_MULTIPLAYER, HWRM_CMD_POLL_WAIT_TIME, hwrm_write_req(), len, input::req_type, input::seq_id, short_hwrm_cmd_req(), STATUS_TIMEOUT, test_if, and udelay().
Referenced by bnxt_hwrm_backing_store_cfg(), bnxt_hwrm_backing_store_qcfg(), bnxt_hwrm_cfa_l2_filter_alloc(), bnxt_hwrm_cfa_l2_filter_free(), bnxt_hwrm_func_cfg_req(), bnxt_hwrm_func_drv_rgtr(), bnxt_hwrm_func_drv_unrgtr(), bnxt_hwrm_func_qcaps_req(), bnxt_hwrm_func_qcfg_req(), bnxt_hwrm_func_reset_req(), bnxt_hwrm_func_resource_qcaps(), bnxt_hwrm_nvm_get_variable_req(), bnxt_hwrm_port_mac_cfg(), bnxt_hwrm_port_phy_cfg(), bnxt_hwrm_port_phy_qcaps_req(), bnxt_hwrm_port_phy_qcfg(), bnxt_hwrm_queue_qportcfg(), bnxt_hwrm_ring_alloc(), bnxt_hwrm_ring_alloc_grp(), bnxt_hwrm_ring_free(), bnxt_hwrm_ring_free_grp(), bnxt_hwrm_set_async_event(), bnxt_hwrm_set_rx_mask(), bnxt_hwrm_stat_ctx_alloc(), bnxt_hwrm_stat_ctx_free(), bnxt_hwrm_ver_get(), bnxt_hwrm_vnic_alloc(), bnxt_hwrm_vnic_cfg(), and bnxt_hwrm_vnic_free().
|
static |
Definition at line 752 of file bnxt.c.
References BNXT_FLAG_HWRM_SHORT_CMD_SUPP, BNXT_FLAG_IS_CHIP_P5, BNXT_FLAG_IS_CHIP_P5_PLUS, BNXT_FLAG_IS_CHIP_P7, bp, hwrm_ver_get_output::chip_bond_id, hwrm_ver_get_output::chip_metal, hwrm_ver_get_output::chip_num, CHIP_NUM_57502, CHIP_NUM_57504, CHIP_NUM_57508, CHIP_NUM_57608, hwrm_ver_get_output::chip_platform_type, hwrm_ver_get_output::chip_rev, dbg_fw_ver, DBGP, hwrm_ver_get_output::def_req_timeout, hwrm_ver_get_output::dev_caps_cfg, FLAG_SET, HWRM_CMD_DEFAULT_TIMEOUT, hwrm_init(), hwrm_ver_get_output::hwrm_intf_maj_8b, hwrm_ver_get_output::hwrm_intf_min_8b, hwrm_ver_get_output::hwrm_intf_upd_8b, HWRM_VER_GET, HWRM_VERSION_MAJOR, HWRM_VERSION_MINOR, HWRM_VERSION_UPDATE, if(), hwrm_ver_get_output::max_ext_req_len, hwrm_ver_get_output::max_req_win_len, rc, SHORT_CMD_REQUIRED, SHORT_CMD_SUPPORTED, STATUS_FAILURE, STATUS_SUCCESS, test_if, u16, u32, and wait_resp().
|
static |
Definition at line 803 of file bnxt.c.
References BNXT_FLAG_RESOURCE_QCAPS_SUPPORT, bp, dbg_func_resource_qcaps, DBGP, FLAG_SET, HWRM_FUNC_RESOURCE_QCAPS, hwrm_init(), HWRM_NA_SIGNATURE, hwrm_func_resource_qcaps_output::max_cmpl_rings, hwrm_func_resource_qcaps_output::max_hw_ring_grps, hwrm_func_resource_qcaps_output::max_l2_ctxs, hwrm_func_resource_qcaps_output::max_msix, hwrm_func_resource_qcaps_output::max_rsscos_ctx, hwrm_func_resource_qcaps_output::max_rx_rings, hwrm_func_resource_qcaps_output::max_stat_ctx, hwrm_func_resource_qcaps_output::max_tx_rings, hwrm_func_resource_qcaps_output::max_vfs, hwrm_func_resource_qcaps_output::max_vnics, hwrm_func_resource_qcaps_output::min_cmpl_rings, hwrm_func_resource_qcaps_output::min_hw_ring_grps, hwrm_func_resource_qcaps_output::min_l2_ctxs, hwrm_func_resource_qcaps_output::min_rsscos_ctx, hwrm_func_resource_qcaps_output::min_rx_rings, hwrm_func_resource_qcaps_output::min_stat_ctx, hwrm_func_resource_qcaps_output::min_tx_rings, hwrm_func_resource_qcaps_output::min_vnics, rc, STATUS_SUCCESS, u16, hwrm_func_resource_qcaps_output::vf_reservation_strategy, and wait_resp().
Definition at line 866 of file bnxt.c.
References bp, dbg_num_rings, DBGP, DEFAULT_NUMBER_OF_CMPL_RINGS, DEFAULT_NUMBER_OF_RING_GRPS, DEFAULT_NUMBER_OF_RX_RINGS, DEFAULT_NUMBER_OF_STAT_CTXS, DEFAULT_NUMBER_OF_TX_RINGS, FUNC_CFG_REQ_ENABLES_NUM_CMPL_RINGS, FUNC_CFG_REQ_ENABLES_NUM_HW_RING_GRPS, FUNC_CFG_REQ_ENABLES_NUM_RX_RINGS, FUNC_CFG_REQ_ENABLES_NUM_STAT_CTXS, and FUNC_CFG_REQ_ENABLES_NUM_TX_RINGS.
Referenced by bnxt_hwrm_assign_resources().
|
static |
Definition at line 901 of file bnxt.c.
References BNXT_FLAG_RESOURCE_QCAPS_SUPPORT, bnxt_set_ring_info(), bp, DBGP, hwrm_func_cfg_input::enables, FLAG_TEST, hwrm_func_cfg_input::num_cmpl_rings, hwrm_func_cfg_input::num_hw_ring_grps, hwrm_func_cfg_input::num_rx_rings, hwrm_func_cfg_input::num_stat_ctxs, and hwrm_func_cfg_input::num_tx_rings.
Referenced by bnxt_hwrm_func_cfg_req().
|
static |
Definition at line 919 of file bnxt.c.
References bp, dbg_func_qcaps, DBGP, ETH_ALEN, hwrm_func_qcaps_output::fid, HWRM_FUNC_QCAPS, hwrm_init(), HWRM_NA_SIGNATURE, hwrm_func_qcaps_output::mac_address, memcpy(), hwrm_func_qcaps_output::port_id, rc, STATUS_FAILURE, STATUS_SUCCESS, u16, u8, and wait_resp().
|
static |
Definition at line 949 of file bnxt.c.
References BNXT_FLAG_MULTI_HOST, BNXT_FLAG_NPAR_MODE, bp, dbg_func_qcfg, DBGP, ETH_ALEN, hwrm_func_qcfg_output::fid, FLAG_SET, hwrm_func_qcfg_output::flags, FUNC_QCFG_RESP_FLAGS_MULTI_HOST, FUNC_QCFG_RESP_PORT_PARTITION_TYPE_NPAR1_0, HWRM_FUNC_QCFG, hwrm_init(), HWRM_NA_SIGNATURE, if(), hwrm_func_qcfg_output::mac_address, memcpy(), hwrm_func_qcfg_output::pci_id, hwrm_func_qcfg_output::port_id, hwrm_func_qcfg_output::port_partition_type, rc, hwrm_func_qcfg_output::stat_ctx_id, STATUS_FAILURE, STATUS_SUCCESS, u16, u8, hwrm_func_qcfg_output::vlan, and wait_resp().
|
static |
Definition at line 990 of file bnxt.c.
References BNXT_FLAG_LINK_SPEEDS2, bp, DBGP, FLAG_SET, hwrm_port_phy_qcaps_output::flags2, hwrm_init(), HWRM_PORT_PHY_QCAPS, PORT_PHY_QCAPS_RESP_FLAGS2_SPEEDS2_SUPPORTED, rc, STATUS_FAILURE, STATUS_SUCCESS, u16, and wait_resp().
|
static |
Definition at line 1014 of file bnxt.c.
References bp, DBGP, hwrm_func_reset_input::func_reset_level, FUNC_RESET_REQ_FUNC_RESET_LEVEL_RESETME, HWRM_CMD_WAIT, HWRM_FUNC_RESET, hwrm_init(), u16, and wait_resp().
|
static |
Definition at line 1028 of file bnxt.c.
References BNXT_FLAG_IS_CHIP_P5_PLUS, bnxt_hwrm_assign_resources(), bp, DBGP, hwrm_func_cfg_input::enables, hwrm_func_cfg_input::evb_mode, hwrm_func_cfg_input::fid, FLAG_TEST, FUNC_CFG_REQ_ENABLES_EVB_MODE, FUNC_CFG_REQ_ENABLES_NUM_MSIX, FUNC_CFG_REQ_ENABLES_NUM_VNICS, FUNC_CFG_REQ_EVB_MODE_NO_EVB, HWRM_FUNC_CFG, hwrm_init(), HWRM_NA_SIGNATURE, hwrm_func_cfg_input::num_msix, hwrm_func_cfg_input::num_vnics, STATUS_SUCCESS, u16, and wait_resp().
|
static |
Definition at line 1052 of file bnxt.c.
References hwrm_func_drv_rgtr_input::async_event_fwd, bp, DBGP, hwrm_func_drv_rgtr_input::enables, FLAG_SET, FUNC_DRV_RGTR_REQ_ENABLES_ASYNC_EVENT_FWD, FUNC_DRV_RGTR_REQ_ENABLES_OS_TYPE, FUNC_DRV_RGTR_REQ_ENABLES_VER, FUNC_DRV_RGTR_REQ_OS_TYPE_OTHER, HWRM_FUNC_DRV_RGTR, hwrm_init(), IPXE_VERSION_MAJOR, IPXE_VERSION_MINOR, IPXE_VERSION_UPDATE, hwrm_func_drv_rgtr_input::os_type, rc, STATUS_FAILURE, STATUS_SUCCESS, u16, VALID_DRIVER_REG, hwrm_func_drv_rgtr_input::ver_maj, hwrm_func_drv_rgtr_input::ver_min, hwrm_func_drv_rgtr_input::ver_upd, and wait_resp().
|
static |
Definition at line 1081 of file bnxt.c.
References bp, DBGP, FLAG_RESET, FLAG_TEST, hwrm_func_drv_unrgtr_input::flags, FUNC_DRV_UNRGTR_REQ_FLAGS_PREPARE_FOR_SHUTDOWN, HWRM_FUNC_DRV_UNRGTR, hwrm_init(), rc, STATUS_FAILURE, STATUS_SUCCESS, u16, VALID_DRIVER_REG, and wait_resp().
|
static |
Definition at line 1102 of file bnxt.c.
References hwrm_func_vf_cfg_input::async_event_cr, hwrm_func_cfg_input::async_event_cr, BNXT_FLAG_IS_CHIP_P5_PLUS, bp, DBGP, hwrm_func_vf_cfg_input::dflt_mac_addr, hwrm_func_vf_cfg_input::enables, hwrm_func_cfg_input::enables, ETH_ALEN, hwrm_func_cfg_input::fid, FLAG_TEST, FUNC_CFG_REQ_ENABLES_ASYNC_EVENT_CR, hwrm_func_vf_cfg_input::guest_vlan, HWRM_FUNC_CFG, HWRM_FUNC_VF_CFG, hwrm_init(), HWRM_NA_SIGNATURE, memcpy(), hwrm_func_vf_cfg_input::mtu, rc, u16, VF_CFG_ENABLE_FLAGS, and wait_resp().
|
static |
Definition at line 1140 of file bnxt.c.
References bp, CFA_L2_FILTER_ALLOC_REQ_ENABLES_DST_ID, CFA_L2_FILTER_ALLOC_REQ_ENABLES_L2_ADDR, CFA_L2_FILTER_ALLOC_REQ_ENABLES_L2_ADDR_MASK, CFA_L2_FILTER_ALLOC_REQ_FLAGS_OUTERMOST, CFA_L2_FILTER_ALLOC_REQ_FLAGS_PATH_RX, CFA_L2_FILTER_ALLOC_REQ_SRC_TYPE_NPORT, DBGP, hwrm_cfa_l2_filter_alloc_input::enables, ETH_ALEN, FLAG_SET, flags, HWRM_CFA_L2_FILTER_ALLOC, hwrm_init(), hwrm_cfa_l2_filter_alloc_output::l2_filter_id, memcpy(), memset(), rc, STATUS_FAILURE, STATUS_SUCCESS, u16, u32, VALID_L2_FILTER, and wait_resp().
|
static |
Definition at line 1181 of file bnxt.c.
References bp, DBGP, FLAG_RESET, FLAG_TEST, HWRM_CFA_L2_FILTER_FREE, hwrm_init(), hwrm_cfa_l2_filter_free_input::l2_filter_id, rc, STATUS_FAILURE, STATUS_SUCCESS, u16, VALID_L2_FILTER, and wait_resp().
Definition at line 1205 of file bnxt.c.
References CFA_L2_SET_RX_MASK_REQ_MASK_ALL_MCAST, CFA_L2_SET_RX_MASK_REQ_MASK_BCAST, CFA_L2_SET_RX_MASK_REQ_MASK_MCAST, CFA_L2_SET_RX_MASK_REQ_MASK_PROMISCUOUS, RX_MASK_ACCEPT_ALL_MULTICAST, RX_MASK_ACCEPT_MULTICAST, RX_MASK_ACCEPT_NONE, and RX_MASK_PROMISCUOUS_MODE.
Referenced by bnxt_hwrm_set_rx_mask().
Definition at line 1224 of file bnxt.c.
References bp, HWRM_CFA_L2_SET_RX_MASK, hwrm_init(), hwrm_cfa_l2_set_rx_mask_input::mask, set_rx_mask(), u16, hwrm_cfa_l2_set_rx_mask_input::vnic_id, and wait_resp().
Referenced by bnxt_reset_rx_mask(), and bnxt_set_rx_mask().
Definition at line 1239 of file bnxt.c.
References hwrm_port_phy_qcfg_output::auto_link_speeds2, BNXT_FLAG_LINK_SPEEDS2, bp, DBGP, DETECT_MEDIA, FLAG_TEST, hwrm_init(), HWRM_PORT_PHY_QCFG, hwrm_port_phy_qcfg_output::link, hwrm_port_phy_qcfg_output::link_speed, hwrm_port_phy_qcfg_output::module_status, PHY_SPEED, PHY_STATUS, PORT_PHY_QCFG_RESP_LINK_LINK, rc, STATUS_FAILURE, STATUS_LINK_ACTIVE, STATUS_LINK_DOWN, STATUS_SUCCESS, SUPPORT_SPEEDS, hwrm_port_phy_qcfg_output::support_speeds, SUPPORT_SPEEDS2, u16, and wait_resp().
Referenced by bnxt_get_phy_link(), and bnxt_query_phy_link().
|
static |
Definition at line 1278 of file bnxt.c.
References bp, data_len, hwrm_nvm_get_variable_input::data_len, DBGP, hwrm_nvm_get_variable_input::dest_data_addr, hwrm_nvm_get_variable_input::dimensions, HWRM_CMD_FLASH_MULTIPLAYER, hwrm_init(), HWRM_NVM_GET_VARIABLE, hwrm_nvm_get_variable_input::index_0, hwrm_nvm_get_variable_input::option_num, u16, and wait_resp().
Referenced by bnxt_get_link_speed(), and bnxt_get_vlan().
|
static |
Definition at line 1297 of file bnxt.c.
References BNXT_FLAG_IS_CHIP_P7, bnxt_hwrm_nvm_get_variable_req(), bp, D3_LINK_SPEED_FW_NUM, D3_SPEED_FW_MASK, D3_SPEED_FW_SHIFT, DBGP, FLAG_TEST, LINK_SPEED_DRV_NUM, LINK_SPEED_FW_100G, LINK_SPEED_FW_100G_PAM4, LINK_SPEED_FW_100G_PAM4_112, LINK_SPEED_FW_10G, LINK_SPEED_FW_1G, LINK_SPEED_FW_200G, LINK_SPEED_FW_200G_PAM4_112, LINK_SPEED_FW_25G, LINK_SPEED_FW_2_5G, LINK_SPEED_FW_400G_PAM4, LINK_SPEED_FW_400G_PAM4_112, LINK_SPEED_FW_40G, LINK_SPEED_FW_50G, LINK_SPEED_FW_50G_PAM4, LINK_SPEED_FW_AUTONEG, LINK_SPEED_FW_MASK, LINK_SPEED_FW_NUM, MEDIA_AUTO_DETECT_MASK, MEDIA_AUTO_DETECT_SHIFT, MEDIUM_FULL_DUPLEX, MEDIUM_SPEED_1000MBPS, MEDIUM_SPEED_100GBPS, MEDIUM_SPEED_100PAM4_112GBPS, MEDIUM_SPEED_100PAM4GBPS, MEDIUM_SPEED_10GBPS, MEDIUM_SPEED_200GBPS, MEDIUM_SPEED_200PAM4_112GBPS, MEDIUM_SPEED_2500MBPS, MEDIUM_SPEED_25GBPS, MEDIUM_SPEED_400PAM4_112GBPS, MEDIUM_SPEED_400PAM4GBPS, MEDIUM_SPEED_40GBPS, MEDIUM_SPEED_50GBPS, MEDIUM_SPEED_50PAM4GBPS, MEDIUM_SPEED_AUTONEG, PORT_CFG_LINK_SETTINGS_MEDIA_AUTO_DETECT_NUM, prn_set_speed, SET_LINK, SET_MEDIUM_DUPLEX, SET_MEDIUM_SPEED, SPEED_DRV_MASK, SPEED_DRV_SHIFT, SPEED_FW_MASK, SPEED_FW_SHIFT, STATUS_FAILURE, STATUS_SUCCESS, and test_if.
Referenced by bnxt_query_phy_link().
|
static |
Definition at line 1382 of file bnxt.c.
References BNXT_FLAG_IS_CHIP_P7, bnxt_hwrm_nvm_get_variable_req(), bp, DBGP, FLAG_TEST, FUNC_CFG_PRE_BOOT_MBA_VLAN_ENABLED, FUNC_CFG_PRE_BOOT_MBA_VLAN_NUM, FUNC_CFG_PRE_BOOT_MBA_VLAN_VALUE_NUM, if(), SET_MBA, STATUS_FAILURE, STATUS_SUCCESS, test_if, VLAN_MASK, VLAN_SHIFT, VLAN_VALUE_MASK, and VLAN_VALUE_SHIFT.
|
static |
Definition at line 1416 of file bnxt.c.
References BNXT_FLAG_IS_CHIP_P5_PLUS, bp, DBGP, FLAG_TEST, HWRM_FUNC_BACKING_STORE_QCFG, hwrm_init(), STATUS_SUCCESS, u16, and wait_resp().
|
static |
Definition at line 1431 of file bnxt.c.
References BNXT_FLAG_IS_CHIP_P5_PLUS, bp, DBGP, hwrm_func_backing_store_cfg_input::enables, FLAG_TEST, hwrm_func_backing_store_cfg_input::flags, FUNC_BACKING_STORE_CFG_REQ_FLAGS_PREBOOT_MODE, HWRM_CMD_WAIT, HWRM_FUNC_BACKING_STORE_CFG, hwrm_init(), STATUS_SUCCESS, u16, and wait_resp().
|
static |
Definition at line 1448 of file bnxt.c.
References BNXT_FLAG_IS_CHIP_P5_PLUS, bp, DBGP, FLAG_TEST, hwrm_init(), HWRM_QUEUE_QPORTCFG, hwrm_queue_qportcfg_output::queue_id0, rc, STATUS_FAILURE, STATUS_SUCCESS, u16, and wait_resp().
|
static |
Definition at line 1474 of file bnxt.c.
References bp, DBGP, hwrm_init(), HWRM_PORT_MAC_CFG, hwrm_port_mac_cfg_input::lpbk, PORT_MAC_CFG_REQ_LPBK_NONE, STATUS_SUCCESS, u16, and wait_resp().
|
static |
Definition at line 1489 of file bnxt.c.
References hwrm_port_phy_cfg_input::auto_duplex, hwrm_port_phy_cfg_input::auto_link_speed_mask, hwrm_port_phy_cfg_input::auto_link_speeds2_mask, hwrm_port_phy_cfg_input::auto_mode, hwrm_port_phy_cfg_input::auto_pause, BNXT_FLAG_LINK_SPEEDS2, bp, DBGP, hwrm_port_phy_cfg_input::enables, FLAG_TEST, flags, hwrm_port_phy_cfg_input::force_link_speed, hwrm_port_phy_cfg_input::force_link_speeds2, hwrm_port_phy_cfg_input::force_pam4_link_speed, GET_MEDIUM_SPEED, hwrm_init(), HWRM_PORT_PHY_CFG, MEDIUM_SPEED_1000MBPS, MEDIUM_SPEED_100GBPS, MEDIUM_SPEED_100PAM4_112GBPS, MEDIUM_SPEED_100PAM4GBPS, MEDIUM_SPEED_10GBPS, MEDIUM_SPEED_200GBPS, MEDIUM_SPEED_200PAM4_112GBPS, MEDIUM_SPEED_25GBPS, MEDIUM_SPEED_400PAM4_112GBPS, MEDIUM_SPEED_400PAM4GBPS, MEDIUM_SPEED_40GBPS, MEDIUM_SPEED_50GBPS, MEDIUM_SPEED_50PAM4GBPS, PORT_PHY_CFG_REQ_AUTO_DUPLEX_BOTH, PORT_PHY_CFG_REQ_AUTO_MODE_SPEED_MASK, PORT_PHY_CFG_REQ_AUTO_PAUSE_RX, PORT_PHY_CFG_REQ_AUTO_PAUSE_TX, PORT_PHY_CFG_REQ_ENABLES_AUTO_DUPLEX, PORT_PHY_CFG_REQ_ENABLES_AUTO_LINK_SPEED_MASK, PORT_PHY_CFG_REQ_ENABLES_AUTO_LINK_SPEEDS2_MASK, PORT_PHY_CFG_REQ_ENABLES_AUTO_MODE, PORT_PHY_CFG_REQ_ENABLES_AUTO_PAUSE, PORT_PHY_CFG_REQ_ENABLES_FORCE_LINK_SPEEDS2, PORT_PHY_CFG_REQ_ENABLES_FORCE_PAM4_LINK_SPEED, PORT_PHY_CFG_REQ_FLAGS_FORCE, PORT_PHY_CFG_REQ_FLAGS_RESET_PHY, PORT_PHY_CFG_REQ_FORCE_LINK_SPEED_100GB, PORT_PHY_CFG_REQ_FORCE_LINK_SPEED_10GB, PORT_PHY_CFG_REQ_FORCE_LINK_SPEED_1GB, PORT_PHY_CFG_REQ_FORCE_LINK_SPEED_25GB, PORT_PHY_CFG_REQ_FORCE_LINK_SPEED_40GB, PORT_PHY_CFG_REQ_FORCE_LINK_SPEED_50GB, PORT_PHY_CFG_REQ_FORCE_LINK_SPEEDS2_100GB, PORT_PHY_CFG_REQ_FORCE_LINK_SPEEDS2_100GB_PAM4_112, PORT_PHY_CFG_REQ_FORCE_LINK_SPEEDS2_100GB_PAM4_56, PORT_PHY_CFG_REQ_FORCE_LINK_SPEEDS2_10GB, PORT_PHY_CFG_REQ_FORCE_LINK_SPEEDS2_200GB_PAM4_112, PORT_PHY_CFG_REQ_FORCE_LINK_SPEEDS2_200GB_PAM4_56, PORT_PHY_CFG_REQ_FORCE_LINK_SPEEDS2_25GB, PORT_PHY_CFG_REQ_FORCE_LINK_SPEEDS2_400GB_PAM4_112, PORT_PHY_CFG_REQ_FORCE_LINK_SPEEDS2_400GB_PAM4_56, PORT_PHY_CFG_REQ_FORCE_LINK_SPEEDS2_40GB, PORT_PHY_CFG_REQ_FORCE_LINK_SPEEDS2_50GB, PORT_PHY_CFG_REQ_FORCE_LINK_SPEEDS2_50GB_PAM4_56, PORT_PHY_CFG_REQ_FORCE_PAM4_LINK_SPEED_100GB, PORT_PHY_CFG_REQ_FORCE_PAM4_LINK_SPEED_200GB, PORT_PHY_CFG_REQ_FORCE_PAM4_LINK_SPEED_50GB, switch(), u16, and wait_resp().
Referenced by bnxt_query_phy_link().
|
static |
Definition at line 1638 of file bnxt.c.
References bnxt_get_link_speed(), bnxt_hwrm_port_phy_cfg(), bnxt_hwrm_port_phy_qcfg(), bp, dbg_flags, DBGP, DETECT_MEDIA, flag, FLAG_TEST, PHY_SPEED, PHY_STATUS, PORT_PHY_FLAGS, QCFG_PHY_ALL, STATUS_FAILURE, STATUS_LINK_ACTIVE, and STATUS_SUCCESS.
|
static |
Definition at line 1673 of file bnxt.c.
References bnxt_hwrm_port_phy_qcfg(), bnxt_set_link(), bp, dbg_chip_info, dbg_link_state, DBGP, DETECT_MEDIA, flag, LINK_POLL_WAIT_TIME, mdelay(), PHY_SPEED, PHY_STATUS, STATUS_LINK_ACTIVE, and STATUS_SUCCESS.
|
static |
Definition at line 1696 of file bnxt.c.
References bp, DBGP, FLAG_SET, hwrm_init(), HWRM_STAT_CTX_ALLOC, rc, hwrm_stat_ctx_alloc_output::stat_ctx_id, STATUS_FAILURE, STATUS_SUCCESS, u16, VALID_STAT_CTX, and wait_resp().
|
static |
Definition at line 1718 of file bnxt.c.
References bp, DBGP, FLAG_RESET, FLAG_TEST, hwrm_init(), HWRM_STAT_CTX_FREE, rc, hwrm_stat_ctx_free_input::stat_ctx_id, STATUS_FAILURE, STATUS_SUCCESS, u16, u32, VALID_STAT_CTX, and wait_resp().
|
static |
Definition at line 1741 of file bnxt.c.
References bp, DBGP, FLAG_RESET, FLAG_TEST, hwrm_init(), HWRM_RING_GRP_FREE, rc, hwrm_ring_grp_free_input::ring_group_id, STATUS_FAILURE, STATUS_SUCCESS, u16, u32, VALID_RING_GRP, and wait_resp().
|
static |
Definition at line 1764 of file bnxt.c.
References BNXT_FLAG_IS_CHIP_P5_PLUS, bp, DBGP, FLAG_SET, FLAG_TEST, hwrm_init(), HWRM_NA_SIGNATURE, HWRM_RING_GRP_ALLOC, rc, hwrm_ring_grp_alloc_output::ring_group_id, STATUS_FAILURE, STATUS_SUCCESS, u16, VALID_RING_GRP, and wait_resp().
Definition at line 1795 of file bnxt.c.
References bp, DBGP, hwrm_init(), HWRM_RING_FREE, hwrm_ring_free_input::ring_id, hwrm_ring_free_input::ring_type, u16, and wait_resp().
Definition at line 1808 of file bnxt.c.
References BNXT_CQ_INTR_MODE, BNXT_FLAG_IS_CHIP_P5_PLUS, BNXT_FLAG_IS_CHIP_P7, bp, DBGP, FLAG_SET, FLAG_TEST, hwrm_init(), HWRM_RING_ALLOC, LM_PAGE_BITS, MAX_ETHERNET_PACKET_BUFFER_SIZE, rc, RING_ALLOC_REQ_ENABLES_NQ_RING_ID_VALID, RING_ALLOC_REQ_ENABLES_RX_BUF_SIZE_VALID, RING_ALLOC_REQ_INT_MODE_POLL, RING_ALLOC_REQ_RING_TYPE_L2_CMPL, RING_ALLOC_REQ_RING_TYPE_NQ, RING_ALLOC_REQ_RING_TYPE_RX, RING_ALLOC_REQ_RING_TYPE_TX, hwrm_ring_alloc_output::ring_id, RX_RING_QID, STAT_CTX_ID, STATUS_FAILURE, STATUS_SUCCESS, type, u16, u32, VALID_RING_CQ, VALID_RING_NQ, VALID_RING_RX, VALID_RING_TX, virt_to_bus(), and wait_resp().
Referenced by bnxt_hwrm_ring_alloc_cq(), bnxt_hwrm_ring_alloc_nq(), bnxt_hwrm_ring_alloc_rx(), and bnxt_hwrm_ring_alloc_tx().
|
static |
Definition at line 1886 of file bnxt.c.
References bnxt_hwrm_ring_alloc(), bp, DBGP, and RING_ALLOC_REQ_RING_TYPE_L2_CMPL.
|
static |
Definition at line 1892 of file bnxt.c.
References bnxt_hwrm_ring_alloc(), bp, DBGP, and RING_ALLOC_REQ_RING_TYPE_TX.
|
static |
Definition at line 1898 of file bnxt.c.
References bnxt_hwrm_ring_alloc(), bp, DBGP, and RING_ALLOC_REQ_RING_TYPE_RX.
|
static |
Definition at line 1904 of file bnxt.c.
References bp, DBGP, FLAG_RESET, FLAG_TEST, RING_FREE, RING_FREE_REQ_RING_TYPE_L2_CMPL, STATUS_SUCCESS, and VALID_RING_CQ.
|
static |
Definition at line 1919 of file bnxt.c.
References bp, DBGP, FLAG_RESET, FLAG_TEST, RING_FREE, RING_FREE_REQ_RING_TYPE_TX, STATUS_SUCCESS, and VALID_RING_TX.
|
static |
Definition at line 1934 of file bnxt.c.
References bp, DBGP, FLAG_RESET, FLAG_TEST, RING_FREE, RING_FREE_REQ_RING_TYPE_RX, STATUS_SUCCESS, and VALID_RING_RX.
|
static |
Definition at line 1949 of file bnxt.c.
References BNXT_FLAG_IS_CHIP_P5_PLUS, bnxt_hwrm_ring_alloc(), bp, FLAG_TEST, RING_ALLOC_REQ_RING_TYPE_NQ, and STATUS_SUCCESS.
|
static |
Definition at line 1956 of file bnxt.c.
References BNXT_FLAG_IS_CHIP_P5_PLUS, bp, DBGP, FLAG_RESET, FLAG_TEST, RING_FREE, RING_FREE_REQ_RING_TYPE_NQ, STATUS_SUCCESS, and VALID_RING_NQ.
|
static |
Definition at line 1974 of file bnxt.c.
References bp, DBGP, FLAG_SET, hwrm_init(), HWRM_VNIC_ALLOC, rc, STATUS_FAILURE, STATUS_SUCCESS, u16, VALID_VNIC_ID, VNIC_ALLOC_REQ_FLAGS_DEFAULT, hwrm_vnic_alloc_output::vnic_id, and wait_resp().
|
static |
Definition at line 1997 of file bnxt.c.
References bp, DBGP, FLAG_RESET, FLAG_TEST, hwrm_init(), HWRM_VNIC_FREE, rc, STATUS_FAILURE, STATUS_SUCCESS, u16, VALID_VNIC_ID, hwrm_vnic_free_input::vnic_id, and wait_resp().
|
static |
Definition at line 2020 of file bnxt.c.
References BNXT_FLAG_IS_CHIP_P5_PLUS, bp, DBGP, hwrm_vnic_cfg_input::default_cmpl_ring_id, hwrm_vnic_cfg_input::default_rx_ring_id, hwrm_vnic_cfg_input::dflt_ring_grp, hwrm_vnic_cfg_input::enables, FLAG_TEST, hwrm_vnic_cfg_input::flags, hwrm_init(), HWRM_VNIC_CFG, hwrm_vnic_cfg_input::mru, u16, VNIC_CFG_REQ_ENABLES_DEFAULT_CMPL_RING_ID, VNIC_CFG_REQ_ENABLES_DEFAULT_RX_RING_ID, VNIC_CFG_REQ_ENABLES_DFLT_RING_GRP, VNIC_CFG_REQ_ENABLES_MRU, VNIC_CFG_REQ_FLAGS_VLAN_STRIP_MODE, hwrm_vnic_cfg_input::vnic_id, and wait_resp().
|
static |
Definition at line 2046 of file bnxt.c.
References bnxt_hwrm_set_rx_mask(), bp, and RX_MASK.
|
static |
Definition at line 2051 of file bnxt.c.
References bnxt_hwrm_set_rx_mask(), and bp.
int bnxt_hwrm_run | ( | hwrm_func_t | cmds[], |
struct bnxt * | bp | ||
) |
Definition at line 2113 of file bnxt.c.
References bp, DBGP, memset(), REQ_BUFFER_SIZE, RESP_BUFFER_SIZE, STATUS_FAILURE, and STATUS_SUCCESS.
|
static |
Definition at line 2135 of file bnxt.c.
References bnxt_mm_nic(), bnxt_up_nic, bp, DBGP, bnxt::dev, and net_device::priv.
Definition at line 2144 of file bnxt.c.
References bnxt_add_vlan(), bnxt_get_pkt_vlan(), bp, io_buffer::data, dbg_tx_pad, dbg_tx_vlan, ETH_ZLEN, iob_len(), and iob_pad().
Referenced by bnxt_tx().
|
static |
Definition at line 2160 of file bnxt.c.
References bnxt_db_tx(), bnxt_set_txq(), bnxt_tx_adjust_pkt(), bnxt_tx_avail(), bp, io_buffer::data, DBGP, bnxt::dev, dump_tx_pkt, ENOBUFS, iob_len(), len, mb(), NEXT_IDX, net_device::priv, and virt_to_bus().
|
static |
Definition at line 2270 of file bnxt.c.
References BD_NOW, bnxt_adv_nq_index(), bnxt_db_nq(), BNXT_FLAG_IS_CHIP_P5_PLUS, bnxt_link_evt(), bp, CMPL_BASE_TYPE_HWRM_ASYNC_EVENT, bnxt::dev, done, dump_evt, dump_nq, FLAG_TEST, NO_MORE_NQ_BD_TO_SERVICE, NQ_CN_TOGGLE_MASK, NQ_CN_TOGGLE_SFT, NQ_CN_TYPE_CQ_NOTIFICATION, NQ_CN_TYPE_MASK, NQ_CN_V, net_device::priv, SERVICE_NEXT_NQ_BD, nq_base::type, and nq_base::v.
Referenced by bnxt_poll().
|
static |
|
static |
Definition at line 2316 of file bnxt.c.
References bnxt_down_nic, bnxt_down_pci(), bnxt_pci_base(), bp, DBGP, bnxt::dev, PCI_BASE_ADDRESS_0, PCI_BASE_ADDRESS_2, PCI_BASE_ADDRESS_4, and net_device::priv.
|
static |
Definition at line 2340 of file bnxt.c.
References adjust_pci_device(), alloc_etherdev(), bnxt_alloc_mem(), bnxt_down_chip, bnxt_down_pci(), bnxt_free_mem(), bnxt_get_pci_info(), bnxt_netdev_ops, bnxt_up_chip, bp, DBGP, pci_device::dev, net_device::dev, ENOMEM, memset(), netdev, netdev_init(), netdev_nullify(), netdev_put(), NULL, pci_set_drvdata(), net_device::priv, and register_netdev().
|
static |
Definition at line 2410 of file bnxt.c.
References bnxt_down_chip, bnxt_down_pci(), bnxt_free_mem(), bp, DBGP, netdev, netdev_nullify(), netdev_put(), pci_get_drvdata(), net_device::priv, and unregister_netdev().
|
static |
hwrm_func_t bring_down_chip[] |
hwrm_func_t bring_down_nic[] |
hwrm_func_t bring_up_chip[] |
hwrm_func_t bring_up_nic[] |
|
static |
Definition at line 2333 of file bnxt.c.
Referenced by bnxt_init_one().
struct pci_driver bnxt_pci_driver __pci_driver |