Skip to contentSkip to conversation

mlx4_en: Fix double pci unmapping.

PATCH In review Yevgeny Petrilin 3 participants 3 messages Jul 19, 2009 – Aug 3, 2009

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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.

---
 drivers/net/mlx4/en_tx.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
drivers/net/mlx4/en_tx.c +1 -0
index d5c18c6..3e8a404 100644
@@ -249,6 +249,7 @@ static u32 mlx4_en_free_tx_desc(struct mlx4_en_priv *priv,
 				pci_unmap_page(mdev->pdev,
 					(dma_addr_t) be64_to_cpu(data->addr),
 					 frag->size, PCI_DMA_TODEVICE);
+				++data;
 			}
 		}
 		/* Stamp the freed descriptor */
Signature · 1 line
1.6.0
maintainer
#1 lore raw

From: Yevgeny Petrilin <[email protected]>
Date: Sun, 19 Jul 2009 10:23:09 +0300

Quoted 7 lines

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.

Ok, I'm just going to apply this. Waiting more than a week to get feedback from Roland for a bug fix like this is not reasonable.

Thanks Yevgeny.

#2 lore raw
Quoted 3 lines

Ok, I'm just going to apply this. Waiting more than a week to get feedback from Roland for a bug fix like this is not reasonable.

Dave, for the mlx4 ethernet (mlx4_en) driver patches you can go ahead and apply them without worrying about me -- Yevgeny was the original author of that code and I consider him more than qualified to handle that. It's the mlx4_core changes that I prefer to handle, since I wrote the original driver there, and mlx4_core changes potentially hit the mlx4_ib InfiniBand driver too.

I realize that it's one more annoying thing to keep track of (although Yevgeny has been great about sending mlx4_en patches to you and mlx4_core patches to me -- but I understand your workflow makes looking at the "To:" line hard). That's why I suggested moving the mlx4_core driver out of drivers/net/mlx4. So that the two drivers are physically separate, to make things clearer.

- R.