[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1363429925-12724-4-git-send-email-christoph.paasch@uclouvain.be>
Date: Sat, 16 Mar 2013 11:32:05 +0100
From: Christoph Paasch <christoph.paasch@...ouvain.be>
To: Jeff Kirsher <jeffrey.t.kirsher@...el.com>,
Bruce Allan <bruce.w.allan@...el.com>,
Alex Duyck <alexander.h.duyck@...el.com>
Cc: e1000-devel@...ts.sourceforge.net, netdev@...r.kernel.org,
David Miller <davem@...emloft.net>
Subject: [PATCH 3/3] e1000e: Add missing dma_mapping_error-call in e1000_alloc_jumbo_rx_buffers
After dma_map_page, dma_mapping_error must be called. It seems safe to
not free the skb/page allocated in this function, as the skb/page can be
reused later.
Signed-off-by: Christoph Paasch <christoph.paasch@...ouvain.be>
---
drivers/net/ethernet/intel/e1000e/netdev.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/intel/e1000e/netdev.c b/drivers/net/ethernet/intel/e1000e/netdev.c
index 142ca39..5706dcd 100644
--- a/drivers/net/ethernet/intel/e1000e/netdev.c
+++ b/drivers/net/ethernet/intel/e1000e/netdev.c
@@ -846,11 +846,16 @@ check_page:
}
}
- if (!buffer_info->dma)
+ if (!buffer_info->dma) {
buffer_info->dma = dma_map_page(&pdev->dev,
buffer_info->page, 0,
PAGE_SIZE,
DMA_FROM_DEVICE);
+ if (dma_mapping_error(&pdev->dev, buffer_info->dma)) {
+ adapter->alloc_rx_buff_failed++;
+ break;
+ }
+ }
rx_desc = E1000_RX_DESC_EXT(*rx_ring, i);
rx_desc->read.buffer_addr = cpu_to_le64(buffer_info->dma);
--
1.8.1.227.g44fe835
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists