iPXE
Data Structures | Macros | Enumerations | Functions | Variables
vxge_config.h File Reference
#include <stdint.h>
#include <ipxe/list.h>
#include <ipxe/pci.h>

Go to the source code of this file.

Data Structures

struct  vxge_hw_ring_rxd_1
 struct vxge_hw_ring_rxd_1 - One buffer mode RxD for ring More...
 
struct  vxge_hw_fifo_txd
 struct vxge_hw_fifo_txd - Transmit Descriptor More...
 
struct  vxge_hw_device_date
 
struct  vxge_hw_device_version
 
struct  __vxge_hw_non_offload_db_wrapper
 
struct  __vxge_hw_fifo
 
struct  __vxge_hw_ring_block
 
struct  __vxge_hw_ring
 
struct  __vxge_hw_virtualpath
 
struct  vxge_hw_device_hw_info
 struct vxge_hw_device_hw_info - Device information @host_type: Host Type @func_id: Function Id @vpath_mask: vpath bit mask @fw_version: Firmware version @fw_date: Firmware Date @flash_version: Firmware version @flash_date: Firmware Date @mac_addrs: Mac addresses for each vpath @mac_addr_masks: Mac address masks for each vpath More...
 
struct  __vxge_hw_device
 struct __vxge_hw_device - Hal device object @magic: Magic Number @bar0: BAR0 virtual address. More...
 

Macros

#define VXGE_CONFIG_H
 
#define VXGE_CACHE_LINE_SIZE   4096
 
#define WAIT_FACTOR   1
 
#define VXGE_HW_MAC_MAX_WIRE_PORTS   2
 
#define VXGE_HW_MAC_MAX_AGGR_PORTS   2
 
#define VXGE_HW_MAC_MAX_PORTS   3
 
#define VXGE_HW_MIN_MTU   68
 
#define VXGE_HW_MAX_MTU   9600
 
#define VXGE_HW_DEFAULT_MTU   1500
 
#define __iomem
 
#define ____cacheline_aligned
 
#define VXGE_NONE   0x00
 debug filtering masks More...
 
#define VXGE_INFO   0x01
 
#define VXGE_INTR   0x02
 
#define VXGE_XMIT   0x04
 
#define VXGE_POLL   0x08
 
#define VXGE_ERR   0x10
 
#define VXGE_TRACE   0x20
 
#define VXGE_ALL
 
#define NULL_VPID   0xFFFFFFFF
 
#define VXGE_HW_EVENT_BASE   0
 
#define VXGE_LL_EVENT_BASE   100
 
#define VXGE_HW_BASE_INF   100
 
#define VXGE_HW_BASE_ERR   200
 
#define VXGE_HW_BASE_BADCFG   300
 
#define VXGE_HW_DEF_DEVICE_POLL_MILLIS   1000
 
#define VXGE_HW_MAX_PAYLOAD_SIZE_512   2
 
#define VXGE_HW_RING_RXD_RTH_BUCKET_GET(ctrl0)   vxge_bVALn(ctrl0, 0, 7)
 
#define VXGE_HW_RING_RXD_LIST_OWN_ADAPTER   vxge_mBIT(7)
 
#define VXGE_HW_RING_RXD_FAST_PATH_ELIGIBLE_GET(ctrl0)   vxge_bVALn(ctrl0, 8, 1)
 
#define VXGE_HW_RING_RXD_L3_CKSUM_CORRECT_GET(ctrl0)   vxge_bVALn(ctrl0, 9, 1)
 
#define VXGE_HW_RING_RXD_L4_CKSUM_CORRECT_GET(ctrl0)   vxge_bVALn(ctrl0, 10, 1)
 
#define VXGE_HW_RING_RXD_T_CODE_GET(ctrl0)   vxge_bVALn(ctrl0, 12, 4)
 
#define VXGE_HW_RING_RXD_T_CODE(val)   vxge_vBIT(val, 12, 4)
 
#define VXGE_HW_RING_RXD_T_CODE_UNUSED   VXGE_HW_RING_T_CODE_UNUSED
 
#define VXGE_HW_RING_RXD_SYN_GET(ctrl0)   vxge_bVALn(ctrl0, 16, 1)
 
#define VXGE_HW_RING_RXD_IS_ICMP_GET(ctrl0)   vxge_bVALn(ctrl0, 17, 1)
 
#define VXGE_HW_RING_RXD_RTH_SPDM_HIT_GET(ctrl0)   vxge_bVALn(ctrl0, 18, 1)
 
#define VXGE_HW_RING_RXD_RTH_IT_HIT_GET(ctrl0)   vxge_bVALn(ctrl0, 19, 1)
 
#define VXGE_HW_RING_RXD_RTH_HASH_TYPE_GET(ctrl0)   vxge_bVALn(ctrl0, 20, 4)
 
#define VXGE_HW_RING_RXD_IS_VLAN_GET(ctrl0)   vxge_bVALn(ctrl0, 24, 1)
 
#define VXGE_HW_RING_RXD_ETHER_ENCAP_GET(ctrl0)   vxge_bVALn(ctrl0, 25, 2)
 
#define VXGE_HW_RING_RXD_FRAME_PROTO_GET(ctrl0)   vxge_bVALn(ctrl0, 27, 5)
 
#define VXGE_HW_RING_RXD_L3_CKSUM_GET(ctrl0)   vxge_bVALn(ctrl0, 32, 16)
 
#define VXGE_HW_RING_RXD_L4_CKSUM_GET(ctrl0)   vxge_bVALn(ctrl0, 48, 16)
 
#define VXGE_HW_RING_RXD_1_BUFFER0_SIZE_GET(ctrl1)   vxge_bVALn(ctrl1, 2, 14)
 
#define VXGE_HW_RING_RXD_1_BUFFER0_SIZE(val)   vxge_vBIT(val, 2, 14)
 
#define VXGE_HW_RING_RXD_1_BUFFER0_SIZE_MASK   vxge_vBIT(0x3FFF, 2, 14)
 
#define VXGE_HW_RING_RXD_1_RTH_HASH_VAL_GET(ctrl1)   vxge_bVALn(ctrl1, 16, 32)
 
#define VXGE_HW_RING_RXD_VLAN_TAG_GET(ctrl1)   vxge_bVALn(ctrl1, 48, 16)
 
#define VXGE_HW_FIFO_TXD_LIST_OWN_ADAPTER   vxge_mBIT(7)
 
#define VXGE_HW_FIFO_TXD_T_CODE_GET(ctrl0)   vxge_bVALn(ctrl0, 12, 4)
 
#define VXGE_HW_FIFO_TXD_T_CODE(val)   vxge_vBIT(val, 12, 4)
 
#define VXGE_HW_FIFO_TXD_T_CODE_UNUSED   VXGE_HW_FIFO_T_CODE_UNUSED
 
#define VXGE_HW_FIFO_TXD_GATHER_CODE(val)   vxge_vBIT(val, 22, 2)
 
#define VXGE_HW_FIFO_TXD_GATHER_CODE_FIRST   VXGE_HW_FIFO_GATHER_CODE_FIRST
 
#define VXGE_HW_FIFO_TXD_GATHER_CODE_LAST   VXGE_HW_FIFO_GATHER_CODE_LAST
 
#define VXGE_HW_FIFO_TXD_LSO_EN   vxge_mBIT(30)
 
#define VXGE_HW_FIFO_TXD_LSO_MSS(val)   vxge_vBIT(val, 34, 14)
 
#define VXGE_HW_FIFO_TXD_BUFFER_SIZE(val)   vxge_vBIT(val, 48, 16)
 
#define VXGE_HW_FIFO_TXD_TX_CKO_IPV4_EN   vxge_mBIT(5)
 
#define VXGE_HW_FIFO_TXD_TX_CKO_TCP_EN   vxge_mBIT(6)
 
#define VXGE_HW_FIFO_TXD_TX_CKO_UDP_EN   vxge_mBIT(7)
 
#define VXGE_HW_FIFO_TXD_VLAN_ENABLE   vxge_mBIT(15)
 
#define VXGE_HW_FIFO_TXD_VLAN_TAG(val)   vxge_vBIT(val, 16, 16)
 
#define VXGE_HW_FIFO_TXD_NO_BW_LIMIT   vxge_mBIT(43)
 
#define VXGE_HW_FIFO_TXD_INT_NUMBER(val)   vxge_vBIT(val, 34, 6)
 
#define VXGE_HW_FIFO_TXD_INT_TYPE_PER_LIST   vxge_mBIT(46)
 
#define VXGE_HW_FIFO_TXD_INT_TYPE_UTILZ   vxge_mBIT(47)
 
#define VXGE_HW_FW_STRLEN   32
 struct vxge_hw_device_date - Date Format @day: Day @month: Month @year: Year More...
 
#define VXGE_HW_NODBW_GET_TYPE(ctrl0)   vxge_bVALn(ctrl0, 0, 8)
 
#define VXGE_HW_NODBW_TYPE(val)   vxge_vBIT(val, 0, 8)
 
#define VXGE_HW_NODBW_TYPE_NODBW   0
 
#define VXGE_HW_NODBW_GET_LAST_TXD_NUMBER(ctrl0)   vxge_bVALn(ctrl0, 32, 8)
 
#define VXGE_HW_NODBW_LAST_TXD_NUMBER(val)   vxge_vBIT(val, 32, 8)
 
#define VXGE_HW_NODBW_GET_NO_SNOOP(ctrl0)   vxge_bVALn(ctrl0, 56, 8)
 
#define VXGE_HW_NODBW_LIST_NO_SNOOP(val)   vxge_vBIT(val, 56, 8)
 
#define VXGE_HW_NODBW_LIST_NO_SNOOP_TXD_READ_TXD0_WRITE   0x2
 
#define VXGE_HW_NODBW_LIST_NO_SNOOP_TX_FRAME_DATA_READ   0x1
 
#define VXGE_HW_FIFO_TXD_DEPTH   128
 
#define VXGE_HW_MAX_RXDS_PER_BLOCK_1   127
 
#define END_OF_BLOCK   0xFEFFFFFFFFFFFFFFULL
 
#define VXGE_HW_RING_RXD_QWORDS_MODE_1   4
 
#define VXGE_HW_RING_RXD_QWORD_LIMIT   16
 
#define VXGE_HW_RING_BUF_PER_BLOCK   9
 
#define VXGE_HW_RING_RX_POLL_WEIGHT   8
 
#define VXGE_HW_VP_NOT_OPEN   0
 
#define VXGE_HW_VP_OPEN   1
 
#define VXGE_HW_INFO_LEN   64
 
#define VXGE_HW_PMD_INFO_LEN   16
 
#define VXGE_MAX_PRINT_BUF_SIZE   128
 
#define VXGE_HW_NO_MR_NO_SR_NORMAL_FUNCTION   0
 
#define VXGE_HW_MR_NO_SR_VH0_BASE_FUNCTION   1
 
#define VXGE_HW_NO_MR_SR_VH0_FUNCTION0   2
 
#define VXGE_HW_NO_MR_SR_VH0_VIRTUAL_FUNCTION   3
 
#define VXGE_HW_MR_SR_VH0_INVALID_CONFIG   4
 
#define VXGE_HW_SR_VH_FUNCTION0   5
 
#define VXGE_HW_SR_VH_VIRTUAL_FUNCTION   6
 
#define VXGE_HW_VH_NORMAL_FUNCTION   7
 
#define VXGE_HW_FUNCTION_MODE_MIN   0
 
#define VXGE_HW_FUNCTION_MODE_MAX   11
 
#define VXGE_HW_FUNCTION_MODE_SINGLE_FUNCTION   0
 
#define VXGE_HW_FUNCTION_MODE_MULTI_FUNCTION   1
 
#define VXGE_HW_FUNCTION_MODE_SRIOV   2
 
#define VXGE_HW_FUNCTION_MODE_MRIOV   3
 
#define VXGE_HW_FUNCTION_MODE_MRIOV_8   4
 
#define VXGE_HW_FUNCTION_MODE_MULTI_FUNCTION_17   5
 
#define VXGE_HW_FUNCTION_MODE_SRIOV_8   6
 
#define VXGE_HW_FUNCTION_MODE_SRIOV_4   7
 
#define VXGE_HW_FUNCTION_MODE_MULTI_FUNCTION_2   8
 
#define VXGE_HW_FUNCTION_MODE_MULTI_FUNCTION_4   9
 
#define VXGE_HW_FUNCTION_MODE_MRIOV_4   10
 
#define VXGE_HW_FUNCTION_MODE_MULTI_FUNCTION_DIRECT_IO   11
 
#define VXGE_HW_DEVICE_MAGIC   0x12345678
 
#define VXGE_HW_DEVICE_DEAD   0xDEADDEAD
 
#define VXGE_HW_DEVICE_ACCESS_RIGHT_VPATH   0x1
 
#define VXGE_HW_DEVICE_ACCESS_RIGHT_SRPCIM   0x2
 
#define VXGE_HW_DEVICE_ACCESS_RIGHT_MRPCIM   0x4
 
#define VXGE_HW_DEVICE_LINK_STATE_SET(hldev, ls)   (hldev->link_state = ls)
 
#define VXGE_HW_DEVICE_TIM_INT_MASK_SET(m0, m1, i)
 
#define VXGE_HW_DEVICE_TIM_INT_MASK_RESET(m0, m1, i)
 
#define vxge_debug(mask, fmt...)
 
#define vxge_trace()   vxge_debug(VXGE_TRACE, "%s:%d\n", __func__, __LINE__);
 

Enumerations

enum  vxge_hw_status {
  VXGE_HW_OK = 0, VXGE_HW_FAIL = 1, VXGE_HW_PENDING = 2, VXGE_HW_COMPLETIONS_REMAIN = 3,
  VXGE_HW_INF_NO_MORE_COMPLETED_DESCRIPTORS = VXGE_HW_BASE_INF + 1, VXGE_HW_INF_OUT_OF_DESCRIPTORS = VXGE_HW_BASE_INF + 2, VXGE_HW_INF_SW_LRO_BEGIN = VXGE_HW_BASE_INF + 3, VXGE_HW_INF_SW_LRO_CONT = VXGE_HW_BASE_INF + 4,
  VXGE_HW_INF_SW_LRO_UNCAPABLE = VXGE_HW_BASE_INF + 5, VXGE_HW_INF_SW_LRO_FLUSH_SESSION = VXGE_HW_BASE_INF + 6, VXGE_HW_INF_SW_LRO_FLUSH_BOTH = VXGE_HW_BASE_INF + 7, VXGE_HW_ERR_INVALID_HANDLE = VXGE_HW_BASE_ERR + 1,
  VXGE_HW_ERR_OUT_OF_MEMORY = VXGE_HW_BASE_ERR + 2, VXGE_HW_ERR_VPATH_NOT_AVAILABLE = VXGE_HW_BASE_ERR + 3, VXGE_HW_ERR_VPATH_NOT_OPEN = VXGE_HW_BASE_ERR + 4, VXGE_HW_ERR_WRONG_IRQ = VXGE_HW_BASE_ERR + 5,
  VXGE_HW_ERR_SWAPPER_CTRL = VXGE_HW_BASE_ERR + 6, VXGE_HW_ERR_INVALID_MTU_SIZE = VXGE_HW_BASE_ERR + 7, VXGE_HW_ERR_INVALID_INDEX = VXGE_HW_BASE_ERR + 8, VXGE_HW_ERR_INVALID_TYPE = VXGE_HW_BASE_ERR + 9,
  VXGE_HW_ERR_INVALID_OFFSET = VXGE_HW_BASE_ERR + 10, VXGE_HW_ERR_INVALID_DEVICE = VXGE_HW_BASE_ERR + 11, VXGE_HW_ERR_VERSION_CONFLICT = VXGE_HW_BASE_ERR + 12, VXGE_HW_ERR_INVALID_PCI_INFO = VXGE_HW_BASE_ERR + 13,
  VXGE_HW_ERR_INVALID_TCODE = VXGE_HW_BASE_ERR + 14, VXGE_HW_ERR_INVALID_BLOCK_SIZE = VXGE_HW_BASE_ERR + 15, VXGE_HW_ERR_INVALID_STATE = VXGE_HW_BASE_ERR + 16, VXGE_HW_ERR_PRIVILAGED_OPEARATION = VXGE_HW_BASE_ERR + 17,
  VXGE_HW_ERR_INVALID_PORT = VXGE_HW_BASE_ERR + 18, VXGE_HW_ERR_FIFO = VXGE_HW_BASE_ERR + 19, VXGE_HW_ERR_VPATH = VXGE_HW_BASE_ERR + 20, VXGE_HW_ERR_CRITICAL = VXGE_HW_BASE_ERR + 21,
  VXGE_HW_ERR_SLOT_FREEZE = VXGE_HW_BASE_ERR + 22, VXGE_HW_ERR_INVALID_MIN_BANDWIDTH = VXGE_HW_BASE_ERR + 25, VXGE_HW_ERR_INVALID_MAX_BANDWIDTH = VXGE_HW_BASE_ERR + 26, VXGE_HW_ERR_INVALID_TOTAL_BANDWIDTH = VXGE_HW_BASE_ERR + 27,
  VXGE_HW_ERR_INVALID_BANDWIDTH_LIMIT = VXGE_HW_BASE_ERR + 28, VXGE_HW_ERR_RESET_IN_PROGRESS = VXGE_HW_BASE_ERR + 29, VXGE_HW_ERR_OUT_OF_SPACE = VXGE_HW_BASE_ERR + 30, VXGE_HW_ERR_INVALID_FUNC_MODE = VXGE_HW_BASE_ERR + 31,
  VXGE_HW_ERR_INVALID_DP_MODE = VXGE_HW_BASE_ERR + 32, VXGE_HW_ERR_INVALID_FAILURE_BEHAVIOUR = VXGE_HW_BASE_ERR + 33, VXGE_HW_ERR_INVALID_L2_SWITCH_STATE = VXGE_HW_BASE_ERR + 34, VXGE_HW_ERR_INVALID_CATCH_BASIN_MODE = VXGE_HW_BASE_ERR + 35,
  VXGE_HW_BADCFG_RING_INDICATE_MAX_PKTS = VXGE_HW_BASE_BADCFG + 1, VXGE_HW_BADCFG_FIFO_BLOCKS = VXGE_HW_BASE_BADCFG + 2, VXGE_HW_BADCFG_VPATH_MTU = VXGE_HW_BASE_BADCFG + 3, VXGE_HW_BADCFG_VPATH_RPA_STRIP_VLAN_TAG = VXGE_HW_BASE_BADCFG + 4,
  VXGE_HW_BADCFG_VPATH_MIN_BANDWIDTH = VXGE_HW_BASE_BADCFG + 5, VXGE_HW_BADCFG_VPATH_BANDWIDTH_LIMIT = VXGE_HW_BASE_BADCFG + 6, VXGE_HW_BADCFG_INTR_MODE = VXGE_HW_BASE_BADCFG + 7, VXGE_HW_BADCFG_RTS_MAC_EN = VXGE_HW_BASE_BADCFG + 8,
  VXGE_HW_BADCFG_VPATH_AGGR_ACK = VXGE_HW_BASE_BADCFG + 9, VXGE_HW_BADCFG_VPATH_PRIORITY = VXGE_HW_BASE_BADCFG + 10, VXGE_HW_EOF_TRACE_BUF = -1
}
 
