Hi Ayaz,
sorry for the slow reply:
Ayaz Abdulla wrote:
This forcedeth patch adds high dma support for tx/rx rings.
@@ -2529,7 +2548,14 @@
printk(KERN_INFO "forcedeth: 64-bit DMA failed, using 32-bit
addressing for device %s.\n",
pci_name(pci_dev));
} else {
- dev->features |= NETIF_F_HIGHDMA;
+ if (pci_set_consistent_dma_mask(pci_dev,
0x0000007fffffffffULL)) {
+ printk(KERN_INFO "forcedeth: 64-bit DMA (consistent)
failed for device %s.\n",
+ pci_name(pci_dev));
+ goto out_relreg;
+ } else {
+ dev->features |= NETIF_F_HIGHDMA;
+ printk(KERN_INFO "forcedeth: using HIGHDMA\n");
+ }
}
np->txrxctl_bits = NVREG_TXRXCTL_DESC_3;
} else if (id->driver_data & DEV_HAS_LARGEDESC) {
I don't understand this change:
set_consistent_dma_mask is the memory allocation mask for the driver
internal ring buffer. I don't see why it should affect NETIF_F_HIGHDMA.
If HIGHDMA is set, then the network stack will skip the double buffering
for _data buffers_ that are located above 4 GB. That's unrelated to the
ring buffer allocation.
What about the attached patch? It just replaces the shown hunk.
Completely untested, I have only 512 MB memory....
--
Manfred
--- 2.6/drivers/net/forcedeth.c 2006-02-27 06:09:35.000000000 +0100
+++ build-2.6/drivers/net/forcedeth.c 2006-03-05 12:39:26.000000000 +0100
@@ -2474,6 +2474,11 @@
dev->features |= NETIF_F_HIGHDMA;
}
np->txrxctl_bits = NVREG_TXRXCTL_DESC_3;
+
+ if (pci_set_consistent_dma_mask(pci_dev,
0x0000007fffffffffULL)) {
+ printk(KERN_INFO "forcedeth: consistent 64-bit DMA
failed, using 32-bit ring buffers for device %s.\n",
+ pci_name(pci_dev));
+ }
} else if (id->driver_data & DEV_HAS_LARGEDESC) {
/* packet format 2: supports jumbo frames */
np->desc_ver = DESC_VER_2;