]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
i40e: Correct the macros for setting the DMA attributes
authorJack Vogel <jack.vogel@oracle.com>
Mon, 10 Jul 2017 22:19:26 +0000 (15:19 -0700)
committerJack Vogel <jack.vogel@oracle.com>
Tue, 11 Jul 2017 00:48:16 +0000 (17:48 -0700)
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 <jack.vogel@oracle.com>
Reviewed-by: Shannon Nelson <shannon.nelson@oracle.com>
drivers/net/ethernet/intel/i40e/i40e_txrx.h
drivers/net/ethernet/intel/i40evf/i40e_txrx.h

index a3511bd822c13f8a74c65d65a2f981b807957308..2419b90a3f72023868fef3dfee1a6ae133d72105 100644 (file)
@@ -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
index 8ad98fb708de358d83a00c39a9d343777cbffb5d..5b6a2763cbd3a5bc5c97ae354aff7a92e056d81b 100644 (file)
@@ -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