Re: [PATCH] RFC: kills consistent_dma_mask

Jes Sorensen
2003-08-19T09:24:14Z

>>>>> "Krzysztof" == Krzysztof Halasa <khc@pm.waw.pl> writes:

Krzysztof> Example:

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

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

Yes there is a problem, them emu10k driver was expecting the
pci_set_dma_mask call to affect pci_alloc_consistent, which was
unfortunately incorrect usage of the API.

Jes