[openib-general] [PATCH] ofed_1_2 Chelsio ethernet driver updates.

Steve Wise swise at opengridcomputing.com
Thu Feb 1 12:09:03 PST 2007


From: Steve Wise <swise at opengridcomputing.com>

This patch updates the ofed_1_2 cxgb3 module to the latest queued
for 2.6.21.

Signed-off-by: Steve Wise <swise at opengridcomputing.com>
---

 drivers/net/cxgb3/firmware_exports.h |    2 +-
 drivers/net/cxgb3/sge.c              |   21 +++++++++------------
 drivers/net/cxgb3/t3_cpl.h           |    3 ---
 3 files changed, 10 insertions(+), 16 deletions(-)

diff --git a/drivers/net/cxgb3/firmware_exports.h b/drivers/net/cxgb3/firmware_exports.h
index 4538377..6a835f6 100755
--- a/drivers/net/cxgb3/firmware_exports.h
+++ b/drivers/net/cxgb3/firmware_exports.h
@@ -129,7 +129,7 @@ #define FW_OFLD_NUM			8
 #define FW_OFLD_SGEEC_START		0
 
 /*
- *
+ * 
  */
 #define FW_RI_NUM			1
 #define FW_RI_SGEEC_START		65527
diff --git a/drivers/net/cxgb3/sge.c b/drivers/net/cxgb3/sge.c
index 6b053bf..3f2cf8a 100755
--- a/drivers/net/cxgb3/sge.c
+++ b/drivers/net/cxgb3/sge.c
@@ -601,17 +601,16 @@ static struct sk_buff *get_packet(struct
 	if (len <= SGE_RX_COPY_THRES) {
 		skb = alloc_skb(len, GFP_ATOMIC);
 		if (likely(skb != NULL)) {
-			struct rx_desc *d = &fl->desc[fl->cidx];
-			dma_addr_t mapping =
-			    (dma_addr_t)((u64) be32_to_cpu(d->addr_hi) << 32 |
-					 be32_to_cpu(d->addr_lo));
-
 			__skb_put(skb, len);
-			pci_dma_sync_single_for_cpu(adap->pdev, mapping, len,
-						    PCI_DMA_FROMDEVICE);
+			pci_dma_sync_single_for_cpu(adap->pdev,
+						    pci_unmap_addr(sd,
+								   dma_addr),
+						    len, PCI_DMA_FROMDEVICE);
 			memcpy(skb->data, sd->skb->data, len);
-			pci_dma_sync_single_for_device(adap->pdev, mapping, len,
-						       PCI_DMA_FROMDEVICE);
+			pci_dma_sync_single_for_device(adap->pdev,
+						       pci_unmap_addr(sd,
+								      dma_addr),
+						       len, PCI_DMA_FROMDEVICE);
 		} else if (!drop_thres)
 			goto use_orig_buf;
 	      recycle:
@@ -1667,7 +1666,7 @@ #endif
 	credits = G_RSPD_TXQ0_CR(flags);
 	if (credits)
 		qs->txq[TXQ_ETH].processed += credits;
-	
+
 	credits = G_RSPD_TXQ2_CR(flags);
 	if (credits)
 		qs->txq[TXQ_CTRL].processed += credits;
@@ -2220,14 +2219,12 @@ static irqreturn_t t3b_intr_napi(int irq
 	if (likely(map & 1)) {
 		dev = adap->sge.qs[0].netdev;
 
-		BUG_ON(napi_is_scheduled(dev));
 		if (likely(__netif_rx_schedule_prep(dev)))
 			__netif_rx_schedule(dev);
 	}
 	if (map & 2) {
 		dev = adap->sge.qs[1].netdev;
 
-		BUG_ON(napi_is_scheduled(dev));
 		if (likely(__netif_rx_schedule_prep(dev)))
 			__netif_rx_schedule(dev);
 	}
diff --git a/drivers/net/cxgb3/t3_cpl.h b/drivers/net/cxgb3/t3_cpl.h
index 96b2f36..b7a1a31 100755
--- a/drivers/net/cxgb3/t3_cpl.h
+++ b/drivers/net/cxgb3/t3_cpl.h
@@ -184,9 +184,6 @@ #define V_OPCODE(x) ((x) << S_OPCODE)
 #define G_OPCODE(x) (((x) >> S_OPCODE) & 0xFF)
 #define G_TID(x)    ((x) & 0xFFFFFF)
 
-#define S_QNUM 0
-#define G_QNUM(x) (((x) >> S_QNUM) & 0xFFFF)
-
 /* tid is assumed to be 24-bits */
 #define MK_OPCODE_TID(opcode, tid) (V_OPCODE(opcode) | (tid))
 





More information about the general mailing list