]> err.no Git - linux-2.6/commitdiff
iwlwifi: support 64 bit DMA masks
authorRon Rindjunsky <ron.rindjunsky@intel.com>
Mon, 21 Apr 2008 22:41:59 +0000 (15:41 -0700)
committerJohn W. Linville <linville@tuxdriver.com>
Wed, 7 May 2008 19:02:16 +0000 (15:02 -0400)
This patch adds consistent DMA masks for 64 bit

Signed-off-by: Ron Rindjunsky <ron.rindjunsky@intel.com>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/iwlwifi/iwl4965-base.c

index 6309f08c3a13da93dd1bf0ae4973cca53e7ecd1c..028523af010420a2344e7b988ae12631eb0a973e 100644 (file)
@@ -7440,13 +7440,19 @@ static int iwl4965_pci_probe(struct pci_dev *pdev, const struct pci_device_id *e
 
        pci_set_master(pdev);
 
-       err = pci_set_dma_mask(pdev, DMA_32BIT_MASK);
+       err = pci_set_dma_mask(pdev, DMA_64BIT_MASK);
        if (!err)
-               err = pci_set_consistent_dma_mask(pdev, DMA_32BIT_MASK);
+               err = pci_set_consistent_dma_mask(pdev, DMA_64BIT_MASK);
+       if (err) {
+               err = pci_set_dma_mask(pdev, DMA_32BIT_MASK);
+               if (!err)
+                       err = pci_set_consistent_dma_mask(pdev, DMA_32BIT_MASK);
+               /* both attempts failed: */
                if (err) {
-                       printk(KERN_WARNING DRV_NAME
-                               ": No suitable DMA available.\n");
+                       printk(KERN_WARNING "%s: No suitable DMA available.\n",
+                               DRV_NAME);
                        goto out_pci_disable_device;
+               }
        }
 
        err = pci_request_regions(pdev, DRV_NAME);