enum  vxge_hw_device_link_state { VXGE_HW_LINK_NONE, VXGE_HW_LINK_DOWN, VXGE_HW_LINK_UP }
 enum enum vxge_hw_device_link_state - Link state enumeration. More...
 
enum  vxge_hw_txdl_state { VXGE_HW_TXDL_STATE_NONE = 0, VXGE_HW_TXDL_STATE_AVAIL = 1, VXGE_HW_TXDL_STATE_POSTED = 2, VXGE_HW_TXDL_STATE_FREED = 3 }
 enum enum vxge_hw_txdl_state - Descriptor (TXDL) state. More...
 

Functions

 FILE_LICENCE (GPL2_ONLY)
 
u64 __vxge_hw_vpath_pci_func_mode_get (u32 vp_id, struct vxge_hw_vpath_reg __iomem *vpath_reg)
 
static void __vxge_hw_desc_offset_up (u16 upper_limit, u16 *offset)
 
static void vxge_hw_ring_rxd_offset_up (u16 *offset)
 
static void vxge_hw_fifo_txd_offset_up (u16 *offset)
 
static void vxge_hw_ring_rxd_1b_set (struct vxge_hw_ring_rxd_1 *rxdp, struct io_buffer *iob, u32 size)
 vxge_hw_ring_rxd_1b_set - Prepare 1-buffer-mode descriptor. More...
 
enum vxge_hw_status vxge_hw_device_hw_info_get (struct pci_device *pdev, void __iomem *bar0, struct vxge_hw_device_hw_info *hw_info)
 vxge_hw_device_hw_info_get - Get the hw information Returns the vpath mask that has the bits set for each vpath allocated for the driver, FW version information and the first mac addresse for each vpath More...
 
enum vxge_hw_status __vxge_hw_vpath_fw_ver_get (struct vxge_hw_vpath_reg __iomem *vpath_reg, struct vxge_hw_device_hw_info *hw_info)
 
enum vxge_hw_status __vxge_hw_vpath_card_info_get (struct vxge_hw_vpath_reg __iomem *vpath_reg, struct vxge_hw_device_hw_info *hw_info)
 
static enum vxge_hw_device_link_state vxge_hw_device_link_state_get (struct __vxge_hw_device *devh)
 vxge_hw_device_link_state_get - Get link state. More...
 
void vxge_hw_device_terminate (struct __vxge_hw_device *devh)
 
enum vxge_hw_status vxge_hw_device_initialize (struct __vxge_hw_device **devh, void *bar0, struct pci_device *pdev, u8 titan1)
 
enum vxge_hw_status vxge_hw_vpath_open (struct __vxge_hw_device *hldev, struct vxge_vpath *vpath)
 
enum vxge_hw_status __vxge_hw_device_vpath_reset_in_prog_check (u64 __iomem *vpath_rst_in_prog)
 
enum vxge_hw_status vxge_hw_vpath_close (struct __vxge_hw_virtualpath *vpath)
 
enum vxge_hw_status vxge_hw_vpath_reset (struct __vxge_hw_virtualpath *vpath)
 
enum vxge_hw_status vxge_hw_vpath_recover_from_reset (struct __vxge_hw_virtualpath *vpath)
 
void vxge_hw_vpath_enable (struct __vxge_hw_virtualpath *vpath)
 
enum vxge_hw_status vxge_hw_vpath_mtu_set (struct __vxge_hw_virtualpath *vpath, u32 new_mtu)
 
void vxge_hw_vpath_rx_doorbell_init (struct __vxge_hw_virtualpath *vpath)
 
void __vxge_hw_device_pci_e_init (struct __vxge_hw_device *hldev)
 
enum vxge_hw_status __vxge_hw_legacy_swapper_set (struct vxge_hw_legacy_reg __iomem *legacy_reg)
 
enum vxge_hw_status __vxge_hw_vpath_swapper_set (struct vxge_hw_vpath_reg __iomem *vpath_reg)
 
enum vxge_hw_status __vxge_hw_kdfc_swapper_set (struct vxge_hw_legacy_reg __iomem *legacy_reg, struct vxge_hw_vpath_reg __iomem *vpath_reg)
 
enum vxge_hw_status __vxge_hw_device_register_poll (void __iomem *reg, u64 mask, u32 max_millis)
 
static void __vxge_hw_pio_mem_write32_upper (u32 val, void __iomem *addr)
 
static void __vxge_hw_pio_mem_write32_lower (u32 val, void __iomem *addr)
 
static enum vxge_hw_status __vxge_hw_pio_mem_write64 (u64 val64, void __iomem *addr, u64 mask, u32 max_millis)
 
void __vxge_hw_device_host_info_get (struct __vxge_hw_device *hldev)
 
enum vxge_hw_status __vxge_hw_device_initialize (struct __vxge_hw_device *hldev)
 
enum vxge_hw_status __vxge_hw_vpath_pci_read (struct __vxge_hw_virtualpath *vpath, u32 phy_func_0, u32 offset, u32 *val)
 
enum vxge_hw_status __vxge_hw_vpath_addr_get (struct vxge_hw_vpath_reg __iomem *vpath_reg, u8(macaddr)[ETH_ALEN], u8(macaddr_mask)[ETH_ALEN])
 
u32 __vxge_hw_vpath_func_id_get (struct vxge_hw_vpmgmt_reg __iomem *vpmgmt_reg)
 
enum vxge_hw_status __vxge_hw_vpath_reset_check (struct __vxge_hw_virtualpath *vpath)
 
enum vxge_hw_status vxge_hw_vpath_strip_fcs_check (struct __vxge_hw_device *hldev, u64 vpath_mask)
 
enum vxge_hw_status vxge_hw_get_func_mode (struct __vxge_hw_device *hldev, u32 *func_mode)
 
enum vxge_hw_status vxge_hw_set_fw_api (struct __vxge_hw_device *hldev, u64 vp_id, u32 action, u32 offset, u64 data0, u64 data1)
 
void vxge_hw_vpath_set_zero_rx_frm_len (struct __vxge_hw_device *hldev)
 

Variables

static const u16 debug_filter = VXGE_ERR
 vxge_debug @mask: mask for the debug @fmt: printf like format string More...
 

Macro Definition Documentation

◆ VXGE_CONFIG_H

#define VXGE_CONFIG_H

Definition at line 18 of file vxge_config.h.

◆ VXGE_CACHE_LINE_SIZE

#define VXGE_CACHE_LINE_SIZE   4096

Definition at line 25 of file vxge_config.h.

◆ WAIT_FACTOR

#define WAIT_FACTOR   1

Definition at line 28 of file vxge_config.h.

◆ VXGE_HW_MAC_MAX_WIRE_PORTS

#define VXGE_HW_MAC_MAX_WIRE_PORTS   2

Definition at line 30 of file vxge_config.h.

◆ VXGE_HW_MAC_MAX_AGGR_PORTS

#define VXGE_HW_MAC_MAX_AGGR_PORTS   2

Definition at line 31 of file vxge_config.h.

◆ VXGE_HW_MAC_MAX_PORTS

#define VXGE_HW_MAC_MAX_PORTS   3

Definition at line 32 of file vxge_config.h.

◆ VXGE_HW_MIN_MTU

#define VXGE_HW_MIN_MTU   68

Definition at line 34 of file vxge_config.h.

◆ VXGE_HW_MAX_MTU

#define VXGE_HW_MAX_MTU   9600

Definition at line 35 of file vxge_config.h.

◆ VXGE_HW_DEFAULT_MTU

#define VXGE_HW_DEFAULT_MTU   1500

Definition at line 36 of file vxge_config.h.

◆ __iomem

#define __iomem

Definition at line 39 of file vxge_config.h.

◆ ____cacheline_aligned

#define ____cacheline_aligned

Definition at line 43 of file vxge_config.h.

◆ VXGE_NONE

#define VXGE_NONE   0x00

debug filtering masks

Definition at line 49 of file vxge_config.h.

◆ VXGE_INFO

#define VXGE_INFO   0x01

Definition at line 50 of file vxge_config.h.

◆ VXGE_INTR

#define VXGE_INTR   0x02

Definition at line 51 of file vxge_config.h.

◆ VXGE_XMIT

#define VXGE_XMIT   0x04

Definition at line 52 of file vxge_config.h.

◆ VXGE_POLL

#define VXGE_POLL   0x08

Definition at line 53 of file vxge_config.h.

◆ VXGE_ERR

#define VXGE_ERR   0x10

Definition at line 54 of file vxge_config.h.

◆ VXGE_TRACE

#define VXGE_TRACE   0x20

Definition at line 55 of file vxge_config.h.

◆ VXGE_ALL

#define VXGE_ALL
Value:
#define VXGE_XMIT
Definition: vxge_config.h:52
#define VXGE_INFO
Definition: vxge_config.h:50
#define VXGE_POLL
Definition: vxge_config.h:53
#define VXGE_INTR
Definition: vxge_config.h:51
#define VXGE_TRACE
Definition: vxge_config.h:55
#define VXGE_ERR
Definition: vxge_config.h:54

Definition at line 56 of file vxge_config.h.

◆ NULL_VPID

#define NULL_VPID   0xFFFFFFFF

Definition at line 59 of file vxge_config.h.

◆ VXGE_HW_EVENT_BASE

#define VXGE_HW_EVENT_BASE   0

Definition at line 61 of file vxge_config.h.

◆ VXGE_LL_EVENT_BASE

#define VXGE_LL_EVENT_BASE   100

Definition at line 62 of file vxge_config.h.

◆ VXGE_HW_BASE_INF

#define VXGE_HW_BASE_INF   100

Definition at line 64 of file vxge_config.h.

◆ VXGE_HW_BASE_ERR

#define VXGE_HW_BASE_ERR   200

Definition at line 65 of file vxge_config.h.

◆ VXGE_HW_BASE_BADCFG

#define VXGE_HW_BASE_BADCFG   300

Definition at line 66 of file vxge_config.h.

◆ VXGE_HW_DEF_DEVICE_POLL_MILLIS

#define VXGE_HW_DEF_DEVICE_POLL_MILLIS   1000

Definition at line 67 of file vxge_config.h.

◆ VXGE_HW_MAX_PAYLOAD_SIZE_512

#define VXGE_HW_MAX_PAYLOAD_SIZE_512   2

Definition at line 68 of file vxge_config.h.

◆ VXGE_HW_RING_RXD_RTH_BUCKET_GET

#define VXGE_HW_RING_RXD_RTH_BUCKET_GET (   ctrl0)    vxge_bVALn(ctrl0, 0, 7)

Definition at line 157 of file vxge_config.h.

◆ VXGE_HW_RING_RXD_LIST_OWN_ADAPTER

#define VXGE_HW_RING_RXD_LIST_OWN_ADAPTER   vxge_mBIT(7)

Definition at line 159 of file vxge_config.h.

◆ VXGE_HW_RING_RXD_FAST_PATH_ELIGIBLE_GET

#define VXGE_HW_RING_RXD_FAST_PATH_ELIGIBLE_GET (   ctrl0)    vxge_bVALn(ctrl0, 8, 1)

Definition at line 161 of file vxge_config.h.

◆ VXGE_HW_RING_RXD_L3_CKSUM_CORRECT_GET

#define VXGE_HW_RING_RXD_L3_CKSUM_CORRECT_GET (   ctrl0)    vxge_bVALn(ctrl0, 9, 1)

Definition at line 163 of file vxge_config.h.

◆ VXGE_HW_RING_RXD_L4_CKSUM_CORRECT_GET

#define VXGE_HW_RING_RXD_L4_CKSUM_CORRECT_GET (   ctrl0)    vxge_bVALn(ctrl0, 10, 1)

Definition at line 165 of file vxge_config.h.

◆ VXGE_HW_RING_RXD_T_CODE_GET

#define VXGE_HW_RING_RXD_T_CODE_GET (   ctrl0)    vxge_bVALn(ctrl0, 12, 4)

Definition at line 167 of file vxge_config.h.

◆ VXGE_HW_RING_RXD_T_CODE

#define VXGE_HW_RING_RXD_T_CODE (   val)    vxge_vBIT(val, 12, 4)

Definition at line 168 of file vxge_config.h.

◆ VXGE_HW_RING_RXD_T_CODE_UNUSED

#define VXGE_HW_RING_RXD_T_CODE_UNUSED   VXGE_HW_RING_T_CODE_UNUSED

Definition at line 170 of file vxge_config.h.

◆ VXGE_HW_RING_RXD_SYN_GET

#define VXGE_HW_RING_RXD_SYN_GET (   ctrl0)    vxge_bVALn(ctrl0, 16, 1)

Definition at line 172 of file vxge_config.h.

◆ VXGE_HW_RING_RXD_IS_ICMP_GET

#define VXGE_HW_RING_RXD_IS_ICMP_GET (   ctrl0)    vxge_bVALn(ctrl0, 17, 1)

Definition at line 174 of file vxge_config.h.

◆ VXGE_HW_RING_RXD_RTH_SPDM_HIT_GET

#define VXGE_HW_RING_RXD_RTH_SPDM_HIT_GET (   ctrl0)    vxge_bVALn(ctrl0, 18, 1)

Definition at line 176 of file vxge_config.h.

◆ VXGE_HW_RING_RXD_RTH_IT_HIT_GET

#define VXGE_HW_RING_RXD_RTH_IT_HIT_GET (   ctrl0)    vxge_bVALn(ctrl0, 19, 1)

Definition at line 178 of file vxge_config.h.

◆ VXGE_HW_RING_RXD_RTH_HASH_TYPE_GET

#define VXGE_HW_RING_RXD_RTH_HASH_TYPE_GET (   ctrl0)    vxge_bVALn(ctrl0, 20, 4)

Definition at line 180 of file vxge_config.h.

◆ VXGE_HW_RING_RXD_IS_VLAN_GET

#define VXGE_HW_RING_RXD_IS_VLAN_GET (   ctrl0)    vxge_bVALn(ctrl0, 24, 1)

Definition at line 182 of file vxge_config.h.

◆ VXGE_HW_RING_RXD_ETHER_ENCAP_GET

#define VXGE_HW_RING_RXD_ETHER_ENCAP_GET (   ctrl0)    vxge_bVALn(ctrl0, 25, 2)

Definition at line 184 of file vxge_config.h.

◆ VXGE_HW_RING_RXD_FRAME_PROTO_GET

#define VXGE_HW_RING_RXD_FRAME_PROTO_GET (   ctrl0)    vxge_bVALn(ctrl0, 27, 5)

Definition at line 186 of file vxge_config.h.

◆ VXGE_HW_RING_RXD_L3_CKSUM_GET

#define VXGE_HW_RING_RXD_L3_CKSUM_GET (   ctrl0)    vxge_bVALn(ctrl0, 32, 16)

Definition at line 188 of file vxge_config.h.

◆ VXGE_HW_RING_RXD_L4_CKSUM_GET

#define VXGE_HW_RING_RXD_L4_CKSUM_GET (   ctrl0)    vxge_bVALn(ctrl0, 48, 16)

Definition at line 190 of file vxge_config.h.

◆ VXGE_HW_RING_RXD_1_BUFFER0_SIZE_GET

#define VXGE_HW_RING_RXD_1_BUFFER0_SIZE_GET (   ctrl1)    vxge_bVALn(ctrl1, 2, 14)

Definition at line 194 of file vxge_config.h.

◆ VXGE_HW_RING_RXD_1_BUFFER0_SIZE

#define VXGE_HW_RING_RXD_1_BUFFER0_SIZE (   val)    vxge_vBIT(val, 2, 14)

Definition at line 195 of file vxge_config.h.

◆ VXGE_HW_RING_RXD_1_BUFFER0_SIZE_MASK

#define VXGE_HW_RING_RXD_1_BUFFER0_SIZE_MASK   vxge_vBIT(0x3FFF, 2, 14)

Definition at line 196 of file vxge_config.h.

◆ VXGE_HW_RING_RXD_1_RTH_HASH_VAL_GET

#define VXGE_HW_RING_RXD_1_RTH_HASH_VAL_GET (   ctrl1)    vxge_bVALn(ctrl1, 16, 32)

Definition at line 198 of file vxge_config.h.

◆ VXGE_HW_RING_RXD_VLAN_TAG_GET

#define VXGE_HW_RING_RXD_VLAN_TAG_GET (   ctrl1)    vxge_bVALn(ctrl1, 48, 16)

Definition at line 200 of file vxge_config.h.

◆ VXGE_HW_FIFO_TXD_LIST_OWN_ADAPTER

#define VXGE_HW_FIFO_TXD_LIST_OWN_ADAPTER   vxge_mBIT(7)

Definition at line 214 of file vxge_config.h.

◆ VXGE_HW_FIFO_TXD_T_CODE_GET

