Switchtec Userspace PROJECT_NUMBER = 4.4
Loading...
Searching...
No Matches
PCI Capability Access

Access PCI capabilities through GAS. More...

Classes

struct  gas_cap_read_cmd
struct  gas_cap_write_cmd

Functions

int switchtec_multicast_cap_get (struct switchtec_dev *dev, uint32_t gas_base, struct switchtec_multicast_cap *cap)
 Read the multicast capability registers.
int switchtec_multicast_cap_set (struct switchtec_dev *dev, uint32_t gas_base, struct switchtec_multicast_set *set)
 Set multicast capability registers.

Detailed Description

Access PCI capabilities through GAS.

These functions provide access to PCI capabilities in the switch's Global Address Space. The multicast capability allows configuring PCIe multicast functionality.

Function Documentation

◆ switchtec_multicast_cap_get()

int switchtec_multicast_cap_get ( struct switchtec_dev * dev,
uint32_t gas_base,
struct switchtec_multicast_cap * cap )

Read the multicast capability registers.

Parameters
[in]devSwitchtec device handle
[in]gas_baseGAS base address of the port
[out]capMulticast capability structure to fill
Returns
0 on success, negative on error

Definition at line 70 of file cap.c.

◆ switchtec_multicast_cap_set()

int switchtec_multicast_cap_set ( struct switchtec_dev * dev,
uint32_t gas_base,
struct switchtec_multicast_set * set )

Set multicast capability registers.

Parameters
[in]devSwitchtec device handle
[in]gas_baseGAS base address of the port
[in]setParameters specifying which fields to set
Returns
0 on success, negative on error

The set structure specifies which fields to modify:

  • enable/disable: Set the MC Enable bit
  • num_group: Set the number of multicast groups (0-63), -1 to skip
  • set_base_addr/base_addr: Set the MC Base Address
  • set_receive/receive: Set the MC Receive register
  • set_block_all/block_all: Set the MC Block All register
  • set_block_untranslated/block_untranslated: Set the MC Block Untranslated register

Definition at line 118 of file cap.c.