lkml.org 
[lkml]   [2004]   [Feb]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [BK PATCH] USB update for 2.6.3


On Fri, 20 Feb 2004, Hollis Blanchard wrote:
>
> Well, I was picturing all those *_dma_supported() functions as being
> plugged into (new) fields in struct bus_type:
> struct bus_type {
> ...
> int (*dma_supported)(struct device *dev, u64 mask);
> }

Ok, that would work. It might even be a good idea (not just DMA-related)
to make sure that everything you can portably "do" with a device would
show up as device operations. Right now it's not very well specified, and
there's obviously a lot of confusion.

> If your *_dma_supported functions only take usb_dev, pci_dev, etc, then
> you end up with code like asm-generic/dma-mapping.h:

I agree, that is horrible. On the other hand, some architectures don't
need any indirection or any conditionals at all, since they know that they
only have one type of DMA.

Making the device operations explicit would be good, though, and would
match how we do things in general. It's a fairly big change at this point,
but if somebody is willing to put the effort into the cleanup, then I'm
all for it.

I'd still ask that people don't do DMA on non-host devices. I'd rather
have a USB "struct device" just return "DMA not supported", to make sure
that everybody asks the right chip.

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

\
 
 \ /
  Last update: 2009-11-18 23:46    [W:0.052 / U:0.512 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site