#define VXGE_HW_FIFO_TXD_T_CODE_GET (   ctrl0)    vxge_bVALn(ctrl0, 12, 4)

Definition at line 216 of file vxge_config.h.

◆ VXGE_HW_FIFO_TXD_T_CODE

#define VXGE_HW_FIFO_TXD_T_CODE (   val)    vxge_vBIT(val, 12, 4)

Definition at line 217 of file vxge_config.h.

◆ VXGE_HW_FIFO_TXD_T_CODE_UNUSED

#define VXGE_HW_FIFO_TXD_T_CODE_UNUSED   VXGE_HW_FIFO_T_CODE_UNUSED

Definition at line 218 of file vxge_config.h.

◆ VXGE_HW_FIFO_TXD_GATHER_CODE

#define VXGE_HW_FIFO_TXD_GATHER_CODE (   val)    vxge_vBIT(val, 22, 2)

Definition at line 220 of file vxge_config.h.

◆ VXGE_HW_FIFO_TXD_GATHER_CODE_FIRST

#define VXGE_HW_FIFO_TXD_GATHER_CODE_FIRST   VXGE_HW_FIFO_GATHER_CODE_FIRST

Definition at line 221 of file vxge_config.h.

◆ VXGE_HW_FIFO_TXD_GATHER_CODE_LAST

#define VXGE_HW_FIFO_TXD_GATHER_CODE_LAST   VXGE_HW_FIFO_GATHER_CODE_LAST

Definition at line 222 of file vxge_config.h.

◆ VXGE_HW_FIFO_TXD_LSO_EN

#define VXGE_HW_FIFO_TXD_LSO_EN   vxge_mBIT(30)

Definition at line 224 of file vxge_config.h.

◆ VXGE_HW_FIFO_TXD_LSO_MSS

#define VXGE_HW_FIFO_TXD_LSO_MSS (   val)    vxge_vBIT(val, 34, 14)

Definition at line 225 of file vxge_config.h.

◆ VXGE_HW_FIFO_TXD_BUFFER_SIZE

#define VXGE_HW_FIFO_TXD_BUFFER_SIZE (   val)    vxge_vBIT(val, 48, 16)

Definition at line 226 of file vxge_config.h.

◆ VXGE_HW_FIFO_TXD_TX_CKO_IPV4_EN

#define VXGE_HW_FIFO_TXD_TX_CKO_IPV4_EN   vxge_mBIT(5)

Definition at line 229 of file vxge_config.h.

◆ VXGE_HW_FIFO_TXD_TX_CKO_TCP_EN

#define VXGE_HW_FIFO_TXD_TX_CKO_TCP_EN   vxge_mBIT(6)

Definition at line 230 of file vxge_config.h.

◆ VXGE_HW_FIFO_TXD_TX_CKO_UDP_EN

#define VXGE_HW_FIFO_TXD_TX_CKO_UDP_EN   vxge_mBIT(7)

Definition at line 231 of file vxge_config.h.

◆ VXGE_HW_FIFO_TXD_VLAN_ENABLE

#define VXGE_HW_FIFO_TXD_VLAN_ENABLE   vxge_mBIT(15)

Definition at line 232 of file vxge_config.h.

◆ VXGE_HW_FIFO_TXD_VLAN_TAG

#define VXGE_HW_FIFO_TXD_VLAN_TAG (   val)    vxge_vBIT(val, 16, 16)

Definition at line 234 of file vxge_config.h.

◆ VXGE_HW_FIFO_TXD_NO_BW_LIMIT

#define VXGE_HW_FIFO_TXD_NO_BW_LIMIT   vxge_mBIT(43)

Definition at line 235 of file vxge_config.h.

◆ VXGE_HW_FIFO_TXD_INT_NUMBER

#define VXGE_HW_FIFO_TXD_INT_NUMBER (   val)    vxge_vBIT(val, 34, 6)

Definition at line 237 of file vxge_config.h.

◆ VXGE_HW_FIFO_TXD_INT_TYPE_PER_LIST

#define VXGE_HW_FIFO_TXD_INT_TYPE_PER_LIST   vxge_mBIT(46)

Definition at line 239 of file vxge_config.h.

◆ VXGE_HW_FIFO_TXD_INT_TYPE_UTILZ

#define VXGE_HW_FIFO_TXD_INT_TYPE_UTILZ   vxge_mBIT(47)

Definition at line 240 of file vxge_config.h.

◆ VXGE_HW_FW_STRLEN

#define VXGE_HW_FW_STRLEN   32

struct vxge_hw_device_date - Date Format @day: Day @month: Month @year: Year

Date
: Date in string format

Structure for returning date

Definition at line 257 of file vxge_config.h.

◆ VXGE_HW_NODBW_GET_TYPE

#define VXGE_HW_NODBW_GET_TYPE (   ctrl0)    vxge_bVALn(ctrl0, 0, 8)

Definition at line 293 of file vxge_config.h.

◆ VXGE_HW_NODBW_TYPE

#define VXGE_HW_NODBW_TYPE (   val)    vxge_vBIT(val, 0, 8)

Definition at line 294 of file vxge_config.h.

◆ VXGE_HW_NODBW_TYPE_NODBW

#define VXGE_HW_NODBW_TYPE_NODBW   0

Definition at line 295 of file vxge_config.h.

◆ VXGE_HW_NODBW_GET_LAST_TXD_NUMBER

#define VXGE_HW_NODBW_GET_LAST_TXD_NUMBER (   ctrl0)    vxge_bVALn(ctrl0, 32, 8)

Definition at line 297 of file vxge_config.h.

◆ VXGE_HW_NODBW_LAST_TXD_NUMBER

#define VXGE_HW_NODBW_LAST_TXD_NUMBER (   val)    vxge_vBIT(val, 32, 8)

Definition at line 298 of file vxge_config.h.

◆ VXGE_HW_NODBW_GET_NO_SNOOP

#define VXGE_HW_NODBW_GET_NO_SNOOP (   ctrl0)    vxge_bVALn(ctrl0, 56, 8)

Definition at line 300 of file vxge_config.h.

◆ VXGE_HW_NODBW_LIST_NO_SNOOP

#define VXGE_HW_NODBW_LIST_NO_SNOOP (   val)    vxge_vBIT(val, 56, 8)

Definition at line 301 of file vxge_config.h.

◆ VXGE_HW_NODBW_LIST_NO_SNOOP_TXD_READ_TXD0_WRITE

#define VXGE_HW_NODBW_LIST_NO_SNOOP_TXD_READ_TXD0_WRITE   0x2

Definition at line 302 of file vxge_config.h.

◆ VXGE_HW_NODBW_LIST_NO_SNOOP_TX_FRAME_DATA_READ

#define VXGE_HW_NODBW_LIST_NO_SNOOP_TX_FRAME_DATA_READ   0x1

Definition at line 303 of file vxge_config.h.

◆ VXGE_HW_FIFO_TXD_DEPTH

#define VXGE_HW_FIFO_TXD_DEPTH   128

Definition at line 329 of file vxge_config.h.

◆ VXGE_HW_MAX_RXDS_PER_BLOCK_1

#define VXGE_HW_MAX_RXDS_PER_BLOCK_1   127

Definition at line 341 of file vxge_config.h.

◆ END_OF_BLOCK

#define END_OF_BLOCK   0xFEFFFFFFFFFFFFFFULL

Definition at line 345 of file vxge_config.h.

◆ VXGE_HW_RING_RXD_QWORDS_MODE_1

#define VXGE_HW_RING_RXD_QWORDS_MODE_1   4

Definition at line 364 of file vxge_config.h.

◆ VXGE_HW_RING_RXD_QWORD_LIMIT

#define VXGE_HW_RING_RXD_QWORD_LIMIT   16

Definition at line 367 of file vxge_config.h.

◆ VXGE_HW_RING_BUF_PER_BLOCK

#define VXGE_HW_RING_BUF_PER_BLOCK   9

Definition at line 371 of file vxge_config.h.

◆ VXGE_HW_RING_RX_POLL_WEIGHT

#define VXGE_HW_RING_RX_POLL_WEIGHT   8

Definition at line 375 of file vxge_config.h.

◆ VXGE_HW_VP_NOT_OPEN

#define VXGE_HW_VP_NOT_OPEN   0

Definition at line 393 of file vxge_config.h.

◆ VXGE_HW_VP_OPEN

#define VXGE_HW_VP_OPEN   1

Definition at line 394 of file vxge_config.h.

◆ VXGE_HW_INFO_LEN

#define VXGE_HW_INFO_LEN   64

Definition at line 409 of file vxge_config.h.

◆ VXGE_HW_PMD_INFO_LEN

#define VXGE_HW_PMD_INFO_LEN   16

Definition at line 410 of file vxge_config.h.

◆ VXGE_MAX_PRINT_BUF_SIZE

#define VXGE_MAX_PRINT_BUF_SIZE   128

Definition at line 411 of file vxge_config.h.

◆ VXGE_HW_NO_MR_NO_SR_NORMAL_FUNCTION

#define VXGE_HW_NO_MR_NO_SR_NORMAL_FUNCTION   0

Definition at line 429 of file vxge_config.h.

◆ VXGE_HW_MR_NO_SR_VH0_BASE_FUNCTION

#define VXGE_HW_MR_NO_SR_VH0_BASE_FUNCTION   1

Definition at line 430 of file vxge_config.h.

◆ VXGE_HW_NO_MR_SR_VH0_FUNCTION0

#define VXGE_HW_NO_MR_SR_VH0_FUNCTION0   2

Definition at line 431 of file vxge_config.h.

◆ VXGE_HW_NO_MR_SR_VH0_VIRTUAL_FUNCTION

#define VXGE_HW_NO_MR_SR_VH0_VIRTUAL_FUNCTION   3

Definition at line 432 of file vxge_config.h.

◆ VXGE_HW_MR_SR_VH0_INVALID_CONFIG

#define VXGE_HW_MR_SR_VH0_INVALID_CONFIG   4

Definition at line 433 of file vxge_config.h.

◆ VXGE_HW_SR_VH_FUNCTION0

#define VXGE_HW_SR_VH_FUNCTION0   5

Definition at line 434 of file vxge_config.h.

◆ VXGE_HW_SR_VH_VIRTUAL_FUNCTION

#define VXGE_HW_SR_VH_VIRTUAL_FUNCTION   6

Definition at line 435 of file vxge_config.h.

◆ VXGE_HW_VH_NORMAL_FUNCTION

#define VXGE_HW_VH_NORMAL_FUNCTION   7

Definition at line 436 of file vxge_config.h.

◆ VXGE_HW_FUNCTION_MODE_MIN

#define VXGE_HW_FUNCTION_MODE_MIN   0

Definition at line 438 of file vxge_config.h.

◆ VXGE_HW_FUNCTION_MODE_MAX

#define VXGE_HW_FUNCTION_MODE_MAX   11

Definition at line 439 of file vxge_config.h.

◆ VXGE_HW_FUNCTION_MODE_SINGLE_FUNCTION

#define VXGE_HW_FUNCTION_MODE_SINGLE_FUNCTION   0

Definition at line 441 of file vxge_config.h.

◆ VXGE_HW_FUNCTION_MODE_MULTI_FUNCTION

#define VXGE_HW_FUNCTION_MODE_MULTI_FUNCTION   1

Definition at line 442 of file vxge_config.h.

◆ VXGE_HW_FUNCTION_MODE_SRIOV

#define VXGE_HW_FUNCTION_MODE_SRIOV   2

Definition at line 443 of file vxge_config.h.

◆ VXGE_HW_FUNCTION_MODE_MRIOV

#define VXGE_HW_FUNCTION_MODE_MRIOV   3

Definition at line 444 of file vxge_config.h.

◆ VXGE_HW_FUNCTION_MODE_MRIOV_8

#define VXGE_HW_FUNCTION_MODE_MRIOV_8   4

Definition at line 445 of file vxge_config.h.

◆ VXGE_HW_FUNCTION_MODE_MULTI_FUNCTION_17

#define VXGE_HW_FUNCTION_MODE_MULTI_FUNCTION_17   5

Definition at line 446 of file vxge_config.h.

◆ VXGE_HW_FUNCTION_MODE_SRIOV_8

#define VXGE_HW_FUNCTION_MODE_SRIOV_8   6

Definition at line 447 of file vxge_config.h.

◆ VXGE_HW_FUNCTION_MODE_SRIOV_4

#define VXGE_HW_FUNCTION_MODE_SRIOV_4   7

Definition at line 448 of file vxge_config.h.

◆ VXGE_HW_FUNCTION_MODE_MULTI_FUNCTION_2

#define VXGE_HW_FUNCTION_MODE_MULTI_FUNCTION_2   8

Definition at line 449 of file vxge_config.h.

◆ VXGE_HW_FUNCTION_MODE_MULTI_FUNCTION_4

#define VXGE_HW_FUNCTION_MODE_MULTI_FUNCTION_4   9

Definition at line 450 of file vxge_config.h.

◆ VXGE_HW_FUNCTION_MODE_MRIOV_4

#define VXGE_HW_FUNCTION_MODE_MRIOV_4   10

Definition at line 451 of file vxge_config.h.

◆ VXGE_HW_FUNCTION_MODE_MULTI_FUNCTION_DIRECT_IO

#define VXGE_HW_FUNCTION_MODE_MULTI_FUNCTION_DIRECT_IO   11

Definition at line 452 of file vxge_config.h.

◆ VXGE_HW_DEVICE_MAGIC

#define VXGE_HW_DEVICE_MAGIC   0x12345678

Definition at line 479 of file vxge_config.h.

◆ VXGE_HW_DEVICE_DEAD

#define VXGE_HW_DEVICE_DEAD   0xDEADDEAD

Definition at line 480 of file vxge_config.h.

◆ VXGE_HW_DEVICE_ACCESS_RIGHT_VPATH

#define VXGE_HW_DEVICE_ACCESS_RIGHT_VPATH   0x1

Definition at line 492 of file vxge_config.h.

◆ VXGE_HW_DEVICE_ACCESS_RIGHT_SRPCIM

#define VXGE_HW_DEVICE_ACCESS_RIGHT_SRPCIM   0x2

Definition at line 493 of file vxge_config.h.

◆ VXGE_HW_DEVICE_ACCESS_RIGHT_MRPCIM

#define VXGE_HW_DEVICE_ACCESS_RIGHT_MRPCIM   0x4

Definition at line 494 of file vxge_config.h.

◆ VXGE_HW_DEVICE_LINK_STATE_SET

#define VXGE_HW_DEVICE_LINK_STATE_SET (   hldev,
  ls 
)    (hldev->link_state = ls)

Definition at line 517 of file vxge_config.h.

◆ VXGE_HW_DEVICE_TIM_INT_MASK_SET

#define VXGE_HW_DEVICE_TIM_INT_MASK_SET (   m0,
  m1,
 
)
Value:
{ \
if (i < 16) { \
m0[0] |= vxge_vBIT(0x8, (i*4), 4); \
m0[1] |= vxge_vBIT(0x4, (i*4), 4); \
} \
else { \
m1[0] = 0x80000000; \
m1[1] = 0x40000000; \
} \
}
#define vxge_vBIT(val, loc, sz)
Definition: vxge_reg.h:29

Definition at line 519 of file vxge_config.h.

◆ VXGE_HW_DEVICE_TIM_INT_MASK_RESET

#define VXGE_HW_DEVICE_TIM_INT_MASK_RESET (   m0,
  m1,
 
)
Value:
{ \
if (i < 16) { \
m0[0] &= ~vxge_vBIT(0x8, (i*4), 4); \
m0[1] &= ~vxge_vBIT(0x4, (i*4), 4); \
} \
else { \
m1[0] = 0; \
m1[1] = 0; \
} \
}
#define vxge_vBIT(val, loc, sz)
Definition: vxge_reg.h:29

Definition at line 530 of file vxge_config.h.

◆ vxge_debug

#define vxge_debug (   mask,
  fmt... 
)
Value:
do { \
if (debug_filter & mask) \
DBG(fmt); \
} while (0);
static const u16 debug_filter
vxge_debug @mask: mask for the debug @fmt: printf like format string
Definition: vxge_config.h:761
int ssize_t const char * fmt
Definition: vsprintf.h:72

Definition at line 762 of file vxge_config.h.

◆ vxge_trace

#define vxge_trace ( )    vxge_debug(VXGE_TRACE, "%s:%d\n", __func__, __LINE__);

Definition at line 767 of file vxge_config.h.

Enumeration Type Documentation

◆ vxge_hw_status

