aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/cxgb3
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2009-06-03 05:43:41 -0400
committerDavid S. Miller <davem@davemloft.net>2009-06-03 05:43:41 -0400
commitb2f8f7525c8aa1fdd8ad8c72c832dfb571d5f768 (patch)
tree71ae1801d264bca62efa0d22376b49de7f206e9a /drivers/net/cxgb3
parentd455e5b165a367a628110ec2d18807ea10052cd1 (diff)
parent12186be7d2e1106cede1cc728526e3d7998cbe94 (diff)
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Conflicts: drivers/net/forcedeth.c
Diffstat (limited to 'drivers/net/cxgb3')
-rw-r--r--drivers/net/cxgb3/adapter.h4
-rw-r--r--drivers/net/cxgb3/cxgb3_main.c8
-rw-r--r--drivers/net/cxgb3/sge.c11
-rw-r--r--drivers/net/cxgb3/t3_hw.c5
4 files changed, 17 insertions, 11 deletions
diff --git a/drivers/net/cxgb3/adapter.h b/drivers/net/cxgb3/adapter.h
index 322434ac42fc..e48e508b9632 100644
--- a/drivers/net/cxgb3/adapter.h
+++ b/drivers/net/cxgb3/adapter.h
@@ -85,8 +85,8 @@ struct fl_pg_chunk {
85 struct page *page; 85 struct page *page;
86 void *va; 86 void *va;
87 unsigned int offset; 87 unsigned int offset;
88 u64 *p_cnt; 88 unsigned long *p_cnt;
89 DECLARE_PCI_UNMAP_ADDR(mapping); 89 dma_addr_t mapping;
90}; 90};
91 91
92struct rx_desc; 92struct rx_desc;
diff --git a/drivers/net/cxgb3/cxgb3_main.c b/drivers/net/cxgb3/cxgb3_main.c
index 4bc26568b2f6..aef3ab21f5f7 100644
--- a/drivers/net/cxgb3/cxgb3_main.c
+++ b/drivers/net/cxgb3/cxgb3_main.c
@@ -2453,14 +2453,16 @@ static void check_link_status(struct adapter *adapter)
2453 for_each_port(adapter, i) { 2453 for_each_port(adapter, i) {
2454 struct net_device *dev = adapter->port[i]; 2454 struct net_device *dev = adapter->port[i];
2455 struct port_info *p = netdev_priv(dev); 2455 struct port_info *p = netdev_priv(dev);
2456 int link_fault;
2456 2457
2457 spin_lock_irq(&adapter->work_lock); 2458 spin_lock_irq(&adapter->work_lock);
2458 if (p->link_fault) { 2459 link_fault = p->link_fault;
2460 spin_unlock_irq(&adapter->work_lock);
2461
2462 if (link_fault) {
2459 t3_link_fault(adapter, i); 2463 t3_link_fault(adapter, i);
2460 spin_unlock_irq(&adapter->work_lock);
2461 continue; 2464 continue;
2462 } 2465 }
2463 spin_unlock_irq(&adapter->work_lock);
2464 2466
2465 if (!(p->phy.caps & SUPPORTED_IRQ) && netif_running(dev)) { 2467 if (!(p->phy.caps & SUPPORTED_IRQ) && netif_running(dev)) {
2466 t3_xgm_intr_disable(adapter, i); 2468 t3_xgm_intr_disable(adapter, i);
diff --git a/drivers/net/cxgb3/sge.c b/drivers/net/cxgb3/sge.c
index 0b978827874b..29c79eb43beb 100644
--- a/drivers/net/cxgb3/sge.c
+++ b/drivers/net/cxgb3/sge.c
@@ -355,7 +355,7 @@ static void clear_rx_desc(struct pci_dev *pdev, const struct sge_fl *q,
355 (*d->pg_chunk.p_cnt)--; 355 (*d->pg_chunk.p_cnt)--;
356 if (!*d->pg_chunk.p_cnt) 356 if (!*d->pg_chunk.p_cnt)
357 pci_unmap_page(pdev, 357 pci_unmap_page(pdev,
358 pci_unmap_addr(&d->pg_chunk, mapping), 358 d->pg_chunk.mapping,
359 q->alloc_size, PCI_DMA_FROMDEVICE); 359 q->alloc_size, PCI_DMA_FROMDEVICE);
360 360
361 put_page(d->pg_chunk.page); 361 put_page(d->pg_chunk.page);
@@ -454,7 +454,7 @@ static int alloc_pg_chunk(struct adapter *adapter, struct sge_fl *q,
454 q->pg_chunk.offset = 0; 454 q->pg_chunk.offset = 0;
455 mapping = pci_map_page(adapter->pdev, q->pg_chunk.page, 455 mapping = pci_map_page(adapter->pdev, q->pg_chunk.page,
456 0, q->alloc_size, PCI_DMA_FROMDEVICE); 456 0, q->alloc_size, PCI_DMA_FROMDEVICE);
457 pci_unmap_addr_set(&q->pg_chunk, mapping, mapping); 457 q->pg_chunk.mapping = mapping;
458 } 458 }
459 sd->pg_chunk = q->pg_chunk; 459 sd->pg_chunk = q->pg_chunk;
460 460
@@ -511,8 +511,7 @@ static int refill_fl(struct adapter *adap, struct sge_fl *q, int n, gfp_t gfp)
511nomem: q->alloc_failed++; 511nomem: q->alloc_failed++;
512 break; 512 break;
513 } 513 }
514 mapping = pci_unmap_addr(&sd->pg_chunk, mapping) + 514 mapping = sd->pg_chunk.mapping + sd->pg_chunk.offset;
515 sd->pg_chunk.offset;
516 pci_unmap_addr_set(sd, dma_addr, mapping); 515 pci_unmap_addr_set(sd, dma_addr, mapping);
517 516
518 add_one_rx_chunk(mapping, d, q->gen); 517 add_one_rx_chunk(mapping, d, q->gen);
@@ -882,7 +881,7 @@ recycle:
882 (*sd->pg_chunk.p_cnt)--; 881 (*sd->pg_chunk.p_cnt)--;
883 if (!*sd->pg_chunk.p_cnt) 882 if (!*sd->pg_chunk.p_cnt)
884 pci_unmap_page(adap->pdev, 883 pci_unmap_page(adap->pdev,
885 pci_unmap_addr(&sd->pg_chunk, mapping), 884 sd->pg_chunk.mapping,
886 fl->alloc_size, 885 fl->alloc_size,
887 PCI_DMA_FROMDEVICE); 886 PCI_DMA_FROMDEVICE);
888 if (!skb) { 887 if (!skb) {
@@ -2091,7 +2090,7 @@ static void lro_add_page(struct adapter *adap, struct sge_qset *qs,
2091 (*sd->pg_chunk.p_cnt)--; 2090 (*sd->pg_chunk.p_cnt)--;
2092 if (!*sd->pg_chunk.p_cnt) 2091 if (!*sd->pg_chunk.p_cnt)
2093 pci_unmap_page(adap->pdev, 2092 pci_unmap_page(adap->pdev,
2094 pci_unmap_addr(&sd->pg_chunk, mapping), 2093 sd->pg_chunk.mapping,
2095 fl->alloc_size, 2094 fl->alloc_size,
2096 PCI_DMA_FROMDEVICE); 2095 PCI_DMA_FROMDEVICE);
2097 2096
diff --git a/drivers/net/cxgb3/t3_hw.c b/drivers/net/cxgb3/t3_hw.c
index 6a454476bb17..870d44992c70 100644
--- a/drivers/net/cxgb3/t3_hw.c
+++ b/drivers/net/cxgb3/t3_hw.c
@@ -1288,6 +1288,11 @@ void t3_link_fault(struct adapter *adapter, int port_id)
1288 A_XGM_INT_STATUS + mac->offset); 1288 A_XGM_INT_STATUS + mac->offset);
1289 link_fault &= F_LINKFAULTCHANGE; 1289 link_fault &= F_LINKFAULTCHANGE;
1290 1290
1291 link_ok = lc->link_ok;
1292 speed = lc->speed;
1293 duplex = lc->duplex;
1294 fc = lc->fc;
1295
1291 phy->ops->get_link_status(phy, &link_ok, &speed, &duplex, &fc); 1296 phy->ops->get_link_status(phy, &link_ok, &speed, &duplex, &fc);
1292 1297
1293 if (link_fault) { 1298 if (link_fault) {