mlx4_en: Fixed incorrect unmapping on RX flow.
authorYevgeny Petrilin <yevgenyp@mellanox.co.il>
Tue, 24 Aug 2010 03:45:05 +0000 (03:45 +0000)
committerDavid S. Miller <davem@davemloft.net>
Tue, 24 Aug 2010 21:54:47 +0000 (14:54 -0700)
When allocating new fragments to replace the ones that would be passed to the stack,
The fragments that should be replaced, are the ones that were already used.

Signed-off-by: Yevgeny Petrilin <yevgenyp@mellanox.co.il>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/mlx4/en_rx.c

index 2add04025fd0188ffb6cf1c65b2baaed4b92a0b7..4335c58160d7a5b0d051398b9763462fe52fd4d3 100644 (file)
@@ -459,7 +459,7 @@ static int mlx4_en_complete_rx_desc(struct mlx4_en_priv *priv,
                        goto fail;
 
                /* Unmap buffer */
-               pci_unmap_single(mdev->pdev, dma, skb_frags[nr].size,
+               pci_unmap_single(mdev->pdev, dma, skb_frags_rx[nr].size,
                                 PCI_DMA_FROMDEVICE);
        }
        /* Adjust size of last fragment to match actual length */