Enumerator
VXGE_HW_OK 
VXGE_HW_FAIL 
VXGE_HW_PENDING 
VXGE_HW_COMPLETIONS_REMAIN 
VXGE_HW_INF_NO_MORE_COMPLETED_DESCRIPTORS 
VXGE_HW_INF_OUT_OF_DESCRIPTORS 
VXGE_HW_INF_SW_LRO_BEGIN 
VXGE_HW_INF_SW_LRO_CONT 
VXGE_HW_INF_SW_LRO_UNCAPABLE 
VXGE_HW_INF_SW_LRO_FLUSH_SESSION 
VXGE_HW_INF_SW_LRO_FLUSH_BOTH 
VXGE_HW_ERR_INVALID_HANDLE 
VXGE_HW_ERR_OUT_OF_MEMORY 
VXGE_HW_ERR_VPATH_NOT_AVAILABLE 
VXGE_HW_ERR_VPATH_NOT_OPEN 
VXGE_HW_ERR_WRONG_IRQ 
VXGE_HW_ERR_SWAPPER_CTRL 
VXGE_HW_ERR_INVALID_MTU_SIZE 
VXGE_HW_ERR_INVALID_INDEX 
VXGE_HW_ERR_INVALID_TYPE 
VXGE_HW_ERR_INVALID_OFFSET 
VXGE_HW_ERR_INVALID_DEVICE 
VXGE_HW_ERR_VERSION_CONFLICT 
VXGE_HW_ERR_INVALID_PCI_INFO 
VXGE_HW_ERR_INVALID_TCODE 
VXGE_HW_ERR_INVALID_BLOCK_SIZE 
VXGE_HW_ERR_INVALID_STATE 
VXGE_HW_ERR_PRIVILAGED_OPEARATION 
VXGE_HW_ERR_INVALID_PORT 
VXGE_HW_ERR_FIFO 
VXGE_HW_ERR_VPATH 
VXGE_HW_ERR_CRITICAL 
VXGE_HW_ERR_SLOT_FREEZE 
VXGE_HW_ERR_INVALID_MIN_BANDWIDTH 
VXGE_HW_ERR_INVALID_MAX_BANDWIDTH 
VXGE_HW_ERR_INVALID_TOTAL_BANDWIDTH 
VXGE_HW_ERR_INVALID_BANDWIDTH_LIMIT 
VXGE_HW_ERR_RESET_IN_PROGRESS 
VXGE_HW_ERR_OUT_OF_SPACE 
VXGE_HW_ERR_INVALID_FUNC_MODE 
VXGE_HW_ERR_INVALID_DP_MODE 
VXGE_HW_ERR_INVALID_FAILURE_BEHAVIOUR 
VXGE_HW_ERR_INVALID_L2_SWITCH_STATE 
VXGE_HW_ERR_INVALID_CATCH_BASIN_MODE 
VXGE_HW_BADCFG_RING_INDICATE_MAX_PKTS 
VXGE_HW_BADCFG_FIFO_BLOCKS 
VXGE_HW_BADCFG_VPATH_MTU 
VXGE_HW_BADCFG_VPATH_RPA_STRIP_VLAN_TAG 
VXGE_HW_BADCFG_VPATH_MIN_BANDWIDTH 
VXGE_HW_BADCFG_VPATH_BANDWIDTH_LIMIT 
VXGE_HW_BADCFG_INTR_MODE 
VXGE_HW_BADCFG_RTS_MAC_EN 
VXGE_HW_BADCFG_VPATH_AGGR_ACK 
VXGE_HW_BADCFG_VPATH_PRIORITY 
VXGE_HW_EOF_TRACE_BUF 

Definition at line 70 of file vxge_config.h.

70  {
71  VXGE_HW_OK = 0,
72  VXGE_HW_FAIL = 1,
73  VXGE_HW_PENDING = 2,
75 
83 
117 
128 
130 };
#define VXGE_HW_BASE_BADCFG
Definition: vxge_config.h:66
#define VXGE_HW_BASE_ERR
Definition: vxge_config.h:65
#define VXGE_HW_BASE_INF
Definition: vxge_config.h:64

◆ vxge_hw_device_link_state

enum enum vxge_hw_device_link_state - Link state enumeration.

@VXGE_HW_LINK_NONE: Invalid link state. @VXGE_HW_LINK_DOWN: Link is down. @VXGE_HW_LINK_UP: Link is up.

Enumerator
VXGE_HW_LINK_NONE 
VXGE_HW_LINK_DOWN 
VXGE_HW_LINK_UP 

Definition at line 139 of file vxge_config.h.

◆ vxge_hw_txdl_state

enum enum vxge_hw_txdl_state - Descriptor (TXDL) state.

@VXGE_HW_TXDL_STATE_NONE: Invalid state. @VXGE_HW_TXDL_STATE_AVAIL: Descriptor is available for reservation. @VXGE_HW_TXDL_STATE_POSTED: Descriptor is posted for processing by the device. @VXGE_HW_TXDL_STATE_FREED: Descriptor is free and can be reused for filling-in and posting later.

Titan/HW descriptor states.

Enumerator
VXGE_HW_TXDL_STATE_NONE 
VXGE_HW_TXDL_STATE_AVAIL 
VXGE_HW_TXDL_STATE_POSTED 
VXGE_HW_TXDL_STATE_FREED 

Definition at line 553 of file vxge_config.h.

Function Documentation

◆ FILE_LICENCE()

FILE_LICENCE ( GPL2_ONLY  )

◆ __vxge_hw_vpath_pci_func_mode_get()

u64 __vxge_hw_vpath_pci_func_mode_get ( u32  vp_id,
struct vxge_hw_vpath_reg __iomem vpath_reg 
)

◆ __vxge_hw_desc_offset_up()

static void __vxge_hw_desc_offset_up ( u16  upper_limit,
u16 offset 
)
inlinestatic

Definition at line 562 of file vxge_config.h.

564 {
565  if (++(*offset) >= upper_limit)
566  *offset = 0;
567 }
static userptr_t size_t offset
Offset of the first segment within the content.
Definition: deflate.h:259

References offset.

Referenced by vxge_hw_fifo_txd_offset_up(), and vxge_hw_ring_rxd_offset_up().

◆ vxge_hw_ring_rxd_offset_up()

static void vxge_hw_ring_rxd_offset_up ( u16 offset)
inlinestatic

Definition at line 570 of file vxge_config.h.

571 {
573  offset);
574 }
static void __vxge_hw_desc_offset_up(u16 upper_limit, u16 *offset)
Definition: vxge_config.h:562
static userptr_t size_t offset
Offset of the first segment within the content.
Definition: deflate.h:259
#define VXGE_HW_MAX_RXDS_PER_BLOCK_1
Definition: vxge_config.h:341

References __vxge_hw_desc_offset_up(), offset, and VXGE_HW_MAX_RXDS_PER_BLOCK_1.

Referenced by vxge_hw_vpath_poll_rx().

◆ vxge_hw_fifo_txd_offset_up()

static void vxge_hw_fifo_txd_offset_up ( u16 offset)
inlinestatic

Definition at line 576 of file vxge_config.h.

577 {
579 }
#define VXGE_HW_FIFO_TXD_DEPTH
Definition: vxge_config.h:329
static void __vxge_hw_desc_offset_up(u16 upper_limit, u16 *offset)
Definition: vxge_config.h:562
static userptr_t size_t offset
Offset of the first segment within the content.
Definition: deflate.h:259

References __vxge_hw_desc_offset_up(), offset, and VXGE_HW_FIFO_TXD_DEPTH.

Referenced by vxge_hw_fifo_txdl_post(), and vxge_hw_vpath_poll_tx().

◆ vxge_hw_ring_rxd_1b_set()

static void vxge_hw_ring_rxd_1b_set ( struct vxge_hw_ring_rxd_1 rxdp,
struct io_buffer iob,
u32  size 
)
inlinestatic

vxge_hw_ring_rxd_1b_set - Prepare 1-buffer-mode descriptor.

@rxdh: Descriptor handle. @dma_pointer: DMA address of a single receive buffer this descriptor should carry. Note that by the time vxge_hw_ring_rxd_1b_set is called, the receive buffer should be already mapped to the device @size: Size of the receive @dma_pointer buffer.

Prepare 1-buffer-mode Rx descriptor for posting (via vxge_hw_ring_rxd_post()).

This inline helper-function does not return any parameters and always succeeds.

Definition at line 597 of file vxge_config.h.

599 {
600  rxdp->host_control = (intptr_t)(iob);
601  rxdp->buffer0_ptr = virt_to_bus(iob->data);
604 }
#define VXGE_HW_RING_RXD_1_BUFFER0_SIZE_MASK
Definition: vxge_config.h:196
unsigned long intptr_t
Definition: stdint.h:21
static __always_inline unsigned long virt_to_bus(volatile const void *addr)
Convert virtual address to a bus address.
Definition: io.h:183
#define VXGE_HW_RING_RXD_1_BUFFER0_SIZE(val)
Definition: vxge_config.h:195
void * data
Start of data.
Definition: iobuf.h:44
uint8_t size
Entry size (in 32-bit words)
Definition: ena.h:16
Definition: sis900.h:32

References io_buffer::data, rxdp, size, virt_to_bus(), VXGE_HW_RING_RXD_1_BUFFER0_SIZE, and VXGE_HW_RING_RXD_1_BUFFER0_SIZE_MASK.

Referenced by vxge_hw_ring_replenish(), and vxge_hw_vpath_poll_rx().

◆ vxge_hw_device_hw_info_get()

enum vxge_hw_status vxge_hw_device_hw_info_get ( struct pci_device pdev,
void __iomem bar0,
struct vxge_hw_device_hw_info hw_info 
)

vxge_hw_device_hw_info_get - Get the hw information Returns the vpath mask that has the bits set for each vpath allocated for the driver, FW version information and the first mac addresse for each vpath

Definition at line 384 of file vxge_config.c.

386 {
387  u32 i;
388  u64 val64;
389  struct vxge_hw_toc_reg __iomem *toc;
390  struct vxge_hw_mrpcim_reg __iomem *mrpcim_reg;
391  struct vxge_hw_common_reg __iomem *common_reg;
392  struct vxge_hw_vpath_reg __iomem *vpath_reg;
393  struct vxge_hw_vpmgmt_reg __iomem *vpmgmt_reg;
394  struct vxge_hw_legacy_reg __iomem *legacy_reg;
395  enum vxge_hw_status status;
396 
397  vxge_trace();
398 
399  memset(hw_info, 0, sizeof(struct vxge_hw_device_hw_info));
400 
401  legacy_reg = __vxge_hw_device_get_legacy_reg(pdev, bar0);
402  if (legacy_reg == NULL) {
404  goto exit;
405  }
406 
407  toc = __vxge_hw_device_toc_get(bar0, legacy_reg);
408  if (toc == NULL) {
410  goto exit;
411  }
412 
413  val64 = readq(&toc->toc_common_pointer);
414  common_reg = (struct vxge_hw_common_reg __iomem *)(bar0 + val64);
415 
417  (u64 __iomem *)&common_reg->vpath_rst_in_prog);
418  if (status != VXGE_HW_OK)
419  goto exit;
420 
421  hw_info->vpath_mask = readq(&common_reg->vpath_assignments);
422 
423  val64 = readq(&common_reg->host_type_assignments);
424 
425  hw_info->host_type =
427 
428  for (i = 0; i < VXGE_HW_MAX_VIRTUAL_PATHS; i++) {
429 
430  if (!((hw_info->vpath_mask) & vxge_mBIT(i)))
431  continue;
432 
433  val64 = readq(&toc->toc_vpmgmt_pointer[i]);
434 
435  vpmgmt_reg = (struct vxge_hw_vpmgmt_reg __iomem *)
436  (bar0 + val64);
437 
438  hw_info->func_id = __vxge_hw_vpath_func_id_get(vpmgmt_reg);
440  hw_info->func_id) &
442 
443  val64 = readq(&toc->toc_mrpcim_pointer);
444 
445  mrpcim_reg = (struct vxge_hw_mrpcim_reg __iomem *)
446  (bar0 + val64);
447 
448  writeq(0, &mrpcim_reg->xgmac_gen_fw_memo_mask);
449  wmb();
450  }
451 
452  val64 = readq(&toc->toc_vpath_pointer[i]);
453 
454  vpath_reg = (struct vxge_hw_vpath_reg __iomem *)(bar0 + val64);
455 
456  status = __vxge_hw_vpath_fw_ver_get(vpath_reg, hw_info);
457  if (status != VXGE_HW_OK)
458  goto exit;
459 
460  status = __vxge_hw_vpath_card_info_get(vpath_reg, hw_info);
461  if (status != VXGE_HW_OK)
462  goto exit;
463 
464  break;
465  }
466 
467  for (i = 0; i < VXGE_HW_MAX_VIRTUAL_PATHS; i++) {
468 
469  if (!((hw_info->vpath_mask) & vxge_mBIT(i)))
470  continue;
471 
472  val64 = readq(&toc->toc_vpath_pointer[i]);
473  vpath_reg = (struct vxge_hw_vpath_reg __iomem *)(bar0 + val64);
474 
475  status = __vxge_hw_vpath_addr_get(vpath_reg,
476  hw_info->mac_addrs[i],
477  hw_info->mac_addr_masks[i]);
478  if (status != VXGE_HW_OK)
479  goto exit;
480  }
481 exit:
482  return status;
483 }
wmb()
u64 toc_vpmgmt_pointer[17]
Definition: vxge_reg.h:683
static struct vxge_hw_legacy_reg __iomem * __vxge_hw_device_get_legacy_reg(struct pci_device *pdev, void __iomem *bar0)
Definition: vxge_config.c:196
u64 toc_vpath_pointer[17]
Definition: vxge_reg.h:687
uint64_t readq(volatile uint64_t *io_addr)
Read 64-bit qword from memory-mapped device.
struct vxge_hw_toc_reg __iomem * __vxge_hw_device_toc_get(void __iomem *bar0, struct vxge_hw_legacy_reg __iomem *legacy_reg)
Definition: vxge_config.c:222
u64 host_type_assignments
Definition: vxge_reg.h:883
u64 toc_mrpcim_pointer
Definition: vxge_reg.h:677
enum vxge_hw_status __vxge_hw_device_vpath_reset_in_prog_check(u64 __iomem *vpath_rst_in_prog)
Definition: vxge_config.c:178
enum vxge_hw_status __vxge_hw_vpath_card_info_get(struct vxge_hw_vpath_reg __iomem *vpath_reg, struct vxge_hw_device_hw_info *hw_info)
Definition: vxge_config.c:935
struct vxge_hw_device_hw_info - Device information @host_type: Host Type @func_id: Function Id @vpath...
Definition: vxge_config.h:427
uint8_t status
Status.
Definition: ena.h:16
#define u32
Definition: vga.h:21
#define VXGE_HW_MAX_VIRTUAL_PATHS
Definition: vxge_traffic.h:30
uint64_t u64
Definition: stdint.h:25
#define __iomem
Definition: igbvf_osdep.h:45
#define VXGE_HW_HOST_TYPE_ASSIGNMENTS_GET_HOST_TYPE_ASSIGNMENTS(bits)
Definition: vxge_reg.h:47
u64 toc_common_pointer
Definition: vxge_reg.h:669
u64 xgmac_gen_fw_memo_mask
Definition: vxge_reg.h:1906
#define vxge_mBIT(loc)
Definition: vxge_reg.h:24
u32 __vxge_hw_vpath_func_id_get(struct vxge_hw_vpmgmt_reg __iomem *vpmgmt_reg)
Definition: vxge_config.c:905
#define vxge_trace()
Definition: vxge_config.h:767
vxge_hw_status
Definition: vxge_config.h:70
static u32 __vxge_hw_device_access_rights_get(u32 host_type, u32 func_id)
Definition: vxge_config.c:311
#define VXGE_HW_DEVICE_ACCESS_RIGHT_MRPCIM
Definition: vxge_config.h:494
enum vxge_hw_status __vxge_hw_vpath_addr_get(struct vxge_hw_vpath_reg *vpath_reg, u8(macaddr)[ETH_ALEN], u8(macaddr_mask)[ETH_ALEN])
Definition: vxge_config.c:1148
enum vxge_hw_status __vxge_hw_vpath_fw_ver_get(struct vxge_hw_vpath_reg __iomem *vpath_reg, struct vxge_hw_device_hw_info *hw_info)
Definition: vxge_config.c:1056
#define NULL
NULL pointer (VOID *)
Definition: Base.h:362
void writeq(uint64_t data, volatile uint64_t *io_addr)
Write 64-bit qword to memory-mapped device.
uint32_t u32
Definition: stdint.h:23
void * memset(void *dest, int character, size_t len) __nonnull

References __iomem, __vxge_hw_device_access_rights_get(), __vxge_hw_device_get_legacy_reg(), __vxge_hw_device_toc_get(), __vxge_hw_device_vpath_reset_in_prog_check(), __vxge_hw_vpath_addr_get(), __vxge_hw_vpath_card_info_get(), __vxge_hw_vpath_func_id_get(), __vxge_hw_vpath_fw_ver_get(), vxge_hw_device_hw_info::func_id, vxge_hw_device_hw_info::host_type, vxge_hw_common_reg::host_type_assignments, memset(), NULL, readq(), status, vxge_hw_toc_reg::toc_common_pointer, vxge_hw_toc_reg::toc_mrpcim_pointer, vxge_hw_toc_reg::toc_vpath_pointer, vxge_hw_toc_reg::toc_vpmgmt_pointer, u32, vxge_hw_common_reg::vpath_assignments, vxge_hw_device_hw_info::vpath_mask, vxge_hw_common_reg::vpath_rst_in_prog, VXGE_HW_DEVICE_ACCESS_RIGHT_MRPCIM, VXGE_HW_ERR_CRITICAL, VXGE_HW_HOST_TYPE_ASSIGNMENTS_GET_HOST_TYPE_ASSIGNMENTS, VXGE_HW_MAX_VIRTUAL_PATHS, VXGE_HW_OK, vxge_mBIT, vxge_trace, wmb(), writeq(), and vxge_hw_mrpcim_reg::xgmac_gen_fw_memo_mask.

Referenced by vxge_probe().

◆ __vxge_hw_vpath_fw_ver_get()

enum vxge_hw_status __vxge_hw_vpath_fw_ver_get ( struct vxge_hw_vpath_reg __iomem vpath_reg,
struct vxge_hw_device_hw_info hw_info 
)

Definition at line 1056 of file vxge_config.c.

