iPXE
|
Intel 40 Gigabit Ethernet network card driver. More...
Go to the source code of this file.
Data Structures | |
struct | intelxl_admin_offsets |
Admin queue register offsets. More... | |
struct | intelxl_admin_buffer_params |
Admin queue data buffer command parameters. More... | |
struct | intelxl_admin_version |
Admin queue version number. More... | |
struct | intelxl_admin_version_params |
Admin queue Get Version command parameters. More... | |
struct | intelxl_admin_driver_params |
Admin queue Driver Version command parameters. More... | |
struct | intelxl_admin_driver_buffer |
Admin queue Driver Version data buffer. More... | |
struct | intelxl_admin_shutdown_params |
Admin queue Shutdown command parameters. More... | |
struct | intelxl_admin_mac_read_params |
Admin queue Manage MAC Address Read command parameters. More... | |
struct | intelxl_admin_mac_read_buffer |
Admin queue Manage MAC Address Read data buffer. More... | |
struct | intelxl_admin_mac_write_params |
Admin queue Manage MAC Address Write command parameters. More... | |
struct | intelxl_admin_clear_pxe_params |
Admin queue Clear PXE Mode command parameters. More... | |
struct | intelxl_admin_switch_config |
Switching element configuration. More... | |
struct | intelxl_admin_switch_params |
Admin queue Get Switch Configuration command parameters. More... | |
struct | intelxl_admin_switch_buffer |
Admin queue Get Switch Configuration data buffer. More... | |
struct | intelxl_admin_vsi_params |
Admin queue Get VSI Parameters command parameters. More... | |
struct | intelxl_admin_vsi_buffer |
Admin queue Get VSI Parameters data buffer. More... | |
struct | intelxl_admin_promisc_params |
Admin queue Set VSI Promiscuous Modes command parameters. More... | |
struct | intelxl_admin_mac_config_params |
Admin queue Set MAC Configuration command parameters. More... | |
struct | intelxl_admin_autoneg_params |
Admin queue Restart Autonegotiation command parameters. More... | |
struct | intelxl_admin_link_params |
Admin queue Get Link Status command parameters. More... | |
union | intelxl_admin_params |
Admin queue command parameters. More... | |
union | intelxl_admin_buffer |
Admin queue data buffer. More... | |
struct | intelxl_admin_descriptor |
Admin queue descriptor. More... | |
struct | intelxl_admin |
Admin queue. More... | |
struct | intelxl_context_line |
Queue context line. More... | |
struct | intelxl_context_tx |
Transmit queue context. More... | |
struct | intelxl_context_rx |
Receive queue context. More... | |
struct | intelxl_tx_data_descriptor |
Transmit data descriptor. More... | |
struct | intelxl_tx_writeback_descriptor |
Transmit writeback descriptor. More... | |
union | intelxl_tx_descriptor |
Transmit descriptor. More... | |
struct | intelxl_rx_data_descriptor |
Receive data descriptor. More... | |
struct | intelxl_rx_writeback_descriptor |
Receive writeback descriptor. More... | |
union | intelxl_rx_descriptor |
Packet descriptor. More... | |
struct | intelxl_ring |
Descriptor ring. More... | |
struct | intelxl_msix |
MSI-X interrupt. More... | |
struct | intelxl_nic |
An Intel 40 Gigabit network card. More... | |
Macros | |
#define | INTELXL_BAR_SIZE 0x200000 |
BAR size. More... | |
#define | INTELXL_ALIGN 256 |
Alignment. More... | |
#define | INTELXL_ADMIN_CMD 0x080000 |
PF Admin Command Queue register block. More... | |
#define | INTELXL_ADMIN_EVT 0x080080 |
PF Admin Event Queue register block. More... | |
#define | INTELXL_ADMIN_BAL 0x000 |
Admin Queue Base Address Low Register (offset) More... | |
#define | INTELXL_ADMIN_BAH 0x100 |
Admin Queue Base Address High Register (offset) More... | |
#define | INTELXL_ADMIN_LEN 0x200 |
Admin Queue Length Register (offset) More... | |
#define | INTELXL_ADMIN_LEN_LEN(x) ( (x) << 0 ) |
Queue length. More... | |
#define | INTELXL_ADMIN_LEN_ENABLE 0x80000000UL |
Queue enable. More... | |
#define | INTELXL_ADMIN_HEAD 0x300 |
Admin Queue Head Register (offset) More... | |
#define | INTELXL_ADMIN_TAIL 0x400 |
Admin Queue Tail Register (offset) More... | |
#define | INTELXL_ADMIN_VERSION 0x0001 |
Admin queue Get Version command. More... | |
#define | INTELXL_ADMIN_DRIVER 0x0002 |
Admin queue Driver Version command. More... | |
#define | INTELXL_ADMIN_SHUTDOWN 0x0003 |
Admin queue Shutdown command. More... | |
#define | INTELXL_ADMIN_SHUTDOWN_UNLOADING 0x01 |
Driver is unloading. More... | |
#define | INTELXL_ADMIN_MAC_READ 0x0107 |
Admin queue Manage MAC Address Read command. More... | |
#define | INTELXL_ADMIN_MAC_READ_VALID_LAN 0x10 |
LAN MAC address is valid. More... | |
#define | INTELXL_ADMIN_MAC_WRITE 0x0108 |
Admin queue Manage MAC Address Write command. More... | |
#define | INTELXL_ADMIN_CLEAR_PXE 0x0110 |
Admin queue Clear PXE Mode command. More... | |
#define | INTELXL_ADMIN_CLEAR_PXE_MAGIC 0x02 |
Clear PXE Mode magic value. More... | |
#define | INTELXL_ADMIN_SWITCH 0x0200 |
Admin queue Get Switch Configuration command. More... | |
#define | INTELXL_ADMIN_SWITCH_TYPE_VSI 19 |
Virtual Station Inferface element type. More... | |
#define | INTELXL_ADMIN_VSI 0x0212 |
Admin queue Get VSI Parameters command. More... | |
#define | INTELXL_ADMIN_PROMISC 0x0254 |
Admin queue Set VSI Promiscuous Modes command. More... | |
#define | INTELXL_ADMIN_PROMISC_FL_UNICAST 0x0001 |
Promiscuous unicast mode. More... | |
#define | INTELXL_ADMIN_PROMISC_FL_MULTICAST 0x0002 |
Promiscuous multicast mode. More... | |
#define | INTELXL_ADMIN_PROMISC_FL_BROADCAST 0x0004 |
Promiscuous broadcast mode. More... | |
#define | INTELXL_ADMIN_PROMISC_FL_VLAN 0x0010 |
Promiscuous VLAN mode. More... | |
#define | INTELXL_ADMIN_MAC_CONFIG 0x0603 |
Admin queue Set MAC Configuration command. More... | |
#define | INTELXL_ADMIN_MAC_CONFIG_FL_CRC 0x04 |
Append CRC on transmit. More... | |
#define | INTELXL_ADMIN_AUTONEG 0x0605 |
Admin queue Restart Autonegotiation command. More... | |
#define | INTELXL_ADMIN_AUTONEG_FL_RESTART 0x02 |
Restart autonegotiation. More... | |
#define | INTELXL_ADMIN_AUTONEG_FL_ENABLE 0x04 |
Enable link. More... | |
#define | INTELXL_ADMIN_LINK 0x0607 |
Admin queue Get Link Status command. More... | |
#define | INTELXL_ADMIN_LINK_NOTIFY 0x03 |
Notify driver of link status changes. More... | |
#define | INTELXL_ADMIN_LINK_UP 0x01 |
Link is up. More... | |
#define | INTELXL_ADMIN_BUFFER_SIZE 0x1000 |
Maximum size of a data buffer. More... | |
#define | INTELXL_ADMIN_FL_DD 0x0001 |
Admin descriptor done. More... | |
#define | INTELXL_ADMIN_FL_CMP 0x0002 |
Admin descriptor contains a completion. More... | |
#define | INTELXL_ADMIN_FL_ERR 0x0004 |
Admin descriptor completed in error. More... | |
#define | INTELXL_ADMIN_FL_RD 0x0400 |
Admin descriptor uses data buffer for command parameters. More... | |
#define | INTELXL_ADMIN_FL_BUF 0x1000 |
Admin descriptor uses data buffer. More... | |
#define | INTELXL_ADMIN_EEXIST 13 |
Error: attempt to create something that already exists. More... | |
#define | INTELXL_ADMIN_NUM_DESC 4 |
Number of admin queue descriptors. More... | |
#define | INTELXL_ADMIN_MAX_WAIT_MS 100 |
Maximum time to wait for an admin request to complete. More... | |
#define | INTELXL_ADMIN_API_MAJOR 1 |
Admin queue API major version. More... | |
#define | INTELXL_PFCM_LANCTXDATA(x) ( 0x10c100 + ( 0x80 * (x) ) ) |
CMLAN Context Data Register. More... | |
#define | INTELXL_PFCM_LANCTXCTL 0x10c300 |
CMLAN Context Control Register. More... | |
#define | INTELXL_PFCM_LANCTXCTL_QUEUE_NUM(x) ( (x) << 0 ) |
Queue number. More... | |
#define | INTELXL_PFCM_LANCTXCTL_SUB_LINE(x) ( (x) << 12 ) |
Sub-line. More... | |
#define | INTELXL_PFCM_LANCTXCTL_TYPE(x) ( (x) << 15 ) |
Queue type. More... | |
#define | INTELXL_PFCM_LANCTXCTL_TYPE_RX INTELXL_PFCM_LANCTXCTL_TYPE ( 0x0 ) |
RX queue type. More... | |
#define | INTELXL_PFCM_LANCTXCTL_TYPE_TX INTELXL_PFCM_LANCTXCTL_TYPE ( 0x1 ) |
TX queue type. More... | |
#define | INTELXL_PFCM_LANCTXCTL_OP_CODE(x) ( (x) << 17 ) |
Op code. More... | |
#define | INTELXL_PFCM_LANCTXCTL_OP_CODE_READ INTELXL_PFCM_LANCTXCTL_OP_CODE ( 0x0 ) |
Read context. More... | |
#define | INTELXL_PFCM_LANCTXCTL_OP_CODE_WRITE INTELXL_PFCM_LANCTXCTL_OP_CODE ( 0x1 ) |
Write context. More... | |
#define | INTELXL_PFCM_LANCTXSTAT 0x10c380 |
CMLAN Context Status Register. More... | |
#define | INTELXL_PFCM_LANCTXSTAT_DONE 0x00000001UL |
Complete. More... | |
#define | INTELXL_CTX_TX_FL_NEW 0x4000 |
New transmit queue context. More... | |
#define | INTELXL_CTX_TX_BASE(base) ( (base) >> 7 ) |
Transmit queue base address. More... | |
#define | INTELXL_CTX_TX_COUNT(count) ( (count) << 1 ) |
Transmit queue count. More... | |
#define | INTELXL_CTX_TX_QSET(qset) ( (qset) << 4 ) |
Transmit queue set. More... | |
#define | INTELXL_CTX_RX_BASE_COUNT(base, count) ( ( (base) >> 7 ) | ( ( ( uint64_t ) (count) ) << 57 ) ) |
Receive queue base address and queue count. More... | |
#define | INTELXL_CTX_RX_LEN(len) ( (len) >> 1 ) |
Receive queue data buffer length. More... | |
#define | INTELXL_CTX_RX_FL_DSIZE 0x10 |
Use 32-byte receive descriptors. More... | |
#define | INTELXL_CTX_RX_FL_CRCSTRIP 0x20 |
Strip CRC from received packets. More... | |
#define | INTELXL_CTX_RX_MFS(mfs) ( (mfs) >> 2 ) |
Receive queue maximum frame size. More... | |
#define | INTELXL_CTX_MAX_WAIT_MS 100 |
Maximum time to wait for a context operation to complete. More... | |
#define | INTELXL_QUEUE_ENABLE_DELAY_US 20 |
Time to wait for a queue to become enabled. More... | |
#define | INTELXL_QUEUE_PRE_DISABLE_DELAY_US 400 |
Time to wait for a transmit queue to become pre-disabled. More... | |
#define | INTELXL_QUEUE_DISABLE_MAX_WAIT_MS 1000 |
Maximum time to wait for a queue to become disabled. More... | |
#define | INTELXL_QTX_HEAD(x) ( 0x0e4000 + ( 0x4 * (x) ) ) |
Global Transmit Queue Head register. More... | |
#define | INTELXL_GLLAN_TXPRE_QDIS(x) ( 0x0e6500 + ( 0x4 * ( (x) / 0x80 ) ) ) |
Global Transmit Pre Queue Disable register. More... | |
#define | INTELXL_GLLAN_TXPRE_QDIS_QINDX(x) ( (x) << 0 ) |
Queue index. More... | |
#define | INTELXL_GLLAN_TXPRE_QDIS_SET_QDIS 0x40000000UL |
Set disable. More... | |
#define | INTELXL_GLLAN_TXPRE_QDIS_CLEAR_QDIS 0x80000000UL |
Clear disable. More... | |
#define | INTELXL_QTX(x) ( 0x100000 + ( 0x4 * (x) ) ) |
Global Transmit Queue register block. More... | |
#define | INTELXL_QRX(x) ( 0x120000 + ( 0x4 * (x) ) ) |
Global Receive Queue register block. More... | |
#define | INTELXL_QXX_ENA 0x0000 |
Queue Enable Register (offset) More... | |
#define | INTELXL_QXX_ENA_REQ 0x00000001UL |
Enable request. More... | |
#define | INTELXL_QXX_ENA_STAT 0x00000004UL |
Enabled status. More... | |
#define | INTELXL_QXX_CTL 0x4000 |
Queue Control Register (offset) More... | |
#define | INTELXL_QXX_CTL_PFVF_Q(x) ( (x) << 0 ) |
PF/VF queue. More... | |
#define | INTELXL_QXX_CTL_PFVF_Q_PF INTELXL_QXX_CTL_PFVF_Q ( 0x2 ) |
PF queue. More... | |
#define | INTELXL_QXX_CTL_PFVF_PF_INDX(x) ( (x) << 2 ) |
PF index. More... | |
#define | INTELXL_QXX_TAIL 0x8000 |
Queue Tail Pointer Register (offset) More... | |
#define | INTELXL_TX_DATA_DTYP 0x0 |
Transmit data descriptor type. More... | |
#define | INTELXL_TX_DATA_EOP 0x10 |
Transmit data descriptor end of packet. More... | |
#define | INTELXL_TX_DATA_RS 0x20 |
Transmit data descriptor report status. More... | |
#define | INTELXL_TX_DATA_JFDI 0x40 |
Transmit data descriptor pretty please. More... | |
#define | INTELXL_TX_DATA_LEN(len) ( (len) << 2 ) |
Transmit data descriptor length. More... | |
#define | INTELXL_TX_WB_FL_DD 0x01 |
Transmit writeback descriptor complete. More... | |
#define | INTELXL_RX_WB_FL_DD 0x00000001UL |
Receive writeback descriptor complete. More... | |
#define | INTELXL_RX_WB_FL_VLAN 0x00000004UL |
Receive writeback descriptor VLAN tag present. More... | |
#define | INTELXL_RX_WB_FL_RXE 0x00080000UL |
Receive writeback descriptor error. More... | |
#define | INTELXL_RX_WB_LEN(len) ( ( (len) >> 6 ) & 0x3fff ) |
Receive writeback descriptor length. More... | |
#define | INTELXL_TX_NUM_DESC 64 |
Number of transmit descriptors. More... | |
#define | INTELXL_TX_FILL ( INTELXL_TX_NUM_DESC - 1 ) |
Transmit descriptor ring maximum fill level. More... | |
#define | INTELXL_RX_NUM_DESC 64 |
Number of receive descriptors. More... | |
#define | INTELXL_RX_FILL 16 |
Receive descriptor ring fill level. More... | |
#define | INTELXL_MAX_PKT_LEN ( 9728 - 4 /* CRC */ ) |
Maximum packet length (excluding CRC) More... | |
#define | INTELXL_PFINT_DYN_CTL0 0x038480 |
PF Interrupt Zero Dynamic Control Register. More... | |
#define | INTELXL_INT_DYN_CTL_INTENA 0x00000001UL |
Enable. More... | |
#define | INTELXL_INT_DYN_CTL_CLEARPBA 0x00000002UL |
Acknowledge. More... | |
#define | INTELXL_INT_DYN_CTL_INTENA_MASK 0x80000000UL |
Ignore enable. More... | |
#define | INTELXL_PFINT_LNKLST0 0x038500 |
PF Interrupt Zero Linked List Register. More... | |
#define | INTELXL_PFINT_LNKLST0_FIRSTQ_INDX(x) ( (x) << 0 ) |
Queue index. More... | |
#define | INTELXL_PFINT_LNKLST0_FIRSTQ_INDX_NONE INTELXL_PFINT_LNKLST0_FIRSTQ_INDX ( 0x7ff ) |
End of list. More... | |
#define | INTELXL_PFINT_LNKLST0_FIRSTQ_TYPE(x) ( (x) << 11 ) |
Queue type. More... | |
#define | INTELXL_PFINT_LNKLST0_FIRSTQ_TYPE_RX INTELXL_PFINT_LNKLST0_FIRSTQ_TYPE ( 0x0 ) |
Receive queue. More... | |
#define | INTELXL_PFINT_LNKLST0_FIRSTQ_TYPE_TX INTELXL_PFINT_LNKLST0_FIRSTQ_TYPE ( 0x1 ) |
Transmit queue. More... | |
#define | INTELXL_PFINT_ICR0_ENA 0x038800 |
PF Interrupt Zero Cause Enablement Register. More... | |
#define | INTELXL_PFINT_ICR0_ENA_ADMINQ 0x40000000UL |
Admin event. More... | |
#define | INTELXL_QINT_RQCTL(x) ( 0x03a000 + ( 0x4 * (x) ) ) |
Receive Queue Interrupt Cause Control Register. More... | |
#define | INTELXL_QINT_RQCTL_NEXTQ_INDX(x) ( (x) << 16 ) |
Queue index. More... | |
#define | INTELXL_QINT_RQCTL_NEXTQ_INDX_NONE INTELXL_QINT_RQCTL_NEXTQ_INDX ( 0x7ff ) |
End of list. More... | |
#define | INTELXL_QINT_RQCTL_NEXTQ_TYPE(x) ( (x) << 27 ) |
Queue type. More... | |
#define | INTELXL_QINT_RQCTL_NEXTQ_TYPE_RX INTELXL_QINT_RQCTL_NEXTQ_TYPE ( 0x0 ) |
Receive queue. More... | |
#define | INTELXL_QINT_RQCTL_NEXTQ_TYPE_TX INTELXL_QINT_RQCTL_NEXTQ_TYPE ( 0x1 ) |
Transmit queue. More... | |
#define | INTELXL_QINT_RQCTL_CAUSE_ENA 0x40000000UL |
Enable. More... | |
#define | INTELXL_QINT_TQCTL(x) ( 0x03c000 + ( 0x4 * (x) ) ) |
Transmit Queue Interrupt Cause Control Register. More... | |
#define | INTELXL_QINT_TQCTL_NEXTQ_INDX(x) ( (x) << 16 ) |
Queue index. More... | |
#define | INTELXL_QINT_TQCTL_NEXTQ_INDX_NONE INTELXL_QINT_TQCTL_NEXTQ_INDX ( 0x7ff ) |
End of list. More... | |
#define | INTELXL_QINT_TQCTL_NEXTQ_TYPE(x) ( (x) << 27 ) |
Queue type. More... | |
#define | INTELXL_QINT_TQCTL_NEXTQ_TYPE_RX INTELXL_QINT_TQCTL_NEXTQ_TYPE ( 0x0 ) |
Receive queue. More... | |
#define | INTELXL_QINT_TQCTL_NEXTQ_TYPE_TX INTELXL_QINT_TQCTL_NEXTQ_TYPE ( 0x1 ) |
Transmit queue. More... | |
#define | INTELXL_QINT_TQCTL_CAUSE_ENA 0x40000000UL |
Enable. More... | |
#define | INTELXL_PFFUNC_RID 0x09c000 |
Function Requester ID Information Register. More... | |
#define | INTELXL_PFFUNC_RID_FUNC_NUM(x) ( ( (x) >> 0 ) & 0x7 ) |
Function number. More... | |
#define | INTELXL_PFLAN_QALLOC 0x1c0400 |
PF Queue Allocation Register. More... | |
#define | INTELXL_PFLAN_QALLOC_FIRSTQ(x) ( ( (x) >> 0 ) & 0x7ff ) |
First queue. More... | |
#define | INTELXL_PFLAN_QALLOC_LASTQ(x) ( ( (x) >> 16 ) & 0x7ff ) |
Last queue. More... | |
#define | INTELXL_PFGEN_PORTNUM 0x1c0480 |
PF LAN Port Number Register. More... | |
#define | INTELXL_PFGEN_PORTNUM_PORT_NUM(x) ( ( (x) >> 0 ) & 0x3 ) |
Port number. More... | |
#define | INTELXL_MSIX_VECTOR 0 |
MSI-X interrupt vector. More... | |
Functions | |
FILE_LICENCE (GPL2_OR_LATER_OR_UBDL) | |
static void | intelxl_init_admin (struct intelxl_admin *admin, unsigned int base, const struct intelxl_admin_offsets *regs) |
Initialise admin queue. More... | |
static void | intelxl_init_ring (struct intelxl_ring *ring, unsigned int count, size_t len, int(*context)(struct intelxl_nic *intelxl, physaddr_t address)) |
Initialise descriptor ring. More... | |
int | intelxl_msix_enable (struct intelxl_nic *intelxl, struct pci_device *pci, unsigned int vector) |
Enable MSI-X dummy interrupt. More... | |
void | intelxl_msix_disable (struct intelxl_nic *intelxl, struct pci_device *pci, unsigned int vector) |
Disable MSI-X dummy interrupt. More... | |
struct intelxl_admin_descriptor * | intelxl_admin_command_descriptor (struct intelxl_nic *intelxl) |
Get next admin command queue descriptor. More... | |
union intelxl_admin_buffer * | intelxl_admin_command_buffer (struct intelxl_nic *intelxl) |
Get next admin command queue data buffer. More... | |
int | intelxl_admin_command (struct intelxl_nic *intelxl) |
Issue admin queue command. More... | |
int | intelxl_admin_clear_pxe (struct intelxl_nic *intelxl) |
Clear PXE mode. More... | |
int | intelxl_admin_mac_config (struct intelxl_nic *intelxl) |
Set MAC configuration. More... | |
void | intelxl_poll_admin (struct net_device *netdev) |
Poll admin event queue. More... | |
int | intelxl_open_admin (struct intelxl_nic *intelxl) |
Open admin queues. More... | |
void | intelxl_reopen_admin (struct intelxl_nic *intelxl) |
Reopen admin queues (after virtual function reset) More... | |
void | intelxl_close_admin (struct intelxl_nic *intelxl) |
Close admin queues. More... | |
int | intelxl_alloc_ring (struct intelxl_nic *intelxl, struct intelxl_ring *ring) |
Allocate descriptor ring. More... | |
void | intelxl_free_ring (struct intelxl_nic *intelxl, struct intelxl_ring *ring) |
int | intelxl_create_ring (struct intelxl_nic *intelxl, struct intelxl_ring *ring) |
Create descriptor ring. More... | |
void | intelxl_destroy_ring (struct intelxl_nic *intelxl, struct intelxl_ring *ring) |
Destroy descriptor ring. More... | |
void | intelxl_empty_rx (struct intelxl_nic *intelxl) |
Discard unused receive I/O buffers. More... | |
int | intelxl_transmit (struct net_device *netdev, struct io_buffer *iobuf) |
Transmit packet. More... | |
void | intelxl_poll (struct net_device *netdev) |
Poll for completed and received packets. More... | |
Variables | |
const struct intelxl_admin_offsets | intelxl_admin_offsets |
Admin queue register offsets. More... | |
Intel 40 Gigabit Ethernet network card driver.
Definition in file intelxl.h.
#define INTELXL_ALIGN 256 |
#define INTELXL_ADMIN_CMD 0x080000 |
#define INTELXL_ADMIN_EVT 0x080080 |
#define INTELXL_ADMIN_BAL 0x000 |
#define INTELXL_ADMIN_BAH 0x100 |
#define INTELXL_ADMIN_LEN 0x200 |
#define INTELXL_ADMIN_LEN_LEN | ( | x | ) | ( (x) << 0 ) |
#define INTELXL_ADMIN_LEN_ENABLE 0x80000000UL |
#define INTELXL_ADMIN_HEAD 0x300 |
#define INTELXL_ADMIN_TAIL 0x400 |
#define INTELXL_ADMIN_VERSION 0x0001 |
#define INTELXL_ADMIN_DRIVER 0x0002 |
#define INTELXL_ADMIN_SHUTDOWN 0x0003 |
#define INTELXL_ADMIN_SHUTDOWN_UNLOADING 0x01 |
#define INTELXL_ADMIN_MAC_READ 0x0107 |
#define INTELXL_ADMIN_MAC_READ_VALID_LAN 0x10 |
#define INTELXL_ADMIN_MAC_WRITE 0x0108 |
#define INTELXL_ADMIN_CLEAR_PXE 0x0110 |
#define INTELXL_ADMIN_CLEAR_PXE_MAGIC 0x02 |
#define INTELXL_ADMIN_SWITCH 0x0200 |
#define INTELXL_ADMIN_SWITCH_TYPE_VSI 19 |
#define INTELXL_ADMIN_VSI 0x0212 |
#define INTELXL_ADMIN_PROMISC 0x0254 |
#define INTELXL_ADMIN_PROMISC_FL_UNICAST 0x0001 |
#define INTELXL_ADMIN_PROMISC_FL_MULTICAST 0x0002 |
#define INTELXL_ADMIN_PROMISC_FL_BROADCAST 0x0004 |
#define INTELXL_ADMIN_PROMISC_FL_VLAN 0x0010 |
#define INTELXL_ADMIN_MAC_CONFIG 0x0603 |
#define INTELXL_ADMIN_MAC_CONFIG_FL_CRC 0x04 |
#define INTELXL_ADMIN_AUTONEG 0x0605 |
#define INTELXL_ADMIN_AUTONEG_FL_RESTART 0x02 |
#define INTELXL_ADMIN_LINK 0x0607 |
#define INTELXL_ADMIN_LINK_NOTIFY 0x03 |
#define INTELXL_ADMIN_BUFFER_SIZE 0x1000 |
#define INTELXL_ADMIN_FL_CMP 0x0002 |
#define INTELXL_ADMIN_FL_ERR 0x0004 |
#define INTELXL_ADMIN_FL_RD 0x0400 |
#define INTELXL_ADMIN_FL_BUF 0x1000 |
#define INTELXL_ADMIN_EEXIST 13 |
#define INTELXL_ADMIN_NUM_DESC 4 |
#define INTELXL_ADMIN_MAX_WAIT_MS 100 |
#define INTELXL_ADMIN_API_MAJOR 1 |
#define INTELXL_PFCM_LANCTXDATA | ( | x | ) | ( 0x10c100 + ( 0x80 * (x) ) ) |
#define INTELXL_PFCM_LANCTXCTL 0x10c300 |
#define INTELXL_PFCM_LANCTXCTL_QUEUE_NUM | ( | x | ) | ( (x) << 0 ) |
#define INTELXL_PFCM_LANCTXCTL_SUB_LINE | ( | x | ) | ( (x) << 12 ) |
#define INTELXL_PFCM_LANCTXCTL_TYPE | ( | x | ) | ( (x) << 15 ) |
#define INTELXL_PFCM_LANCTXCTL_TYPE_RX INTELXL_PFCM_LANCTXCTL_TYPE ( 0x0 ) |
#define INTELXL_PFCM_LANCTXCTL_TYPE_TX INTELXL_PFCM_LANCTXCTL_TYPE ( 0x1 ) |
#define INTELXL_PFCM_LANCTXCTL_OP_CODE | ( | x | ) | ( (x) << 17 ) |
#define INTELXL_PFCM_LANCTXCTL_OP_CODE_READ INTELXL_PFCM_LANCTXCTL_OP_CODE ( 0x0 ) |
#define INTELXL_PFCM_LANCTXCTL_OP_CODE_WRITE INTELXL_PFCM_LANCTXCTL_OP_CODE ( 0x1 ) |
#define INTELXL_PFCM_LANCTXSTAT 0x10c380 |
#define INTELXL_PFCM_LANCTXSTAT_DONE 0x00000001UL |
#define INTELXL_CTX_TX_FL_NEW 0x4000 |
#define INTELXL_CTX_TX_QSET | ( | qset | ) | ( (qset) << 4 ) |
#define INTELXL_CTX_RX_FL_DSIZE 0x10 |
#define INTELXL_CTX_RX_FL_CRCSTRIP 0x20 |
#define INTELXL_CTX_RX_MFS | ( | mfs | ) | ( (mfs) >> 2 ) |
#define INTELXL_CTX_MAX_WAIT_MS 100 |
#define INTELXL_QUEUE_ENABLE_DELAY_US 20 |
#define INTELXL_QUEUE_PRE_DISABLE_DELAY_US 400 |
#define INTELXL_QUEUE_DISABLE_MAX_WAIT_MS 1000 |
#define INTELXL_QTX_HEAD | ( | x | ) | ( 0x0e4000 + ( 0x4 * (x) ) ) |
#define INTELXL_GLLAN_TXPRE_QDIS | ( | x | ) | ( 0x0e6500 + ( 0x4 * ( (x) / 0x80 ) ) ) |
#define INTELXL_GLLAN_TXPRE_QDIS_QINDX | ( | x | ) | ( (x) << 0 ) |
#define INTELXL_GLLAN_TXPRE_QDIS_SET_QDIS 0x40000000UL |
#define INTELXL_GLLAN_TXPRE_QDIS_CLEAR_QDIS 0x80000000UL |
#define INTELXL_QTX | ( | x | ) | ( 0x100000 + ( 0x4 * (x) ) ) |
#define INTELXL_QRX | ( | x | ) | ( 0x120000 + ( 0x4 * (x) ) ) |
#define INTELXL_QXX_ENA 0x0000 |
#define INTELXL_QXX_CTL 0x4000 |
#define INTELXL_QXX_CTL_PFVF_Q | ( | x | ) | ( (x) << 0 ) |
#define INTELXL_QXX_CTL_PFVF_Q_PF INTELXL_QXX_CTL_PFVF_Q ( 0x2 ) |
#define INTELXL_QXX_CTL_PFVF_PF_INDX | ( | x | ) | ( (x) << 2 ) |
#define INTELXL_QXX_TAIL 0x8000 |
#define INTELXL_TX_DATA_DTYP 0x0 |
#define INTELXL_TX_DATA_EOP 0x10 |
#define INTELXL_TX_DATA_RS 0x20 |
#define INTELXL_TX_DATA_JFDI 0x40 |
Transmit data descriptor pretty please.
This bit is completely missing from older versions of the XL710 datasheet. Later versions describe it innocuously as "reserved, must be 1". Without this bit, everything will appear to work (up to and including the port "transmit good octets" counter), but no packet will actually be sent.
#define INTELXL_TX_WB_FL_DD 0x01 |
#define INTELXL_RX_WB_FL_DD 0x00000001UL |
#define INTELXL_RX_WB_FL_VLAN 0x00000004UL |
#define INTELXL_RX_WB_FL_RXE 0x00080000UL |
#define INTELXL_TX_NUM_DESC 64 |
#define INTELXL_TX_FILL ( INTELXL_TX_NUM_DESC - 1 ) |
#define INTELXL_RX_NUM_DESC 64 |
#define INTELXL_RX_FILL 16 |
#define INTELXL_MAX_PKT_LEN ( 9728 - 4 /* CRC */ ) |
#define INTELXL_PFINT_DYN_CTL0 0x038480 |
#define INTELXL_INT_DYN_CTL_CLEARPBA 0x00000002UL |
#define INTELXL_INT_DYN_CTL_INTENA_MASK 0x80000000UL |
#define INTELXL_PFINT_LNKLST0 0x038500 |
#define INTELXL_PFINT_LNKLST0_FIRSTQ_INDX | ( | x | ) | ( (x) << 0 ) |
#define INTELXL_PFINT_LNKLST0_FIRSTQ_INDX_NONE INTELXL_PFINT_LNKLST0_FIRSTQ_INDX ( 0x7ff ) |
#define INTELXL_PFINT_LNKLST0_FIRSTQ_TYPE | ( | x | ) | ( (x) << 11 ) |
#define INTELXL_PFINT_LNKLST0_FIRSTQ_TYPE_RX INTELXL_PFINT_LNKLST0_FIRSTQ_TYPE ( 0x0 ) |
#define INTELXL_PFINT_LNKLST0_FIRSTQ_TYPE_TX INTELXL_PFINT_LNKLST0_FIRSTQ_TYPE ( 0x1 ) |
#define INTELXL_PFINT_ICR0_ENA 0x038800 |
#define INTELXL_PFINT_ICR0_ENA_ADMINQ 0x40000000UL |
#define INTELXL_QINT_RQCTL | ( | x | ) | ( 0x03a000 + ( 0x4 * (x) ) ) |
#define INTELXL_QINT_RQCTL_NEXTQ_INDX | ( | x | ) | ( (x) << 16 ) |
#define INTELXL_QINT_RQCTL_NEXTQ_INDX_NONE INTELXL_QINT_RQCTL_NEXTQ_INDX ( 0x7ff ) |
#define INTELXL_QINT_RQCTL_NEXTQ_TYPE | ( | x | ) | ( (x) << 27 ) |
#define INTELXL_QINT_RQCTL_NEXTQ_TYPE_RX INTELXL_QINT_RQCTL_NEXTQ_TYPE ( 0x0 ) |
#define INTELXL_QINT_RQCTL_NEXTQ_TYPE_TX INTELXL_QINT_RQCTL_NEXTQ_TYPE ( 0x1 ) |
#define INTELXL_QINT_TQCTL | ( | x | ) | ( 0x03c000 + ( 0x4 * (x) ) ) |
#define INTELXL_QINT_TQCTL_NEXTQ_INDX | ( | x | ) | ( (x) << 16 ) |
#define INTELXL_QINT_TQCTL_NEXTQ_INDX_NONE INTELXL_QINT_TQCTL_NEXTQ_INDX ( 0x7ff ) |
#define INTELXL_QINT_TQCTL_NEXTQ_TYPE | ( | x | ) | ( (x) << 27 ) |
#define INTELXL_QINT_TQCTL_NEXTQ_TYPE_RX INTELXL_QINT_TQCTL_NEXTQ_TYPE ( 0x0 ) |
#define INTELXL_QINT_TQCTL_NEXTQ_TYPE_TX INTELXL_QINT_TQCTL_NEXTQ_TYPE ( 0x1 ) |
#define INTELXL_PFFUNC_RID 0x09c000 |
#define INTELXL_PFFUNC_RID_FUNC_NUM | ( | x | ) | ( ( (x) >> 0 ) & 0x7 ) |
#define INTELXL_PFLAN_QALLOC 0x1c0400 |
#define INTELXL_PFLAN_QALLOC_FIRSTQ | ( | x | ) | ( ( (x) >> 0 ) & 0x7ff ) |
#define INTELXL_PFLAN_QALLOC_LASTQ | ( | x | ) | ( ( (x) >> 16 ) & 0x7ff ) |
#define INTELXL_PFGEN_PORTNUM 0x1c0480 |
#define INTELXL_PFGEN_PORTNUM_PORT_NUM | ( | x | ) | ( ( (x) >> 0 ) & 0x3 ) |
FILE_LICENCE | ( | GPL2_OR_LATER_OR_UBDL | ) |
|
inlinestatic |
Initialise admin queue.
admin | Admin queue |
base | Register block base |
regs | Register offsets |
Definition at line 475 of file intelxl.h.
References base, intelxl_admin::base, regs, and intelxl_admin::regs.
Referenced by ice_probe(), intelxl_probe(), and intelxlvf_probe().
|
inlinestatic |
Initialise descriptor ring.
ring | Descriptor ring |
count | Number of descriptors |
len | Length of a single descriptor |
context | Method to program queue context |
Definition at line 795 of file intelxl.h.
Referenced by ice_probe(), and intelxl_probe().
int intelxl_msix_enable | ( | struct intelxl_nic * | intelxl, |
struct pci_device * | pci, | ||
unsigned int | vector | ||
) |
Enable MSI-X dummy interrupt.
intelxl | Intel device |
pci | PCI device |
vector | MSI-X vector |
rc | Return status code |
Definition at line 62 of file intelxl.c.
References intelxl_msix::cap, DBGC, dma(), intelxl_nic::dma, DMA_RX, dma_unmap(), intelxl_msix::map, intelxl_msix::msg, intelxl_nic::msix, pci_msix_disable(), pci_msix_enable(), pci_msix_map(), pci_msix_unmask(), rc, strerror(), vector, and virt_to_phys().
Referenced by ice_probe(), intelxl_probe(), and intelxlvf_probe().
void intelxl_msix_disable | ( | struct intelxl_nic * | intelxl, |
struct pci_device * | pci, | ||
unsigned int | vector | ||
) |
Disable MSI-X dummy interrupt.
intelxl | Intel device |
pci | PCI device |
vector | MSI-X vector |
Definition at line 105 of file intelxl.c.
References intelxl_msix::cap, dma_unmap(), intelxl_msix::map, intelxl_nic::msix, pci_msix_disable(), pci_msix_mask(), and vector.
Referenced by ice_probe(), ice_remove(), intelxl_probe(), intelxl_remove(), intelxlvf_probe(), and intelxlvf_remove().
struct intelxl_admin_descriptor* intelxl_admin_command_descriptor | ( | struct intelxl_nic * | intelxl | ) |
Get next admin command queue descriptor.
intelxl | Intel device |
cmd | Command descriptor |
Definition at line 239 of file intelxl.c.
References cmd, intelxl_nic::command, intelxl_admin::desc, intelxl_admin::index, INTELXL_ADMIN_NUM_DESC, and memset().
Referenced by ice_admin_command_descriptor(), intelxl_admin_autoneg(), intelxl_admin_clear_pxe(), intelxl_admin_driver(), intelxl_admin_link(), intelxl_admin_mac_config(), intelxl_admin_mac_read(), intelxl_admin_mac_write(), intelxl_admin_promisc(), intelxl_admin_shutdown(), intelxl_admin_switch(), intelxl_admin_version(), intelxl_admin_vsi(), and intelxlvf_admin_command_descriptor().
union intelxl_admin_buffer* intelxl_admin_command_buffer | ( | struct intelxl_nic * | intelxl | ) |
Get next admin command queue data buffer.
intelxl | Intel device |
buf | Data buffer |
Definition at line 256 of file intelxl.c.
References intelxl_admin::buf, intelxl_nic::command, intelxl_admin::index, INTELXL_ADMIN_NUM_DESC, and memset().
Referenced by ice_admin_command_buffer(), intelxl_admin_driver(), intelxl_admin_mac_read(), intelxl_admin_switch(), intelxl_admin_vsi(), and intelxlvf_admin_command_buffer().
int intelxl_admin_command | ( | struct intelxl_nic * | intelxl | ) |
Issue admin queue command.
intelxl | Intel device |
rc | Return status code |
Definition at line 295 of file intelxl.c.
References address, assert(), intelxl_admin::base, intelxl_admin::buf, cmd, intelxl_nic::command, cpu_to_le16, cpu_to_le32, DBGC, DBGC2, DBGC2_HDA, DBGC_HDA, intelxl_admin::desc, dma(), EIO, EPROTO, ETIMEDOUT, index, intelxl_admin::index, INTELXL_ADMIN_FL_BUF, INTELXL_ADMIN_FL_CMP, INTELXL_ADMIN_FL_DD, INTELXL_ADMIN_FL_ERR, INTELXL_ADMIN_FL_RD, INTELXL_ADMIN_MAX_WAIT_MS, INTELXL_ADMIN_NUM_DESC, le16_to_cpu, le32_to_cpu, intelxl_admin::map, mdelay(), rc, regs, intelxl_admin::regs, intelxl_nic::regs, virt_to_phys(), wmb(), and writel().
Referenced by ice_admin_add_txq(), ice_admin_autoneg(), ice_admin_disable_txq(), ice_admin_link(), ice_admin_mac_read(), ice_admin_mac_write(), ice_admin_rules(), ice_admin_schedule(), ice_admin_switch(), ice_admin_version(), intelxl_admin_autoneg(), intelxl_admin_clear_pxe(), intelxl_admin_driver(), intelxl_admin_link(), intelxl_admin_mac_config(), intelxl_admin_mac_read(), intelxl_admin_mac_write(), intelxl_admin_promisc(), intelxl_admin_shutdown(), intelxl_admin_switch(), intelxl_admin_version(), intelxl_admin_vsi(), intelxlvf_admin_command(), intelxlvf_admin_request_qps(), and intelxlvf_reset_admin().
int intelxl_admin_clear_pxe | ( | struct intelxl_nic * | intelxl | ) |
Clear PXE mode.
intelxl | Intel device |
rc | Return status code |
Definition at line 578 of file intelxl.c.
References cmd, cpu_to_le16, DBGC, INTELXL_ADMIN_CLEAR_PXE, INTELXL_ADMIN_CLEAR_PXE_MAGIC, intelxl_admin_command(), intelxl_admin_command_descriptor(), INTELXL_ADMIN_EEXIST, intelxl_admin_clear_pxe_params::magic, and rc.
Referenced by ice_probe(), and intelxl_probe().
int intelxl_admin_mac_config | ( | struct intelxl_nic * | intelxl | ) |
Set MAC configuration.
intelxl | Intel device |
rc | Return status code |
Definition at line 729 of file intelxl.c.
References cmd, cpu_to_le16, intelxl_admin_mac_config_params::flags, intelxl_admin_command(), intelxl_admin_command_descriptor(), INTELXL_ADMIN_MAC_CONFIG, INTELXL_ADMIN_MAC_CONFIG_FL_CRC, intelxl_admin_mac_config_params::mfs, intelxl_nic::mfs, and rc.
Referenced by ice_open(), and intelxl_open().
void intelxl_poll_admin | ( | struct net_device * | netdev | ) |
Poll admin event queue.
netdev | Network device |
Definition at line 853 of file intelxl.c.
References intelxl_admin::buf, cpu_to_le16, DBGC2, DBGC2_HDA, intelxl_admin::desc, intelxl_nic::event, intelxl_admin_descriptor::flags, intelxl_nic::handle, intelxl_admin::index, intelxl_admin_event_init(), INTELXL_ADMIN_FL_BUF, INTELXL_ADMIN_FL_DD, INTELXL_ADMIN_NUM_DESC, intelxl_refill_admin(), le16_to_cpu, intelxl_admin_descriptor::len, netdev, net_device::priv, and virt_to_phys().
Referenced by intelxl_poll(), and intelxlvf_admin_command().
int intelxl_open_admin | ( | struct intelxl_nic * | intelxl | ) |
Open admin queues.
intelxl | Intel device |
rc | Return status code |
Definition at line 894 of file intelxl.c.
References intelxl_nic::command, intelxl_nic::event, intelxl_alloc_admin(), intelxl_disable_admin(), intelxl_free_admin(), intelxl_reopen_admin(), and rc.
Referenced by ice_probe(), intelxl_probe(), and intelxlvf_probe().
void intelxl_reopen_admin | ( | struct intelxl_nic * | intelxl | ) |
Reopen admin queues (after virtual function reset)
intelxl | Intel device |
Definition at line 924 of file intelxl.c.
References intelxl_nic::command, intelxl_nic::event, intelxl_admin_event_init(), INTELXL_ADMIN_NUM_DESC, intelxl_enable_admin(), and intelxl_refill_admin().
Referenced by intelxl_open_admin(), and intelxlvf_reset_wait().
void intelxl_close_admin | ( | struct intelxl_nic * | intelxl | ) |
Close admin queues.
intelxl | Intel device |
Definition at line 946 of file intelxl.c.
References intelxl_nic::command, intelxl_nic::event, intelxl_admin_shutdown(), intelxl_disable_admin(), and intelxl_free_admin().
Referenced by ice_probe(), ice_remove(), intelxl_probe(), intelxl_remove(), intelxlvf_probe(), and intelxlvf_remove().
int intelxl_alloc_ring | ( | struct intelxl_nic * | intelxl, |
struct intelxl_ring * | ring | ||
) |
Allocate descriptor ring.
intelxl | Intel device |
ring | Descriptor ring |
rc | Return status code |
Definition at line 974 of file intelxl.c.
References intelxl_ring::cons, DBGC, intelxl_ring::desc, intelxl_nic::dma, dma_alloc(), dma_free(), ENOMEM, INTELXL_ALIGN, intelxl_ring::len, intelxl_ring::map, memset(), intelxl_ring::prod, intelxl_ring::raw, rc, intelxl_nic::regs, intelxl_ring::tail, virt_to_phys(), and writel().
Referenced by ice_create_tx(), intelxl_create_ring(), and intelxlvf_open().
void intelxl_free_ring | ( | struct intelxl_nic * | intelxl, |
struct intelxl_ring * | ring | ||
) |
int intelxl_create_ring | ( | struct intelxl_nic * | intelxl, |
struct intelxl_ring * | ring | ||
) |
Create descriptor ring.
intelxl | Intel device |
ring | Descriptor ring |
rc | Return status code |
Definition at line 1283 of file intelxl.c.
References address, intelxl_ring::context, intelxl_ring::desc, dma(), intelxl_alloc_ring(), intelxl_disable_ring(), intelxl_enable_ring(), intelxl_free_ring(), intelxl_ring::map, intelxl_ring::raw, and rc.
Referenced by ice_open(), and intelxl_open().
void intelxl_destroy_ring | ( | struct intelxl_nic * | intelxl, |
struct intelxl_ring * | ring | ||
) |
Destroy descriptor ring.
intelxl | Intel device |
ring | Descriptor ring |
Definition at line 1317 of file intelxl.c.
References intelxl_disable_ring(), intelxl_free_ring(), and rc.
Referenced by ice_close(), ice_open(), intelxl_close(), and intelxl_open().
void intelxl_empty_rx | ( | struct intelxl_nic * | intelxl | ) |
Discard unused receive I/O buffers.
intelxl | Intel device |
Definition at line 1384 of file intelxl.c.
References free_rx_iob(), INTELXL_RX_NUM_DESC, NULL, and intelxl_nic::rx_iobuf.
Referenced by ice_close(), intelxl_close(), and intelxlvf_close().
int intelxl_transmit | ( | struct net_device * | netdev, |
struct io_buffer * | iobuf | ||
) |
Transmit packet.
netdev | Network device |
iobuf | I/O buffer |
rc | Return status code |
Definition at line 1510 of file intelxl.c.
References intelxl_ring::cons, cpu_to_le32, cpu_to_le64, io_buffer::data, intelxl_tx_descriptor::data, DBGC, DBGC2, intelxl_ring::desc, ENOBUFS, INTELXL_TX_DATA_DTYP, INTELXL_TX_DATA_EOP, INTELXL_TX_DATA_JFDI, INTELXL_TX_DATA_LEN, INTELXL_TX_DATA_RS, INTELXL_TX_FILL, INTELXL_TX_NUM_DESC, iob_dma(), iob_len(), len, netdev, net_device::priv, intelxl_ring::prod, intelxl_nic::regs, intelxl_ring::tail, tx, intelxl_ring::tx, intelxl_nic::tx, virt_to_phys(), wmb(), and writel().
void intelxl_poll | ( | struct net_device * | netdev | ) |
Poll for completed and received packets.
netdev | Network device |
Definition at line 1630 of file intelxl.c.
References INTELXL_INT_DYN_CTL_INTENA, intelxl_poll_admin(), intelxl_poll_rx(), intelxl_poll_tx(), intelxl_refill_rx(), intelxl_nic::intr, netdev, net_device::priv, intelxl_nic::regs, and writel().
const struct intelxl_admin_offsets intelxl_admin_offsets |