jme: Adding {64,40}bits DMA mask back
authorGuo-Fu Tseng <cooldavid@cooldavid.org>
Fri, 27 Feb 2009 17:59:44 +0000 (17:59 +0000)
committerDavid S. Miller <davem@davemloft.net>
Mon, 2 Mar 2009 04:39:32 +0000 (20:39 -0800)
All JMC250 chips have no problem with higher bits support.
Adding it back.

Found-by: Ethan Hsiao <ethanhsiao@jmicron.com>
Signed-off-by: Guo-Fu Tseng <cooldavid@cooldavid.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/jme.c

index 47dd47f..4da81a3 100644 (file)
@@ -2589,6 +2589,16 @@ static const struct ethtool_ops jme_ethtool_ops = {
 static int
 jme_pci_dma64(struct pci_dev *pdev)
 {
+       if (pdev->device == PCI_DEVICE_ID_JMICRON_JMC250 &&
+           !pci_set_dma_mask(pdev, DMA_64BIT_MASK))
+               if (!pci_set_consistent_dma_mask(pdev, DMA_64BIT_MASK))
+                       return 1;
+
+       if (pdev->device == PCI_DEVICE_ID_JMICRON_JMC250 &&
+           !pci_set_dma_mask(pdev, DMA_40BIT_MASK))
+               if (!pci_set_consistent_dma_mask(pdev, DMA_40BIT_MASK))
+                       return 1;
+
        if (!pci_set_dma_mask(pdev, DMA_32BIT_MASK))
                if (!pci_set_consistent_dma_mask(pdev, DMA_32BIT_MASK))
                        return 0;