1059 {
1060  u64 val64;
1061  u64 data1 = 0ULL;
1062  u64 data2 = 0ULL;
1063  struct vxge_hw_device_version *fw_version = &hw_info->fw_version;
1064  struct vxge_hw_device_date *fw_date = &hw_info->fw_date;
1065  struct vxge_hw_device_version *flash_version = &hw_info->flash_version;
1066  struct vxge_hw_device_date *flash_date = &hw_info->flash_date;
1068 
1075 
1077  &vpath_reg->rts_access_steer_ctrl,
1080 
1081  if (status != VXGE_HW_OK)
1082  goto exit;
1083 
1084  val64 = readq(&vpath_reg->rts_access_steer_ctrl);
1085 
1087 
1088  data1 = readq(&vpath_reg->rts_access_steer_data0);
1089  data2 = readq(&vpath_reg->rts_access_steer_data1);
1090 
1091  fw_date->day =
1093  data1);
1094  fw_date->month =
1096  data1);
1097  fw_date->year =
1099  data1);
1100 
1101  snprintf(fw_date->date, VXGE_HW_FW_STRLEN, "%d/%d/%d",
1102  fw_date->month, fw_date->day, fw_date->year);
1103 
1104  fw_version->major =
1106  fw_version->minor =
1108  fw_version->build =
1110 
1111  snprintf(fw_version->version, VXGE_HW_FW_STRLEN, "%d.%d.%d",
1112  fw_version->major, fw_version->minor, fw_version->build);
1113 
1114  flash_date->day =
1116  flash_date->month =
1118  flash_date->year =
1120 
1121  snprintf(flash_date->date, VXGE_HW_FW_STRLEN, "%d/%d/%d",
1122  flash_date->month, flash_date->day, flash_date->year);
1123 
1124  flash_version->major =
1126  flash_version->minor =
1128  flash_version->build =
1130 
1131  snprintf(flash_version->version, VXGE_HW_FW_STRLEN, "%d.%d.%d",
1132  flash_version->major, flash_version->minor,
1133  flash_version->build);
1134 
1135  status = VXGE_HW_OK;
1136 
1137  } else
1138  status = VXGE_HW_FAIL;
1139 exit:
1140  return status;
1141 }
#define VXGE_HW_RTS_ACCESS_STEER_DATA1_GET_FLASH_VER_BUILD(bits)
Definition: vxge_reg.h:479
struct vxge_hw_device_date fw_date
Definition: vxge_config.h:457
#define VXGE_HW_RTS_ACCESS_STEER_DATA1_GET_FLASH_VER_DAY(bits)
Definition: vxge_reg.h:462
struct vxge_hw_device_date flash_date
Definition: vxge_config.h:459
struct vxge_hw_device_version fw_version
Definition: vxge_config.h:456
char date[VXGE_HW_FW_STRLEN]
Definition: vxge_config.h:262
#define VXGE_HW_RTS_ACCESS_STEER_DATA0_GET_FW_VER_MAJOR(bits)
Definition: vxge_reg.h:451
uint64_t readq(volatile uint64_t *io_addr)
Read 64-bit qword from memory-mapped device.
#define VXGE_HW_FW_STRLEN
struct vxge_hw_device_date - Date Format @day: Day @month: Month @year: Year
Definition: vxge_config.h:257
#define VXGE_HW_RTS_ACCESS_STEER_CTRL_OFFSET(val)
Definition: vxge_reg.h:189
#define VXGE_HW_RTS_ACCESS_STEER_DATA0_GET_FW_VER_MINOR(bits)
Definition: vxge_reg.h:454
u32 data1
Definition: ar9003_mac.h:71
#define VXGE_HW_RTS_ACCESS_STEER_CTRL_RMACJ_STATUS
Definition: vxge_reg.h:188
#define VXGE_HW_RTS_ACCESS_STEER_DATA1_GET_FLASH_VER_MONTH(bits)
Definition: vxge_reg.h:465
#define VXGE_HW_RTS_ACCESS_STEER_DATA1_GET_FLASH_VER_MAJOR(bits)
Definition: vxge_reg.h:473
uint8_t status
Status.
Definition: ena.h:16
#define VXGE_HW_RTS_ACCESS_STEER_DATA1_GET_FLASH_VER_YEAR(bits)
Definition: vxge_reg.h:468
#define VXGE_HW_RTS_ACCESS_STEER_DATA0_GET_FW_VER_BUILD(bits)
Definition: vxge_reg.h:457
#define VXGE_HW_RTS_ACCESS_STEER_CTRL_STROBE
Definition: vxge_reg.h:185
#define u32
Definition: vga.h:21
#define VXGE_HW_RTS_ACCESS_STEER_DATA1_GET_FLASH_VER_MINOR(bits)
Definition: vxge_reg.h:476
uint64_t u64
Definition: stdint.h:25
#define VXGE_HW_DEF_DEVICE_POLL_MILLIS
Definition: vxge_config.h:67
struct vxge_hw_device_version flash_version
Definition: vxge_config.h:458
#define VXGE_HW_RTS_ACCESS_STEER_DATA0_GET_FW_VER_YEAR(bits)
Definition: vxge_reg.h:446
static enum vxge_hw_status __vxge_hw_pio_mem_write64(u64 val64, void __iomem *addr, u64 mask, u32 max_millis)
Definition: vxge_config.h:714
u32 data2
Definition: ar9003_mac.h:73
#define VXGE_HW_RTS_ACCESS_STEER_CTRL_ACTION_READ_ENTRY
Definition: vxge_reg.h:186
#define VXGE_HW_RTS_ACCESS_STEER_DATA0_GET_FW_VER_MONTH(bits)
Definition: vxge_reg.h:443
vxge_hw_status
Definition: vxge_config.h:70
#define VXGE_HW_RTS_ACCESS_STEER_CTRL_DATA_STRUCT_SEL_FW_MEMO
Definition: vxge_reg.h:204
#define VXGE_HW_RTS_ACCESS_STEER_CTRL_ACTION(val)
Definition: vxge_reg.h:183
int snprintf(char *buf, size_t size, const char *fmt,...)
Write a formatted string to a buffer.
Definition: vsprintf.c:382
#define VXGE_HW_RTS_ACCESS_STEER_DATA0_GET_FW_VER_DAY(bits)
Definition: vxge_reg.h:440
#define VXGE_HW_RTS_ACCESS_STEER_CTRL_DATA_STRUCT_SEL(val)
Definition: vxge_reg.h:184
char version[VXGE_HW_FW_STRLEN]
Definition: vxge_config.h:269

References __vxge_hw_pio_mem_write64(), vxge_hw_device_version::build, data1, data2, vxge_hw_device_date::date, vxge_hw_device_date::day, vxge_hw_device_hw_info::flash_date, vxge_hw_device_hw_info::flash_version, vxge_hw_device_hw_info::fw_date, vxge_hw_device_hw_info::fw_version, vxge_hw_device_version::major, vxge_hw_device_version::minor, vxge_hw_device_date::month, readq(), snprintf(), status, u32, vxge_hw_device_version::version, VXGE_HW_DEF_DEVICE_POLL_MILLIS, VXGE_HW_FAIL, VXGE_HW_FW_STRLEN, VXGE_HW_OK, VXGE_HW_RTS_ACCESS_STEER_CTRL_ACTION, VXGE_HW_RTS_ACCESS_STEER_CTRL_ACTION_READ_ENTRY, VXGE_HW_RTS_ACCESS_STEER_CTRL_DATA_STRUCT_SEL, VXGE_HW_RTS_ACCESS_STEER_CTRL_DATA_STRUCT_SEL_FW_MEMO, VXGE_HW_RTS_ACCESS_STEER_CTRL_OFFSET, VXGE_HW_RTS_ACCESS_STEER_CTRL_RMACJ_STATUS, VXGE_HW_RTS_ACCESS_STEER_CTRL_STROBE, VXGE_HW_RTS_ACCESS_STEER_DATA0_GET_FW_VER_BUILD, VXGE_HW_RTS_ACCESS_STEER_DATA0_GET_FW_VER_DAY, VXGE_HW_RTS_ACCESS_STEER_DATA0_GET_FW_VER_MAJOR, VXGE_HW_RTS_ACCESS_STEER_DATA0_GET_FW_VER_MINOR, VXGE_HW_RTS_ACCESS_STEER_DATA0_GET_FW_VER_MONTH, VXGE_HW_RTS_ACCESS_STEER_DATA0_GET_FW_VER_YEAR, VXGE_HW_RTS_ACCESS_STEER_DATA1_GET_FLASH_VER_BUILD, VXGE_HW_RTS_ACCESS_STEER_DATA1_GET_FLASH_VER_DAY, VXGE_HW_RTS_ACCESS_STEER_DATA1_GET_FLASH_VER_MAJOR, VXGE_HW_RTS_ACCESS_STEER_DATA1_GET_FLASH_VER_MINOR, VXGE_HW_RTS_ACCESS_STEER_DATA1_GET_FLASH_VER_MONTH, VXGE_HW_RTS_ACCESS_STEER_DATA1_GET_FLASH_VER_YEAR, and vxge_hw_device_date::year.

Referenced by vxge_hw_device_hw_info_get().

◆ __vxge_hw_vpath_card_info_get()

enum vxge_hw_status __vxge_hw_vpath_card_info_get ( struct vxge_hw_vpath_reg __iomem vpath_reg,
struct vxge_hw_device_hw_info hw_info 
)

Definition at line 935 of file vxge_config.c.

938 {
939  u32 i, j;
940  u64 val64;
941  u64 data1 = 0ULL;
942  u64 data2 = 0ULL;
944  u8 *serial_number = hw_info->serial_number;
945  u8 *part_number = hw_info->part_number;
946  u8 *product_desc = hw_info->product_desc;
947 
948  __vxge_hw_read_rts_ds(vpath_reg,
950 
957 
959  &vpath_reg->rts_access_steer_ctrl,
962 
963  if (status != VXGE_HW_OK)
964  return status;
965 
966  val64 = readq(&vpath_reg->rts_access_steer_ctrl);
967 
969  data1 = readq(&vpath_reg->rts_access_steer_data0);
970  ((u64 *)serial_number)[0] = be64_to_cpu(data1);
971 
972  data2 = readq(&vpath_reg->rts_access_steer_data1);
973  ((u64 *)serial_number)[1] = be64_to_cpu(data2);
974  status = VXGE_HW_OK;
975  } else
976  *serial_number = 0;
977 
978  __vxge_hw_read_rts_ds(vpath_reg,
980 
987 
989  &vpath_reg->rts_access_steer_ctrl,
992 
993  if (status != VXGE_HW_OK)
994  return status;
995 
996  val64 = readq(&vpath_reg->rts_access_steer_ctrl);
997 
999 
1000  data1 = readq(&vpath_reg->rts_access_steer_data0);
1001  ((u64 *)part_number)[0] = be64_to_cpu(data1);
1002 
1003  data2 = readq(&vpath_reg->rts_access_steer_data1);
1004  ((u64 *)part_number)[1] = be64_to_cpu(data2);
1005 
1006  status = VXGE_HW_OK;
1007 
1008  } else
1009  *part_number = 0;
1010 
1011  j = 0;
1012 
1015 
1016  __vxge_hw_read_rts_ds(vpath_reg, i);
1017 
1024 
1026  &vpath_reg->rts_access_steer_ctrl,
1029 
1030  if (status != VXGE_HW_OK)
1031  return status;
1032 
1033  val64 = readq(&vpath_reg->rts_access_steer_ctrl);
1034 
1036 
1037  data1 = readq(&vpath_reg->rts_access_steer_data0);
1038  ((u64 *)product_desc)[j++] = be64_to_cpu(data1);
1039 
1040  data2 = readq(&vpath_reg->rts_access_steer_data1);
1041  ((u64 *)product_desc)[j++] = be64_to_cpu(data2);
1042 
1043  status = VXGE_HW_OK;
1044  } else
1045  *product_desc = 0;
1046  }
1047 
1048  return status;
1049 }
uint64_t readq(volatile uint64_t *io_addr)
Read 64-bit qword from memory-mapped device.
#define VXGE_HW_RTS_ACCESS_STEER_CTRL_OFFSET(val)
Definition: vxge_reg.h:189
u32 data1
Definition: ar9003_mac.h:71
#define VXGE_HW_RTS_ACCESS_STEER_CTRL_RMACJ_STATUS
Definition: vxge_reg.h:188
uint8_t status
Status.
Definition: ena.h:16
#define VXGE_HW_RTS_ACCESS_STEER_CTRL_STROBE
Definition: vxge_reg.h:185
#define VXGE_HW_RTS_ACCESS_STEER_DATA0_MEMO_ITEM_DESC_0
Definition: vxge_reg.h:421
u8 serial_number[VXGE_HW_INFO_LEN]
Definition: vxge_config.h:460
uint64_t u64
Definition: stdint.h:25
#define VXGE_HW_DEF_DEVICE_POLL_MILLIS
Definition: vxge_config.h:67
#define VXGE_HW_RTS_ACCESS_STEER_CTRL_ACTION_READ_MEMO_ENTRY
Definition: vxge_reg.h:188
#define be64_to_cpu(value)
Definition: byteswap.h:117
#define VXGE_HW_RTS_ACCESS_STEER_DATA0_MEMO_ITEM_SERIAL_NUMBER
Definition: vxge_reg.h:418
u8 product_desc[VXGE_HW_INFO_LEN]
Definition: vxge_config.h:462
static enum vxge_hw_status __vxge_hw_pio_mem_write64(u64 val64, void __iomem *addr, u64 mask, u32 max_millis)
Definition: vxge_config.h:714
#define VXGE_HW_RTS_ACCESS_STEER_DATA0_MEMO_ITEM_DESC_3
Definition: vxge_reg.h:424
u32 data2
Definition: ar9003_mac.h:73
u8 part_number[VXGE_HW_INFO_LEN]
Definition: vxge_config.h:461
vxge_hw_status
Definition: vxge_config.h:70
#define VXGE_HW_RTS_ACCESS_STEER_CTRL_DATA_STRUCT_SEL_FW_MEMO
Definition: vxge_reg.h:204
#define VXGE_HW_RTS_ACCESS_STEER_CTRL_ACTION(val)
Definition: vxge_reg.h:183
#define VXGE_HW_RTS_ACCESS_STEER_DATA0_MEMO_ITEM_PART_NUMBER
Definition: vxge_reg.h:417
static void __vxge_hw_read_rts_ds(struct vxge_hw_vpath_reg __iomem *vpath_reg, u64 dta_struct_sel)
Definition: vxge_config.c:919
#define VXGE_HW_RTS_ACCESS_STEER_CTRL_DATA_STRUCT_SEL(val)
Definition: vxge_reg.h:184
uint8_t u8
Definition: stdint.h:19
uint32_t u32
Definition: stdint.h:23

References __vxge_hw_pio_mem_write64(), __vxge_hw_read_rts_ds(), be64_to_cpu, data1, data2, vxge_hw_device_hw_info::part_number, vxge_hw_device_hw_info::product_desc, readq(), vxge_hw_device_hw_info::serial_number, status, VXGE_HW_DEF_DEVICE_POLL_MILLIS, VXGE_HW_OK, VXGE_HW_RTS_ACCESS_STEER_CTRL_ACTION, VXGE_HW_RTS_ACCESS_STEER_CTRL_ACTION_READ_MEMO_ENTRY, VXGE_HW_RTS_ACCESS_STEER_CTRL_DATA_STRUCT_SEL, VXGE_HW_RTS_ACCESS_STEER_CTRL_DATA_STRUCT_SEL_FW_MEMO, VXGE_HW_RTS_ACCESS_STEER_CTRL_OFFSET, VXGE_HW_RTS_ACCESS_STEER_CTRL_RMACJ_STATUS, VXGE_HW_RTS_ACCESS_STEER_CTRL_STROBE, VXGE_HW_RTS_ACCESS_STEER_DATA0_MEMO_ITEM_DESC_0, VXGE_HW_RTS_ACCESS_STEER_DATA0_MEMO_ITEM_DESC_3, VXGE_HW_RTS_ACCESS_STEER_DATA0_MEMO_ITEM_PART_NUMBER, and VXGE_HW_RTS_ACCESS_STEER_DATA0_MEMO_ITEM_SERIAL_NUMBER.

Referenced by vxge_hw_device_hw_info_get().

◆ vxge_hw_device_link_state_get()

static enum vxge_hw_device_link_state vxge_hw_device_link_state_get ( struct __vxge_hw_device devh)
inlinestatic

vxge_hw_device_link_state_get - Get link state.

@devh: HW device handle.

Get link state. Returns: link state.

Definition at line 629 of file vxge_config.h.

631 {
632  return devh->link_state;
633 }
enum vxge_hw_device_link_state link_state
Definition: vxge_config.h:486

References __vxge_hw_device::link_state.

Referenced by vxge_open().

◆ vxge_hw_device_terminate()

void vxge_hw_device_terminate ( struct __vxge_hw_device devh)

Definition at line 542 of file vxge_config.c.

543 {
544  vxge_trace();
545 
546  assert(hldev->magic == VXGE_HW_DEVICE_MAGIC);
547 
548  hldev->magic = VXGE_HW_DEVICE_DEAD;
549  free(hldev);
550 }
#define VXGE_HW_DEVICE_DEAD
Definition: vxge_config.h:480
assert((readw(&hdr->flags) &(GTF_reading|GTF_writing))==0)
static void(* free)(struct refcnt *refcnt))
Definition: refcnt.h:54
#define vxge_trace()
Definition: vxge_config.h:767
#define VXGE_HW_DEVICE_MAGIC
Definition: vxge_config.h:479

References assert(), free, __vxge_hw_device::magic, VXGE_HW_DEVICE_DEAD, VXGE_HW_DEVICE_MAGIC, and vxge_trace.

Referenced by vxge_hw_device_initialize(), vxge_probe(), and vxge_remove().

◆ vxge_hw_device_initialize()

enum vxge_hw_status vxge_hw_device_initialize ( struct __vxge_hw_device **  devh,
void *  bar0,
struct pci_device pdev,
u8  titan1 
)

Definition at line 495 of file vxge_config.c.

