diff options
Diffstat (limited to 'drivers/net/ixgbe')
-rw-r--r-- | drivers/net/ixgbe/ixgbe_main.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/drivers/net/ixgbe/ixgbe_main.c b/drivers/net/ixgbe/ixgbe_main.c index 025419567440..494cb57b700d 100644 --- a/drivers/net/ixgbe/ixgbe_main.c +++ b/drivers/net/ixgbe/ixgbe_main.c | |||
@@ -5181,12 +5181,11 @@ int ixgbe_setup_tx_resources(struct ixgbe_ring *tx_ring) | |||
5181 | int size; | 5181 | int size; |
5182 | 5182 | ||
5183 | size = sizeof(struct ixgbe_tx_buffer) * tx_ring->count; | 5183 | size = sizeof(struct ixgbe_tx_buffer) * tx_ring->count; |
5184 | tx_ring->tx_buffer_info = vmalloc_node(size, tx_ring->numa_node); | 5184 | tx_ring->tx_buffer_info = vzalloc_node(size, tx_ring->numa_node); |
5185 | if (!tx_ring->tx_buffer_info) | 5185 | if (!tx_ring->tx_buffer_info) |
5186 | tx_ring->tx_buffer_info = vmalloc(size); | 5186 | tx_ring->tx_buffer_info = vzalloc(size); |
5187 | if (!tx_ring->tx_buffer_info) | 5187 | if (!tx_ring->tx_buffer_info) |
5188 | goto err; | 5188 | goto err; |
5189 | memset(tx_ring->tx_buffer_info, 0, size); | ||
5190 | 5189 | ||
5191 | /* round up to nearest 4K */ | 5190 | /* round up to nearest 4K */ |
5192 | tx_ring->size = tx_ring->count * sizeof(union ixgbe_adv_tx_desc); | 5191 | tx_ring->size = tx_ring->count * sizeof(union ixgbe_adv_tx_desc); |
@@ -5246,12 +5245,11 @@ int ixgbe_setup_rx_resources(struct ixgbe_ring *rx_ring) | |||
5246 | int size; | 5245 | int size; |
5247 | 5246 | ||
5248 | size = sizeof(struct ixgbe_rx_buffer) * rx_ring->count; | 5247 | size = sizeof(struct ixgbe_rx_buffer) * rx_ring->count; |
5249 | rx_ring->rx_buffer_info = vmalloc_node(size, rx_ring->numa_node); | 5248 | rx_ring->rx_buffer_info = vzalloc_node(size, rx_ring->numa_node); |
5250 | if (!rx_ring->rx_buffer_info) | 5249 | if (!rx_ring->rx_buffer_info) |
5251 | rx_ring->rx_buffer_info = vmalloc(size); | 5250 | rx_ring->rx_buffer_info = vzalloc(size); |
5252 | if (!rx_ring->rx_buffer_info) | 5251 | if (!rx_ring->rx_buffer_info) |
5253 | goto err; | 5252 | goto err; |
5254 | memset(rx_ring->rx_buffer_info, 0, size); | ||
5255 | 5253 | ||
5256 | /* Round up to nearest 4K */ | 5254 | /* Round up to nearest 4K */ |
5257 | rx_ring->size = rx_ring->count * sizeof(union ixgbe_adv_rx_desc); | 5255 | rx_ring->size = rx_ring->count * sizeof(union ixgbe_adv_rx_desc); |