summaryrefslogtreecommitdiffstats
path: root/drivers/net/igbvf
diff options
context:
space:
mode:
authorAlexander Duyck <alexander.h.duyck@intel.com>2009-07-23 20:11:01 +0200
committerDavid S. Miller <davem@davemloft.net>2009-07-26 18:47:05 +0200
commit92d947b77436437f4fe6f9b7b7cd35f1a294fa9d (patch)
tree798daa9cb74a2c4ff132933e3cf08182813b06c4 /drivers/net/igbvf
parentigb: initialize mailbox function pointers prior to phy init (diff)
downloadlinux-92d947b77436437f4fe6f9b7b7cd35f1a294fa9d.tar.xz
linux-92d947b77436437f4fe6f9b7b7cd35f1a294fa9d.zip
igbvf: resolve "frees DMA memory with different size" warnings
This change resolves some warnings seen with DMA debugging enabled in which we were mapping skb->data with size + NET_IP_ALIGN and unmapping it with just size. Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/igbvf')
-rw-r--r--drivers/net/igbvf/netdev.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/net/igbvf/netdev.c b/drivers/net/igbvf/netdev.c
index 2bc9d63027db..926c31b47261 100644
--- a/drivers/net/igbvf/netdev.c
+++ b/drivers/net/igbvf/netdev.c
@@ -149,7 +149,6 @@ static void igbvf_alloc_rx_buffers(struct igbvf_ring *rx_ring,
bufsz = adapter->rx_ps_hdr_size;
else
bufsz = adapter->rx_buffer_len;
- bufsz += NET_IP_ALIGN;
while (cleaned_count--) {
rx_desc = IGBVF_RX_DESC_ADV(*rx_ring, i);
@@ -173,7 +172,7 @@ static void igbvf_alloc_rx_buffers(struct igbvf_ring *rx_ring,
}
if (!buffer_info->skb) {
- skb = netdev_alloc_skb(netdev, bufsz);
+ skb = netdev_alloc_skb(netdev, bufsz + NET_IP_ALIGN);
if (!skb) {
adapter->alloc_rx_buff_failed++;
goto no_buffers;
@@ -286,7 +285,7 @@ static bool igbvf_clean_rx_irq(struct igbvf_adapter *adapter,
if (!skb_shinfo(skb)->nr_frags) {
pci_unmap_single(pdev, buffer_info->dma,
- adapter->rx_ps_hdr_size + NET_IP_ALIGN,
+ adapter->rx_ps_hdr_size,
PCI_DMA_FROMDEVICE);
skb_put(skb, hlen);
}