From: Jack Vogel Date: Mon, 10 Jul 2017 22:19:26 +0000 (-0700) Subject: i40e: Correct the macros for setting the DMA attributes X-Git-Tag: v4.1.12-106.0.20170710_2300~17 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=fbfba0576b97c30b8f10b523f0f6443a548039df;p=users%2Fjedix%2Flinux-maple.git i40e: Correct the macros for setting the DMA attributes The I40E_DMA_ATTRS() macro was not setting the WEAK_ORDERING as intended, this change corrects the issue. Orabug: 26379170 Signed-off-by: Jack Vogel Reviewed-by: Shannon Nelson --- diff --git a/drivers/net/ethernet/intel/i40e/i40e_txrx.h b/drivers/net/ethernet/intel/i40e/i40e_txrx.h index a3511bd822c13..2419b90a3f720 100644 --- a/drivers/net/ethernet/intel/i40e/i40e_txrx.h +++ b/drivers/net/ethernet/intel/i40e/i40e_txrx.h @@ -133,9 +133,10 @@ enum i40e_dyn_idx_t { #define I40E_RX_HDR_SIZE I40E_RXBUFFER_256 #define i40e_rx_desc i40e_32byte_rx_desc -#define I40E_RX_DMA_ATTR \ - (DMA_ATTR_SKIP_CPU_SYNC | DMA_ATTR_WEAK_ORDERING) -#define I40E_DMA_ATTRS(x) dma_set_attr(I40E_RX_DMA_ATTR, x) +#define I40E_DMA_ATTRS(x) { \ + dma_set_attr(DMA_ATTR_SKIP_CPU_SYNC, x); \ + dma_set_attr(DMA_ATTR_WEAK_ORDERING, x); \ +} /** * i40e_test_staterr - tests bits in Rx descriptor status and error fields diff --git a/drivers/net/ethernet/intel/i40evf/i40e_txrx.h b/drivers/net/ethernet/intel/i40evf/i40e_txrx.h index 8ad98fb708de3..5b6a2763cbd3a 100644 --- a/drivers/net/ethernet/intel/i40evf/i40e_txrx.h +++ b/drivers/net/ethernet/intel/i40evf/i40e_txrx.h @@ -120,9 +120,10 @@ enum i40e_dyn_idx_t { #define I40E_RX_HDR_SIZE I40E_RXBUFFER_256 #define i40e_rx_desc i40e_32byte_rx_desc -#define I40E_RX_DMA_ATTR \ - (DMA_ATTR_SKIP_CPU_SYNC | DMA_ATTR_WEAK_ORDERING) -#define I40E_DMA_ATTRS(x) dma_set_attr(I40E_RX_DMA_ATTR, x) +#define I40E_DMA_ATTRS(x) { \ + dma_set_attr(DMA_ATTR_SKIP_CPU_SYNC, x); \ + dma_set_attr(DMA_ATTR_WEAK_ORDERING, x); \ +} /** * i40e_test_staterr - tests bits in Rx descriptor status and error fields