10 #include "../../mlx_utils/include/private/mlx_pci_priv.h" 85 for(;iteration <
count ; iteration++) {
struct option_descriptor read[1]
#define MLX_INVALID_PARAMETER
int pci_write_config_word(struct pci_device *pci, unsigned int where, uint16_t value)
Write 16-bit word to PCI configuration space.
mlx_status mlx_pci_mem_write_priv(IN mlx_utils *utils, IN mlx_pci_width width, IN mlx_uint8 bar_index, IN mlx_uint64 offset, IN mlx_uintn count, IN mlx_void *buffer)
uint32_t readl(volatile uint32_t *io_addr)
Read 32-bit dword from memory-mapped device.
static mlx_status mlx_pci_config_word(IN mlx_utils *utils, IN mlx_boolean read, IN mlx_uint32 offset, IN OUT mlx_uint16 *buffer)
#define PCI_BASE_ADDRESS_0
int pci_read_config_word(struct pci_device *pci, unsigned int where, uint16_t *value)
Read 16-bit word from PCI configuration space.
uint32_t buffer
Buffer index (or NETVSC_RNDIS_NO_BUFFER)
void adjust_pci_device(struct pci_device *pci)
Enable PCI device.
mlx_status mlx_pci_write_priv(IN mlx_utils *utils, IN mlx_pci_width width, IN mlx_uint32 offset, IN mlx_uintn count, IN mlx_void *buffer)
mlx_status mlx_pci_init_priv(IN mlx_utils *utils)
int pci_read_config_dword(struct pci_device *pci, unsigned int where, uint32_t *value)
Read 32-bit dword from PCI configuration space.
static mlx_status mlx_pci_config_byte(IN mlx_utils *utils, IN mlx_boolean read, IN mlx_uint32 offset, IN OUT mlx_uint8 *buffer)
void writel(uint32_t data, volatile uint32_t *io_addr)
Write 32-bit dword to memory-mapped device.
A 16-bit general register.
static userptr_t size_t offset
Offset of the first segment within the content.
unsigned long pci_bar_start(struct pci_device *pci, unsigned int reg)
Find the start of a PCI BAR.
static mlx_status mlx_pci_config_dword(IN mlx_utils *utils, IN mlx_boolean read, IN mlx_uint32 offset, IN OUT mlx_uint32 *buffer)
mlx_status mlx_pci_mem_read_priv(IN mlx_utils *utils, IN mlx_pci_width width, IN mlx_uint8 bar_index, IN mlx_uint64 offset, IN mlx_uintn count, OUT mlx_void *buffer)
static mlx_status mlx_pci_config(IN mlx_utils *utils, IN mlx_boolean read, IN mlx_pci_width width, IN mlx_uint32 offset, IN mlx_uintn count, IN OUT mlx_void *buffer)
int pci_write_config_byte(struct pci_device *pci, unsigned int where, uint8_t value)
Write byte to PCI configuration space.
mlx_status mlx_pci_teardown_priv(IN mlx_utils *utils)
uint8_t unused[32]
Unused.
#define barrier()
Optimisation barrier.
uint16_t count
Number of entries.
int pci_write_config_dword(struct pci_device *pci, unsigned int where, uint32_t value)
Write 32-bit dword to PCI configuration space.
void iounmap(volatile const void *io_addr)
Unmap I/O address.
void * pci_ioremap(struct pci_device *pci, unsigned long bus_addr, size_t len)
Map PCI bus address as an I/O address.
#define NULL
NULL pointer (VOID *)
mlx_status mlx_pci_read_priv(IN mlx_utils *utils, IN mlx_pci_width width, IN mlx_uint32 offset, IN mlx_uintn count, OUT mlx_void *buffer)
int pci_read_config_byte(struct pci_device *pci, unsigned int where, uint8_t *value)
Read byte from PCI configuration space.