21 #define EXANIC_MAX_PORTS 8 24 #define EXANIC_REGS_BAR PCI_BASE_ADDRESS_0 27 #define EXANIC_TX_BAR PCI_BASE_ADDRESS_2 30 #define EXANIC_ALIGN 0x1000 33 #define EXANIC_DMA_32_BIT 0x00000001UL 36 #define EXANIC_REGS_LEN 0x2000 39 #define EXANIC_TXF_LEN 0x1000 45 #define EXANIC_TXF_SLOT( index ) ( 0x40 * (index) ) 48 #define EXANIC_RX_LEN 0x200000 51 #define EXANIC_TXF_BASE 0x0014 54 #define EXANIC_CAPS 0x0038 55 #define EXANIC_CAPS_100M 0x01000000UL 56 #define EXANIC_CAPS_1G 0x02000000UL 57 #define EXANIC_CAPS_10G 0x04000000UL 58 #define EXANIC_CAPS_40G 0x08000000UL 59 #define EXANIC_CAPS_100G 0x10000000UL 60 #define EXANIC_CAPS_SPEED_MASK 0x1f000000UL 63 #define EXANIC_I2C 0x012c 66 #define EXANIC_POWER 0x0138 67 #define EXANIC_POWER_ON 0x000000f0UL 70 #define EXANIC_PORT_REGS( index ) ( 0x0200 + ( 0x40 * (index) ) ) 73 #define EXANIC_PORT_ENABLE 0x0000 74 #define EXANIC_PORT_ENABLE_ENABLED 0x00000001UL 77 #define EXANIC_PORT_SPEED 0x0004 80 #define EXANIC_PORT_STATUS 0x0008 81 #define EXANIC_PORT_STATUS_LINK 0x00000008UL 82 #define EXANIC_PORT_STATUS_ABSENT 0x80000000UL 85 #define EXANIC_PORT_MAC 0x000c 88 #define EXANIC_PORT_FLAGS 0x0010 89 #define EXANIC_PORT_FLAGS_PROMISC 0x00000001UL 92 #define EXANIC_PORT_RX_BASE 0x0014 95 #define EXANIC_PORT_TX_COMMAND 0x0020 98 #define EXANIC_PORT_TX_OFFSET 0x0024 101 #define EXANIC_PORT_TX_LEN 0x0028 104 #define EXANIC_PORT_OUI 0x0030 107 #define EXANIC_PORT_IRQ 0x0034 134 #define EXANIC_TYPE_RAW 0x01 159 #define EXANIC_STATUS_ERROR_MASK 0x0f 172 #define EXANIC_EEPROM_ADDRESS 0x50 247 #define EXANIC_MAX_TX_LEN ( 256 * sizeof ( struct exanic_tx_chunk ) ) 253 #define EXANIC_MAX_RX_LEN ( ETH_FRAME_LEN + 4 + 4 ) 259 #define EXANIC_LINK_INTERVAL ( 1 * TICKS_PER_SEC )
uint16_t txf_slot
Transmit feedback slot.
void * regs
Port registers.
userptr_t rx
Receive region.
uint8_t getsda
GPIO bit for reading SDA.
struct exanic_i2c_config i2cfg
I2C bus configuration.
void * tx
Transmit region.
uint8_t setscl
GPIO bit for pulling SCL low.
uint8_t generation
Generation.
struct exanic_tx_descriptor desc
Descriptor.
struct exanic_rx_descriptor desc
Descriptor.
uint8_t len
Length (zero except on the final chunk)
A bit-bashing I2C interface.
uint32_t status
Port status.
struct exanic_port * port[EXANIC_MAX_PORTS]
Ports.
uint16_t tx_cons
Transmit consumer counter.
Access to external ("user") memory.
An ExaNIC transmit chunk.
uint8_t setsda
GPIO bit for pulling SDA low.
uint16_t txf_slot
Feedback slot.
uint32_t userptr_t
A pointer to a user buffer.
uint32_t speeds
Speed capability bitmask.
void * txf
Transmit feedback region.
size_t tx_offset
Transmit region offset.
An ExaNIC receive chunk descriptor.
void * tx
Transmit region.
uint8_t status
Status (valid only on final chunk)
uint16_t len
Payload length (including padding.
uint16_t * txf
Transmit feedback region.
uint32_t caps
Capabilities.
An ExaNIC transmit chunk descriptor.
struct net_device * netdev
Network device.
unsigned int speed
Current attempted link speed (as a capability bit index)
unsigned int rx_cons
Receive consumer counter.
uint8_t type
Payload type.
uint16_t txf_id
Feedback ID.
#define EXANIC_MAX_PORTS
Maximum number of ports.
uint8_t data[120]
Payload data.
struct io_buffer * rx_iobuf
Receive I/O buffer (if any)
uint16_t tx_prod
Transmit producer counter.
uint32_t default_speed
Default link speed (as raw register value)
struct i2c_bit_basher basher
I2C bit-bashing interface.
uint8_t filter
Filter number.
uint16_t tx_count
Number of transmit descriptors.
uint8_t data[2038]
Payload data.
uint8_t mac[ETH_ALEN]
Base MAC address.
FILE_LICENCE(GPL2_OR_LATER_OR_UBDL)
uint32_t timestamp
Timestamp.
An ExaNIC I2C bus configuration.