Re: [RFT][PATCH] generic device DMA implementation

James Bottomley (James.Bottomley@SteelEye.com)
Sat, 28 Dec 2002 10:18:07 -0600


david-b@pacbell.net said:
> The indirection is getting from the USB device (or interface) to the
> object representing the USB controller. All USB calls need that, at
> least for host-side APIs, since the controller driver is multiplexing
> up to almost 4000 I/O channels. (127 devices * 31 endpoints, max; and
> of course typical usage is more like dozens of channels.)

This sounds like a mirror of the problem of finding the IOMMU on parisc (there
can be more than one).

The way parisc solves this is to look in dev->platform_data and if that's null
walk up the dev->parent until the IOMMU is found and then cache the IOMMU ops
in the current dev->platform_data. Obviously, you can't use platform_data,
but you could use driver_data for this. The IOMMU's actually lie on a parisc
specific bus, so the ability to walk up the device tree without having to know
the device types was crucial to implementing this.

James

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