500 {
501  struct __vxge_hw_device *hldev = NULL;
503 
504  vxge_trace();
505 
506  hldev = (struct __vxge_hw_device *)
507  zalloc(sizeof(struct __vxge_hw_device));
508  if (hldev == NULL) {
509  vxge_debug(VXGE_ERR, "hldev allocation failed\n");
511  goto exit;
512  }
513 
514  hldev->magic = VXGE_HW_DEVICE_MAGIC;
515 
516  hldev->bar0 = bar0;
517  hldev->pdev = pdev;
518  hldev->titan1 = titan1;
519 
521 
523  if (status != VXGE_HW_OK) {
524  vxge_debug(VXGE_ERR, "%s:%d __vxge_hw_device_reg_addr_get "
525  "failed\n", __func__, __LINE__);
527  goto exit;
528  }
529 
531 
532  *devh = hldev;
533 exit:
534  return status;
535 }
void __vxge_hw_device_host_info_get(struct __vxge_hw_device *hldev)
Definition: vxge_config.c:347
#define vxge_debug(mask, fmt...)
Definition: vxge_config.h:762
uint8_t status
Status.
Definition: ena.h:16
enum vxge_hw_status __vxge_hw_device_reg_addr_get(struct __vxge_hw_device *hldev)
Definition: vxge_config.c:241
void __vxge_hw_device_pci_e_init(struct __vxge_hw_device *hldev)
Definition: vxge_config.c:126
void * zalloc(size_t size)
Allocate cleared memory.
Definition: malloc.c:624
void __iomem * bar0
Definition: vxge_config.h:481
struct __vxge_hw_device - Hal device object @magic: Magic Number @bar0: BAR0 virtual address.
Definition: vxge_config.h:477
#define vxge_trace()
Definition: vxge_config.h:767
vxge_hw_status
Definition: vxge_config.h:70
struct pci_device * pdev
Definition: vxge_config.h:482
void vxge_hw_device_terminate(struct __vxge_hw_device *hldev)
Definition: vxge_config.c:542
#define NULL
NULL pointer (VOID *)
Definition: Base.h:362
#define VXGE_HW_DEVICE_MAGIC
Definition: vxge_config.h:479
#define VXGE_ERR
Definition: vxge_config.h:54

References __vxge_hw_device_host_info_get(), __vxge_hw_device_pci_e_init(), __vxge_hw_device_reg_addr_get(), __vxge_hw_device::bar0, __vxge_hw_device::magic, NULL, __vxge_hw_device::pdev, status, __vxge_hw_device::titan1, vxge_debug, VXGE_ERR, VXGE_HW_DEVICE_MAGIC, vxge_hw_device_terminate(), VXGE_HW_ERR_OUT_OF_MEMORY, VXGE_HW_OK, vxge_trace, and zalloc().

Referenced by vxge_probe().

◆ vxge_hw_vpath_open()

enum vxge_hw_status vxge_hw_vpath_open ( struct __vxge_hw_device hldev,
struct vxge_vpath vpath 
)

Definition at line 1690 of file vxge_config.c.

1691 {
1692  struct __vxge_hw_virtualpath *vpathh;
1693  enum vxge_hw_status status;
1694 
1695  vxge_trace();
1696 
1697  vpathh = &hldev->virtual_path;
1698 
1699  if (vpath->vp_open == VXGE_HW_VP_OPEN) {
1701  goto vpath_open_exit1;
1702  }
1703 
1705  if (status != VXGE_HW_OK)
1706  goto vpath_open_exit1;
1707 
1708  status = __vxge_hw_fifo_create(vpathh, &vpathh->fifoh);
1709  if (status != VXGE_HW_OK)
1710  goto vpath_open_exit2;
1711 
1712  status = __vxge_hw_ring_create(vpathh, &vpathh->ringh);
1713  if (status != VXGE_HW_OK)
1714  goto vpath_open_exit3;
1715 
1717 
1718  return VXGE_HW_OK;
1719 
1720 vpath_open_exit3:
1721  __vxge_hw_fifo_delete(&vpathh->fifoh);
1722 vpath_open_exit2:
1723  __vxge_hw_vp_terminate(hldev, vpathh);
1724 vpath_open_exit1:
1725  return status;
1726 }
int vp_open
Definition: vxge_main.h:191
struct __vxge_hw_virtualpath virtual_path
Definition: vxge_config.h:507
uint8_t status
Status.
Definition: ena.h:16
enum vxge_hw_status __vxge_hw_fifo_delete(struct __vxge_hw_fifo *fifo)
Definition: vxge_config.c:844
void __vxge_hw_vp_terminate(struct __vxge_hw_device *hldev, struct __vxge_hw_virtualpath *vpath)
Definition: vxge_config.c:1641
enum vxge_hw_status __vxge_hw_vp_initialize(struct __vxge_hw_device *hldev, u32 vp_id, struct __vxge_hw_virtualpath *vpath)
Definition: vxge_config.c:1595
enum vxge_hw_status __vxge_hw_fifo_create(struct __vxge_hw_virtualpath *vpath, struct __vxge_hw_fifo *fifo)
Definition: vxge_config.c:813
struct __vxge_hw_ring ringh
Definition: vxge_config.h:406
#define vxge_trace()
Definition: vxge_config.h:767
vxge_hw_status
Definition: vxge_config.h:70
struct __vxge_hw_device * hldev
Definition: vxge_config.h:396
struct __vxge_hw_fifo fifoh
Definition: vxge_config.h:407
void __vxge_hw_vpath_prc_configure(struct __vxge_hw_device *hldev)
Definition: vxge_config.c:1290
#define VXGE_HW_VP_OPEN
Definition: vxge_config.h:394
enum vxge_hw_status __vxge_hw_ring_create(struct __vxge_hw_virtualpath *vpath, struct __vxge_hw_ring *ring)
Definition: vxge_config.c:615

References __vxge_hw_fifo_create(), __vxge_hw_fifo_delete(), __vxge_hw_ring_create(), __vxge_hw_vp_initialize(), __vxge_hw_vp_terminate(), __vxge_hw_vpath_prc_configure(), __vxge_hw_virtualpath::fifoh, __vxge_hw_device::first_vp_id, __vxge_hw_virtualpath::hldev, __vxge_hw_virtualpath::ringh, status, __vxge_hw_device::virtual_path, vxge_vpath::vp_open, VXGE_HW_ERR_INVALID_STATE, VXGE_HW_OK, VXGE_HW_VP_OPEN, and vxge_trace.

Referenced by vxge_open_vpaths().

◆ __vxge_hw_device_vpath_reset_in_prog_check()

enum vxge_hw_status __vxge_hw_device_vpath_reset_in_prog_check ( u64 __iomem vpath_rst_in_prog)

Definition at line 178 of file vxge_config.c.

179 {
180  enum vxge_hw_status status;
181 
182  vxge_trace();
183 
187  return status;
188 }
uint8_t status
Status.
Definition: ena.h:16
u64 vpath_rst_in_prog
Definition: vxge_reg.h:167
#define VXGE_HW_DEF_DEVICE_POLL_MILLIS
Definition: vxge_config.h:67
#define vxge_trace()
Definition: vxge_config.h:767
vxge_hw_status
Definition: vxge_config.h:70
#define VXGE_HW_VPATH_RST_IN_PROG_VPATH_RST_IN_PROG(val)
Definition: vxge_reg.h:168
enum vxge_hw_status __vxge_hw_device_register_poll(void __iomem *reg, u64 mask, u32 max_millis)
Definition: vxge_config.c:147

References __vxge_hw_device_register_poll(), status, vpath_rst_in_prog, VXGE_HW_DEF_DEVICE_POLL_MILLIS, VXGE_HW_VPATH_RST_IN_PROG_VPATH_RST_IN_PROG, and vxge_trace.

Referenced by __vxge_hw_device_reg_addr_get(), and vxge_hw_device_hw_info_get().

◆ vxge_hw_vpath_close()

enum vxge_hw_status vxge_hw_vpath_close ( struct __vxge_hw_virtualpath vpath)

Definition at line 1760 of file vxge_config.c.

1761 {
1762  struct __vxge_hw_device *devh = NULL;
1763  u32 vp_id = vpath->vp_id;
1765 
1766  vxge_trace();
1767 
1768  devh = vpath->hldev;
1769 
1770  if (vpath->vp_open == VXGE_HW_VP_NOT_OPEN) {
1772  goto vpath_close_exit;
1773  }
1774 
1775  devh->vpaths_deployed &= ~vxge_mBIT(vp_id);
1776 
1777  __vxge_hw_ring_delete(&vpath->ringh);
1778 
1779  __vxge_hw_fifo_delete(&vpath->fifoh);
1780 
1781  __vxge_hw_vp_terminate(devh, vpath);
1782 
1783  vpath->vp_open = VXGE_HW_VP_NOT_OPEN;
1784 
1785 vpath_close_exit:
1786  return status;
1787 }
enum vxge_hw_status __vxge_hw_ring_delete(struct __vxge_hw_ring *ring)
Definition: vxge_config.c:658
uint8_t status
Status.
Definition: ena.h:16
enum vxge_hw_status __vxge_hw_fifo_delete(struct __vxge_hw_fifo *fifo)
Definition: vxge_config.c:844
void __vxge_hw_vp_terminate(struct __vxge_hw_device *hldev, struct __vxge_hw_virtualpath *vpath)
Definition: vxge_config.c:1641
#define vxge_mBIT(loc)
Definition: vxge_reg.h:24
struct __vxge_hw_device - Hal device object @magic: Magic Number @bar0: BAR0 virtual address.
Definition: vxge_config.h:477
struct __vxge_hw_ring ringh
Definition: vxge_config.h:406
#define vxge_trace()
Definition: vxge_config.h:767
vxge_hw_status
Definition: vxge_config.h:70
struct __vxge_hw_device * hldev
Definition: vxge_config.h:396
struct __vxge_hw_fifo fifoh
Definition: vxge_config.h:407
#define VXGE_HW_VP_NOT_OPEN
Definition: vxge_config.h:393
#define NULL
NULL pointer (VOID *)
Definition: Base.h:362
uint32_t u32
Definition: stdint.h:23

References __vxge_hw_fifo_delete(), __vxge_hw_ring_delete(), __vxge_hw_vp_terminate(), __vxge_hw_virtualpath::fifoh, __vxge_hw_virtualpath::hldev, NULL, __vxge_hw_virtualpath::ringh, status, __vxge_hw_virtualpath::vp_id, __vxge_hw_virtualpath::vp_open, __vxge_hw_device::vpaths_deployed, VXGE_HW_ERR_VPATH_NOT_OPEN, VXGE_HW_OK, VXGE_HW_VP_NOT_OPEN, vxge_mBIT, and vxge_trace.

Referenced by vxge_close_vpaths().

◆ vxge_hw_vpath_reset()

enum vxge_hw_status vxge_hw_vpath_reset ( struct __vxge_hw_virtualpath vpath)

Definition at line 1793 of file vxge_config.c.

1794 {
1795  enum vxge_hw_status status;
1796  u32 vp_id;
1797 
1798  vxge_trace();
1799 
1800  vp_id = vpath->vp_id;
1801 
1802  if (vpath->vp_open == VXGE_HW_VP_NOT_OPEN) {
1804  goto exit;
1805  }
1806 
1807  status = __vxge_hw_vpath_reset(vpath->hldev, vp_id);
1808 exit:
1809  return status;
1810 }
uint8_t status
Status.
Definition: ena.h:16
enum vxge_hw_status __vxge_hw_vpath_reset(struct __vxge_hw_device *hldev, u32 vp_id)
Definition: vxge_config.c:1269
#define vxge_trace()
Definition: vxge_config.h:767
vxge_hw_status
Definition: vxge_config.h:70
struct __vxge_hw_device * hldev
Definition: vxge_config.h:396
#define VXGE_HW_VP_NOT_OPEN
Definition: vxge_config.h:393
uint32_t u32
Definition: stdint.h:23

References __vxge_hw_vpath_reset(), __vxge_hw_virtualpath::hldev, status, __vxge_hw_virtualpath::vp_id, __vxge_hw_virtualpath::vp_open, VXGE_HW_ERR_VPATH_NOT_OPEN, VXGE_HW_VP_NOT_OPEN, and vxge_trace.

Referenced by vxge_reset_all_vpaths().

◆ vxge_hw_vpath_recover_from_reset()

enum vxge_hw_status vxge_hw_vpath_recover_from_reset ( struct __vxge_hw_virtualpath vpath)

Definition at line 1818 of file vxge_config.c.

1819 {
1820  enum vxge_hw_status status;
1821  struct __vxge_hw_device *hldev;
1822  u32 vp_id;
1823 
1824  vxge_trace();
1825 
1826  vp_id = vpath->vp_id;
1827  hldev = vpath->hldev;
1828 
1829  if (vpath->vp_open == VXGE_HW_VP_NOT_OPEN) {
1831  goto exit;
1832  }
1833 
1835  if (status != VXGE_HW_OK)
1836  goto exit;
1837 
1838  status = __vxge_hw_vpath_initialize(hldev, vp_id);
1839  if (status != VXGE_HW_OK)
1840  goto exit;
1841 
1843 
1844 exit:
1845  return status;
1846 }
enum vxge_hw_status __vxge_hw_vpath_initialize(struct __vxge_hw_device *hldev, u32 vp_id)
Definition: vxge_config.c:1514
uint8_t status
Status.
Definition: ena.h:16
enum vxge_hw_status __vxge_hw_vpath_reset_check(struct __vxge_hw_virtualpath *vpath)
Definition: vxge_config.c:1249
struct __vxge_hw_device - Hal device object @magic: Magic Number @bar0: BAR0 virtual address.
Definition: vxge_config.h:477
#define vxge_trace()
Definition: vxge_config.h:767
vxge_hw_status
Definition: vxge_config.h:70
struct __vxge_hw_device * hldev
Definition: vxge_config.h:396
#define VXGE_HW_VP_NOT_OPEN
Definition: vxge_config.h:393
void __vxge_hw_vpath_prc_configure(struct __vxge_hw_device *hldev)
Definition: vxge_config.c:1290
uint32_t u32
Definition: stdint.h:23

References __vxge_hw_vpath_initialize(), __vxge_hw_vpath_prc_configure(), __vxge_hw_vpath_reset_check(), __vxge_hw_virtualpath::hldev, status, __vxge_hw_virtualpath::vp_id, __vxge_hw_virtualpath::vp_open, VXGE_HW_ERR_VPATH_NOT_OPEN, VXGE_HW_OK, VXGE_HW_VP_NOT_OPEN, and vxge_trace.

Referenced by vxge_reset_all_vpaths().

◆ vxge_hw_vpath_enable()

void vxge_hw_vpath_enable ( struct __vxge_hw_virtualpath vpath)

Definition at line 1854 of file vxge_config.c.

1855 {
1856  struct __vxge_hw_device *hldev;
1857  u64 val64;
1858 
1859  vxge_trace();
1860 
1861  hldev = vpath->hldev;
1862 
1864  1 << (16 - vpath->vp_id));
1865 
1867  &hldev->common_reg->cmn_rsthdlr_cfg1);
1868 }
struct vxge_hw_common_reg * common_reg
Definition: vxge_config.h:497
static void __vxge_hw_pio_mem_write32_upper(u32 val, void __iomem *addr)
Definition: vxge_config.h:703
#define VXGE_HW_CMN_RSTHDLR_CFG1_CLR_VPATH_RESET(val)
Definition: vxge_reg.h:74
uint64_t u64
Definition: stdint.h:25
#define vxge_bVALn(bits, loc, n)
Definition: vxge_reg.h:35
struct __vxge_hw_device - Hal device object @magic: Magic Number @bar0: BAR0 virtual address.
Definition: vxge_config.h:477
#define vxge_trace()
Definition: vxge_config.h:767
struct __vxge_hw_device * hldev
Definition: vxge_config.h:396
uint32_t u32
Definition: stdint.h:23

References __vxge_hw_pio_mem_write32_upper(), vxge_hw_common_reg::cmn_rsthdlr_cfg1, __vxge_hw_device::common_reg, __vxge_hw_virtualpath::hldev, __vxge_hw_virtualpath::vp_id, vxge_bVALn, VXGE_HW_CMN_RSTHDLR_CFG1_CLR_VPATH_RESET, and vxge_trace.

Referenced by vxge_open().

◆ vxge_hw_vpath_mtu_set()

enum vxge_hw_status vxge_hw_vpath_mtu_set ( struct __vxge_hw_virtualpath vpath,
u32  new_mtu 
)

Definition at line 1661 of file vxge_config.c.

1662 {
1663  u64 val64;
1665 
1666  vxge_trace();
1667 
1668  new_mtu += VXGE_HW_MAC_HEADER_MAX_SIZE;
1669 
1670  if ((new_mtu < VXGE_HW_MIN_MTU) || (new_mtu > vpath->max_mtu))
1672 
1673  val64 = readq(&vpath->vp_reg->rxmac_vcfg0);
1674 
1675  val64 &= ~VXGE_HW_RXMAC_VCFG0_RTS_MAX_FRM_LEN(0x3fff);
1676  val64 |= VXGE_HW_RXMAC_VCFG0_RTS_MAX_FRM_LEN(new_mtu);
1677 
1678  writeq(val64, &vpath->vp_reg->rxmac_vcfg0);
1679 
1680  return status;
1681 }
uint64_t readq(volatile uint64_t *io_addr)
Read 64-bit qword from memory-mapped device.
uint8_t status
Status.
Definition: ena.h:16
uint64_t u64
Definition: stdint.h:25
#define VXGE_HW_MAC_HEADER_MAX_SIZE
Definition: vxge_traffic.h:41
struct vxge_hw_vpath_reg * vp_reg
Definition: vxge_config.h:397
#define VXGE_HW_MIN_MTU
Definition: vxge_config.h:34
#define vxge_trace()
Definition: vxge_config.h:767
vxge_hw_status
Definition: vxge_config.h:70
#define VXGE_HW_RXMAC_VCFG0_RTS_MAX_FRM_LEN(val)
Definition: vxge_reg.h:171
void writeq(uint64_t data, volatile uint64_t *io_addr)
Write 64-bit qword to memory-mapped device.

References __vxge_hw_virtualpath::max_mtu, readq(), vxge_hw_vpath_reg::rxmac_vcfg0, status, __vxge_hw_virtualpath::vp_reg, VXGE_HW_ERR_INVALID_MTU_SIZE, VXGE_HW_MAC_HEADER_MAX_SIZE, VXGE_HW_MIN_MTU, VXGE_HW_OK, VXGE_HW_RXMAC_VCFG0_RTS_MAX_FRM_LEN, vxge_trace, and writeq().

Referenced by vxge_open().

◆ vxge_hw_vpath_rx_doorbell_init()

void vxge_hw_vpath_rx_doorbell_init ( struct __vxge_hw_virtualpath vpath)

Definition at line 1737 of file vxge_config.c.

