83 ESF_DZ_TX_KER_TYPE, 0,
84 ESF_DZ_TX_KER_CONT, 0,
85 ESF_DZ_TX_KER_BYTE_CNT,
iob_len(iob),
86 ESF_DZ_TX_KER_BUF_ADDR, dma_addr);
105 int fill_level, space;
117 txq->
buf[buf_id] = iob;
119 DBGCIO(efx,
"tx_buf[%d] for iob %p data %p len %zd\n",
148 DBGCIO(efx,
"tx_buf[%d] for iob %p done\n", read_ptr, iob);
187 ESF_DZ_RX_KER_BUF_ADDR, dma_addr);
220 DBGCP(efx,
"pushing rx_buf[%d] iob %p data %p\n",
221 buf_id, iob, iob->
data);
223 rxq->
buf[buf_id] = iob;
235 DBGCP(efx,
"pushed %d rx buffers to fill level %d\n",
250 assert((
id & 15) == ((read_ptr + (
len != 0)) & 15));
253 iob = rxq->
buf[buf_ptr];
256 DBGCIO(efx,
"popping rx_buf[%d] iob %p data %p with %d bytes %s %x\n",
257 read_ptr, iob, iob->
data,
len, drop ?
"bad" :
"ok", drop);
357 ERF_DD_EVQ_IND_RPTR, evq->
read_ptr &
370 int ev_code, desc_ptr,
len;
371 int next_ptr_lbits, packet_drop;
392 packet_drop = (
len == 0) | (rx_cont << 1) |
399 DBGCP(efx,
"Unknown event type %d\n", ev_code);
417 DBGCP(efx,
"Event at index 0x%x address %p is " 473 ERF_DZ_TC_TIMER_MODE, 0,
474 ERF_DZ_TC_TIMER_VAL, 0);
#define EFE_DD_EVQ_IND_RPTR_FLAGS_LOW
void efx_hunt_irq(struct net_device *netdev, int enable)
#define iob_pull(iobuf, len)
#define ER_DZ_BIU_INT_ISR
void efx_hunt_poll(struct net_device *netdev)
static void netdev_tx_complete(struct net_device *netdev, struct io_buffer *iobuf)
Complete network transmission.
#define efx_writel_table(efx, value, index, reg)
#define iob_put(iobuf, len)
void netdev_rx_err(struct net_device *netdev, struct io_buffer *iobuf, int rc)
Discard received packet.
int efx_hunt_rx_init(struct net_device *netdev, dma_addr_t *dma_addr)
static int efx_hunt_event_present(efx_event_t *event)
See if an event is present.
static unsigned int unsigned int reg
struct efx_special_buffer entry
#define NETDEV_OPEN
Network device is open.
void free_iob(struct io_buffer *iobuf)
Free I/O buffer.
static void efx_hunt_build_rx_desc(efx_rx_desc_t *rxd, struct io_buffer *iob)
#define EFE_DD_EVQ_IND_RPTR_FLAGS_HIGH
unsigned int state
Current device state.
static void *__malloc malloc_phys(size_t size, size_t phys_align)
Allocate memory with specified physical alignment.
int efx_hunt_ev_init(struct net_device *netdev, dma_addr_t *dma_addr)
#define ER_DD_EVQ_INDIRECT
static void efx_hunt_rxq_fill(struct efx_nic *efx)
#define efx_writel_page(efx, value, index, reg)
uint32_t buffer
Buffer index (or NETVSC_RNDIS_NO_BUFFER)
int efx_hunt_tx_init(struct net_device *netdev, dma_addr_t *dma_addr)
unsigned int rx_cont_prev
A doubleword (4 byte) datatype - little-endian in HW.
struct io_buffer * alloc_iob(size_t len)
Allocate I/O buffer.
Dynamic memory allocation.
#define ESE_DZ_EV_CODE_RX_EV
static void efx_hunt_notify_rx_desc(struct efx_nic *efx)
static void efx_hunt_receive(struct efx_nic *efx, unsigned int id, int len, int drop)
#define EFX_POPULATE_QWORD_4(qword,...)
#define ENOMEM
Not enough space.
A buffer table allocation backing a tx dma, rx dma or eventq.
#define EFX_NUM_RX_DESC_MASK
static __always_inline unsigned long virt_to_bus(volatile const void *addr)
Convert virtual address to a bus address.
void efx_hunt_close(struct net_device *netdev)
#define EBADMSG
Bad message.
assert((readw(&hdr->flags) &(GTF_reading|GTF_writing))==0)
void * priv
Driver private data.
#define EFX_SET_QWORD(qword)
static void efx_hunt_clear_interrupts(struct efx_nic *efx)
static void efx_hunt_build_tx_desc(efx_tx_desc_t *txd, struct io_buffer *iob)
static struct net_device * netdev
efx_qword_t efx_tx_desc_t
#define ER_DZ_RX_DESC_UPD
EF10 hardware architecture definitions.
#define EFX_POPULATE_QWORD_2(qword,...)
struct efx_special_buffer entry
#define EFX_DWORD_IS_ALL_ONES(dword)
static size_t iob_len(struct io_buffer *iobuf)
Calculate length of data in an I/O buffer.
static void efx_hunt_transmit_done(struct efx_nic *efx, int id)
FILE_LICENCE(GPL2_OR_LATER_OR_UBDL)
#define EFX_QWORD_VAL(qword)
#define EFX_POPULATE_DWORD_1(dword,...)
#define EFX_POPULATE_DWORD_2(dword,...)
unsigned int rx_prefix_size
#define ESE_DZ_EV_CODE_TX_EV
void netdev_rx(struct net_device *netdev, struct io_buffer *iobuf)
Add packet to receive queue.
efx_qword_t efx_rx_desc_t
int efx_hunt_open(struct net_device *netdev)
Network device management.
int efx_hunt_transmit(struct net_device *netdev, struct io_buffer *iob)
#define ENOBUFS
No buffer space available.
#define ER_DZ_TX_DESC_UPD_DWORD
void * data
Start of data.
struct io_buffer * buf[EFX_TXD_SIZE]
static unsigned int efx_hunt_handle_event(struct efx_nic *efx, efx_event_t *evt)
static void free_phys(void *ptr, size_t size)
Free memory allocated with malloc_phys()
struct io_buffer * buf[EFX_NUM_RX_DESC]
struct efx_special_buffer entry
static void * efx_hunt_alloc_special_buffer(int bytes, struct efx_special_buffer *entry)
void efx_hunt_free_special_buffer(void *buf, int bytes)
#define ERF_DD_EVQ_IND_RPTR_WIDTH
void efx_readl(struct efx_nic *efx, efx_dword_t *value, unsigned int reg)
static void efx_hunt_notify_tx_desc(struct efx_nic *efx)
static void efx_hunt_evq_read_ack(struct efx_nic *efx)
#define NULL
NULL pointer (VOID *)
A quadword (8 byte) datatype - little-endian in HW.
struct net_device * netdev
void * memset(void *dest, int character, size_t len) __nonnull