Re: Proposal for a new PCI function call

From: Jeff Garzik (jgarzik@mandrakesoft.com)
Date: Fri Apr 13 2001 - 20:25:01 EST


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."
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Sun Apr 15 2001 - 21:00:22 EST