aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2010-03-26 13:23:30 -0400
committerDavid S. Miller <davem@davemloft.net>2010-03-26 13:23:30 -0400
commit4300e8c7f64d95a80ffa7d98d98738f41546bc30 (patch)
treec147d782512379a4357d4717bf146a9ebbdeaaaf /drivers/net
parent3da0ae6298fa10d4f5e2855ae400b2470bc6693d (diff)
Revert "r8169: enable 64-bit DMA by default for PCI Express devices (v2)"
This reverts commit 353176888386d9025062a12dcec08d49af10cf2c. People are reporting problems due to this change and there is no anticipation that the cause will be tracked down any time soon. We can try next time to selectively re-enable this based upon chip type, or have a black list of some sort. Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/r8169.c21
1 files changed, 7 insertions, 14 deletions
diff --git a/drivers/net/r8169.c b/drivers/net/r8169.c
index 9d3ebf3e975e..b93fd23b9f0d 100644
--- a/drivers/net/r8169.c
+++ b/drivers/net/r8169.c
@@ -187,7 +187,7 @@ static DEFINE_PCI_DEVICE_TABLE(rtl8169_pci_tbl) = {
187MODULE_DEVICE_TABLE(pci, rtl8169_pci_tbl); 187MODULE_DEVICE_TABLE(pci, rtl8169_pci_tbl);
188 188
189static int rx_copybreak = 200; 189static int rx_copybreak = 200;
190static int use_dac = -1; 190static int use_dac;
191static struct { 191static struct {
192 u32 msg_enable; 192 u32 msg_enable;
193} debug = { -1 }; 193} debug = { -1 };
@@ -511,8 +511,7 @@ MODULE_DESCRIPTION("RealTek RTL-8169 Gigabit Ethernet driver");
511module_param(rx_copybreak, int, 0); 511module_param(rx_copybreak, int, 0);
512MODULE_PARM_DESC(rx_copybreak, "Copy breakpoint for copy-only-tiny-frames"); 512MODULE_PARM_DESC(rx_copybreak, "Copy breakpoint for copy-only-tiny-frames");
513module_param(use_dac, int, 0); 513module_param(use_dac, int, 0);
514MODULE_PARM_DESC(use_dac, "Enable PCI DAC. -1 defaults on for PCI Express only." 514MODULE_PARM_DESC(use_dac, "Enable PCI DAC. Unsafe on 32 bit PCI slot.");
515" Unsafe on 32 bit PCI slot.");
516module_param_named(debug, debug.msg_enable, int, 0); 515module_param_named(debug, debug.msg_enable, int, 0);
517MODULE_PARM_DESC(debug, "Debug verbosity level (0=none, ..., 16=all)"); 516MODULE_PARM_DESC(debug, "Debug verbosity level (0=none, ..., 16=all)");
518MODULE_LICENSE("GPL"); 517MODULE_LICENSE("GPL");
@@ -2974,7 +2973,6 @@ rtl8169_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
2974 void __iomem *ioaddr; 2973 void __iomem *ioaddr;
2975 unsigned int i; 2974 unsigned int i;
2976 int rc; 2975 int rc;
2977 int this_use_dac = use_dac;
2978 2976
2979 if (netif_msg_drv(&debug)) { 2977 if (netif_msg_drv(&debug)) {
2980 printk(KERN_INFO "%s Gigabit Ethernet driver %s loaded\n", 2978 printk(KERN_INFO "%s Gigabit Ethernet driver %s loaded\n",
@@ -3040,17 +3038,8 @@ rtl8169_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
3040 3038
3041 tp->cp_cmd = PCIMulRW | RxChkSum; 3039 tp->cp_cmd = PCIMulRW | RxChkSum;
3042 3040
3043 tp->pcie_cap = pci_find_capability(pdev, PCI_CAP_ID_EXP);
3044 if (!tp->pcie_cap)
3045 netif_info(tp, probe, dev, "no PCI Express capability\n");
3046
3047 if (this_use_dac < 0)
3048 this_use_dac = tp->pcie_cap != 0;
3049
3050 if ((sizeof(dma_addr_t) > 4) && 3041 if ((sizeof(dma_addr_t) > 4) &&
3051 this_use_dac && 3042 !pci_set_dma_mask(pdev, DMA_BIT_MASK(64)) && use_dac) {
3052 !pci_set_dma_mask(pdev, DMA_BIT_MASK(64))) {
3053 netif_info(tp, probe, dev, "using 64-bit DMA\n");
3054 tp->cp_cmd |= PCIDAC; 3043 tp->cp_cmd |= PCIDAC;
3055 dev->features |= NETIF_F_HIGHDMA; 3044 dev->features |= NETIF_F_HIGHDMA;
3056 } else { 3045 } else {
@@ -3069,6 +3058,10 @@ rtl8169_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
3069 goto err_out_free_res_4; 3058 goto err_out_free_res_4;
3070 } 3059 }
3071 3060
3061 tp->pcie_cap = pci_find_capability(pdev, PCI_CAP_ID_EXP);
3062 if (!tp->pcie_cap)
3063 netif_info(tp, probe, dev, "no PCI Express capability\n");
3064
3072 RTL_W16(IntrMask, 0x0000); 3065 RTL_W16(IntrMask, 0x0000);
3073 3066
3074 /* Soft reset the chip. */ 3067 /* Soft reset the chip. */