* Re: ssb: Fix DMA-API compilation for non-PCI systems
@ 2008-11-10 21:52 David Miller
2008-11-10 22:07 ` Michael Buesch
0 siblings, 1 reply; 5+ messages in thread
From: David Miller @ 2008-11-10 21:52 UTC (permalink / raw)
To: mb; +Cc: netdev
I applied this since it's a build buster and we should
get it fixed quickly.
But as I look at this, the thing to really do here is get
rid of these stupid switch statements. None of it is needed.
The layer that sets up the SSB devices should simply save the
generic device pointer for the DMA entity into some new
->dma_dev struct member.
Then you just use generic dma_*() interfaces unilaterally. For PCI
devices it will "just work".
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: ssb: Fix DMA-API compilation for non-PCI systems
2008-11-10 21:52 ssb: Fix DMA-API compilation for non-PCI systems David Miller
@ 2008-11-10 22:07 ` Michael Buesch
2008-11-10 22:53 ` David Miller
0 siblings, 1 reply; 5+ messages in thread
From: Michael Buesch @ 2008-11-10 22:07 UTC (permalink / raw)
To: David Miller; +Cc: netdev
On Monday 10 November 2008 22:52:31 David Miller wrote:
>
> I applied this since it's a build buster and we should
> get it fixed quickly.
>
> But as I look at this, the thing to really do here is get
> rid of these stupid switch statements. None of it is needed.
>
> The layer that sets up the SSB devices should simply save the
> generic device pointer for the DMA entity into some new
> ->dma_dev struct member.
>
> Then you just use generic dma_*() interfaces unilaterally. For PCI
> devices it will "just work".
We tried that. It doesn't work. It breaks on several architectures
that do special things in the pci_dma... functions.
See the git history and mailinglists, please.
--
Greetings Michael.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: ssb: Fix DMA-API compilation for non-PCI systems
2008-11-10 22:07 ` Michael Buesch
@ 2008-11-10 22:53 ` David Miller
2008-11-10 23:32 ` Michael Buesch
0 siblings, 1 reply; 5+ messages in thread
From: David Miller @ 2008-11-10 22:53 UTC (permalink / raw)
To: mb; +Cc: netdev
From: Michael Buesch <mb@bu3sch.de>
Date: Mon, 10 Nov 2008 23:07:37 +0100
> On Monday 10 November 2008 22:52:31 David Miller wrote:
> >
> > I applied this since it's a build buster and we should
> > get it fixed quickly.
> >
> > But as I look at this, the thing to really do here is get
> > rid of these stupid switch statements. None of it is needed.
> >
> > The layer that sets up the SSB devices should simply save the
> > generic device pointer for the DMA entity into some new
> > ->dma_dev struct member.
> >
> > Then you just use generic dma_*() interfaces unilaterally. For PCI
> > devices it will "just work".
>
> We tried that. It doesn't work. It breaks on several architectures
> that do special things in the pci_dma... functions.
> See the git history and mailinglists, please.
Then those architectures need to fix their implementations,
simply. They aren't implementing the generic DMA interfaces
properly. Other subsystems do make use of the generic DMA
interfaces in this way.
Even something as simple as checking for &pci_bus_type in the
dma_*() routines (like powerpc did for quite some time) is
enough to fix the problem.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: ssb: Fix DMA-API compilation for non-PCI systems
2008-11-10 22:53 ` David Miller
@ 2008-11-10 23:32 ` Michael Buesch
2008-11-11 8:56 ` Christoph Hellwig
0 siblings, 1 reply; 5+ messages in thread
From: Michael Buesch @ 2008-11-10 23:32 UTC (permalink / raw)
To: David Miller; +Cc: netdev
On Monday 10 November 2008 23:53:43 David Miller wrote:
> Then those architectures need to fix their implementations,
> simply. They aren't implementing the generic DMA interfaces
> properly. Other subsystems do make use of the generic DMA
> interfaces in this way.
>
> Even something as simple as checking for &pci_bus_type in the
> dma_*() routines (like powerpc did for quite some time) is
> enough to fix the problem.
Yeah, sure. The architectures are broken.
But the bugreports hit _my_ code. I got pretty tired of forwarding stuff
to the arch maintainers, so I implemented something that does work in
every situation. The bugreports stopped immediately (Except this tiny build
failure that does only hit under rare circumstances).
DMA is pretty much a mess, if you look at how ever arch does implement the API
in a slightly different way.
If somebody wants to fix this, I'm certainly OK with it. But for now we will
have to live with SSB implementing a wrapper around the ssb-host-device DMA APIs.
--
Greetings Michael.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: ssb: Fix DMA-API compilation for non-PCI systems
2008-11-10 23:32 ` Michael Buesch
@ 2008-11-11 8:56 ` Christoph Hellwig
0 siblings, 0 replies; 5+ messages in thread
From: Christoph Hellwig @ 2008-11-11 8:56 UTC (permalink / raw)
To: Michael Buesch; +Cc: David Miller, netdev
On Tue, Nov 11, 2008 at 12:32:00AM +0100, Michael Buesch wrote:
> On Monday 10 November 2008 23:53:43 David Miller wrote:
> > Then those architectures need to fix their implementations,
> > simply. They aren't implementing the generic DMA interfaces
> > properly. Other subsystems do make use of the generic DMA
> > interfaces in this way.
> >
> > Even something as simple as checking for &pci_bus_type in the
> > dma_*() routines (like powerpc did for quite some time) is
> > enough to fix the problem.
>
> Yeah, sure. The architectures are broken.
> But the bugreports hit _my_ code. I got pretty tired of forwarding stuff
> to the arch maintainers, so I implemented something that does work in
> every situation. The bugreports stopped immediately (Except this tiny build
> failure that does only hit under rare circumstances).
>
> DMA is pretty much a mess, if you look at how ever arch does implement the API
> in a slightly different way.
We have tons of PCI drivers using the dma_ routines. So please report
the broken architecture to get it fixes instead of whining.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2008-11-11 8:56 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-11-10 21:52 ssb: Fix DMA-API compilation for non-PCI systems David Miller
2008-11-10 22:07 ` Michael Buesch
2008-11-10 22:53 ` David Miller
2008-11-10 23:32 ` Michael Buesch
2008-11-11 8:56 ` Christoph Hellwig
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).