48 { .
name =
"intel.vm_tx" };
52 { .
name =
"intel.vm_refill" };
56 { .
name =
"intel.vm_poll" };
106 DBGC ( intel,
"INTEL %p timed out waiting for EEPROM read\n", intel );
126 DBGC ( intel,
"INTEL %p EEPROM write not supported\n", intel );
163 DBGC ( intel,
"INTEL %p has large-format EERD\n",
170 DBGC ( intel,
"INTEL %p has small-format EERD\n",
179 DBGC ( intel,
"INTEL %p timed out waiting for initial EEPROM read " 180 "(value %08x)\n", intel,
value );
209 DBGC ( intel,
"INTEL %p could not read EEPROM base MAC " 217 DBGC ( intel,
"INTEL %p has EEPROM MAC address %s (port %d)\n",
236 DBGC ( intel,
"INTEL %p has autoloaded MAC address %s\n",
249 DBGC ( intel,
"INTEL %p has no MAC address to use\n", intel );
282 DBGC ( intel,
"INTEL %p WARNING: applying ICH PBS/PBA errata\n",
288 DBGC ( intel,
"INTEL %p PBS %#08x->%#08x PBA %#08x->%#08x\n",
331 DBGC ( intel,
"INTEL %p %sMAC reset (%08x/%08x was " 332 "%08x/%08x)\n", intel,
348 DBGC ( intel,
"INTEL %p MAC+PHY reset (%08x/%08x was %08x/%08x)\n",
349 intel,
ctrl,
status, orig_ctrl, orig_status );
371 DBGC ( intel,
"INTEL %p link status is %08x\n", intel,
status );
475 DBGC ( intel,
"INTEL %p ring %05x timed out waiting for disable " 476 "(dctl %08x)\n", intel,
reg, dctl );
550 DBGC ( intel,
"INTEL %p ring %05x is at [%08lx,%08lx)\n",
584 unsigned int rx_tail;
585 unsigned int refilled = 0;
608 DBGC2 ( intel,
"INTEL %p RX %d is [%lx,%lx)\n",
660 DBGC ( intel,
"INTEL %p WARNING: applying reset hang " 661 "workaround\n", intel );
704 DBGC ( intel,
"INTEL %p applying VMware errata workaround\n",
756 unsigned int tx_tail;
761 DBGC ( intel,
"INTEL %p out of transmit descriptors\n", intel );
779 DBGC2 ( intel,
"INTEL %p TX %d is [%lx,%lx)\n",
807 DBGC2 ( intel,
"INTEL %p TX %d complete\n", intel, tx_idx );
846 DBGC ( intel,
"INTEL %p RX %d error (length %zd, " 847 "status %08x)\n", intel, rx_idx,
len,
851 DBGC2 ( intel,
"INTEL %p RX %d complete (length %zd)\n",
852 intel, rx_idx,
len );
896 DBGC ( intel,
"INTEL %p unexpected ICR %08x\n", intel, icr );
960 memset ( intel, 0,
sizeof ( *intel ) );
973 if ( ! intel->
regs ) {
993 goto err_register_netdev;
1001 err_register_netdev:
1036 PCI_ROM ( 0x8086, 0x0438,
"dh8900cc",
"DH8900CC", 0 ),
1037 PCI_ROM ( 0x8086, 0x043a,
"dh8900cc-f",
"DH8900CC Fiber", 0 ),
1038 PCI_ROM ( 0x8086, 0x043c,
"dh8900cc-b",
"DH8900CC Backplane", 0 ),
1039 PCI_ROM ( 0x8086, 0x0440,
"dh8900cc-s",
"DH8900CC SFP", 0 ),
1047 PCI_ROM ( 0x8086, 0x1000,
"82542-f",
"82542 (Fiber)", 0 ),
1048 PCI_ROM ( 0x8086, 0x1001,
"82543gc-f",
"82543GC (Fiber)", 0 ),
1049 PCI_ROM ( 0x8086, 0x1004,
"82543gc",
"82543GC (Copper)", 0 ),
1050 PCI_ROM ( 0x8086, 0x1008,
"82544ei",
"82544EI (Copper)", 0 ),
1051 PCI_ROM ( 0x8086, 0x1009,
"82544ei-f",
"82544EI (Fiber)", 0 ),
1052 PCI_ROM ( 0x8086, 0x100c,
"82544gc",
"82544GC (Copper)", 0 ),
1053 PCI_ROM ( 0x8086, 0x100d,
"82544gc-l",
"82544GC (LOM)", 0 ),
1054 PCI_ROM ( 0x8086, 0x100e,
"82540em",
"82540EM", 0 ),
1056 PCI_ROM ( 0x8086, 0x1010,
"82546eb",
"82546EB (Copper)", 0 ),
1057 PCI_ROM ( 0x8086, 0x1011,
"82545em-f",
"82545EM (Fiber)", 0 ),
1058 PCI_ROM ( 0x8086, 0x1012,
"82546eb-f",
"82546EB (Fiber)", 0 ),
1059 PCI_ROM ( 0x8086, 0x1013,
"82541ei",
"82541EI", 0 ),
1060 PCI_ROM ( 0x8086, 0x1014,
"82541er",
"82541ER", 0 ),
1061 PCI_ROM ( 0x8086, 0x1015,
"82540em-l",
"82540EM (LOM)", 0 ),
1062 PCI_ROM ( 0x8086, 0x1016,
"82540ep-m",
"82540EP (Mobile)", 0 ),
1063 PCI_ROM ( 0x8086, 0x1017,
"82540ep",
"82540EP", 0 ),
1064 PCI_ROM ( 0x8086, 0x1018,
"82541ei",
"82541EI", 0 ),
1065 PCI_ROM ( 0x8086, 0x1019,
"82547ei",
"82547EI", 0 ),
1066 PCI_ROM ( 0x8086, 0x101a,
"82547ei-m",
"82547EI (Mobile)", 0 ),
1067 PCI_ROM ( 0x8086, 0x101d,
"82546eb",
"82546EB", 0 ),
1068 PCI_ROM ( 0x8086, 0x101e,
"82540ep-m",
"82540EP (Mobile)", 0 ),
1069 PCI_ROM ( 0x8086, 0x1026,
"82545gm",
"82545GM", 0 ),
1070 PCI_ROM ( 0x8086, 0x1027,
"82545gm-1",
"82545GM", 0 ),
1071 PCI_ROM ( 0x8086, 0x1028,
"82545gm-2",
"82545GM", 0 ),
1077 PCI_ROM ( 0x8086, 0x105e,
"82571eb",
"82571EB", 0 ),
1078 PCI_ROM ( 0x8086, 0x105f,
"82571eb-1",
"82571EB", 0 ),
1079 PCI_ROM ( 0x8086, 0x1060,
"82571eb-2",
"82571EB", 0 ),
1080 PCI_ROM ( 0x8086, 0x1075,
"82547gi",
"82547GI", 0 ),
1081 PCI_ROM ( 0x8086, 0x1076,
"82541gi",
"82541GI", 0 ),
1082 PCI_ROM ( 0x8086, 0x1077,
"82541gi-1",
"82541GI", 0 ),
1083 PCI_ROM ( 0x8086, 0x1078,
"82541er",
"82541ER", 0 ),
1084 PCI_ROM ( 0x8086, 0x1079,
"82546gb",
"82546GB", 0 ),
1085 PCI_ROM ( 0x8086, 0x107a,
"82546gb-1",
"82546GB", 0 ),
1086 PCI_ROM ( 0x8086, 0x107b,
"82546gb-2",
"82546GB", 0 ),
1087 PCI_ROM ( 0x8086, 0x107c,
"82541pi",
"82541PI", 0 ),
1088 PCI_ROM ( 0x8086, 0x107d,
"82572ei",
"82572EI (Copper)", 0 ),
1089 PCI_ROM ( 0x8086, 0x107e,
"82572ei-f",
"82572EI (Fiber)", 0 ),
1090 PCI_ROM ( 0x8086, 0x107f,
"82572ei",
"82572EI", 0 ),
1091 PCI_ROM ( 0x8086, 0x108a,
"82546gb-3",
"82546GB", 0 ),
1092 PCI_ROM ( 0x8086, 0x108b,
"82573v",
"82573V (Copper)", 0 ),
1093 PCI_ROM ( 0x8086, 0x108c,
"82573e",
"82573E (Copper)", 0 ),
1094 PCI_ROM ( 0x8086, 0x1096,
"80003es2lan",
"80003ES2LAN (Copper)", 0 ),
1095 PCI_ROM ( 0x8086, 0x1098,
"80003es2lan-s",
"80003ES2LAN (Serdes)", 0 ),
1096 PCI_ROM ( 0x8086, 0x1099,
"82546gb-4",
"82546GB (Copper)", 0 ),
1097 PCI_ROM ( 0x8086, 0x109a,
"82573l",
"82573L", 0 ),
1098 PCI_ROM ( 0x8086, 0x10a4,
"82571eb",
"82571EB", 0 ),
1099 PCI_ROM ( 0x8086, 0x10a5,
"82571eb",
"82571EB (Fiber)", 0 ),
1100 PCI_ROM ( 0x8086, 0x10a7,
"82575eb",
"82575EB", 0 ),
1101 PCI_ROM ( 0x8086, 0x10a9,
"82575eb",
"82575EB Backplane", 0 ),
1102 PCI_ROM ( 0x8086, 0x10b5,
"82546gb",
"82546GB (Copper)", 0 ),
1103 PCI_ROM ( 0x8086, 0x10b9,
"82572ei",
"82572EI (Copper)", 0 ),
1104 PCI_ROM ( 0x8086, 0x10ba,
"80003es2lan",
"80003ES2LAN (Copper)", 0 ),
1105 PCI_ROM ( 0x8086, 0x10bb,
"80003es2lan",
"80003ES2LAN (Serdes)", 0 ),
1106 PCI_ROM ( 0x8086, 0x10bc,
"82571eb",
"82571EB (Copper)", 0 ),
1107 PCI_ROM ( 0x8086, 0x10bd,
"82566dm-2",
"82566DM-2", 0 ),
1108 PCI_ROM ( 0x8086, 0x10bf,
"82567lf",
"82567LF", 0 ),
1109 PCI_ROM ( 0x8086, 0x10c0,
"82562v-2",
"82562V-2", 0 ),
1110 PCI_ROM ( 0x8086, 0x10c2,
"82562g-2",
"82562G-2", 0 ),
1111 PCI_ROM ( 0x8086, 0x10c3,
"82562gt-2",
"82562GT-2", 0 ),
1114 PCI_ROM ( 0x8086, 0x10c9,
"82576",
"82576", 0 ),
1115 PCI_ROM ( 0x8086, 0x10cb,
"82567v",
"82567V", 0 ),
1116 PCI_ROM ( 0x8086, 0x10cc,
"82567lm-2",
"82567LM-2", 0 ),
1117 PCI_ROM ( 0x8086, 0x10cd,
"82567lf-2",
"82567LF-2", 0 ),
1118 PCI_ROM ( 0x8086, 0x10ce,
"82567v-2",
"82567V-2", 0 ),
1119 PCI_ROM ( 0x8086, 0x10d3,
"82574l",
"82574L", 0 ),
1120 PCI_ROM ( 0x8086, 0x10d5,
"82571pt",
"82571PT PT Quad", 0 ),
1121 PCI_ROM ( 0x8086, 0x10d6,
"82575gb",
"82575GB", 0 ),
1122 PCI_ROM ( 0x8086, 0x10d9,
"82571eb-d",
"82571EB Dual Mezzanine", 0 ),
1123 PCI_ROM ( 0x8086, 0x10da,
"82571eb-q",
"82571EB Quad Mezzanine", 0 ),
1124 PCI_ROM ( 0x8086, 0x10de,
"82567lm-3",
"82567LM-3", 0 ),
1125 PCI_ROM ( 0x8086, 0x10df,
"82567lf-3",
"82567LF-3", 0 ),
1126 PCI_ROM ( 0x8086, 0x10e5,
"82567lm-4",
"82567LM-4", 0 ),
1127 PCI_ROM ( 0x8086, 0x10e6,
"82576",
"82576", 0 ),
1128 PCI_ROM ( 0x8086, 0x10e7,
"82576-2",
"82576", 0 ),
1129 PCI_ROM ( 0x8086, 0x10e8,
"82576-3",
"82576", 0 ),
1130 PCI_ROM ( 0x8086, 0x10ea,
"82577lm",
"82577LM", 0 ),
1131 PCI_ROM ( 0x8086, 0x10eb,
"82577lc",
"82577LC", 0 ),
1132 PCI_ROM ( 0x8086, 0x10ef,
"82578dm",
"82578DM", 0 ),
1133 PCI_ROM ( 0x8086, 0x10f0,
"82578dc",
"82578DC", 0 ),
1134 PCI_ROM ( 0x8086, 0x10f5,
"82567lm",
"82567LM", 0 ),
1135 PCI_ROM ( 0x8086, 0x10f6,
"82574l",
"82574L", 0 ),
1138 PCI_ROM ( 0x8086, 0x1503,
"82579v",
"82579V", 0 ),
1139 PCI_ROM ( 0x8086, 0x150a,
"82576ns",
"82576NS", 0 ),
1140 PCI_ROM ( 0x8086, 0x150c,
"82583v",
"82583V", 0 ),
1141 PCI_ROM ( 0x8086, 0x150d,
"82576-4",
"82576 Backplane", 0 ),
1142 PCI_ROM ( 0x8086, 0x150e,
"82580",
"82580", 0 ),
1143 PCI_ROM ( 0x8086, 0x150f,
"82580-f",
"82580 Fiber", 0 ),
1144 PCI_ROM ( 0x8086, 0x1510,
"82580-b",
"82580 Backplane", 0 ),
1145 PCI_ROM ( 0x8086, 0x1511,
"82580-s",
"82580 SFP", 0 ),
1146 PCI_ROM ( 0x8086, 0x1516,
"82580-2",
"82580", 0 ),
1147 PCI_ROM ( 0x8086, 0x1518,
"82576ns",
"82576NS SerDes", 0 ),
1148 PCI_ROM ( 0x8086, 0x1521,
"i350",
"I350", 0 ),
1149 PCI_ROM ( 0x8086, 0x1522,
"i350-f",
"I350 Fiber", 0 ),
1151 PCI_ROM ( 0x8086, 0x1524,
"i350-2",
"I350", 0 ),
1152 PCI_ROM ( 0x8086, 0x1525,
"82567v-4",
"82567V-4", 0 ),
1153 PCI_ROM ( 0x8086, 0x1526,
"82576-5",
"82576", 0 ),
1154 PCI_ROM ( 0x8086, 0x1527,
"82580-f2",
"82580 Fiber", 0 ),
1156 PCI_ROM ( 0x8086, 0x1539,
"i211",
"I211", 0 ),
1158 PCI_ROM ( 0x8086, 0x153b,
"i217v",
"I217-V", 0 ),
1165 PCI_ROM ( 0x8086, 0x15a1,
"i218v-2",
"I218-V", 0 ),
1194 PCI_ROM ( 0x8086, 0x294c,
"82566dc-2",
"82566DC-2", 0 ),
1195 PCI_ROM ( 0x8086, 0x2e6e,
"cemedia",
"CE Media Processor", 0 ),
unsigned int force_icr
Forced interrupts.
#define PCI_FUNC(busdevfn)
int(* write)(struct nvs_device *nvs, unsigned int address, const void *data, size_t len)
Write data to device.
unsigned long membase
Memory base.
#define INTEL_RCTL_BSIZE_2048
struct arbelprm_rc_send_wqe rc
unsigned int word_len_log2
Word length.
#define INTEL_ICR
Interrupt Cause Read Register.
#define INTEL_DESC_STATUS_DD
Descriptor done.
#define iob_put(iobuf, len)
struct dma_device dma
DMA device.
#define INTEL_NUM_RX_DESC
Number of receive descriptors.
void netdev_rx_err(struct net_device *netdev, struct io_buffer *iobuf, int rc)
Discard received packet.
#define INTEL_IRQ_RXDMT0
Receive queue low.
#define INTEL_PBA
Packet Buffer Allocation.
#define INTEL_EERD
EEPROM Read Register.
void intel_poll_rx(struct net_device *netdev)
Poll for received packets.
void intel_reset_ring(struct intel_nic *intel, unsigned int reg)
Reset descriptor ring.
#define INTEL_DESC_STATUS_PAYLEN(len)
Payload length.
static unsigned int unsigned int reg
static int intel_fetch_mac_eeprom(struct intel_nic *intel, uint8_t *hw_addr)
Fetch initial MAC address from EEPROM.
static struct profiler intel_vm_tx_profiler __profiler
VM transmit profiler.
#define INTEL_IRQ_RXT0
Receive timer.
#define le32_to_cpu(value)
int(* open)(struct net_device *netdev)
Open network device.
void netdev_tx_err(struct net_device *netdev, struct io_buffer *iobuf, int rc)
Discard transmitted packet.
#define INTEL_EERD_DONE_SMALL
Read done (small EERD)
static int intel_fetch_mac(struct intel_nic *intel, uint8_t *hw_addr)
Fetch initial MAC address.
VMware missing interrupt workaround required.
struct dma_mapping map
Descriptor ring DMA mapping.
#define INTEL_xDCTL
Receive/Transmit Descriptor Control (offset)
static int intel_open(struct net_device *netdev)
Open network device.
#define INTEL_RD
Receive Descriptor register block.
unsigned long driver_data
Arbitrary driver data.
static void netdev_tx_complete_next(struct net_device *netdev)
Complete network transmission.
A non-volatile storage device.
#define INTEL_NUM_TX_DESC
Number of transmit descriptors.
struct pci_device_id * ids
PCI ID table.
void intel_poll_tx(struct net_device *netdev)
Poll for completed packets.
uint64_t address
Base address.
static void intel_irq(struct net_device *netdev, int enable)
Enable or disable interrupts.
#define INTEL_RCTL_BSIZE_BSEX_MASK
uint32_t readl(volatile uint32_t *io_addr)
Read 32-bit dword from memory-mapped device.
struct intel_ring rx
Receive descriptor ring.
#define INTEL_TCTL_EN
Transmit enable.
#define INTEL_xDT
Receive/Transmit Descriptor Tail (offset)
int intel_create_ring(struct intel_nic *intel, struct intel_ring *ring)
Create descriptor ring.
void intel_empty_rx(struct intel_nic *intel)
Discard unused receive I/O buffers.
#define ENOENT
No such file or directory.
size_t len
Length (in bytes)
static __always_inline void dma_set_mask_64bit(struct dma_device *dma)
Set 64-bit addressable space mask.
unsigned long long uint64_t
void intel_describe_tx(struct intel_descriptor *tx, physaddr_t addr, size_t len)
Populate transmit descriptor.
struct dma_device * dma
DMA device.
#define INTEL_TXPBS
Transmit packet buffer size.
#define INTEL_PBS
Packet Buffer Size.
#define cpu_to_le64(value)
void netdev_link_down(struct net_device *netdev)
Mark network device as having link down.
PBS/PBA errata workaround required.
#define INTEL_IRQ_TXDW
Transmit descriptor done.
uint8_t mac[ETH_ALEN]
MAC address.
A data structure for storing profiling information.
An Intel descriptor ring.
#define INTEL_BAR_SIZE
Intel BAR size.
static void profile_stop(struct profiler *profiler)
Stop profiling.
#define INTEL_DESC_FL_DTYP_DATA
#define INTEL_RCTL_SECRC
Strip CRC.
void adjust_pci_device(struct pci_device *pci)
Enable PCI device.
static void intel_init_ring(struct intel_ring *ring, unsigned int count, unsigned int reg, void(*describe)(struct intel_descriptor *desc, physaddr_t addr, size_t len))
Initialise descriptor ring.
unsigned int cons
Consumer index.
#define INTEL_xDLEN
Receive/Transmit Descriptor Length (offset)
static __always_inline unsigned long virt_to_phys(volatile const void *addr)
Convert virtual address to a physical address.
struct device dev
Generic device.
unsigned int reg
Register block.
#define ENOTSUP
Operation not supported.
void intel_refill_rx(struct intel_nic *intel)
Refill receive descriptor ring.
FILE_LICENCE(GPL2_OR_LATER_OR_UBDL)
static void intel_check_link(struct net_device *netdev)
Check link state.
unsigned int port
Port number (for multi-port devices)
static void netdev_init(struct net_device *netdev, struct net_device_operations *op)
Initialise a network device.
#define INTEL_CTRL_FRCDPLX
Force duplex.
#define INTEL_TX_FILL
Transmit descriptor ring maximum fill level.
#define INTEL_xDH
Receive/Transmit Descriptor Head (offset)
static void pci_set_drvdata(struct pci_device *pci, void *priv)
Set PCI driver-private data.
#define INTEL_TCTL_CT_MASK
#define ENOMEM
Not enough space.
#define INTEL_xDBAL
Receive/Transmit Descriptor Base Address Low (offset)
void * memcpy(void *dest, const void *src, size_t len) __nonnull
#define INTEL_FEXTNVM11
Future Extended NVM register 11.
unsigned int block_size
Data block size (in words)
void dma_free(struct dma_mapping *map, void *addr, size_t len)
Unmap and free DMA-coherent buffer.
#define INTEL_EEPROM_MAC
Offset of MAC address within EEPROM.
assert((readw(&hdr->flags) &(GTF_reading|GTF_writing))==0)
static void netdev_put(struct net_device *netdev)
Drop reference to network device.
#define container_of(ptr, type, field)
Get containing structure.
static int intel_reset(struct intel_nic *intel)
Reset hardware.
#define INTEL_CTRL_ASDE
Auto-speed detection.
void * priv
Driver private data.
pseudo_bit_t value[0x00020]
void intel_describe_rx(struct intel_descriptor *rx, physaddr_t addr, size_t len __unused)
Populate receive descriptor.
#define INTEL_FEXTNVM11_WTF
Don't ask.
#define __unused
Declare a variable or data structure as unused.
#define INTEL_EERD_DATA(value)
Read data.
Intel 10/100/1000 network card driver.
PBSIZE registers must be explicitly reset.
static void netdev_link_up(struct net_device *netdev)
Mark network device as having link up.
void writel(uint32_t data, volatile uint32_t *io_addr)
Write 32-bit dword to memory-mapped device.
#define INTEL_CTRL_LRST
Link reset.
uint32_t eerd_done
EEPROM done flag.
#define INTEL_EEPROM_WORD_LEN_LOG2
EEPROM word length.
static struct net_device * netdev
static __always_inline physaddr_t iob_dma(struct io_buffer *iobuf)
Get I/O buffer DMA address.
struct io_buffer * rx_iobuf[INTEL_NUM_RX_DESC]
Receive I/O buffers.
#define INTEL_EERD_ADDR_SHIFT_SMALL
Address shift (small)
#define INTEL_IMS
Interrupt Mask Set/Read Register.
static void profile_start(struct profiler *profiler)
Start profiling.
void unregister_netdev(struct net_device *netdev)
Unregister network device.
#define INTEL_DESC_CMD_IFCS
Insert frame checksum (CRC)
int(* read)(struct nvs_device *nvs, unsigned int address, void *data, size_t len)
Read data from device.
#define cpu_to_le32(value)
#define INTEL_CTRL_RST
Device reset.
static int intel_probe(struct pci_device *pci)
Probe PCI device.
static struct net_device_operations intel_operations
Intel network device operations.
static void intel_poll(struct net_device *netdev)
Poll for completed and received packets.
static struct pci_device_id intel_nics[]
Intel PCI device IDs.
char * strerror(int errno)
Retrieve string representation of error number.
#define INTEL_I219
The i219 has a seriously broken reset mechanism.
#define INTEL_STATUS_LU
Link up.
struct io_buffer * alloc_rx_iob(size_t len, struct dma_device *dma)
Allocate and map I/O buffer for receive DMA.
int register_netdev(struct net_device *netdev)
Register network device.
static size_t iob_len(struct io_buffer *iobuf)
Calculate length of data in an I/O buffer.
const char * eth_ntoa(const void *ll_addr)
Transcribe Ethernet address.
#define ENODEV
No such device.
static void netdev_nullify(struct net_device *netdev)
Stop using a network device.
static int intel_write_eeprom(struct nvs_device *nvs, unsigned int address __unused, const void *data __unused, size_t len __unused)
Write data to EEPROM.
#define INTEL_RX_MAX_LEN
Receive buffer length.
#define INTEL_EEPROM_MAX_WAIT_MS
Maximum time to wait for EEPROM read, in milliseconds.
#define INTEL_TCTL_CT_DEFAULT
A PCI device ID list entry.
#define INTEL_DISABLE_MAX_WAIT_MS
Maximum time to wait for queue disable, in milliseconds.
struct pci_driver intel_driver __pci_driver
Intel PCI driver.
#define le16_to_cpu(value)
#define INTEL_RCTL_BAM
Broadcast accept mode.
static int is_valid_ether_addr(const void *addr)
Check if Ethernet address is valid.
void(* describe)(struct intel_descriptor *desc, physaddr_t addr, size_t len)
Populate descriptor.
static struct xen_remove_from_physmap * remove
static void intel_remove(struct pci_device *pci)
Remove PCI device.
Network device operations.
void netdev_rx(struct net_device *netdev, struct io_buffer *iobuf)
Add packet to receive queue.
struct device * dev
Underlying hardware device.
void * dma_alloc(struct dma_device *dma, struct dma_mapping *map, size_t len, size_t align)
Allocate and map DMA-coherent buffer.
Network device management.
#define INTEL_CTRL
Device Control Register.
static void * pci_get_drvdata(struct pci_device *pci)
Get PCI driver-private data.
struct dma_device * dma
DMA device.
void mdelay(unsigned long msecs)
Delay for a fixed number of milliseconds.
#define INTEL_RCTL_UPE
Unicast promiscuous mode.
#define INTEL_RCTL
Receive Control Register.
uint32_t busdevfn
Segment, bus, device, and function (bus:dev.fn) number.
#define INTEL_TCTL
Transmit Control Register.
#define INTEL_TXPBS_I210
I210 power-up default.
void free_rx_iob(struct io_buffer *iobuf)
Unmap and free I/O buffer for receive DMA.
#define ENOBUFS
No buffer space available.
static int intel_disable_ring(struct intel_nic *intel, unsigned int reg)
Disable descriptor ring.
#define INTEL_CTRL_PHY_RST
PHY reset.
int(* probe)(struct pci_device *pci)
Probe device.
#define INTEL_EERD_DONE_LARGE
Read done (large EERD)
int intel_transmit(struct net_device *netdev, struct io_buffer *iobuf)
Transmit packet.
void * data
Start of data.
#define INTEL_EERD_ADDR_SHIFT_LARGE
Address shift (large)
unsigned int prod
Producer index.
void intel_destroy_ring(struct intel_nic *intel, struct intel_ring *ring)
Destroy descriptor ring.
#define INTEL_RESET_DELAY_MS
Time to delay for device reset, in milliseconds.
#define EIO
Input/output error.
#define INTEL_DESC_CMD_DEXT
Descriptor extension.
struct net_device * alloc_etherdev(size_t priv_size)
Allocate Ethernet device.
u8 rx[WPA_TKIP_MIC_KEY_LEN]
MIC key for packets from the AP.
struct pci_device_id * id
Driver device ID.
#define INTEL_CTRL_SLU
Set link up.
void intel_describe_tx_adv(struct intel_descriptor *tx, physaddr_t addr, size_t len)
Populate advanced transmit descriptor.
#define INTEL_DESC_CMD_EOP
End of packet.
#define cpu_to_le16(value)
void iounmap(volatile const void *io_addr)
Unmap I/O address.
#define INTEL_RXPBS_I210
I210 power-up default.
uint8_t data[48]
Additional event data.
#define INTEL_RX_FILL
Receive descriptor ring fill level.
#define INTEL_xDCTL_ENABLE
Queue enable.
struct intel_descriptor * desc
Descriptors.
int nvs_read(struct nvs_device *nvs, unsigned int address, void *data, size_t len)
Read from non-volatile storage device.
static int intel_read_eeprom(struct nvs_device *nvs, unsigned int address, void *data, size_t len)
Read data from EEPROM.
#define INTEL_TCTL_PSP
Pad short packets.
static int intel_init_eeprom(struct intel_nic *intel)
Initialise EEPROM.
#define INTEL_STATUS
Device Status Register.
#define INTEL_EERD_START
Start read.
struct intel_ring tx
Transmit descriptor ring.
Reset may cause a complete device hang.
#define INTEL_RCTL_EN
Receive enable.
#define INTEL_RAH0_AV
Address valid.
#define INTEL_IRQ_TXQE
Transmit queue empty.
unsigned int eerd_addr_shift
EEPROM address shift.
#define INTEL_DESC_STATUS_RXE
Receive error.
#define INTEL_RAL0
Receive Address Low.
#define INTEL_IRQ_LSC
Link status change.
#define INTEL_EEPROM_MIN_SIZE_WORDS
Minimum EEPROM size, in words.
#define INTEL_RAH0
Receive Address High.
static void profile_exclude(struct profiler *profiler)
Exclude time from other ongoing profiling results.
uint8_t ll_addr[MAX_LL_ADDR_LEN]
Link-layer address.
#define INTEL_TCTL_COLD_MASK
static __always_inline physaddr_t dma(struct dma_mapping *map, void *addr)
Get DMA address from virtual address.
#define INTEL_DESC_CMD_RS
Report status.
void * pci_ioremap(struct pci_device *pci, unsigned long bus_addr, size_t len)
Map PCI bus address as an I/O address.
#define INTEL_TCTL_COLD_DEFAULT
static void intel_close(struct net_device *netdev)
Close network device.
uint8_t hw_addr[MAX_HW_ADDR_LEN]
Hardware address.
#define NULL
NULL pointer (VOID *)
struct nvs_device eeprom
EEPROM.
#define INTEL_xDBAH
Receive/Transmit Descriptor Base Address High (offset)
#define ETIMEDOUT
Connection timed out.
#define INTEL_IMC
Interrupt Mask Clear Register.
#define PCI_ROM(_vendor, _device, _name, _description, _data)
#define INTEL_RCTL_MPE
Multicast promiscuous.
unsigned int size
Device size (in words)
#define INTEL_IRQ_RXO
Receive overrun.
#define INTEL_TD
Transmit Descriptor register block.
#define INTEL_CTRL_FRCSPD
Force speed.
u8 tx[WPA_TKIP_MIC_KEY_LEN]
MIC key for packets to the AP.
void * memset(void *dest, int character, size_t len) __nonnull
#define INTEL_RXPBS
Receive packet buffer size.