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>
This commit is contained in:
committed by
Jeff Garzik
parent
c87ce65868
commit
5f08e46b62
@@ -2203,22 +2203,21 @@ static int __devinit atl1_probe(struct pci_dev *pdev,
|
|||||||
struct net_device *netdev;
|
struct net_device *netdev;
|
||||||
struct atl1_adapter *adapter;
|
struct atl1_adapter *adapter;
|
||||||
static int cards_found = 0;
|
static int cards_found = 0;
|
||||||
bool pci_using_64 = true;
|
|
||||||
int err;
|
int err;
|
||||||
|
|
||||||
err = pci_enable_device(pdev);
|
err = pci_enable_device(pdev);
|
||||||
if (err)
|
if (err)
|
||||||
return err;
|
return err;
|
||||||
|
|
||||||
err = pci_set_dma_mask(pdev, DMA_64BIT_MASK);
|
/*
|
||||||
if (err) {
|
* 64-bit DMA currently has data corruption problems, so let's just
|
||||||
|
* use 32-bit DMA for now. This is a big hack that is probably wrong.
|
||||||
|
*/
|
||||||
err = pci_set_dma_mask(pdev, DMA_32BIT_MASK);
|
err = pci_set_dma_mask(pdev, DMA_32BIT_MASK);
|
||||||
if (err) {
|
if (err) {
|
||||||
dev_err(&pdev->dev, "no usable DMA configuration\n");
|
dev_err(&pdev->dev, "no usable DMA configuration\n");
|
||||||
goto err_dma;
|
goto err_dma;
|
||||||
}
|
}
|
||||||
pci_using_64 = false;
|
|
||||||
}
|
|
||||||
/* Mark all PCI regions associated with PCI device
|
/* Mark all PCI regions associated with PCI device
|
||||||
* pdev as being reserved by owner atl1_driver_name
|
* pdev as being reserved by owner atl1_driver_name
|
||||||
*/
|
*/
|
||||||
@@ -2282,7 +2281,6 @@ static int __devinit atl1_probe(struct pci_dev *pdev,
|
|||||||
|
|
||||||
netdev->ethtool_ops = &atl1_ethtool_ops;
|
netdev->ethtool_ops = &atl1_ethtool_ops;
|
||||||
adapter->bd_number = cards_found;
|
adapter->bd_number = cards_found;
|
||||||
adapter->pci_using_64 = pci_using_64;
|
|
||||||
|
|
||||||
/* setup the private structure */
|
/* setup the private structure */
|
||||||
err = atl1_sw_init(adapter);
|
err = atl1_sw_init(adapter);
|
||||||
@@ -2299,9 +2297,6 @@ static int __devinit atl1_probe(struct pci_dev *pdev,
|
|||||||
*/
|
*/
|
||||||
/* netdev->features |= NETIF_F_TSO; */
|
/* netdev->features |= NETIF_F_TSO; */
|
||||||
|
|
||||||
if (pci_using_64)
|
|
||||||
netdev->features |= NETIF_F_HIGHDMA;
|
|
||||||
|
|
||||||
netdev->features |= NETIF_F_LLTX;
|
netdev->features |= NETIF_F_LLTX;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
Reference in New Issue
Block a user