Jelajahi Sumber

mlx4_en: Fix double pci unmapping.

In cases of fragmented skb, with the data pointers being wrapped around
the TX buffer, the completion handling code would not forward the data
pointer and the firs fragment was unmapped several times, while others
were not unmapped at all.

Signed-off-by: Yevgeny Petrilin <yevgenyp@mellanox.co.il>
Signed-off-by: David S. Miller <davem@davemloft.net>
Yevgeny Petrilin 16 tahun lalu
induk
melakukan
eb4ad82641
1 mengubah file dengan 1 tambahan dan 0 penghapusan
  1. 1 0
      drivers/net/mlx4/en_tx.c

+ 1 - 0
drivers/net/mlx4/en_tx.c

@@ -249,6 +249,7 @@ static u32 mlx4_en_free_tx_desc(struct mlx4_en_priv *priv,
 				pci_unmap_page(mdev->pdev,
 				pci_unmap_page(mdev->pdev,
 					(dma_addr_t) be64_to_cpu(data->addr),
 					(dma_addr_t) be64_to_cpu(data->addr),
 					 frag->size, PCI_DMA_TODEVICE);
 					 frag->size, PCI_DMA_TODEVICE);
+				++data;
 			}
 			}
 		}
 		}
 		/* Stamp the freed descriptor */
 		/* Stamp the freed descriptor */