diff mbox

mlx4_en: Fix double pci unmapping.

Message ID 4A62C9DD.8040506@mellanox.co.il
State Accepted, archived
Delegated to: David Miller
Headers show

Commit Message

Yevgeny Petrilin July 19, 2009, 7:23 a.m. UTC
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>
---
 drivers/net/mlx4/en_tx.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

Comments

David Miller Aug. 3, 2009, 3:23 a.m. UTC | #1
From: Yevgeny Petrilin <yevgenyp@mellanox.co.il>
Date: Sun, 19 Jul 2009 10:23:09 +0300

> 
> 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>

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.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Roland Dreier Aug. 3, 2009, 5:10 a.m. UTC | #2
> 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.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/net/mlx4/en_tx.c b/drivers/net/mlx4/en_tx.c
index d5c18c6..3e8a404 100644
--- a/drivers/net/mlx4/en_tx.c
+++ b/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,
 					(dma_addr_t) be64_to_cpu(data->addr),
 					 frag->size, PCI_DMA_TODEVICE);
+				++data;
 			}
 		}
 		/* Stamp the freed descriptor */