1738 {
1739  u64 new_count, val64;
1740 
1741  vxge_trace();
1742 
1743  if (vpath->hldev->titan1) {
1744  new_count = readq(&vpath->vp_reg->rxdmem_size);
1745  new_count &= 0x1fff;
1746  } else
1747  new_count = VXGE_HW_RING_RXD_QWORDS_MODE_1 * 4;
1748 
1749  val64 = (VXGE_HW_RXDMEM_SIZE_PRC_RXDMEM_SIZE(new_count));
1750 
1752  &vpath->vp_reg->prc_rxd_doorbell);
1753 }
uint64_t readq(volatile uint64_t *io_addr)
Read 64-bit qword from memory-mapped device.
uint64_t u64
Definition: stdint.h:25
#define VXGE_HW_RING_RXD_QWORDS_MODE_1
Definition: vxge_config.h:364
#define VXGE_HW_RXDMEM_SIZE_PRC_RXDMEM_SIZE(val)
Definition: vxge_reg.h:81
#define VXGE_HW_PRC_RXD_DOORBELL_NEW_QW_CNT(val)
Definition: vxge_reg.h:77
struct vxge_hw_vpath_reg * vp_reg
Definition: vxge_config.h:397
#define vxge_trace()
Definition: vxge_config.h:767
struct __vxge_hw_device * hldev
Definition: vxge_config.h:396
void writeq(uint64_t data, volatile uint64_t *io_addr)
Write 64-bit qword to memory-mapped device.

References __vxge_hw_virtualpath::hldev, vxge_hw_vpath_reg::prc_rxd_doorbell, readq(), vxge_hw_vpath_reg::rxdmem_size, __vxge_hw_device::titan1, __vxge_hw_virtualpath::vp_reg, VXGE_HW_PRC_RXD_DOORBELL_NEW_QW_CNT, VXGE_HW_RING_RXD_QWORDS_MODE_1, VXGE_HW_RXDMEM_SIZE_PRC_RXDMEM_SIZE, vxge_trace, and writeq().

Referenced by vxge_open().

◆ __vxge_hw_device_pci_e_init()

void __vxge_hw_device_pci_e_init ( struct __vxge_hw_device hldev)

Definition at line 126 of file vxge_config.c.

127 {
128  u16 cmd = 0;
129  struct pci_device *pdev = hldev->pdev;
130 
131  vxge_trace();
132 
133  /* Set the PErr Repconse bit and SERR in PCI command register. */
135  cmd |= 0x140;
137 
138  return;
139 }
uint16_t u16
Definition: stdint.h:21
int pci_write_config_word(struct pci_device *pci, unsigned int where, uint16_t value)
Write 16-bit word to PCI configuration space.
int pci_read_config_word(struct pci_device *pci, unsigned int where, uint16_t *value)
Read 16-bit word from PCI configuration space.
#define PCI_COMMAND
PCI command.
Definition: pci.h:24
A PCI device.
Definition: pci.h:187
#define vxge_trace()
Definition: vxge_config.h:767
struct pci_device * pdev
Definition: vxge_config.h:482
struct golan_eqe_cmd cmd
Definition: CIB_PRM.h:29

References cmd, PCI_COMMAND, pci_read_config_word(), pci_write_config_word(), __vxge_hw_device::pdev, and vxge_trace.

Referenced by vxge_hw_device_initialize().

◆ __vxge_hw_legacy_swapper_set()

enum vxge_hw_status __vxge_hw_legacy_swapper_set ( struct vxge_hw_legacy_reg __iomem legacy_reg)

Definition at line 683 of file vxge_config.c.

684 {
685  u64 val64;
687 
688  vxge_trace();
689 
690  val64 = readq(&legacy_reg->toc_swapper_fb);
691 
692  wmb();
693 
694  switch (val64) {
695 
697  return status;
698 
701  &legacy_reg->pifm_rd_swap_en);
703  &legacy_reg->pifm_rd_flip_en);
705  &legacy_reg->pifm_wr_swap_en);
707  &legacy_reg->pifm_wr_flip_en);
708  break;
709 
712  &legacy_reg->pifm_rd_swap_en);
714  &legacy_reg->pifm_wr_swap_en);
715  break;
716 
719  &legacy_reg->pifm_rd_flip_en);
721  &legacy_reg->pifm_wr_flip_en);
722  break;
723  }
724 
725  wmb();
726 
727  val64 = readq(&legacy_reg->toc_swapper_fb);
728  if (val64 != VXGE_HW_SWAPPER_INITIAL_VALUE)
730 
731  return status;
732 }
wmb()
uint64_t readq(volatile uint64_t *io_addr)
Read 64-bit qword from memory-mapped device.
#define VXGE_HW_SWAPPER_BYTE_SWAPPED
Definition: vxge_reg.h:623
#define VXGE_HW_SWAPPER_BIT_FLIPPED
Definition: vxge_reg.h:624
uint8_t status
Status.
Definition: ena.h:16
#define VXGE_HW_SWAPPER_WRITE_BIT_FLAP_ENABLE
Definition: vxge_reg.h:636
#define VXGE_HW_SWAPPER_READ_BYTE_SWAP_ENABLE
Definition: vxge_reg.h:627
#define VXGE_HW_SWAPPER_READ_BIT_FLAP_ENABLE
Definition: vxge_reg.h:630
uint64_t u64
Definition: stdint.h:25
#define VXGE_HW_SWAPPER_INITIAL_VALUE
Definition: vxge_reg.h:622
#define VXGE_HW_SWAPPER_WRITE_BYTE_SWAP_ENABLE
Definition: vxge_reg.h:633
#define vxge_trace()
Definition: vxge_config.h:767
vxge_hw_status
Definition: vxge_config.h:70
#define VXGE_HW_SWAPPER_BYTE_SWAPPED_BIT_FLIPPED
Definition: vxge_reg.h:625
void writeq(uint64_t data, volatile uint64_t *io_addr)
Write 64-bit qword to memory-mapped device.

References __vxge_hw_device::legacy_reg, vxge_hw_legacy_reg::pifm_rd_flip_en, vxge_hw_legacy_reg::pifm_rd_swap_en, vxge_hw_legacy_reg::pifm_wr_flip_en, vxge_hw_legacy_reg::pifm_wr_swap_en, readq(), status, vxge_hw_legacy_reg::toc_swapper_fb, VXGE_HW_ERR_SWAPPER_CTRL, VXGE_HW_OK, VXGE_HW_SWAPPER_BIT_FLIPPED, VXGE_HW_SWAPPER_BYTE_SWAPPED, VXGE_HW_SWAPPER_BYTE_SWAPPED_BIT_FLIPPED, VXGE_HW_SWAPPER_INITIAL_VALUE, VXGE_HW_SWAPPER_READ_BIT_FLAP_ENABLE, VXGE_HW_SWAPPER_READ_BYTE_SWAP_ENABLE, VXGE_HW_SWAPPER_WRITE_BIT_FLAP_ENABLE, VXGE_HW_SWAPPER_WRITE_BYTE_SWAP_ENABLE, vxge_trace, wmb(), and writeq().

Referenced by __vxge_hw_device_get_legacy_reg(), and __vxge_hw_vpath_initialize().

◆ __vxge_hw_vpath_swapper_set()

enum vxge_hw_status __vxge_hw_vpath_swapper_set ( struct vxge_hw_vpath_reg __iomem vpath_reg)

Definition at line 739 of file vxge_config.c.

740 {
741  vxge_trace();
742 
743 #if (__BYTE_ORDER != __BIG_ENDIAN)
744  u64 val64;
745 
746  val64 = readq(&vpath_reg->vpath_general_cfg1);
747  wmb();
749  writeq(val64, &vpath_reg->vpath_general_cfg1);
750  wmb();
751 #endif
752  return VXGE_HW_OK;
753 }
wmb()
uint64_t readq(volatile uint64_t *io_addr)
Read 64-bit qword from memory-mapped device.
#define VXGE_HW_VPATH_GENERAL_CFG1_CTL_BYTE_SWAPEN
Definition: vxge_reg.h:558
uint64_t u64
Definition: stdint.h:25
#define vxge_trace()
Definition: vxge_config.h:767
void writeq(uint64_t data, volatile uint64_t *io_addr)
Write 64-bit qword to memory-mapped device.

References readq(), vxge_hw_vpath_reg::vpath_general_cfg1, __vxge_hw_device::vpath_reg, VXGE_HW_OK, VXGE_HW_VPATH_GENERAL_CFG1_CTL_BYTE_SWAPEN, vxge_trace, wmb(), and writeq().

Referenced by __vxge_hw_vpath_initialize().

◆ __vxge_hw_kdfc_swapper_set()

enum vxge_hw_status __vxge_hw_kdfc_swapper_set ( struct vxge_hw_legacy_reg __iomem legacy_reg,
struct vxge_hw_vpath_reg __iomem vpath_reg 
)

Definition at line 760 of file vxge_config.c.

763 {
764  u64 val64;
765 
766  vxge_trace();
767 
768  val64 = readq(&legacy_reg->pifm_wr_swap_en);
769 
771  val64 = readq(&vpath_reg->kdfcctl_cfg0);
772  wmb();
773 
777 
778  writeq(val64, &vpath_reg->kdfcctl_cfg0);
779  wmb();
780  }
781 
782  return VXGE_HW_OK;
783 }
wmb()
#define VXGE_HW_KDFCCTL_CFG0_BYTE_SWAPEN_FIFO2
Definition: vxge_reg.h:573
#define VXGE_HW_KDFCCTL_CFG0_BYTE_SWAPEN_FIFO1
Definition: vxge_reg.h:572
uint64_t readq(volatile uint64_t *io_addr)
Read 64-bit qword from memory-mapped device.
uint64_t u64
Definition: stdint.h:25
#define VXGE_HW_KDFCCTL_CFG0_BYTE_SWAPEN_FIFO0
Definition: vxge_reg.h:571
#define VXGE_HW_SWAPPER_WRITE_BYTE_SWAP_ENABLE
Definition: vxge_reg.h:633
#define vxge_trace()
Definition: vxge_config.h:767
void writeq(uint64_t data, volatile uint64_t *io_addr)
Write 64-bit qword to memory-mapped device.

References vxge_hw_vpath_reg::kdfcctl_cfg0, __vxge_hw_device::legacy_reg, vxge_hw_legacy_reg::pifm_wr_swap_en, readq(), __vxge_hw_device::vpath_reg, VXGE_HW_KDFCCTL_CFG0_BYTE_SWAPEN_FIFO0, VXGE_HW_KDFCCTL_CFG0_BYTE_SWAPEN_FIFO1, VXGE_HW_KDFCCTL_CFG0_BYTE_SWAPEN_FIFO2, VXGE_HW_OK, VXGE_HW_SWAPPER_WRITE_BYTE_SWAP_ENABLE, vxge_trace, wmb(), and writeq().

Referenced by __vxge_hw_vpath_kdfc_configure().

◆ __vxge_hw_device_register_poll()

enum vxge_hw_status __vxge_hw_device_register_poll ( void __iomem reg,
u64  mask,
u32  max_millis 
)

Definition at line 147 of file vxge_config.c.

148 {
149  u64 val64;
150  u32 i = 0;
151  enum vxge_hw_status ret = VXGE_HW_FAIL;
152 
153  udelay(10);
154 
155  do {
156  val64 = readq(reg);
157  if (!(val64 & mask))
158  return VXGE_HW_OK;
159  udelay(100);
160  } while (++i <= 9);
161 
162  i = 0;
163  do {
164  val64 = readq(reg);
165  if (!(val64 & mask))
166  return VXGE_HW_OK;
167  udelay(1000);
168  } while (++i <= max_millis);
169 
170  return ret;
171 }
uint64_t readq(volatile uint64_t *io_addr)
Read 64-bit qword from memory-mapped device.
void udelay(unsigned long usecs)
Delay for a fixed number of microseconds.
Definition: timer.c:60
uint64_t u64
Definition: stdint.h:25
static unsigned int unsigned int reg
Definition: intel.h:245
vxge_hw_status
Definition: vxge_config.h:70
uint32_t u32
Definition: stdint.h:23

References readq(), reg, udelay(), VXGE_HW_FAIL, and VXGE_HW_OK.

Referenced by __vxge_hw_device_vpath_reset_in_prog_check(), __vxge_hw_pio_mem_write64(), __vxge_hw_vpath_pci_read(), __vxge_hw_vpath_reset_check(), and vxge_hw_set_fw_api().

◆ __vxge_hw_pio_mem_write32_upper()

static void __vxge_hw_pio_mem_write32_upper ( u32  val,
void __iomem addr 
)
inlinestatic

Definition at line 703 of file vxge_config.h.

704 {
705  writel(val, addr + 4);
706 }
void writel(uint32_t data, volatile uint32_t *io_addr)
Write 32-bit dword to memory-mapped device.
u32 addr
Definition: sky2.h:8
void __asmcall int val
Definition: setjmp.h:28

References addr, val, and writel().

Referenced by __vxge_hw_pio_mem_write64(), __vxge_hw_vpath_reset(), vxge_hw_device_clear_tx_rx(), vxge_hw_device_intr_disable(), vxge_hw_device_intr_enable(), vxge_hw_device_mask_all(), vxge_hw_device_unmask_all(), vxge_hw_vpath_enable(), vxge_hw_vpath_intr_disable(), and vxge_hw_vpath_intr_enable().

◆ __vxge_hw_pio_mem_write32_lower()

static void __vxge_hw_pio_mem_write32_lower ( u32  val,
void __iomem addr 
)
inlinestatic

Definition at line 708 of file vxge_config.h.

709 {
710  writel(val, addr);
711 }
void writel(uint32_t data, volatile uint32_t *io_addr)
Write 32-bit dword to memory-mapped device.
u32 addr
Definition: sky2.h:8
void __asmcall int val
Definition: setjmp.h:28

References addr, val, and writel().

Referenced by __vxge_hw_pio_mem_write64().

◆ __vxge_hw_pio_mem_write64()

static enum vxge_hw_status __vxge_hw_pio_mem_write64 ( u64  val64,
void __iomem addr,
u64  mask,
u32  max_millis 
)
inlinestatic

Definition at line 714 of file vxge_config.h.

716 {
718 
720  wmb();
722  wmb();
723 
724  status = __vxge_hw_device_register_poll(addr, mask, max_millis);
725  return status;
726 }
wmb()
static void __vxge_hw_pio_mem_write32_upper(u32 val, void __iomem *addr)
Definition: vxge_config.h:703
uint8_t status
Status.
Definition: ena.h:16
#define vxge_bVALn(bits, loc, n)
Definition: vxge_reg.h:35
u32 addr
Definition: sky2.h:8
static void __vxge_hw_pio_mem_write32_lower(u32 val, void __iomem *addr)
Definition: vxge_config.h:708
vxge_hw_status
Definition: vxge_config.h:70
enum vxge_hw_status __vxge_hw_device_register_poll(void __iomem *reg, u64 mask, u32 max_millis)
Definition: vxge_config.c:147
uint32_t u32
Definition: stdint.h:23

References __vxge_hw_device_register_poll(), __vxge_hw_pio_mem_write32_lower(), __vxge_hw_pio_mem_write32_upper(), addr, status, vxge_bVALn, VXGE_HW_OK, and wmb().

Referenced by __vxge_hw_vpath_addr_get(), __vxge_hw_vpath_card_info_get(), and __vxge_hw_vpath_fw_ver_get().

◆ __vxge_hw_device_host_info_get()

void __vxge_hw_device_host_info_get ( struct __vxge_hw_device hldev)

Definition at line 347 of file vxge_config.c.

348 {
349  u64 val64;
350  u32 i;
351 
352  val64 = readq(&hldev->common_reg->host_type_assignments);
353 
354  hldev->host_type =
356 
358 
359  for (i = 0; i < VXGE_HW_MAX_VIRTUAL_PATHS; i++) {
360 
361  if (!(hldev->vpath_assignments & vxge_mBIT(i)))
362  continue;
363 
364  hldev->func_id =
366 
368  hldev->host_type, hldev->func_id);
369 
370  hldev->first_vp_id = i;
371  break;
372  }
373 
374  return;
375 }
uint64_t readq(volatile uint64_t *io_addr)
Read 64-bit qword from memory-mapped device.
struct vxge_hw_common_reg * common_reg
Definition: vxge_config.h:497
u64 host_type_assignments
Definition: vxge_reg.h:883
#define u32
Definition: vga.h:21
#define VXGE_HW_MAX_VIRTUAL_PATHS
Definition: vxge_traffic.h:30
uint64_t u64
Definition: stdint.h:25
#define VXGE_HW_HOST_TYPE_ASSIGNMENTS_GET_HOST_TYPE_ASSIGNMENTS(bits)
Definition: vxge_reg.h:47
struct vxge_hw_vpmgmt_reg * vpmgmt_reg[VXGE_HW_TITAN_VPMGMT_REG_SPACES]
Definition: vxge_config.h:501
#define vxge_mBIT(loc)
Definition: vxge_reg.h:24
u32 __vxge_hw_vpath_func_id_get(struct vxge_hw_vpmgmt_reg __iomem *vpmgmt_reg)
Definition: vxge_config.c:905
static u32 __vxge_hw_device_access_rights_get(u32 host_type, u32 func_id)
Definition: vxge_config.c:311
uint32_t u32
Definition: stdint.h:23

References __vxge_hw_device_access_rights_get(), __vxge_hw_vpath_func_id_get(), __vxge_hw_device::access_rights, __vxge_hw_device::common_reg, __vxge_hw_device::first_vp_id, __vxge_hw_device::func_id, __vxge_hw_device::host_type, vxge_hw_common_reg::host_type_assignments, readq(), u32, __vxge_hw_device::vpath_assignments, vxge_hw_common_reg::vpath_assignments, __vxge_hw_device::vpmgmt_reg, VXGE_HW_HOST_TYPE_ASSIGNMENTS_GET_HOST_TYPE_ASSIGNMENTS, VXGE_HW_MAX_VIRTUAL_PATHS, and vxge_mBIT.

Referenced by vxge_hw_device_initialize().

◆ __vxge_hw_device_initialize()

