iPXE
|
#include "efx_common.h"
Go to the source code of this file.
Data Structures | |
struct | efx_mcdi_req_s |
MCDI request structure. More... | |
Macros | |
#define | EFX_EV_SIZE(_nevs) ((_nevs) * sizeof(efx_qword_t)) |
#define | EFX_EVQ_NBUFS(_nevs) (EFX_EV_SIZE(_nevs) / EFX_BUF_ALIGN) |
#define | EFX_RXQ_SIZE(_ndescs) ((_ndescs) * sizeof(efx_qword_t)) |
#define | EFX_RXQ_NBUFS(_ndescs) (EFX_RXQ_SIZE(_ndescs) / EFX_BUF_ALIGN) |
#define | EFX_TXQ_SIZE(_ndescs) ((_ndescs) * sizeof(efx_qword_t)) |
#define | EFX_TXQ_NBUFS(_ndescs) (EFX_TXQ_SIZE(_ndescs) / EFX_BUF_ALIGN) |
Functions | |
FILE_LICENCE (GPL2_OR_LATER_OR_UBDL) | |
void | efx_hunt_free_special_buffer (void *buf, int bytes) |
int | efx_hunt_transmit (struct net_device *netdev, struct io_buffer *iob) |
void | efx_hunt_poll (struct net_device *netdev) |
void | efx_hunt_irq (struct net_device *netdev, int enable) |
int | efx_hunt_ev_init (struct net_device *netdev, dma_addr_t *dma_addr) |
int | efx_hunt_rx_init (struct net_device *netdev, dma_addr_t *dma_addr) |
int | efx_hunt_tx_init (struct net_device *netdev, dma_addr_t *dma_addr) |
int | efx_hunt_open (struct net_device *netdev) |
void | efx_hunt_close (struct net_device *netdev) |
#define EFX_EV_SIZE | ( | _nevs | ) | ((_nevs) * sizeof(efx_qword_t)) |
Definition at line 34 of file efx_hunt.h.
#define EFX_EVQ_NBUFS | ( | _nevs | ) | (EFX_EV_SIZE(_nevs) / EFX_BUF_ALIGN) |
Definition at line 35 of file efx_hunt.h.
#define EFX_RXQ_SIZE | ( | _ndescs | ) | ((_ndescs) * sizeof(efx_qword_t)) |
Definition at line 37 of file efx_hunt.h.
#define EFX_RXQ_NBUFS | ( | _ndescs | ) | (EFX_RXQ_SIZE(_ndescs) / EFX_BUF_ALIGN) |
Definition at line 38 of file efx_hunt.h.
#define EFX_TXQ_SIZE | ( | _ndescs | ) | ((_ndescs) * sizeof(efx_qword_t)) |
Definition at line 40 of file efx_hunt.h.
#define EFX_TXQ_NBUFS | ( | _ndescs | ) | (EFX_TXQ_SIZE(_ndescs) / EFX_BUF_ALIGN) |
Definition at line 41 of file efx_hunt.h.
FILE_LICENCE | ( | GPL2_OR_LATER_OR_UBDL | ) |
void efx_hunt_free_special_buffer | ( | void * | buf, |
int | bytes | ||
) |
Definition at line 39 of file efx_hunt.c.
References bytes, and free_phys().
Referenced by hunt_ev_fini(), hunt_rx_fini(), and hunt_tx_fini().
int efx_hunt_transmit | ( | struct net_device * | netdev, |
struct io_buffer * | iob | ||
) |
Definition at line 101 of file efx_hunt.c.
References assert(), efx_tx_queue::buf, io_buffer::data, DBGCIO, efx_hunt_build_tx_desc(), efx_hunt_notify_tx_desc(), EFX_TXD_MASK, EFX_TXD_SIZE, ENOBUFS, iob_len(), netdev, NULL, net_device::priv, efx_tx_queue::read_ptr, efx_tx_queue::ring, txd, efx_nic::txq, and efx_tx_queue::write_ptr.
void efx_hunt_poll | ( | struct net_device * | netdev | ) |
Definition at line 405 of file efx_hunt.c.
References DBGCP, EFX_EVQ_MASK, efx_hunt_clear_interrupts(), efx_hunt_event_present(), efx_hunt_evq_read_ack(), efx_hunt_handle_event(), efx_hunt_rxq_fill(), EFX_QWORD_FMT, EFX_QWORD_VAL, EFX_SET_QWORD, efx_nic::evq, efx_nic::int_en, netdev, net_device::priv, efx_ev_queue::read_ptr, and efx_ev_queue::ring.
Referenced by hunt_poll().
void efx_hunt_irq | ( | struct net_device * | netdev, |
int | enable | ||
) |
Definition at line 444 of file efx_hunt.c.
References efx_hunt_clear_interrupts(), efx_hunt_evq_read_ack(), efx_nic::int_en, netdev, efx_nic::netdev, NETDEV_OPEN, net_device::priv, and net_device::state.
int efx_hunt_ev_init | ( | struct net_device * | netdev, |
dma_addr_t * | dma_addr | ||
) |
Definition at line 295 of file efx_hunt.c.
References bytes, efx_special_buffer::dma_addr, EFX_EVQ_SIZE, efx_hunt_alloc_special_buffer(), ENOMEM, efx_ev_queue::entry, efx_nic::evq, memset(), netdev, NULL, net_device::priv, efx_ev_queue::read_ptr, and efx_ev_queue::ring.
Referenced by hunt_ev_init().
int efx_hunt_rx_init | ( | struct net_device * | netdev, |
dma_addr_t * | dma_addr | ||
) |
Definition at line 271 of file efx_hunt.c.
References bytes, efx_special_buffer::dma_addr, efx_hunt_alloc_special_buffer(), EFX_RXD_SIZE, ENOMEM, efx_rx_queue::entry, netdev, NULL, net_device::priv, efx_rx_queue::read_ptr, efx_rx_queue::ring, efx_nic::rxq, and efx_rx_queue::write_ptr.
Referenced by hunt_rx_init().
int efx_hunt_tx_init | ( | struct net_device * | netdev, |
dma_addr_t * | dma_addr | ||
) |
Definition at line 156 of file efx_hunt.c.
References bytes, efx_special_buffer::dma_addr, efx_hunt_alloc_special_buffer(), EFX_TXD_SIZE, ENOMEM, efx_tx_queue::entry, netdev, net_device::priv, efx_tx_queue::read_ptr, efx_tx_queue::ring, efx_nic::txq, and efx_tx_queue::write_ptr.
Referenced by hunt_tx_init().
int efx_hunt_open | ( | struct net_device * | netdev | ) |
Definition at line 466 of file efx_hunt.c.
References cmd, efx_hunt_evq_read_ack(), efx_hunt_rxq_fill(), EFX_POPULATE_DWORD_2, efx_writel_page, ER_DZ_EVQ_TMR, efx_nic::int_en, netdev, and net_device::priv.
Referenced by hunt_open().
void efx_hunt_close | ( | struct net_device * | netdev | ) |
Definition at line 487 of file efx_hunt.c.
References efx_tx_queue::buf, efx_rx_queue::buf, efx_hunt_clear_interrupts(), EFX_NUM_RX_DESC, EFX_TXD_SIZE, free_iob(), netdev, efx_nic::netdev, netdev_tx_complete(), NULL, net_device::priv, efx_nic::rxq, and efx_nic::txq.
Referenced by hunt_close(), and hunt_open().