20#define EXANIC_MAX_PORTS 8
23#define EXANIC_REGS_BAR PCI_BASE_ADDRESS_0
26#define EXANIC_TX_BAR PCI_BASE_ADDRESS_2
29#define EXANIC_ALIGN 0x1000
32#define EXANIC_DMA_32_BIT 0x00000001UL
35#define EXANIC_REGS_LEN 0x2000
38#define EXANIC_TXF_LEN 0x1000
44#define EXANIC_TXF_SLOT( index ) ( 0x40 * (index) )
47#define EXANIC_RX_LEN 0x200000
50#define EXANIC_TXF_BASE 0x0014
53#define EXANIC_CAPS 0x0038
54#define EXANIC_CAPS_100M 0x01000000UL
55#define EXANIC_CAPS_1G 0x02000000UL
56#define EXANIC_CAPS_10G 0x04000000UL
57#define EXANIC_CAPS_40G 0x08000000UL
58#define EXANIC_CAPS_100G 0x10000000UL
59#define EXANIC_CAPS_SPEED_MASK 0x1f000000UL
62#define EXANIC_I2C 0x012c
65#define EXANIC_POWER 0x0138
66#define EXANIC_POWER_ON 0x000000f0UL
69#define EXANIC_PORT_REGS( index ) ( 0x0200 + ( 0x40 * (index) ) )
72#define EXANIC_PORT_ENABLE 0x0000
73#define EXANIC_PORT_ENABLE_ENABLED 0x00000001UL
76#define EXANIC_PORT_SPEED 0x0004
79#define EXANIC_PORT_STATUS 0x0008
80#define EXANIC_PORT_STATUS_LINK 0x00000008UL
81#define EXANIC_PORT_STATUS_ABSENT 0x80000000UL
84#define EXANIC_PORT_MAC 0x000c
87#define EXANIC_PORT_FLAGS 0x0010
88#define EXANIC_PORT_FLAGS_PROMISC 0x00000001UL
91#define EXANIC_PORT_RX_BASE 0x0014
94#define EXANIC_PORT_TX_COMMAND 0x0020
97#define EXANIC_PORT_TX_OFFSET 0x0024
100#define EXANIC_PORT_TX_LEN 0x0028
103#define EXANIC_PORT_OUI 0x0030
106#define EXANIC_PORT_IRQ 0x0034
133#define EXANIC_TYPE_RAW 0x01
158#define EXANIC_STATUS_ERROR_MASK 0x0f
161#define EXANIC_RX_COUNT ( EXANIC_RX_LEN / sizeof ( struct exanic_rx_chunk ) )
174#define EXANIC_EEPROM_ADDRESS 0x50
249#define EXANIC_MAX_TX_LEN ( 256 * sizeof ( struct exanic_tx_chunk ) )
255#define EXANIC_MAX_RX_LEN ( ETH_FRAME_LEN + 4 + 4 )
261#define EXANIC_LINK_INTERVAL ( 1 * TICKS_PER_SEC )
#define EXANIC_MAX_PORTS
Maximum number of ports.
#define FILE_LICENCE(_licence)
Declare a particular licence as applying to a file.
An ExaNIC I2C bus configuration.
uint8_t getsda
GPIO bit for reading SDA.
uint8_t setscl
GPIO bit for pulling SCL low.
uint8_t setsda
GPIO bit for pulling SDA low.
struct net_device * netdev
Network device.
uint16_t tx_count
Number of transmit descriptors.
void * tx
Transmit region.
uint32_t status
Port status.
uint16_t * txf
Transmit feedback region.
struct retry_timer timer
Port status check timer.
uint16_t tx_cons
Transmit consumer counter.
uint32_t speeds
Speed capability bitmask.
void * regs
Port registers.
struct io_buffer * rx_iobuf
Receive I/O buffer (if any)
size_t tx_offset
Transmit region offset.
uint16_t txf_slot
Transmit feedback slot.
unsigned int rx_cons
Receive consumer counter.
uint32_t default_speed
Default link speed (as raw register value)
struct exanic_rx_chunk * rx
Receive region.
uint16_t tx_prod
Transmit producer counter.
unsigned int speed
Current attempted link speed (as a capability bit index)
uint8_t data[120]
Payload data.
struct exanic_rx_descriptor desc
Descriptor.
An ExaNIC receive chunk descriptor.
uint8_t generation
Generation.
uint8_t filter
Filter number.
uint32_t timestamp
Timestamp.
uint8_t len
Length (zero except on the final chunk)
uint8_t status
Status (valid only on final chunk)
An ExaNIC transmit chunk.
struct exanic_tx_descriptor desc
Descriptor.
uint8_t data[2038]
Payload data.
An ExaNIC transmit chunk descriptor.
uint8_t type
Payload type.
uint16_t txf_slot
Feedback slot.
uint16_t txf_id
Feedback ID.
uint16_t len
Payload length (including padding.
struct exanic_port * port[EXANIC_MAX_PORTS]
Ports.
void * txf
Transmit feedback region.
uint8_t mac[ETH_ALEN]
Base MAC address.
struct exanic_i2c_config i2cfg
I2C bus configuration.
uint32_t caps
Capabilities.
struct i2c_device eeprom
I2C serial EEPROM.
void * tx
Transmit region.
struct i2c_bit_basher basher
I2C bit-bashing interface.
A bit-bashing I2C interface.