diff options
author | Joerg Roedel <joerg.roedel@amd.com> | 2009-06-09 04:50:57 -0400 |
---|---|---|
committer | Joerg Roedel <joerg.roedel@amd.com> | 2009-06-09 04:50:57 -0400 |
commit | d2dd01de9924ae24afeba5aa5bc2e08287701df6 (patch) | |
tree | 3021bf496579a48984666355b59df5e44b42dd32 /drivers/net/cxgb3 | |
parent | 367d04c4ec02dad34d80452e32e3370db7fb6fee (diff) | |
parent | 62a6f465f6572e1f28765c583c12753bb3e23715 (diff) |
Merge commit 'tip/core/iommu' into amd-iommu/fixes
Diffstat (limited to 'drivers/net/cxgb3')
-rw-r--r-- | drivers/net/cxgb3/adapter.h | 4 | ||||
-rw-r--r-- | drivers/net/cxgb3/cxgb3_main.c | 8 | ||||
-rw-r--r-- | drivers/net/cxgb3/sge.c | 11 | ||||
-rw-r--r-- | drivers/net/cxgb3/t3_hw.c | 5 |
4 files changed, 17 insertions, 11 deletions
diff --git a/drivers/net/cxgb3/adapter.h b/drivers/net/cxgb3/adapter.h index 714df2b675e6..c888e97c9671 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 | ||
92 | struct rx_desc; | 92 | struct rx_desc; |
diff --git a/drivers/net/cxgb3/cxgb3_main.c b/drivers/net/cxgb3/cxgb3_main.c index 7ea48414c6cb..17858b9a5830 100644 --- a/drivers/net/cxgb3/cxgb3_main.c +++ b/drivers/net/cxgb3/cxgb3_main.c | |||
@@ -2496,14 +2496,16 @@ static void check_link_status(struct adapter *adapter) | |||
2496 | for_each_port(adapter, i) { | 2496 | for_each_port(adapter, i) { |
2497 | struct net_device *dev = adapter->port[i]; | 2497 | struct net_device *dev = adapter->port[i]; |
2498 | struct port_info *p = netdev_priv(dev); | 2498 | struct port_info *p = netdev_priv(dev); |
2499 | int link_fault; | ||
2499 | 2500 | ||
2500 | spin_lock_irq(&adapter->work_lock); | 2501 | spin_lock_irq(&adapter->work_lock); |
2501 | if (p->link_fault) { | 2502 | link_fault = p->link_fault; |
2503 | spin_unlock_irq(&adapter->work_lock); | ||
2504 | |||
2505 | if (link_fault) { | ||
2502 | t3_link_fault(adapter, i); | 2506 | t3_link_fault(adapter, i); |
2503 | spin_unlock_irq(&adapter->work_lock); | ||
2504 | continue; | 2507 | continue; |
2505 | } | 2508 | } |
2506 | spin_unlock_irq(&adapter->work_lock); | ||
2507 | 2509 | ||
2508 | if (!(p->phy.caps & SUPPORTED_IRQ) && netif_running(dev)) { | 2510 | if (!(p->phy.caps & SUPPORTED_IRQ) && netif_running(dev)) { |
2509 | t3_xgm_intr_disable(adapter, i); | 2511 | t3_xgm_intr_disable(adapter, i); |
diff --git a/drivers/net/cxgb3/sge.c b/drivers/net/cxgb3/sge.c index 26d3587f3399..b3ee2bc1a005 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) | |||
511 | nomem: q->alloc_failed++; | 511 | nomem: 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); |
@@ -881,7 +880,7 @@ recycle: | |||
881 | (*sd->pg_chunk.p_cnt)--; | 880 | (*sd->pg_chunk.p_cnt)--; |
882 | if (!*sd->pg_chunk.p_cnt) | 881 | if (!*sd->pg_chunk.p_cnt) |
883 | pci_unmap_page(adap->pdev, | 882 | pci_unmap_page(adap->pdev, |
884 | pci_unmap_addr(&sd->pg_chunk, mapping), | 883 | sd->pg_chunk.mapping, |
885 | fl->alloc_size, | 884 | fl->alloc_size, |
886 | PCI_DMA_FROMDEVICE); | 885 | PCI_DMA_FROMDEVICE); |
887 | if (!skb) { | 886 | if (!skb) { |
@@ -2096,7 +2095,7 @@ static void lro_add_page(struct adapter *adap, struct sge_qset *qs, | |||
2096 | (*sd->pg_chunk.p_cnt)--; | 2095 | (*sd->pg_chunk.p_cnt)--; |
2097 | if (!*sd->pg_chunk.p_cnt) | 2096 | if (!*sd->pg_chunk.p_cnt) |
2098 | pci_unmap_page(adap->pdev, | 2097 | pci_unmap_page(adap->pdev, |
2099 | pci_unmap_addr(&sd->pg_chunk, mapping), | 2098 | sd->pg_chunk.mapping, |
2100 | fl->alloc_size, | 2099 | fl->alloc_size, |
2101 | PCI_DMA_FROMDEVICE); | 2100 | PCI_DMA_FROMDEVICE); |
2102 | 2101 | ||
diff --git a/drivers/net/cxgb3/t3_hw.c b/drivers/net/cxgb3/t3_hw.c index 4f68aeb2679a..4950d5d789ae 100644 --- a/drivers/net/cxgb3/t3_hw.c +++ b/drivers/net/cxgb3/t3_hw.c | |||
@@ -1274,6 +1274,11 @@ void t3_link_fault(struct adapter *adapter, int port_id) | |||
1274 | A_XGM_INT_STATUS + mac->offset); | 1274 | A_XGM_INT_STATUS + mac->offset); |
1275 | link_fault &= F_LINKFAULTCHANGE; | 1275 | link_fault &= F_LINKFAULTCHANGE; |
1276 | 1276 | ||
1277 | link_ok = lc->link_ok; | ||
1278 | speed = lc->speed; | ||
1279 | duplex = lc->duplex; | ||
1280 | fc = lc->fc; | ||
1281 | |||
1277 | phy->ops->get_link_status(phy, &link_ok, &speed, &duplex, &fc); | 1282 | phy->ops->get_link_status(phy, &link_ok, &speed, &duplex, &fc); |
1278 | 1283 | ||
1279 | if (link_fault) { | 1284 | if (link_fault) { |