diff options
Diffstat (limited to 'drivers/net/ethernet/broadcom/tg3.c')
-rw-r--r-- | drivers/net/ethernet/broadcom/tg3.c | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/drivers/net/ethernet/broadcom/tg3.c b/drivers/net/ethernet/broadcom/tg3.c index 0c1a2ef163a5..7794883f5973 100644 --- a/drivers/net/ethernet/broadcom/tg3.c +++ b/drivers/net/ethernet/broadcom/tg3.c | |||
@@ -8172,11 +8172,9 @@ static int tg3_mem_rx_acquire(struct tg3 *tp) | |||
8172 | tnapi->rx_rcb = dma_alloc_coherent(&tp->pdev->dev, | 8172 | tnapi->rx_rcb = dma_alloc_coherent(&tp->pdev->dev, |
8173 | TG3_RX_RCB_RING_BYTES(tp), | 8173 | TG3_RX_RCB_RING_BYTES(tp), |
8174 | &tnapi->rx_rcb_mapping, | 8174 | &tnapi->rx_rcb_mapping, |
8175 | GFP_KERNEL); | 8175 | GFP_KERNEL | __GFP_ZERO); |
8176 | if (!tnapi->rx_rcb) | 8176 | if (!tnapi->rx_rcb) |
8177 | goto err_out; | 8177 | goto err_out; |
8178 | |||
8179 | memset(tnapi->rx_rcb, 0, TG3_RX_RCB_RING_BYTES(tp)); | ||
8180 | } | 8178 | } |
8181 | 8179 | ||
8182 | return 0; | 8180 | return 0; |
@@ -8226,12 +8224,10 @@ static int tg3_alloc_consistent(struct tg3 *tp) | |||
8226 | tp->hw_stats = dma_alloc_coherent(&tp->pdev->dev, | 8224 | tp->hw_stats = dma_alloc_coherent(&tp->pdev->dev, |
8227 | sizeof(struct tg3_hw_stats), | 8225 | sizeof(struct tg3_hw_stats), |
8228 | &tp->stats_mapping, | 8226 | &tp->stats_mapping, |
8229 | GFP_KERNEL); | 8227 | GFP_KERNEL | __GFP_ZERO); |
8230 | if (!tp->hw_stats) | 8228 | if (!tp->hw_stats) |
8231 | goto err_out; | 8229 | goto err_out; |
8232 | 8230 | ||
8233 | memset(tp->hw_stats, 0, sizeof(struct tg3_hw_stats)); | ||
8234 | |||
8235 | for (i = 0; i < tp->irq_cnt; i++) { | 8231 | for (i = 0; i < tp->irq_cnt; i++) { |
8236 | struct tg3_napi *tnapi = &tp->napi[i]; | 8232 | struct tg3_napi *tnapi = &tp->napi[i]; |
8237 | struct tg3_hw_status *sblk; | 8233 | struct tg3_hw_status *sblk; |
@@ -8239,11 +8235,10 @@ static int tg3_alloc_consistent(struct tg3 *tp) | |||
8239 | tnapi->hw_status = dma_alloc_coherent(&tp->pdev->dev, | 8235 | tnapi->hw_status = dma_alloc_coherent(&tp->pdev->dev, |
8240 | TG3_HW_STATUS_SIZE, | 8236 | TG3_HW_STATUS_SIZE, |
8241 | &tnapi->status_mapping, | 8237 | &tnapi->status_mapping, |
8242 | GFP_KERNEL); | 8238 | GFP_KERNEL | __GFP_ZERO); |
8243 | if (!tnapi->hw_status) | 8239 | if (!tnapi->hw_status) |
8244 | goto err_out; | 8240 | goto err_out; |
8245 | 8241 | ||
8246 | memset(tnapi->hw_status, 0, TG3_HW_STATUS_SIZE); | ||
8247 | sblk = tnapi->hw_status; | 8242 | sblk = tnapi->hw_status; |
8248 | 8243 | ||
8249 | if (tg3_flag(tp, ENABLE_RSS)) { | 8244 | if (tg3_flag(tp, ENABLE_RSS)) { |