sfc: Replace some literal constants with EFX_PAGE_SIZE/EFX_BUF_SIZE
The 'page size' for PCIe DMA, i.e. the alignment of boundaries at which DMA must be broken, is 4KB. Name this value as EFX_PAGE_SIZE and use it in efx_max_tx_len(). Redefine EFX_BUF_SIZE as EFX_PAGE_SIZE since its value is also a result of that requirement, and use it in efx_init_special_buffer(). Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
This commit is contained in:
@@ -65,6 +65,11 @@ enum {
|
||||
#define FALCON_GMAC_LOOPBACKS \
|
||||
(1 << LOOPBACK_GMAC)
|
||||
|
||||
/* Alignment of PCIe DMA boundaries (4KB) */
|
||||
#define EFX_PAGE_SIZE 4096
|
||||
/* Size and alignment of buffer table entries (same) */
|
||||
#define EFX_BUF_SIZE EFX_PAGE_SIZE
|
||||
|
||||
/**
|
||||
* struct falcon_board_type - board operations and type information
|
||||
* @id: Board type id, as found in NVRAM
|
||||
|
Reference in New Issue
Block a user