aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/sfc/efx.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/ethernet/sfc/efx.c')
-rw-r--r--drivers/net/ethernet/sfc/efx.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/net/ethernet/sfc/efx.c b/drivers/net/ethernet/sfc/efx.c
index 01b99206139a..39e4cb39de29 100644
--- a/drivers/net/ethernet/sfc/efx.c
+++ b/drivers/net/ethernet/sfc/efx.c
@@ -638,14 +638,16 @@ static void efx_start_datapath(struct efx_nic *efx)
638 EFX_MAX_FRAME_LEN(efx->net_dev->mtu) + 638 EFX_MAX_FRAME_LEN(efx->net_dev->mtu) +
639 efx->type->rx_buffer_padding); 639 efx->type->rx_buffer_padding);
640 rx_buf_len = (sizeof(struct efx_rx_page_state) + 640 rx_buf_len = (sizeof(struct efx_rx_page_state) +
641 EFX_PAGE_IP_ALIGN + efx->rx_dma_len); 641 NET_IP_ALIGN + efx->rx_dma_len);
642 if (rx_buf_len <= PAGE_SIZE) { 642 if (rx_buf_len <= PAGE_SIZE) {
643 efx->rx_scatter = false; 643 efx->rx_scatter = false;
644 efx->rx_buffer_order = 0; 644 efx->rx_buffer_order = 0;
645 } else if (efx->type->can_rx_scatter) { 645 } else if (efx->type->can_rx_scatter) {
646 BUILD_BUG_ON(EFX_RX_USR_BUF_SIZE % L1_CACHE_BYTES);
646 BUILD_BUG_ON(sizeof(struct efx_rx_page_state) + 647 BUILD_BUG_ON(sizeof(struct efx_rx_page_state) +
647 EFX_PAGE_IP_ALIGN + EFX_RX_USR_BUF_SIZE > 648 2 * ALIGN(NET_IP_ALIGN + EFX_RX_USR_BUF_SIZE,
648 PAGE_SIZE / 2); 649 EFX_RX_BUF_ALIGNMENT) >
650 PAGE_SIZE);
649 efx->rx_scatter = true; 651 efx->rx_scatter = true;
650 efx->rx_dma_len = EFX_RX_USR_BUF_SIZE; 652 efx->rx_dma_len = EFX_RX_USR_BUF_SIZE;
651 efx->rx_buffer_order = 0; 653 efx->rx_buffer_order = 0;