Re: skge/sk98lin slowdown with 4 Gb memory compared to 2 Gb memory

Stephen Hemminger
2006-03-10T21:28:41Z

I suspect the optimization (in other drivers as well) that doesn't set 64 bit mask
unless dma addresses are 64 bit. The problem would go away if you config for 64G of
memory.

This unconditionally sets 64 bit mask, does it change the situation?

--- linux-2.6.orig/drivers/net/skge.c 2006-03-10 13:26:29.000000000 -0800
+++ linux-2.6/drivers/net/skge.c 2006-03-10 13:12:38.000000000 -0800
@@ -3265,16 +3265,10 @@

pci_set_master(pdev);

- if (sizeof(dma_addr_t) > sizeof(u32) &&
- !(err = pci_set_dma_mask(pdev, DMA_64BIT_MASK))) {
+ if (!pci_set_dma_mask(pdev, DMA_64BIT_MASK) &&
+ !pci_set_consistent_dma_mask(pdev, DMA_64BIT_MASK))
using_dac = 1;
- err = pci_set_consistent_dma_mask(pdev, DMA_64BIT_MASK);
- if (err < 0) {
- printk(KERN_ERR PFX "%s unable to obtain 64 bit DMA "
- "for consistent allocations\n", pci_name(pdev));
- goto err_out_free_regions;
- }
- } else {
+ else {
err = pci_set_dma_mask(pdev, DMA_32BIT_MASK);
if (err) {
printk(KERN_ERR PFX "%s no usable DMA configuration\n",