[lkml]   [2003]   [Aug]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH] RFC: kills consistent_dma_mask
"David S. Miller" <> writes:

> drivers/net/tg3.c

No... I know of tg3.c:

/* Configure DMA attributes. */
if (!pci_set_dma_mask(pdev, 0xffffffffffffffffULL)) {
pci_using_dac = 1;
if (pci_set_consistent_dma_mask(pdev, 0xffffffffffffffffULL)) {
printk(KERN_ERR PFX "Unable to obtain 64 bit DMA "
"for consistent allocations\n");
goto err_out_free_res;
} else {
err = pci_set_dma_mask(pdev, (u64) 0xffffffff);
if (err) {
printk(KERN_ERR PFX "No usable DMA configuration, "
goto err_out_free_res;
pci_using_dac = 0;

As you can see it tg3 uses consistent_dma_mask = dma_mask so this one
doesn't need two masks.

Ok, I assume there is a real need for two masks. Still, having different
archs rely on different variables for the same task is a bug which needs


$ grep DMA_MASK sound/oss/emu10k1/main.c
#define EMU10K1_DMA_MASK 0x1fffffff /* DMA buffer mask for pci_alloc_consist */
if (pci_set_dma_mask(pci_dev, EMU10K1_DMA_MASK)) {

Do you see a problem here? It will work if and only if pci_alloc_consistent
uses dma_mask rather than consistent_dma_mask.

Ok, I will make a patch which uses consistent_dma_mask for consistent allocs
on all archs. This will break drivers but they are already broken on
x86-64 and ia64, and it's easier to fix drivers than to write them when
the core is faulty.

Hope that it is ok?
Krzysztof Halasa
Network Administrator
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-03-22 13:47    [W:0.088 / U:0.228 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site