69 DBGC ( intelxl,
"INTELXL %p could not enable MSI-X: %s\n",
134 admin->
desc = ( ( (
void * ) admin->
buf ) + buf_len );
136 DBGC ( intelxl,
"INTELXL %p A%cQ is at [%08lx,%08lx) buf "
137 "[%08lx,%08lx)\n", intelxl,
138 ( ( admin == &intelxl->
command ) ?
'T' :
'R' ),
139 virt_to_phys ( admin->
desc ),
140 ( virt_to_phys ( admin->
desc ) +
len ),
141 virt_to_phys ( admin->
buf ),
142 ( virt_to_phys ( admin->
buf ) + buf_len ) );
156 void *admin_regs = ( intelxl->
regs + admin->
base );
174 admin_regs +
regs->bah );
182 admin_regs +
regs->len );
194 void *admin_regs = ( intelxl->
regs + admin->
base );
245 memset ( buf, 0,
sizeof ( *buf ) );
256 unsigned int index ) {
281 void *admin_regs = ( intelxl->
regs + admin->
base );
297 DBGC2 ( intelxl,
"INTELXL %p admin command %#x opcode %#04x",
301 DBGC2 ( intelxl,
":\n" );
324 cookie =
cmd->cookie;
329 DBGC2_HDA ( intelxl, virt_to_phys ( buf ), buf,
343 DBGC2 ( intelxl,
"INTELXL %p admin command %#x response:\n",
348 DBGC2_HDA ( intelxl, virt_to_phys ( buf ), buf,
353 if (
cmd->cookie != cookie ) {
354 DBGC ( intelxl,
"INTELXL %p admin command %#x bad "
355 "cookie %#x\n", intelxl,
index,
362 if ( (
cmd->ret != 0 ) && (
cmd->ret != silence ) ) {
363 DBGC ( intelxl,
"INTELXL %p admin command %#x error "
364 "%d\n", intelxl,
index,
375 DBGC ( intelxl,
"INTELXL %p timed out waiting for admin command %#x:\n",
403 DBGC ( intelxl,
"INTELXL %p firmware v%d.%d API v%d.%d\n",
410 DBGC ( intelxl,
"INTELXL %p unsupported API v%d\n",
502 DBGC ( intelxl,
"INTELXL %p has no MAC address\n", intelxl );
508 DBGC ( intelxl,
"INTELXL %p has invalid MAC address (%s)\n",
514 DBGC ( intelxl,
"INTELXL %p has MAC address %s\n",
570 pxe = &
cmd->params.pxe;
579 DBGC ( intelxl,
"INTELXL %p already in non-PXE mode\n",
607 sw = &
cmd->params.sw;
616 DBGC2 ( intelxl,
"INTELXL %p SEID %#04x:\n",
623 DBGC ( intelxl,
"INTELXL %p VSI %#04x uplink %#04x "
624 "downlink %#04x conn %#02x\n", intelxl,
630 }
while ( (
next =
sw->next ) );
633 if ( ! intelxl->
vsi ) {
634 DBGC ( intelxl,
"INTELXL %p has no VSI\n", intelxl );
669 DBGC ( intelxl,
"INTELXL %p VSI %#04x queue %#04x qset %#04x\n",
694 promisc = &
cmd->params.promisc;
720 config = &
cmd->params.mac_config;
745 autoneg = &
cmd->params.autoneg;
777 DBGC ( intelxl,
"INTELXL %p PHY %#02x speed %#02x status %#02x\n",
804 DBGC ( intelxl,
"INTELXL %p unrecognised event opcode "
821 void *admin_regs = ( intelxl->
regs + admin->
base );
852 DBGC2 ( intelxl,
"INTELXL %p admin event %#x:\n",
853 intelxl, admin->
index );
854 DBGC2_HDA ( intelxl, virt_to_phys ( evt ), evt,
857 DBGC2_HDA ( intelxl, virt_to_phys ( buf ), buf,
882 goto err_alloc_event;
886 goto err_alloc_command;
979 DBGC ( intelxl,
"INTELXL %p ring %06x is at [%08lx,%08lx)\n",
980 intelxl, ring->
tail, virt_to_phys ( ring->
desc.
raw ),
981 ( virt_to_phys ( ring->
desc.
raw ) + ring->
len ) );
1025 DBGC2 ( intelxl,
"INTELXL %p context %#08x:\n", intelxl,
op );
1041 pfcm_lanctxstat =
readl ( intelxl->
regs +
1051 for ( i = 0 ; i < (
sizeof ( line ) /
1052 sizeof ( line.
raw[0] ) ) ; i++ ) {
1057 &line,
sizeof ( line ) );
1079 for ( i = 0; i < (
sizeof ( *line ) /
sizeof ( line->
raw[0] ) ); i++ ) {
1095 pfcm_lanctxstat =
readl ( intelxl->
regs +
1104 DBGC ( intelxl,
"INTELXL %p timed out waiting for context: %#08x\n",
1105 intelxl, pfcm_lanctxctl );
1124 DBGC2 ( intelxl,
"INTELXL %p context %#08x len %#zx:\n",
1210 void *ring_regs = ( intelxl->
regs + ring->
reg );
1218 DBGC ( intelxl,
"INTELXL %p ring %06x failed to enable: "
1219 "%#08x\n", intelxl, ring->
tail, qxx_ena );
1235 void *ring_regs = ( intelxl->
regs + ring->
reg );
1254 DBGC ( intelxl,
"INTELXL %p ring %06x timed out waiting for disable: "
1255 "%#08x\n", intelxl, ring->
tail, qxx_ena );
1322 unsigned int rx_idx;
1323 unsigned int rx_tail;
1324 unsigned int refilled = 0;
1348 DBGC2 ( intelxl,
"INTELXL %p RX %d is [%08lx,%08lx)\n",
1349 intelxl, rx_idx, virt_to_phys ( iobuf->
data ),
1350 ( virt_to_phys ( iobuf->
data ) + intelxl->
mfs ) );
1406 goto err_mac_config;
1496 unsigned int tx_idx;
1497 unsigned int tx_tail;
1502 DBGC ( intelxl,
"INTELXL %p out of transmit descriptors\n",
1521 DBGC2 ( intelxl,
"INTELXL %p TX %d is [%08lx,%08lx)\n",
1522 intelxl, tx_idx, virt_to_phys ( iobuf->
data ),
1523 ( virt_to_phys ( iobuf->
data ) +
len ) );
1535 unsigned int tx_idx;
1547 DBGC2 ( intelxl,
"INTELXL %p TX %d complete\n",
1565 unsigned int rx_idx;
1595 DBGC ( intelxl,
"INTELXL %p RX %d error (length %zd, "
1596 "flags %08x)\n", intelxl, rx_idx,
len,
1600 DBGC2 ( intelxl,
"INTELXL %p RX %d complete (length "
1601 "%zd)\n", intelxl, rx_idx,
len );
1686 memset ( intelxl, 0,
sizeof ( *intelxl ) );
1705 if ( ! intelxl->
regs ) {
1711 intelxl->
dma = &pci->
dma;
1717 if ( ! intelxl->
exp ) {
1718 DBGC ( intelxl,
"INTELXL %p missing PCIe capability\n",
1734 DBGC ( intelxl,
"INTELXL %p PF %d using port %d queues [%#04x-%#04x]\n",
1735 intelxl, intelxl->
pf, intelxl->
port, intelxl->
base,
1745 goto err_open_admin;
1749 goto err_admin_version;
1753 goto err_admin_driver;
1757 goto err_admin_clear_pxe;
1761 goto err_admin_switch;
1769 goto err_admin_promisc;
1773 goto err_admin_mac_read;
1797 goto err_register_netdev;
1805 err_register_netdev:
1810 err_admin_clear_pxe:
1856 PCI_ROM ( 0x8086, 0x0cf8,
"x710-n3000",
"X710 FPGA N3000", 0 ),
1857 PCI_ROM ( 0x8086, 0x0d58,
"xxv710-n3000",
"XXV710 FPGA N3000", 0 ),
1858 PCI_ROM ( 0x8086, 0x104e,
"x710-sfp-b",
"X710 10GbE SFP+", 0 ),
1859 PCI_ROM ( 0x8086, 0x104f,
"x710-kx-b",
"X710 10GbE backplane", 0 ),
1860 PCI_ROM ( 0x8086, 0x1572,
"x710-sfp",
"X710 10GbE SFP+", 0 ),
1861 PCI_ROM ( 0x8086, 0x1574,
"xl710-qemu",
"Virtual XL710", 0 ),
1862 PCI_ROM ( 0x8086, 0x1580,
"xl710-kx-b",
"XL710 40GbE backplane", 0 ),
1863 PCI_ROM ( 0x8086, 0x1581,
"xl710-kx-c",
"XL710 10GbE backplane", 0 ),
1864 PCI_ROM ( 0x8086, 0x1583,
"xl710-qda2",
"XL710 40GbE QSFP+", 0 ),
1865 PCI_ROM ( 0x8086, 0x1584,
"xl710-qda1",
"XL710 40GbE QSFP+", 0 ),
1866 PCI_ROM ( 0x8086, 0x1585,
"x710-qsfp",
"X710 10GbE QSFP+", 0 ),
1867 PCI_ROM ( 0x8086, 0x1586,
"x710-10gt",
"X710 10GBASE-T", 0 ),
1868 PCI_ROM ( 0x8086, 0x1587,
"x710-kr2",
"XL710 20GbE backplane", 0 ),
1869 PCI_ROM ( 0x8086, 0x1588,
"x710-kr2-a",
"XL710 20GbE backplane", 0 ),
1870 PCI_ROM ( 0x8086, 0x1589,
"x710-10gt4",
"X710 10GBASE-T4", 0 ),
1871 PCI_ROM ( 0x8086, 0x158a,
"xxv710",
"XXV710 25GbE backplane", 0 ),
1872 PCI_ROM ( 0x8086, 0x158b,
"xxv710-sfp28",
"XXV710 25GbE SFP28", 0 ),
1873 PCI_ROM ( 0x8086, 0x15ff,
"x710-10gt-b",
"X710 10GBASE-T", 0 ),
1874 PCI_ROM ( 0x8086, 0x37ce,
"x722-kx",
"X722 10GbE backplane", 0 ),
1875 PCI_ROM ( 0x8086, 0x37cf,
"x722-qsfp",
"X722 10GbE QSFP+", 0 ),
1876 PCI_ROM ( 0x8086, 0x37d0,
"x722-sfp",
"X722 10GbE SFP+", 0 ),
1877 PCI_ROM ( 0x8086, 0x37d1,
"x722-1gt",
"X722 1GBASE-T", 0 ),
1878 PCI_ROM ( 0x8086, 0x37d2,
"x722-10gt",
"X722 10GBASE-T", 0 ),
1879 PCI_ROM ( 0x8086, 0x37d3,
"x722-sfp-i",
"X722 10GbE SFP+", 0 ),
#define NULL
NULL pointer (VOID *)
struct golan_eq_context ctx
u32 link
Link to next descriptor.
struct arbelprm_rc_send_wqe rc
unsigned long long uint64_t
#define assert(condition)
Assert a condition at run-time.
u32 version
Driver version.
uint32_t next
Next descriptor address.
uint64_t tag
Identity tag.
uint32_t vector
MSI-X vector.
uint64_t address
Base address.
uint8_t mac[ETH_ALEN]
MAC address.
struct net_device * alloc_etherdev(size_t priv_size)
Allocate Ethernet device.
const char * eth_ntoa(const void *ll_addr)
Transcribe Ethernet address.
static int is_valid_ether_addr(const void *addr)
Check if Ethernet address is valid.
static struct net_device * netdev
#define __unused
Declare a variable or data structure as unused.
#define FILE_LICENCE(_licence)
Declare a particular licence as applying to a file.
#define ENOENT
No such file or directory.
#define ENXIO
No such device or address.
#define ETIMEDOUT
Connection timed out.
#define EPROTO
Protocol error.
#define ENOMEM
Not enough space.
#define EIO
Input/output error.
#define ENOTSUP
Operation not supported.
#define ENOBUFS
No buffer space available.
#define ENODEV
No such device.
#define FILE_SECBOOT(_status)
Declare a file's UEFI Secure Boot permission status.
#define cpu_to_le64(value)
#define le16_to_cpu(value)
#define le32_to_cpu(value)
#define cpu_to_le32(value)
#define cpu_to_le16(value)
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.
void * memcpy(void *dest, const void *src, size_t len) __nonnull
void * memset(void *dest, int character, size_t len) __nonnull
void shutdown(int flags)
Shut down iPXE.
static int intelxl_disable_ring(struct intelxl_nic *intelxl, struct intelxl_ring *ring)
Disable descriptor ring.
static int intelxl_admin_shutdown(struct intelxl_nic *intelxl)
Shutdown admin queues.
static int intelxl_context(struct intelxl_nic *intelxl, struct intelxl_context_line *line, size_t len, uint32_t op)
Program queue context.
int intelxl_msix_enable(struct intelxl_nic *intelxl, struct pci_device *pci, unsigned int vector)
Enable MSI-X dummy interrupt.
void intelxl_destroy_ring(struct intelxl_nic *intelxl, struct intelxl_ring *ring)
Destroy descriptor ring.
static struct pci_device_id intelxl_nics[]
PCI device IDs.
static void intelxl_admin_event(struct net_device *netdev, struct intelxl_admin_descriptor *evt, union intelxl_admin_buffer *buf __unused)
Handle admin event.
static int intelxl_admin_mac_write(struct net_device *netdev)
Set MAC address.
int intelxl_admin_clear_pxe(struct intelxl_nic *intelxl)
Clear PXE mode.
int intelxl_admin_command(struct intelxl_nic *intelxl)
Issue admin queue command.
static void intelxl_context_dump(struct intelxl_nic *intelxl, uint32_t op, size_t len)
Dump queue context (for debugging)
static int intelxl_context_tx(struct intelxl_nic *intelxl, physaddr_t address)
Program transmit queue context.
void intelxl_close_admin(struct intelxl_nic *intelxl)
Close admin queues.
static int intelxl_admin_promisc(struct intelxl_nic *intelxl)
Set VSI promiscuous modes.
int intelxl_alloc_ring(struct intelxl_nic *intelxl, struct intelxl_ring *ring)
Allocate descriptor ring.
static void intelxl_free_admin(struct intelxl_nic *intelxl __unused, struct intelxl_admin *admin)
Free admin queue.
void intelxl_reopen_admin(struct intelxl_nic *intelxl)
Reopen admin queues (after virtual function reset)
void intelxl_free_ring(struct intelxl_nic *intelxl __unused, struct intelxl_ring *ring)
Free descriptor ring.
static int intelxl_admin_driver(struct intelxl_nic *intelxl)
Report driver version.
static void intelxl_remove(struct pci_device *pci)
Remove PCI device.
static int intelxl_admin_link(struct net_device *netdev)
Get link status.
int intelxl_admin_mac_config(struct intelxl_nic *intelxl)
Set MAC configuration.
void intelxl_msix_disable(struct intelxl_nic *intelxl, struct pci_device *pci, unsigned int vector)
Disable MSI-X dummy interrupt.
int intelxl_open_admin(struct intelxl_nic *intelxl)
Open admin queues.
static void intelxl_disable_admin(struct intelxl_nic *intelxl, struct intelxl_admin *admin)
Disable admin queue.
static void intelxl_enable_admin(struct intelxl_nic *intelxl, struct intelxl_admin *admin)
Enable admin queue.
static int intelxl_admin_switch(struct intelxl_nic *intelxl)
Get switch configuration.
static int intelxl_enable_ring(struct intelxl_nic *intelxl, struct intelxl_ring *ring)
Enable descriptor ring.
static void intelxl_poll_tx(struct net_device *netdev)
Poll for completed packets.
union intelxl_admin_buffer * intelxl_admin_command_buffer(struct intelxl_nic *intelxl)
Get next admin command queue data buffer.
static struct net_device_operations intelxl_operations
Network device operations.
static int intelxl_probe(struct pci_device *pci)
Probe PCI device.
static void intelxl_poll_rx(struct net_device *netdev)
Poll for received packets.
struct intelxl_admin_descriptor * intelxl_admin_command_descriptor(struct intelxl_nic *intelxl)
Get next admin command queue descriptor.
static int intelxl_admin_mac_read(struct net_device *netdev)
Get MAC address.
void intelxl_empty_rx(struct intelxl_nic *intelxl)
Discard unused receive I/O buffers.
static int intelxl_admin_version(struct intelxl_nic *intelxl)
Get firmware version.
void intelxl_poll_admin(struct net_device *netdev)
Poll admin event queue.
static int intelxl_context_rx(struct intelxl_nic *intelxl, physaddr_t address)
Program receive queue context.
static int intelxl_admin_autoneg(struct intelxl_nic *intelxl)
Restart autonegotiation.
static int intelxl_context_line(struct intelxl_nic *intelxl, struct intelxl_context_line *line, unsigned int index, uint32_t op)
Program queue context line.
static void intelxl_admin_event_init(struct intelxl_nic *intelxl, unsigned int index)
Initialise admin event queue descriptor.
static void intelxl_close(struct net_device *netdev)
Close network device.
static int intelxl_open(struct net_device *netdev)
Open network device.
static void intelxl_refill_admin(struct intelxl_nic *intelxl)
Refill admin event queue.
int intelxl_transmit(struct net_device *netdev, struct io_buffer *iobuf)
Transmit packet.
static int intelxl_admin_vsi(struct intelxl_nic *intelxl)
Get VSI parameters.
static void intelxl_refill_rx(struct intelxl_nic *intelxl)
Refill receive descriptor ring.
void intelxl_poll(struct net_device *netdev)
Poll for completed and received packets.
static int intelxl_alloc_admin(struct intelxl_nic *intelxl, struct intelxl_admin *admin)
Allocate admin queue.
int intelxl_create_ring(struct intelxl_nic *intelxl, struct intelxl_ring *ring)
Create descriptor ring.
Intel 40 Gigabit Ethernet network card driver.
#define INTELXL_GLLAN_TXPRE_QDIS_SET_QDIS
Set disable.
#define INTELXL_RX_WB_FL_RXE
Receive writeback descriptor error.
#define INTELXL_ADMIN_CLEAR_PXE
Admin queue Clear PXE Mode command.
#define INTELXL_ADMIN_VERSION
Admin queue Get Version command.
#define INTELXL_PFINT_ICR0_ENA_ADMINQ
Admin event.
#define INTELXL_ADMIN_SWITCH_TYPE_VSI
Virtual Station Inferface element type.
#define INTELXL_PFCM_LANCTXCTL_TYPE_RX
RX queue type.
#define INTELXL_ADMIN_SWITCH
Admin queue Get Switch Configuration command.
#define INTELXL_ADMIN_LEN
Admin Queue Length Register (offset)
#define INTELXL_ADMIN_PROMISC_FL_MULTICAST
Promiscuous multicast mode.
#define INTELXL_PFCM_LANCTXCTL_SUB_LINE(x)
Sub-line.
#define INTELXL_GLLAN_TXPRE_QDIS_QINDX(x)
Queue index.
#define INTELXL_ADMIN_MAC_WRITE
Admin queue Manage MAC Address Write command.
#define INTELXL_QUEUE_DISABLE_MAX_WAIT_MS
Maximum time to wait for a queue to become disabled.
#define INTELXL_ADMIN_MAC_CONFIG
Admin queue Set MAC Configuration command.
#define INTELXL_ADMIN_FL_CMP
Admin descriptor contains a completion.
#define INTELXL_ADMIN_PROMISC_FL_BROADCAST
Promiscuous broadcast mode.
#define INTELXL_QXX_ENA
Queue Enable Register (offset)
#define INTELXL_BAR_SIZE
BAR size.
#define INTELXL_CTX_RX_LEN(len)
Receive queue data buffer length.
#define INTELXL_CTX_MAX_WAIT_MS
Maximum time to wait for a context operation to complete.
#define INTELXL_PFFUNC_RID
Function Requester ID Information Register.
#define INTELXL_PFLAN_QALLOC_LASTQ(x)
Last queue.
#define INTELXL_QTX(x)
Global Transmit Queue register block.
#define INTELXL_ADMIN_API_MAJOR
Admin queue API major version.
#define INTELXL_PFFUNC_RID_FUNC_NUM(x)
Function number.
#define INTELXL_QXX_CTL
Queue Control Register (offset)
#define INTELXL_QXX_CTL_PFVF_Q_PF
PF queue.
#define INTELXL_ADMIN_FL_BUF
Admin descriptor uses data buffer.
#define INTELXL_MAX_PKT_LEN
Maximum packet length (excluding CRC)
#define INTELXL_PFCM_LANCTXCTL_OP_CODE_READ
Read context.
#define INTELXL_QXX_ENA_STAT
Enabled status.
#define INTELXL_ADMIN_FL_RD
Admin descriptor uses data buffer for command parameters.
#define INTELXL_RX_WB_FL_VLAN
Receive writeback descriptor VLAN tag present.
#define INTELXL_ADMIN_NUM_DESC
Number of admin queue descriptors.
#define INTELXL_ADMIN_HEAD
Admin Queue Head Register (offset)
#define INTELXL_TX_DATA_RS
Transmit data descriptor report status.
#define INTELXL_TX_FILL
Transmit descriptor ring maximum fill level.
#define INTELXL_GLLAN_TXPRE_QDIS_CLEAR_QDIS
Clear disable.
#define INTELXL_TX_DATA_EOP
Transmit data descriptor end of packet.
#define INTELXL_PFGEN_PORTNUM_PORT_NUM(x)
Port number.
#define INTELXL_ALIGN
Alignment.
#define INTELXL_CTX_TX_FL_NEW
New transmit queue context.
#define INTELXL_CTX_TX_COUNT(count)
Transmit queue count.
#define INTELXL_ADMIN_EEXIST
Error: attempt to create something that already exists.
#define INTELXL_MSIX_VECTOR
MSI-X interrupt vector.
#define INTELXL_QINT_RQCTL_NEXTQ_TYPE_TX
Transmit queue.
#define INTELXL_ADMIN_EVT
PF Admin Event Queue register block.
#define INTELXL_ADMIN_CLEAR_PXE_MAGIC
Clear PXE Mode magic value.
#define INTELXL_CTX_RX_FL_CRCSTRIP
Strip CRC from received packets.
#define INTELXL_PFINT_LNKLST0
PF Interrupt Zero Linked List Register.
#define INTELXL_QXX_CTL_PFVF_PF_INDX(x)
PF index.
#define INTELXL_PFINT_ICR0_ENA
PF Interrupt Zero Cause Enablement Register.
#define INTELXL_ADMIN_MAC_READ_VALID_LAN
LAN MAC address is valid.
#define INTELXL_CTX_RX_MFS(mfs)
Receive queue maximum frame size.
#define INTELXL_QTX_HEAD(x)
Global Transmit Queue Head register.
#define INTELXL_TX_WB_FL_DD
Transmit writeback descriptor complete.
#define INTELXL_ADMIN_LINK_UP
Link is up.
#define INTELXL_RX_WB_FL_DD
Receive writeback descriptor complete.
#define INTELXL_PFCM_LANCTXCTL_TYPE_TX
TX queue type.
#define INTELXL_QUEUE_PRE_DISABLE_DELAY_US
Time to wait for a transmit queue to become pre-disabled.
#define INTELXL_QRX(x)
Global Receive Queue register block.
#define INTELXL_GLLAN_TXPRE_QDIS(x)
Global Transmit Pre Queue Disable register.
#define INTELXL_QINT_TQCTL_CAUSE_ENA
Enable.
#define INTELXL_QXX_ENA_REQ
Enable request.
#define INTELXL_ADMIN_VSI
Admin queue Get VSI Parameters command.
#define INTELXL_RX_WB_LEN(len)
Receive writeback descriptor length.
#define INTELXL_PFINT_DYN_CTL0
PF Interrupt Zero Dynamic Control Register.
#define INTELXL_QINT_RQCTL(x)
Receive Queue Interrupt Cause Control Register.
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.
#define INTELXL_ADMIN_MAC_CONFIG_FL_CRC
Append CRC on transmit.
#define INTELXL_RX_NUM_DESC
Number of receive descriptors.
#define INTELXL_ADMIN_FL_DD
Admin descriptor done.
#define INTELXL_ADMIN_AUTONEG
Admin queue Restart Autonegotiation command.
#define INTELXL_PFCM_LANCTXSTAT
CMLAN Context Status Register.
#define INTELXL_ADMIN_SHUTDOWN_UNLOADING
Driver is unloading.
#define INTELXL_ADMIN_MAX_WAIT_MS
Maximum time to wait for an admin request to complete.
#define INTELXL_ADMIN_FL_ERR
Admin descriptor completed in error.
#define INTELXL_PFINT_LNKLST0_FIRSTQ_INDX(x)
Queue index.
#define INTELXL_ADMIN_AUTONEG_FL_ENABLE
Enable link.
#define INTELXL_TX_DATA_JFDI
Transmit data descriptor pretty please.
#define INTELXL_QINT_TQCTL(x)
Transmit Queue Interrupt Cause Control Register.
#define INTELXL_QINT_TQCTL_NEXTQ_INDX_NONE
End of list.
#define INTELXL_ADMIN_BAL
Admin Queue Base Address Low Register (offset)
#define INTELXL_PFLAN_QALLOC
PF Queue Allocation Register.
#define INTELXL_CTX_TX_BASE(base)
Transmit queue base address.
#define INTELXL_RX_FILL
Receive descriptor ring fill level.
#define INTELXL_PFCM_LANCTXCTL_OP_CODE_WRITE
Write context.
#define INTELXL_ADMIN_MAC_READ
Admin queue Manage MAC Address Read command.
#define INTELXL_CTX_TX_QSET(qset)
Transmit queue set.
#define INTELXL_ADMIN_LINK_NOTIFY
Notify driver of link status changes.
#define INTELXL_INT_DYN_CTL_INTENA
Enable.
#define INTELXL_QINT_RQCTL_NEXTQ_INDX(x)
Queue index.
#define INTELXL_ADMIN_LEN_LEN(x)
Queue length.
#define INTELXL_ADMIN_LINK
Admin queue Get Link Status command.
#define INTELXL_PFCM_LANCTXSTAT_DONE
Complete.
#define INTELXL_ADMIN_BAH
Admin Queue Base Address High Register (offset)
#define INTELXL_ADMIN_DRIVER
Admin queue Driver Version command.
#define INTELXL_ADMIN_PROMISC_FL_VLAN
Promiscuous VLAN mode.
#define INTELXL_PFLAN_QALLOC_FIRSTQ(x)
First queue.
static void intelxl_init_admin(struct intelxl_admin *admin, unsigned int base, const struct intelxl_admin_offsets *regs)
Initialise admin queue.
#define INTELXL_ADMIN_LEN_ENABLE
Queue enable.
#define INTELXL_QUEUE_ENABLE_DELAY_US
Time to wait for a queue to become enabled.
#define INTELXL_PFCM_LANCTXCTL
CMLAN Context Control Register.
#define INTELXL_ADMIN_TAIL
Admin Queue Tail Register (offset)
#define INTELXL_QXX_TAIL
Queue Tail Pointer Register (offset)
#define INTELXL_TX_DATA_LEN(len)
Transmit data descriptor length.
#define INTELXL_TX_NUM_DESC
Number of transmit descriptors.
#define INTELXL_PFCM_LANCTXCTL_QUEUE_NUM(x)
Queue number.
#define INTELXL_PFINT_LNKLST0_FIRSTQ_TYPE_RX
Receive queue.
#define INTELXL_QINT_RQCTL_CAUSE_ENA
Enable.
#define INTELXL_ADMIN_PROMISC_FL_UNICAST
Promiscuous unicast mode.
#define INTELXL_ADMIN_PROMISC
Admin queue Set VSI Promiscuous Modes command.
#define INTELXL_ADMIN_CMD
PF Admin Command Queue register block.
#define INTELXL_CTX_RX_BASE_COUNT(base, count)
Receive queue base address and queue count.
#define INTELXL_PFCM_LANCTXDATA(x)
CMLAN Context Data Register.
#define INTELXL_TX_DATA_DTYP
Transmit data descriptor type.
#define INTELXL_CTX_RX_FL_DSIZE
Use 32-byte receive descriptors.
#define INTELXL_PFGEN_PORTNUM
PF LAN Port Number Register.
#define INTELXL_ADMIN_SHUTDOWN
Admin queue Shutdown command.
#define INTELXL_ADMIN_AUTONEG_FL_RESTART
Restart autonegotiation.
struct io_buffer * alloc_rx_iob(size_t len, struct dma_device *dma)
Allocate and map I/O buffer for receive DMA.
void free_rx_iob(struct io_buffer *iobuf)
Unmap and free I/O buffer for receive DMA.
#define iob_put(iobuf, len)
static __always_inline physaddr_t iob_dma(struct io_buffer *iobuf)
Get I/O buffer DMA address.
static size_t iob_len(struct io_buffer *iobuf)
Calculate length of data in an I/O buffer.
static __always_inline void dma_set_mask_64bit(struct dma_device *dma)
Set 64-bit addressable space mask.
void dma_free(struct dma_mapping *map, void *addr, size_t len)
Unmap and free DMA-coherent buffer.
void * dma_alloc(struct dma_device *dma, struct dma_mapping *map, size_t len, size_t align)
Allocate and map DMA-coherent buffer.
physaddr_t dma(struct dma_mapping *map, void *addr)
Get DMA address from virtual address.
uint32_t high
High 32 bits of address.
uint32_t low
Low 16 bits of address.
__weak void vlan_netdev_rx(struct net_device *netdev, unsigned int tag, struct io_buffer *iobuf)
Add VLAN tag-stripped packet to queue (when VLAN support is not present)
void netdev_link_down(struct net_device *netdev)
Mark network device as having link down.
__weak void vlan_netdev_rx_err(struct net_device *netdev, unsigned int tag __unused, struct io_buffer *iobuf, int rc)
Discard received VLAN tag-stripped packet (when VLAN support is not present)
void unregister_netdev(struct net_device *netdev)
Unregister network device.
int register_netdev(struct net_device *netdev)
Register network device.
Network device management.
static void netdev_link_up(struct net_device *netdev)
Mark network device as having link up.
static void netdev_init(struct net_device *netdev, struct net_device_operations *op)
Initialise a network device.
static void netdev_nullify(struct net_device *netdev)
Stop using a network device.
static void netdev_put(struct net_device *netdev)
Drop reference to network device.
static void netdev_tx_complete_next(struct net_device *netdev)
Complete network transmission.
static uint16_t struct vmbus_xfer_pages_operations * op
struct option_descriptor read[1]
void adjust_pci_device(struct pci_device *pci)
Enable PCI device.
#define __pci_driver
Declare a PCI driver.
#define PCI_CAP_ID_EXP
PCI Express.
static void pci_set_drvdata(struct pci_device *pci, void *priv)
Set PCI driver-private data.
#define PCI_ROM(_vendor, _device, _name, _description, _data)
static void * pci_get_drvdata(struct pci_device *pci)
Get PCI driver-private data.
struct pci_api * api
API for this bus:dev.fn address.
int pci_msix_enable(struct pci_device *pci, struct pci_msix *msix)
Enable MSI-X interrupts.
void pci_msix_disable(struct pci_device *pci, struct pci_msix *msix)
Disable MSI-X interrupts.
static void pci_msix_mask(struct pci_msix *msix, unsigned int vector)
Mask MSI-X interrupt vector.
static void pci_msix_unmask(struct pci_msix *msix, unsigned int vector)
Unmask MSI-X interrupt vector.
char * strerror(int errno)
Retrieve string representation of error number.
Admin queue Restart Autonegotiation command parameters.
uint32_t high
Buffer address high.
uint32_t low
Buffer address low.
Admin queue Clear PXE Mode command parameters.
uint8_t magic
Magic value.
union intelxl_admin_params params
Parameters.
char name[32]
Driver name.
Admin queue Driver Version command parameters.
Admin queue Get Link Status command parameters.
Admin queue Set MAC Configuration command parameters.
uint16_t mfs
Maximum frame size.
uint8_t pf[ETH_ALEN]
Physical function MAC address.
Admin queue Manage MAC Address Read command parameters.
Admin queue Manage MAC Address Write command parameters.
Admin queue register offsets.
unsigned int tail
Tail Register offset.
Admin queue Set VSI Promiscuous Modes command parameters.
uint16_t vsi
VSI switching element ID.
uint16_t valid
Valid flags.
Admin queue Shutdown command parameters.
struct intelxl_admin_switch_config cfg
Switch configuration.
uint16_t downlink
Downlink switching element ID.
uint8_t connection
Connection type.
uint16_t seid
Switching element ID.
uint16_t uplink
Uplink switching element ID.
uint8_t type
Switching element type.
Admin queue Get Switch Configuration command parameters.
Admin queue Get Version command parameters.
Admin queue version number.
uint16_t qset[8]
Queue set handles for each traffic class.
uint16_t queue[16]
Queue numbers.
Admin queue Get VSI Parameters command parameters.
uint16_t vsi
VSI switching element ID.
unsigned int base
Register block base.
const struct intelxl_admin_offsets * regs
Register offsets.
union intelxl_admin_buffer * buf
Data buffers.
struct intelxl_admin_descriptor * desc
Descriptors.
struct dma_mapping map
DMA mapping.
unsigned int index
Queue index.
An Intel 40 Gigabit network card.
struct intelxl_admin event
Admin event queue.
size_t mfs
Maximum frame size.
struct dma_device * dma
DMA device.
struct pci_msix msix
MSI-X interrupt.
unsigned int port
Port number.
unsigned int pf
Physical function number.
unsigned int vsi
Virtual Station Interface switching element ID.
struct intelxl_admin command
Admin command queue.
struct io_buffer * rx_iobuf[INTELXL_RX_NUM_DESC]
Receive I/O buffers.
unsigned int intr
Interrupt control register.
unsigned int queue
Queue number.
struct intelxl_ring tx
Transmit descriptor ring.
unsigned int qset
Queue set handle.
struct intelxl_ring rx
Receive descriptor ring.
unsigned int exp
PCI Express capability offset.
void(* handle)(struct net_device *netdev, struct intelxl_admin_descriptor *evt, union intelxl_admin_buffer *buf)
Handle admin event.
unsigned int base
Absolute queue number base.
union intelxl_ring::@075242332004324155326134235227235157077022164124 desc
Descriptors.
unsigned int cons
Consumer index.
union intelxl_rx_descriptor * rx
Receive descriptors.
size_t len
Length (in bytes)
union intelxl_tx_descriptor * tx
Transmit descriptors.
unsigned int prod
Producer index.
unsigned int reg
Register block.
struct dma_mapping map
Descriptor ring DMA mapping.
unsigned int tail
Tail register.
int(* context)(struct intelxl_nic *intelxl, physaddr_t address)
Program queue context.
Receive writeback descriptor.
Transmit data descriptor.
Transmit writeback descriptor.
void * data
Start of data.
Network device operations.
A PCI device ID list entry.
unsigned long membase
Memory base.
struct device dev
Generic device.
struct dma_device dma
DMA device.
int(* probe)(struct pci_device *pci)
Probe device.
void mdelay(unsigned long msecs)
Delay for a fixed number of milliseconds.
void udelay(unsigned long usecs)
Delay for a fixed number of microseconds.
struct intelxl_admin_driver_buffer driver
Driver Version data buffer.
struct intelxl_admin_vsi_buffer vsi
Get VSI Parameters data buffer.
struct intelxl_admin_mac_read_buffer mac_read
Manage MAC Address Read data buffer.
struct intelxl_admin_switch_buffer sw
Get Switch Configuration data buffer.
struct intelxl_admin_buffer_params buffer
Additional data buffer command parameters.
struct intelxl_rx_writeback_descriptor wb
Receive writeback descriptor.
struct intelxl_rx_data_descriptor data
Receive data descriptor.
struct intelxl_tx_data_descriptor data
Transmit data descriptor.
struct intelxl_tx_writeback_descriptor wb
Transmit writeback descriptor.
const int product_major_version
Product major version.
const char product_short_name[]
Product short name string.
const char product_name[]
Product name string.
const int product_minor_version
Product minor version.
#define VLAN_TAG(tci)
Extract VLAN tag from tag control information.
int snprintf(char *buf, size_t size, const char *fmt,...)
Write a formatted string to a buffer.
u8 tx[WPA_TKIP_MIC_KEY_LEN]
MIC key for packets to the AP.
u8 rx[WPA_TKIP_MIC_KEY_LEN]
MIC key for packets from the AP.
static struct xen_remove_from_physmap * remove