enum vxge_hw_status __vxge_hw_device_initialize ( struct __vxge_hw_device hldev)

◆ __vxge_hw_vpath_pci_read()

enum vxge_hw_status __vxge_hw_vpath_pci_read ( struct __vxge_hw_virtualpath vpath,
u32  phy_func_0,
u32  offset,
u32 val 
)

Definition at line 864 of file vxge_config.c.

866 {
867  u64 val64;
869  struct vxge_hw_vpath_reg __iomem *vp_reg = vpath->vp_reg;
870 
872 
873  if (phy_func_0)
875 
876  writeq(val64, &vp_reg->pci_config_access_cfg1);
877  wmb();
879  &vp_reg->pci_config_access_cfg2);
880  wmb();
881 
883  &vp_reg->pci_config_access_cfg2,
885 
886  if (status != VXGE_HW_OK)
887  goto exit;
888 
889  val64 = readq(&vp_reg->pci_config_access_status);
890 
893  *val = 0;
894  } else
895  *val = (u32)vxge_bVALn(val64, 32, 32);
896 exit:
897  return status;
898 }
wmb()
u64 pci_config_access_status
Definition: vxge_reg.h:4653
uint64_t readq(volatile uint64_t *io_addr)
Read 64-bit qword from memory-mapped device.
#define VXGE_HW_INTR_MASK_ALL
Definition: vxge_traffic.h:29
uint8_t status
Status.
Definition: ena.h:16
#define u32
Definition: vga.h:21
static userptr_t size_t offset
Offset of the first segment within the content.
Definition: deflate.h:259
uint64_t u64
Definition: stdint.h:25
#define VXGE_HW_DEF_DEVICE_POLL_MILLIS
Definition: vxge_config.h:67
#define vxge_bVALn(bits, loc, n)
Definition: vxge_reg.h:35
#define VXGE_HW_PCI_CONFIG_ACCESS_CFG2_REQ
Definition: vxge_reg.h:630
#define __iomem
Definition: igbvf_osdep.h:45
u64 pci_config_access_cfg1
Definition: vxge_reg.h:4648
void __asmcall int val
Definition: setjmp.h:28
struct vxge_hw_vpath_reg * vp_reg
Definition: vxge_config.h:397
#define VXGE_HW_PCI_CONFIG_ACCESS_CFG1_SEL_FUNC0
Definition: vxge_reg.h:628
vxge_hw_status
Definition: vxge_config.h:70
#define VXGE_HW_PCI_CONFIG_ACCESS_CFG1_ADDRESS(val)
Definition: vxge_reg.h:627
#define VXGE_HW_PCI_CONFIG_ACCESS_STATUS_ACCESS_ERR
Definition: vxge_reg.h:632
u64 pci_config_access_cfg2
Definition: vxge_reg.h:4651
void writeq(uint64_t data, volatile uint64_t *io_addr)
Write 64-bit qword to memory-mapped device.
enum vxge_hw_status __vxge_hw_device_register_poll(void __iomem *reg, u64 mask, u32 max_millis)
Definition: vxge_config.c:147

References __iomem, __vxge_hw_device_register_poll(), offset, vxge_hw_vpath_reg::pci_config_access_cfg1, vxge_hw_vpath_reg::pci_config_access_cfg2, vxge_hw_vpath_reg::pci_config_access_status, readq(), status, u32, val, __vxge_hw_virtualpath::vp_reg, vxge_bVALn, VXGE_HW_DEF_DEVICE_POLL_MILLIS, VXGE_HW_FAIL, VXGE_HW_INTR_MASK_ALL, VXGE_HW_OK, VXGE_HW_PCI_CONFIG_ACCESS_CFG1_ADDRESS, VXGE_HW_PCI_CONFIG_ACCESS_CFG1_SEL_FUNC0, VXGE_HW_PCI_CONFIG_ACCESS_CFG2_REQ, VXGE_HW_PCI_CONFIG_ACCESS_STATUS_ACCESS_ERR, wmb(), and writeq().

Referenced by __vxge_hw_vpath_initialize().

◆ __vxge_hw_vpath_addr_get()

enum vxge_hw_status __vxge_hw_vpath_addr_get ( struct vxge_hw_vpath_reg __iomem vpath_reg,
u8(macaddr)  [ETH_ALEN],
u8(macaddr_mask)  [ETH_ALEN] 
)

◆ __vxge_hw_vpath_func_id_get()

u32 __vxge_hw_vpath_func_id_get ( struct vxge_hw_vpmgmt_reg __iomem vpmgmt_reg)

Definition at line 905 of file vxge_config.c.

906 {
907  u64 val64;
908 
909  val64 = readq(&vpmgmt_reg->vpath_to_func_map_cfg1);
910 
911  return
913 }
uint64_t readq(volatile uint64_t *io_addr)
Read 64-bit qword from memory-mapped device.
uint64_t u64
Definition: stdint.h:25
#define VXGE_HW_VPATH_TO_FUNC_MAP_CFG1_GET_VPATH_TO_FUNC_MAP_CFG1(bits)
Definition: vxge_reg.h:45
uint32_t u32
Definition: stdint.h:23

References readq(), and VXGE_HW_VPATH_TO_FUNC_MAP_CFG1_GET_VPATH_TO_FUNC_MAP_CFG1.

Referenced by __vxge_hw_device_host_info_get(), and vxge_hw_device_hw_info_get().

◆ __vxge_hw_vpath_reset_check()

enum vxge_hw_status __vxge_hw_vpath_reset_check ( struct __vxge_hw_virtualpath vpath)

Definition at line 1249 of file vxge_config.c.

1250 {
1251  enum vxge_hw_status status;
1252 
1253  vxge_trace();
1254 
1258  1 << (16 - vpath->vp_id)),
1260 
1261  return status;
1262 }
struct vxge_hw_common_reg * common_reg
Definition: vxge_config.h:497
uint8_t status
Status.
Definition: ena.h:16
#define VXGE_HW_DEF_DEVICE_POLL_MILLIS
Definition: vxge_config.h:67
#define vxge_trace()
Definition: vxge_config.h:767
vxge_hw_status
Definition: vxge_config.h:70
struct __vxge_hw_device * hldev
Definition: vxge_config.h:396
#define VXGE_HW_VPATH_RST_IN_PROG_VPATH_RST_IN_PROG(val)
Definition: vxge_reg.h:168
enum vxge_hw_status __vxge_hw_device_register_poll(void __iomem *reg, u64 mask, u32 max_millis)
Definition: vxge_config.c:147

References __vxge_hw_device_register_poll(), __vxge_hw_device::common_reg, __vxge_hw_virtualpath::hldev, status, __vxge_hw_virtualpath::vp_id, vxge_hw_common_reg::vpath_rst_in_prog, VXGE_HW_DEF_DEVICE_POLL_MILLIS, VXGE_HW_VPATH_RST_IN_PROG_VPATH_RST_IN_PROG, and vxge_trace.

Referenced by __vxge_hw_vp_initialize(), vxge_hw_vpath_recover_from_reset(), and vxge_reset_all_vpaths().

◆ vxge_hw_vpath_strip_fcs_check()

enum vxge_hw_status vxge_hw_vpath_strip_fcs_check ( struct __vxge_hw_device hldev,
u64  vpath_mask 
)

Definition at line 789 of file vxge_config.c.

790 {
791  struct vxge_hw_vpmgmt_reg __iomem *vpmgmt_reg;
793  int i = 0, j = 0;
794 
795  for (i = 0; i < VXGE_HW_MAX_VIRTUAL_PATHS; i++) {
796  if (!((vpath_mask) & vxge_mBIT(i)))
797  continue;
798  vpmgmt_reg = hldev->vpmgmt_reg[i];
799  for (j = 0; j < VXGE_HW_MAC_MAX_MAC_PORT_ID; j++) {
800  if (readq(&vpmgmt_reg->rxmac_cfg0_port_vpmgmt_clone[j])
802  return VXGE_HW_FAIL;
803  }
804  }
805  return status;
806 }
uint64_t readq(volatile uint64_t *io_addr)
Read 64-bit qword from memory-mapped device.
uint8_t status
Status.
Definition: ena.h:16
#define VXGE_HW_MAC_MAX_MAC_PORT_ID
Definition: vxge_traffic.h:34
u64 rxmac_cfg0_port_vpmgmt_clone[3]
Definition: vxge_reg.h:3916
#define VXGE_HW_MAX_VIRTUAL_PATHS
Definition: vxge_traffic.h:30
#define __iomem
Definition: igbvf_osdep.h:45
struct vxge_hw_vpmgmt_reg * vpmgmt_reg[VXGE_HW_TITAN_VPMGMT_REG_SPACES]
Definition: vxge_config.h:501
#define vxge_mBIT(loc)
Definition: vxge_reg.h:24
#define VXGE_HW_RXMAC_CFG0_PORT_VPMGMT_CLONE_STRIP_FCS
Definition: vxge_reg.h:96
vxge_hw_status
Definition: vxge_config.h:70

References __iomem, readq(), vxge_hw_vpmgmt_reg::rxmac_cfg0_port_vpmgmt_clone, status, __vxge_hw_device::vpmgmt_reg, VXGE_HW_FAIL, VXGE_HW_MAC_MAX_MAC_PORT_ID, VXGE_HW_MAX_VIRTUAL_PATHS, VXGE_HW_OK, VXGE_HW_RXMAC_CFG0_PORT_VPMGMT_CLONE_STRIP_FCS, and vxge_mBIT.

Referenced by vxge_probe().

◆ vxge_hw_get_func_mode()

enum vxge_hw_status vxge_hw_get_func_mode ( struct __vxge_hw_device hldev,
u32 func_mode 
)

Definition at line 97 of file vxge_config.c.

98 {
100  struct vxge_hw_vpath_reg __iomem *vp_reg;
101  u64 val64;
102  int vp_id;
103 
104  /* get the first vpath number assigned to this function */
105  vp_id = hldev->first_vp_id;
106 
107  vp_reg = (struct vxge_hw_vpath_reg __iomem *)hldev->vpath_reg[vp_id];
108 
109  status = vxge_hw_set_fw_api(hldev, vp_id,
111 
112  if (status == VXGE_HW_OK) {
113  val64 = readq(&vp_reg->rts_access_steer_data0);
114  *func_mode = VXGE_HW_GET_FUNC_MODE_VAL(val64);
115  }
116 
117  return status;
118 }
uint64_t readq(volatile uint64_t *io_addr)
Read 64-bit qword from memory-mapped device.
enum vxge_hw_status vxge_hw_set_fw_api(struct __vxge_hw_device *hldev, u64 vp_id, u32 action, u32 offset, u64 data0, u64 data1)
Definition: vxge_config.c:47
uint8_t status
Status.
Definition: ena.h:16
uint64_t u64
Definition: stdint.h:25
u64 rts_access_steer_data0
Definition: vxge_reg.h:4215
#define __iomem
Definition: igbvf_osdep.h:45
struct vxge_hw_vpath_reg * vpath_reg[VXGE_HW_TITAN_VPATH_REG_SPACES]
Definition: vxge_config.h:503
vxge_hw_status
Definition: vxge_config.h:70
#define VXGE_HW_GET_FUNC_MODE_VAL(val)
Definition: vxge_reg.h:67
#define VXGE_HW_FW_API_GET_FUNC_MODE
Definition: vxge_reg.h:65

References __iomem, __vxge_hw_device::first_vp_id, readq(), vxge_hw_vpath_reg::rts_access_steer_data0, status, __vxge_hw_device::vpath_reg, VXGE_HW_FW_API_GET_FUNC_MODE, VXGE_HW_GET_FUNC_MODE_VAL, VXGE_HW_OK, and vxge_hw_set_fw_api().

Referenced by vxge_probe().

◆ vxge_hw_set_fw_api()

enum vxge_hw_status vxge_hw_set_fw_api ( struct __vxge_hw_device hldev,
u64  vp_id,
u32  action,
u32  offset,
u64  data0,
u64  data1 
)

Definition at line 47 of file vxge_config.c.

53 {
55  u64 val64;
57 
58  struct vxge_hw_vpath_reg __iomem *vp_reg;
59 
60  vp_reg = (struct vxge_hw_vpath_reg __iomem *)hldev->vpath_reg[vp_id];
61 
64 
65  wmb();
66 
67  val64 = VXGE_HW_RTS_ACCESS_STEER_CTRL_ACTION(action) |
71 
72  writeq(val64, &vp_reg->rts_access_steer_ctrl);
73 
74  wmb();
75 
77  &vp_reg->rts_access_steer_ctrl,
79  WAIT_FACTOR *
81 
82  if (status != VXGE_HW_OK)
83  return VXGE_HW_FAIL;
84 
85  val64 = readq(&vp_reg->rts_access_steer_ctrl);
86 
89  else
91 
92  return status;
93 }
wmb()
uint64_t readq(volatile uint64_t *io_addr)
Read 64-bit qword from memory-mapped device.
#define VXGE_HW_RTS_ACCESS_STEER_CTRL_OFFSET(val)
Definition: vxge_reg.h:189
u32 data1
Definition: ar9003_mac.h:71
#define VXGE_HW_RTS_ACCESS_STEER_CTRL_RMACJ_STATUS
Definition: vxge_reg.h:188
#define WAIT_FACTOR
Definition: vxge_config.h:28
uint8_t status
Status.
Definition: ena.h:16
#define VXGE_HW_RTS_ACCESS_STEER_CTRL_STROBE
Definition: vxge_reg.h:185
static userptr_t size_t offset
Offset of the first segment within the content.
Definition: deflate.h:259
uint64_t u64
Definition: stdint.h:25
u64 rts_access_steer_data0
Definition: vxge_reg.h:4215
#define VXGE_HW_DEF_DEVICE_POLL_MILLIS
Definition: vxge_config.h:67
u64 rts_access_steer_ctrl
Definition: vxge_reg.h:4204
#define __iomem
Definition: igbvf_osdep.h:45
struct vxge_hw_vpath_reg * vpath_reg[VXGE_HW_TITAN_VPATH_REG_SPACES]
Definition: vxge_config.h:503
u64 rts_access_steer_data1
Definition: vxge_reg.h:4217
vxge_hw_status
Definition: vxge_config.h:70
#define VXGE_HW_RTS_ACCESS_STEER_CTRL_DATA_STRUCT_SEL_FW_MEMO
Definition: vxge_reg.h:204
#define VXGE_HW_RTS_ACCESS_STEER_CTRL_ACTION(val)
Definition: vxge_reg.h:183
u32 data0
Definition: ar9003_mac.h:69
#define VXGE_HW_RTS_ACCESS_STEER_CTRL_DATA_STRUCT_SEL(val)
Definition: vxge_reg.h:184
void writeq(uint64_t data, volatile uint64_t *io_addr)
Write 64-bit qword to memory-mapped device.
uint32_t u32
Definition: stdint.h:23
enum vxge_hw_status __vxge_hw_device_register_poll(void __iomem *reg, u64 mask, u32 max_millis)
Definition: vxge_config.c:147

References __iomem, __vxge_hw_device_register_poll(), data0, data1, offset, readq(), vxge_hw_vpath_reg::rts_access_steer_ctrl, vxge_hw_vpath_reg::rts_access_steer_data0, vxge_hw_vpath_reg::rts_access_steer_data1, status, __vxge_hw_device::vpath_reg, VXGE_HW_DEF_DEVICE_POLL_MILLIS, VXGE_HW_FAIL, VXGE_HW_OK, VXGE_HW_RTS_ACCESS_STEER_CTRL_ACTION, VXGE_HW_RTS_ACCESS_STEER_CTRL_DATA_STRUCT_SEL, VXGE_HW_RTS_ACCESS_STEER_CTRL_DATA_STRUCT_SEL_FW_MEMO, VXGE_HW_RTS_ACCESS_STEER_CTRL_OFFSET, VXGE_HW_RTS_ACCESS_STEER_CTRL_RMACJ_STATUS, VXGE_HW_RTS_ACCESS_STEER_CTRL_STROBE, WAIT_FACTOR, wmb(), and writeq().

Referenced by vxge_hw_get_func_mode().

◆ vxge_hw_vpath_set_zero_rx_frm_len()

void vxge_hw_vpath_set_zero_rx_frm_len ( struct __vxge_hw_device hldev)

Definition at line 30 of file vxge_config.c.

31 {
32  u64 val64;
33  struct __vxge_hw_virtualpath *vpath;
34  struct vxge_hw_vpath_reg __iomem *vp_reg;
35 
36  vpath = &hldev->virtual_path;
37  vp_reg = vpath->vp_reg;
38 
39  val64 = readq(&vp_reg->rxmac_vcfg0);
40  val64 &= ~VXGE_HW_RXMAC_VCFG0_RTS_MAX_FRM_LEN(0x3fff);
41  writeq(val64, &vp_reg->rxmac_vcfg0);
42  val64 = readq(&vp_reg->rxmac_vcfg0);
43  return;
44 }
uint64_t readq(volatile uint64_t *io_addr)
Read 64-bit qword from memory-mapped device.
struct __vxge_hw_virtualpath virtual_path
Definition: vxge_config.h:507
uint64_t u64
Definition: stdint.h:25
#define __iomem
Definition: igbvf_osdep.h:45
struct vxge_hw_vpath_reg * vp_reg
Definition: vxge_config.h:397
#define VXGE_HW_RXMAC_VCFG0_RTS_MAX_FRM_LEN(val)
Definition: vxge_reg.h:171
void writeq(uint64_t data, volatile uint64_t *io_addr)
Write 64-bit qword to memory-mapped device.

References __iomem, readq(), vxge_hw_vpath_reg::rxmac_vcfg0, __vxge_hw_device::virtual_path, __vxge_hw_virtualpath::vp_reg, VXGE_HW_RXMAC_VCFG0_RTS_MAX_FRM_LEN, and writeq().

Referenced by vxge_close().

Variable Documentation

◆ debug_filter

const u16 debug_filter = VXGE_ERR
static

vxge_debug @mask: mask for the debug @fmt: printf like format string

Definition at line 761 of file vxge_config.h.