[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4810955E.6080903@firstfloor.org>
Date: Thu, 24 Apr 2008 16:12:46 +0200
From: Andi Kleen <andi@...stfloor.org>
To: Michael Buesch <mb@...sch.de>
CC: linux-kernel <linux-kernel@...r.kernel.org>, vojtech@...e.cz,
muli@...ibm.com, jdmason@...zu.us, tglx@...utronix.de,
mingo@...hat.com, davem@...emloft.net
Subject: Re: [PATCH RFC] x86: Fix 64-bit DMA masks on VIA
Michael Buesch 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 must admit my comment was slightly wrong. In some cases
it can make sense to start with a small mask and retry bigger.
>
> I already added a workaround to the driver.
> Why do we need to workaround this in _every_ driver?
The API was designed this way because many devices support different
hardware interfaces for different address sizes. So for example with a
32bit mask you might be able to transfer less data than with a 64bit
mask. And with the retry steps you should be able to figure out the
most efficient format for the current system.
See the discussion in Documentation/DMA-mapping.txt
cc: DaveM; I think the concept was from him originally.
-Andi
--
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