diff options
Diffstat (limited to 'drivers/net/myri10ge/myri10ge.c')
-rw-r--r-- | drivers/net/myri10ge/myri10ge.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/drivers/net/myri10ge/myri10ge.c b/drivers/net/myri10ge/myri10ge.c index 68fd38b291fd..ac02b3b60f92 100644 --- a/drivers/net/myri10ge/myri10ge.c +++ b/drivers/net/myri10ge/myri10ge.c | |||
@@ -181,6 +181,7 @@ struct myri10ge_priv { | |||
181 | int intr_coal_delay; | 181 | int intr_coal_delay; |
182 | __be32 __iomem *intr_coal_delay_ptr; | 182 | __be32 __iomem *intr_coal_delay_ptr; |
183 | int mtrr; | 183 | int mtrr; |
184 | int wc_enabled; | ||
184 | int wake_queue; | 185 | int wake_queue; |
185 | int stop_queue; | 186 | int stop_queue; |
186 | int down_cnt; | 187 | int down_cnt; |
@@ -1385,7 +1386,7 @@ myri10ge_get_ethtool_stats(struct net_device *netdev, | |||
1385 | data[i] = ((unsigned long *)&mgp->stats)[i]; | 1386 | data[i] = ((unsigned long *)&mgp->stats)[i]; |
1386 | 1387 | ||
1387 | data[i++] = (unsigned int)mgp->tx.boundary; | 1388 | data[i++] = (unsigned int)mgp->tx.boundary; |
1388 | data[i++] = (unsigned int)(mgp->mtrr >= 0); | 1389 | data[i++] = (unsigned int)mgp->wc_enabled; |
1389 | data[i++] = (unsigned int)mgp->pdev->irq; | 1390 | data[i++] = (unsigned int)mgp->pdev->irq; |
1390 | data[i++] = (unsigned int)mgp->msi_enabled; | 1391 | data[i++] = (unsigned int)mgp->msi_enabled; |
1391 | data[i++] = (unsigned int)mgp->read_dma; | 1392 | data[i++] = (unsigned int)mgp->read_dma; |
@@ -1749,7 +1750,7 @@ static int myri10ge_open(struct net_device *dev) | |||
1749 | goto abort_with_irq; | 1750 | goto abort_with_irq; |
1750 | } | 1751 | } |
1751 | 1752 | ||
1752 | if (myri10ge_wcfifo && mgp->mtrr >= 0) { | 1753 | if (myri10ge_wcfifo && mgp->wc_enabled) { |
1753 | mgp->tx.wc_fifo = (u8 __iomem *) mgp->sram + MXGEFW_ETH_SEND_4; | 1754 | mgp->tx.wc_fifo = (u8 __iomem *) mgp->sram + MXGEFW_ETH_SEND_4; |
1754 | mgp->rx_small.wc_fifo = | 1755 | mgp->rx_small.wc_fifo = |
1755 | (u8 __iomem *) mgp->sram + MXGEFW_ETH_RECV_SMALL; | 1756 | (u8 __iomem *) mgp->sram + MXGEFW_ETH_RECV_SMALL; |
@@ -2850,9 +2851,12 @@ static int myri10ge_probe(struct pci_dev *pdev, const struct pci_device_id *ent) | |||
2850 | mgp->board_span = pci_resource_len(pdev, 0); | 2851 | mgp->board_span = pci_resource_len(pdev, 0); |
2851 | mgp->iomem_base = pci_resource_start(pdev, 0); | 2852 | mgp->iomem_base = pci_resource_start(pdev, 0); |
2852 | mgp->mtrr = -1; | 2853 | mgp->mtrr = -1; |
2854 | mgp->wc_enabled = 0; | ||
2853 | #ifdef CONFIG_MTRR | 2855 | #ifdef CONFIG_MTRR |
2854 | mgp->mtrr = mtrr_add(mgp->iomem_base, mgp->board_span, | 2856 | mgp->mtrr = mtrr_add(mgp->iomem_base, mgp->board_span, |
2855 | MTRR_TYPE_WRCOMB, 1); | 2857 | MTRR_TYPE_WRCOMB, 1); |
2858 | if (mgp->mtrr >= 0) | ||
2859 | mgp->wc_enabled = 1; | ||
2856 | #endif | 2860 | #endif |
2857 | /* Hack. need to get rid of these magic numbers */ | 2861 | /* Hack. need to get rid of these magic numbers */ |
2858 | mgp->sram_size = | 2862 | mgp->sram_size = |
@@ -2947,7 +2951,7 @@ static int myri10ge_probe(struct pci_dev *pdev, const struct pci_device_id *ent) | |||
2947 | dev_info(dev, "%s IRQ %d, tx bndry %d, fw %s, WC %s\n", | 2951 | dev_info(dev, "%s IRQ %d, tx bndry %d, fw %s, WC %s\n", |
2948 | (mgp->msi_enabled ? "MSI" : "xPIC"), | 2952 | (mgp->msi_enabled ? "MSI" : "xPIC"), |
2949 | netdev->irq, mgp->tx.boundary, mgp->fw_name, | 2953 | netdev->irq, mgp->tx.boundary, mgp->fw_name, |
2950 | (mgp->mtrr >= 0 ? "Enabled" : "Disabled")); | 2954 | (mgp->wc_enabled ? "Enabled" : "Disabled")); |
2951 | 2955 | ||
2952 | return 0; | 2956 | return 0; |
2953 | 2957 | ||