]> git.karo-electronics.de Git - linux-beck.git/commitdiff
rtl8180: change PCI DMA mask to DMA_BIT_MASK(32)
authorJohn W. Linville <linville@tuxdriver.com>
Mon, 10 May 2010 18:24:34 +0000 (14:24 -0400)
committerJohn W. Linville <linville@tuxdriver.com>
Mon, 10 May 2010 18:24:34 +0000 (14:24 -0400)
From the original report:

"I had problems to get my rtl8185 PCI card running on Sparc64: I always
got an error about "No suitable DMA available" followed by an error
that no device could be detected. When comparing the rtl8180 driver to
others I noticed that others are mostly using DMA_BIT_MASK so I changed
the custom mask to DMA_BIT_MASK(32) which fixed my issue."

Reported-by: Tiziano Müller <tm@dev-zero.ch>
Acked-by: David S. Miller <davem@davemloft.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/rtl818x/rtl8180_dev.c

index cbdc5cfec90cfaee4566d4fa6ee65ae474678234..9430f962c1683737613b0ec5047b844540266f7a 100644 (file)
@@ -926,8 +926,8 @@ static int __devinit rtl8180_probe(struct pci_dev *pdev,
                goto err_free_reg;
        }
 
-       if ((err = pci_set_dma_mask(pdev, 0xFFFFFF00ULL)) ||
-           (err = pci_set_consistent_dma_mask(pdev, 0xFFFFFF00ULL))) {
+       if ((err = pci_set_dma_mask(pdev, DMA_BIT_MASK(32))) ||
+           (err = pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(32)))) {
                printk(KERN_ERR "%s (rtl8180): No suitable DMA available\n",
                       pci_name(pdev));
                goto err_free_reg;