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 47dd47fd0ace99fbfdda8b6264fa6c76567ce9d7..4da81a3602dc21d72b8b81c4de5c34488394f16d 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;