[PATCH net-next-2.6 4/4] jme: Adding {64,40}bits DMA mask back

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Guo-Fu Tseng
Date: Friday, February 27, 2009 - 8:59 pm

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>

diff --git a/drivers/net/jme.c b/drivers/net/jme.c
index 47dd47f..4da81a3 100644
--- a/drivers/net/jme.c
+++ b/drivers/net/jme.c
@@ -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;

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH netdev-2.6] jme: JMicron Gigabit Ethernet Driver, Guo-Fu Tseng, (Mon Sep 15, 10:00 am)
[PATCH net-next-2.6 3/3] jme: Advances version number, Guo-Fu Tseng, (Wed Oct 8, 2:58 pm)
Re: [PATCH netdev-2.6] jme: JMicron Gigabit Ethernet Driver, Stephen Hemminger, (Thu Nov 20, 10:20 pm)
Re: [PATCH netdev-2.6] jme: JMicron Gigabit Ethernet Driver, Stephen Hemminger, (Thu Nov 20, 11:45 pm)
[PATCH net-2.6 2/2] jme: Remove 64 and 40 bit dma_mask, Guo-Fu Tseng, (Wed Dec 3, 3:44 am)
[PATCH net-next-2.6 2/4] jme: Fix pci sync, Guo-Fu Tseng, (Fri Feb 27, 8:57 pm)
[PATCH net-next-2.6 4/4] jme: Adding {64,40}bits DMA mask back, Guo-Fu Tseng, (Fri Feb 27, 8:59 pm)