diff options
author | Alexander Duyck <alexander.h.duyck@intel.com> | 2012-04-06 00:24:50 -0400 |
---|---|---|
committer | Jeff Kirsher <jeffrey.t.kirsher@intel.com> | 2012-05-04 06:20:35 -0400 |
commit | dd411ec4a5743f9108a4bce1b9399a856c6d0378 (patch) | |
tree | da2f837afd7d786e29d4d28c7989d70b18a74b7a /drivers | |
parent | 786e9a5f590f367fffad4c528c97d1f1e155a0ef (diff) |
ixgbe: Use __free_pages instead of put_page to release pages
This change replaces the calls to put_page with calls to __free_page.
Since the FCoE code is able to access order 1 pages I thought it would be a
good idea to change things over to using __free_pages since that is the
preferred approach for freeing pages.
Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Tested-by: Ross Brattain <ross.b.brattain@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c index 09409ae9b688..c2ceda9133ba 100644 --- a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c +++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | |||
@@ -1144,7 +1144,7 @@ static bool ixgbe_alloc_mapped_page(struct ixgbe_ring *rx_ring, | |||
1144 | * there isn't much point in holding memory we can't use | 1144 | * there isn't much point in holding memory we can't use |
1145 | */ | 1145 | */ |
1146 | if (dma_mapping_error(rx_ring->dev, dma)) { | 1146 | if (dma_mapping_error(rx_ring->dev, dma)) { |
1147 | put_page(page); | 1147 | __free_pages(page, ixgbe_rx_pg_order(rx_ring)); |
1148 | bi->page = NULL; | 1148 | bi->page = NULL; |
1149 | 1149 | ||
1150 | rx_ring->rx_stats.alloc_rx_page_failed++; | 1150 | rx_ring->rx_stats.alloc_rx_page_failed++; |
@@ -4102,7 +4102,8 @@ static void ixgbe_clean_rx_ring(struct ixgbe_ring *rx_ring) | |||
4102 | DMA_FROM_DEVICE); | 4102 | DMA_FROM_DEVICE); |
4103 | rx_buffer->dma = 0; | 4103 | rx_buffer->dma = 0; |
4104 | if (rx_buffer->page) | 4104 | if (rx_buffer->page) |
4105 | put_page(rx_buffer->page); | 4105 | __free_pages(rx_buffer->page, |
4106 | ixgbe_rx_pg_order(rx_ring)); | ||
4106 | rx_buffer->page = NULL; | 4107 | rx_buffer->page = NULL; |
4107 | } | 4108 | } |
4108 | 4109 | ||