aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/atl1
diff options
context:
space:
mode:
authorLuca Tettamanti <kronos.it@gmail.com>2007-09-07 20:25:01 -0400
committerJeff Garzik <jeff@garzik.org>2007-09-12 23:54:50 -0400
commit5f08e46b621a769e52a9545a23ab1d5fb2aec1d4 (patch)
treef5d841a9670c2a94b7ee9543112a5aa2cc1414a2 /drivers/net/atl1
parentc87ce65868bbf9bbea9c3f112ff8315302daf8f2 (diff)
atl1: disable broken 64-bit DMA
64-bit DMA causes data corruption with atl1. We don't know why, and Atheros is working on it. For now, just use 32-bit DMA. This is a big hack that is probably wrong, but it stops the bleeding. Signed-off-by: Luca Tettamanti <kronos.it@gmail.com> Acked-by: Chris Snook <csnook@redhat.com> Acked-by: Jay Cliburn <jacliburn@bellsouth.net> Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/net/atl1')
-rw-r--r--drivers/net/atl1/atl1_main.c19
1 files changed, 7 insertions, 12 deletions
diff --git a/drivers/net/atl1/atl1_main.c b/drivers/net/atl1/atl1_main.c
index 3c1984ecf36c..f23e13c8f9a6 100644
--- a/drivers/net/atl1/atl1_main.c
+++ b/drivers/net/atl1/atl1_main.c
@@ -2203,21 +2203,20 @@ static int __devinit atl1_probe(struct pci_dev *pdev,
2203 struct net_device *netdev; 2203 struct net_device *netdev;
2204 struct atl1_adapter *adapter; 2204 struct atl1_adapter *adapter;
2205 static int cards_found = 0; 2205 static int cards_found = 0;
2206 bool pci_using_64 = true;
2207 int err; 2206 int err;
2208 2207
2209 err = pci_enable_device(pdev); 2208 err = pci_enable_device(pdev);
2210 if (err) 2209 if (err)
2211 return err; 2210 return err;
2212 2211
2213 err = pci_set_dma_mask(pdev, DMA_64BIT_MASK); 2212 /*
2213 * 64-bit DMA currently has data corruption problems, so let's just
2214 * use 32-bit DMA for now. This is a big hack that is probably wrong.
2215 */
2216 err = pci_set_dma_mask(pdev, DMA_32BIT_MASK);
2214 if (err) { 2217 if (err) {
2215 err = pci_set_dma_mask(pdev, DMA_32BIT_MASK); 2218 dev_err(&pdev->dev, "no usable DMA configuration\n");
2216 if (err) { 2219 goto err_dma;
2217 dev_err(&pdev->dev, "no usable DMA configuration\n");
2218 goto err_dma;
2219 }
2220 pci_using_64 = false;
2221 } 2220 }
2222 /* Mark all PCI regions associated with PCI device 2221 /* Mark all PCI regions associated with PCI device
2223 * pdev as being reserved by owner atl1_driver_name 2222 * pdev as being reserved by owner atl1_driver_name
@@ -2282,7 +2281,6 @@ static int __devinit atl1_probe(struct pci_dev *pdev,
2282 2281
2283 netdev->ethtool_ops = &atl1_ethtool_ops; 2282 netdev->ethtool_ops = &atl1_ethtool_ops;
2284 adapter->bd_number = cards_found; 2283 adapter->bd_number = cards_found;
2285 adapter->pci_using_64 = pci_using_64;
2286 2284
2287 /* setup the private structure */ 2285 /* setup the private structure */
2288 err = atl1_sw_init(adapter); 2286 err = atl1_sw_init(adapter);
@@ -2299,9 +2297,6 @@ static int __devinit atl1_probe(struct pci_dev *pdev,
2299 */ 2297 */
2300 /* netdev->features |= NETIF_F_TSO; */ 2298 /* netdev->features |= NETIF_F_TSO; */
2301 2299
2302 if (pci_using_64)
2303 netdev->features |= NETIF_F_HIGHDMA;
2304
2305 netdev->features |= NETIF_F_LLTX; 2300 netdev->features |= NETIF_F_LLTX;
2306 2301
2307 /* 2302 /*