Patchwork [5/7] qlge: bugfix: Fix TSO breakage.

login
register
mail settings
Submitter Ron Mercer
Date Feb. 11, 2009, 1:58 p.m.
Message ID <1234360717-32194-5-git-send-email-ron.mercer@qlogic.com>
Download mbox | patch
Permalink /patch/22920/
State Accepted
Delegated to: David Miller
Headers show

Comments

Ron Mercer - Feb. 11, 2009, 1:58 p.m.
Moved the buffer mapping to a point after TSO logic has modified the
iph->check field. We were seeing stale data on the PCIe bus.

Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
---
 drivers/net/qlge/qlge_main.c |   10 ++++++----
 1 files changed, 6 insertions(+), 4 deletions(-)
David Miller - Feb. 13, 2009, 12:39 a.m.
From: Ron Mercer <ron.mercer@qlogic.com>
Date: Wed, 11 Feb 2009 05:58:35 -0800

> Moved the buffer mapping to a point after TSO logic has modified the
> iph->check field. We were seeing stale data on the PCIe bus.
> 
> Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>

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

Patch

diff --git a/drivers/net/qlge/qlge_main.c b/drivers/net/qlge/qlge_main.c
index fc7d210..54b0a9e 100644
--- a/drivers/net/qlge/qlge_main.c
+++ b/drivers/net/qlge/qlge_main.c
@@ -1936,10 +1936,6 @@  static int qlge_send(struct sk_buff *skb, struct net_device *ndev)
 	tx_ring_desc = &tx_ring->q[tx_ring->prod_idx];
 	mac_iocb_ptr = tx_ring_desc->queue_entry;
 	memset((void *)mac_iocb_ptr, 0, sizeof(mac_iocb_ptr));
-	if (ql_map_send(qdev, mac_iocb_ptr, skb, tx_ring_desc) != NETDEV_TX_OK) {
-		QPRINTK(qdev, TX_QUEUED, ERR, "Could not map the segments.\n");
-		return NETDEV_TX_BUSY;
-	}
 
 	mac_iocb_ptr->opcode = OPCODE_OB_MAC_IOCB;
 	mac_iocb_ptr->tid = tx_ring_desc->index;
@@ -1965,6 +1961,12 @@  static int qlge_send(struct sk_buff *skb, struct net_device *ndev)
 		ql_hw_csum_setup(skb,
 				 (struct ob_mac_tso_iocb_req *)mac_iocb_ptr);
 	}
+	if (ql_map_send(qdev, mac_iocb_ptr, skb, tx_ring_desc) !=
+			NETDEV_TX_OK) {
+		QPRINTK(qdev, TX_QUEUED, ERR,
+				"Could not map the segments.\n");
+		return NETDEV_TX_BUSY;
+	}
 	QL_DUMP_OB_MAC_IOCB(mac_iocb_ptr);
 	tx_ring->prod_idx++;
 	if (tx_ring->prod_idx == tx_ring->wq_len)