[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <200804241719.55768.mb@bu3sch.de>
Date: Thu, 24 Apr 2008 17:19:55 +0200
From: Michael Buesch <mb@...sch.de>
To: Alan Cox <alan@...rguk.ukuu.org.uk>
Cc: Andi Kleen <andi@...stfloor.org>,
"linux-kernel" <linux-kernel@...r.kernel.org>, vojtech@...e.cz,
muli@...ibm.com, jdmason@...zu.us, tglx@...utronix.de,
mingo@...hat.com
Subject: Re: [PATCH RFC] x86: Fix 64-bit DMA masks on VIA
On Thursday 24 April 2008 16:32:40 Alan Cox wrote:
> On Thu, 24 Apr 2008 16:06:00 +0200
> Michael Buesch <mb@...sch.de> wrote:
>
> > On Thursday 24 April 2008 15:43:50 Andi Kleen wrote:
> > > Michael Buesch <mb@...sch.de> writes:
> > >
> > > > This untested patch is supposed to fix DMAing on some VIA boards.
> > > > Currently the DMA subsystem returns an error, if the driver does
> > > > tell that it supports a 64bit DMA mask. So the driver probing
> > > > would fail in that case.
> > >
> > > The driver is broken then. It is supposed to retry with a small
> > > mask on an error. Please fix the driver.
> >
> > I already added a workaround to the driver.
> > Why do we need to workaround this in _every_ driver? (Note that _every_
> > driver supporting a 64bit mask is affected). Why not fix it in the DMA layer?
>
> Some hardware wants to know it can get a given DMA mask or failure. I
> agree however that a "pci_prefer_64bit_dma(pdev)" function would be a
> good patch for someone to submit tot he PCI layer code.
Yeah well. I see the issue. However, I think the actual probing should
be done in the DMA layer. We could pass dma_set_mask() the mask as a pointer
and modify the mask value to what is actually used. So the driver would
know what mask we felt back to. That was actually my first idea,
but I preferred to submit a more simple solution without an API change
to the list.
However, in the end I don't care too much, as our driver is fixed.
I just think that we will have more of these bugs in the future. Especially,
as this bug won't hit on the majority of platforms.
--
Greetings Michael.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists