summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/sfc/nic.h
diff options
context:
space:
mode:
authorBen Hutchings <bhutchings@solarflare.com>2012-02-02 21:21:15 +0000
committerBen Hutchings <bhutchings@solarflare.com>2012-02-13 23:40:49 +0000
commit5b6262d0ccf759a16fabe11d904a2531125a4b71 (patch)
tree812b2cab8bbeb0569909d8646ec864bef11c40c7 /drivers/net/ethernet/sfc/nic.h
parentfadac6aae1b8d9344beaa18aa9035869d773fd98 (diff)
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>
Diffstat (limited to 'drivers/net/ethernet/sfc/nic.h')
-rw-r--r--drivers/net/ethernet/sfc/nic.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/net/ethernet/sfc/nic.h b/drivers/net/ethernet/sfc/nic.h
index 905a1877d60..4f9d18ac92f 100644
--- a/drivers/net/ethernet/sfc/nic.h
+++ b/drivers/net/ethernet/sfc/nic.h
@@ -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