Re: [BK PATCH] PCI reorg fix

Patrick Mochel (mochel@osdl.org)
Thu, 9 May 2002 11:26:18 -0700 (PDT)


On Thu, 9 May 2002, Kai Germaschewski wrote:

> On Thu, 9 May 2002, Patrick Mochel wrote:
>
> > I would suggest something like:
> >
> > void *
> > dev_alloc_consistent(struct device * dev, size_t size, dma_addr_t * dma_handle);
> >
> > and moving dma_mask to struct device.
> >
> > To handle differences in arch-specific implementations, we could have a
> > callback that the generic code calls.
> >
> > Implementing the generic code is ~5 minutes work. However, it will break
> > everything. OTOH, it would be the best motivation for modernizing these
> > drivers...
>
> Certainly sounds reasonable. I'd guess it's trivial enough to provide
> wrappers for pci_alloc_consistent(), pci_set_dma_mask() etc., so I don't
> see why everything would break?

Actually, the point _is_ to break everything.

The fact that there are wrappers emulating old PCI behavior is the reason
the SCSI drivers don't use the 2.4 interface. If we provide wrappers for
alloc_consistent, they'll never change those, either.

At some point, you have to bite the bullet and break the API. It'll be
the only way to get drivers to convert. The statement was more of "When we
do this, it'll be painful" rather than "If we do it..." :)

-pat

-
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/