Re: Proposal for a new PCI function call

Jeff Garzik
2001-04-14T01:50:39Z

Jes Sorensen wrote:
> >>>>> "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.

It seems to me that not doing #ifdef CONFIG_HIGHMEM right now is a
bug... I think it's the megaraid driver that wants to set dma_addr_t to
a 64-bit mask.

Alan Cox wrote:
> pci_set_dma_mask_bits() ? So you could do
>
> pci_set_dma_mask_bits(pdev, 64);

As they say, "six of one, 'half-dozen of the other." I don't have a
preference...

Jeff

--
Jeff Garzik | Sam: "Mind if I drive?"
Building 1024 | Max: "Not if you don't mind me clawing at the dash
MandrakeSoft | and shrieking like a cheerleader."