[PATCH] atl1: disable 64bit DMA

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Luca Tettamanti
Date: Monday, June 25, 2007 - 2:18 pm

Il Mon, Jun 25, 2007 at 07:42:44AM -0500, Jay Cliburn ha scritto: 

Hi Jeff,
a couple of users reported hard lockups when using L1 NICs on machines
with 4GB or more of RAM. We're still waiting official confirmation from
the vendor, but it seems that L1 has problems doing DMA to/from high
memory (physical address above the 4GB limit). Passing 32bit DMA mask
cures the problem.

Signed-Off-By: Luca Tettamanti <kronos.it@gmail.com>

---
I think that the patch should be included in 2.6.22.

 drivers/net/atl1/atl1_main.c |   15 +++------------
 1 file changed, 3 insertions(+), 12 deletions(-)

diff --git a/drivers/net/atl1/atl1_main.c b/drivers/net/atl1/atl1_main.c
index 6862c11..a730f15 100644
--- a/drivers/net/atl1/atl1_main.c
+++ b/drivers/net/atl1/atl1_main.c
@@ -2097,21 +2097,16 @@ static int __devinit atl1_probe(struct pci_dev *pdev,
 	struct net_device *netdev;
 	struct atl1_adapter *adapter;
 	static int cards_found = 0;
-	bool pci_using_64 = true;
 	int err;
 
 	err = pci_enable_device(pdev);
 	if (err)
 		return err;
 
-	err = pci_set_dma_mask(pdev, DMA_64BIT_MASK);
+	err = pci_set_dma_mask(pdev, DMA_32BIT_MASK);
 	if (err) {
-		err = pci_set_dma_mask(pdev, DMA_32BIT_MASK);
-		if (err) {
-			dev_err(&pdev->dev, "no usable DMA configuration\n");
-			goto err_dma;
-		}
-		pci_using_64 = false;
+		dev_err(&pdev->dev, "no usable DMA configuration\n");
+		goto err_dma;
 	}
 	/* Mark all PCI regions associated with PCI device
 	 * pdev as being reserved by owner atl1_driver_name
@@ -2176,7 +2171,6 @@ static int __devinit atl1_probe(struct pci_dev *pdev,
 
 	netdev->ethtool_ops = &atl1_ethtool_ops;
 	adapter->bd_number = cards_found;
-	adapter->pci_using_64 = pci_using_64;
 
 	/* setup the private structure */
 	err = atl1_sw_init(adapter);
@@ -2193,9 +2187,6 @@ static int __devinit atl1_probe(struct pci_dev *pdev,
 	 */
 	/* netdev->features |= NETIF_F_TSO; */
 
-	if (pci_using_64)
-		netdev->features |= NETIF_F_HIGHDMA;
-
 	netdev->features |= NETIF_F_LLTX;
 
 	/*


Luca
-- 
Non ho ancora capito se il mio cane e` maschio o femmina:
quando fa la pipi` si chiude in bagno
-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
2.6.22-rc5: pdflush oops under heavy disk load, Jay L. T. Cornwall, (Thu Jun 21, 5:07 pm)
Re: 2.6.22-rc5: pdflush oops under heavy disk load, Chuck Ebbert, (Fri Jun 22, 7:47 am)
Re: 2.6.22-rc5: pdflush oops under heavy disk load, Jay L. T. Cornwall, (Fri Jun 22, 8:04 am)
Re: 2.6.22-rc5: pdflush oops under heavy disk load, Jay L. T. Cornwall, (Sat Jun 23, 5:14 am)
Re: 2.6.22-rc5: pdflush oops under heavy disk load, Andrew Morton, (Sat Jun 23, 10:23 am)
Re: (Last oops is Tainted: P) Re: 2.6.22-rc5: pdflush oops ..., Jay L. T. Cornwall, (Sun Jun 24, 3:10 am)
Re: 2.6.22-rc5: pdflush oops under heavy disk load, Jay Cliburn, (Sun Jun 24, 10:59 am)
Re: 2.6.22-rc5: pdflush oops under heavy disk load, Jay L. T. Cornwall, (Sun Jun 24, 1:31 pm)
Re: 2.6.22-rc5: pdflush oops under heavy disk load, Jay Cliburn, (Sun Jun 24, 2:45 pm)
Re: 2.6.22-rc5: pdflush oops under heavy disk load, Jesper Juhl, (Sun Jun 24, 3:51 pm)
Attansic L1 page corruption (was: 2.6.22-rc5: pdflush oops ..., Jay L. T. Cornwall, (Mon Jun 25, 5:16 am)
Re: Attansic L1 page corruption, Jay Cliburn, (Mon Jun 25, 5:42 am)
[PATCH] atl1: disable 64bit DMA, Luca Tettamanti, (Mon Jun 25, 2:18 pm)
Re: [PATCH] atl1: disable 64bit DMA, Chris Snook, (Mon Jun 25, 2:36 pm)
Re: [PATCH] atl1: disable 64bit DMA, Jay L. T. Cornwall, (Mon Jun 25, 2:51 pm)
Re: [PATCH] atl1: disable 64bit DMA, Chris Snook, (Mon Jun 25, 2:57 pm)
Re: [PATCH] atl1: disable 64bit DMA, Jay Cliburn, (Mon Jun 25, 4:00 pm)
Re: [PATCH] atl1: disable 64bit DMA, Jeff Garzik, (Mon Jun 25, 4:17 pm)
Re: [PATCH] atl1: disable 64bit DMA, Chris Snook, (Mon Jun 25, 4:40 pm)
Re: [PATCH] atl1: disable 64bit DMA, Luca, (Tue Jun 26, 2:12 pm)
Re: [PATCH] atl1: disable 64bit DMA, Jay Cliburn, (Tue Jun 26, 5:16 pm)