Re: Proposal for a new PCI function call

Jes Sorensen
2001-04-13T00:30:20Z

>>>>> "Jeff" == Jeff Garzik <jgarzik@mandrakesoft.com> writes:

>> I think the function idea would let us do some sanity checking to
>> make sure drivers weren't setting this to 64bit on non-64 bit
>> busses and stuff.

Jeff> pci_set_dma_mask. Modify that to do the additional checks you
Jeff> need.

Jeff> Nobody should be setting dma_mask directly anymore, it should be
Jeff> done through this function.

Hmmm, I was wondering if could come up with a pretty way to do this on
32 bit boxes that wants to enable highmem DMA. Right now
pci_set_dma_mask() wants a dma_addr_t which means you have to do
#ifdef CONFIG_HIGHMEM <blah> #else <bleh> #endif.

Introducing a new function that takes bit flags as arguments might be
better?

Jes