lkml.org 
[lkml]   [2003]   [Dec]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] pci_set_dac helper
Matthew Wilcox wrote:
> On Wed, Dec 31, 2003 at 11:12:42AM -0500, Jeff Garzik wrote:
>
>>It seems to me like a lot of drivers wind up getting their
>>pci_set_dma_mask stuff wrong, occasionally in subtle ways. So, I
>>created a "give me 64-bit PCI DMA" helper function.
>
>
> I like it, but I think it could be better. A lot of drivers want
> 64-bit streaming DMA but 32-bit consistent DMA. So how about this:

I like the direction of your patch: the driver informs us ahead of time
what it wants (even though this isn't necessarily true with PCI_DAC_EN,
which falls back instead of fails).

However, the one big failing of your version is that the driver _must_
know if PCI DAC succeeded or not. Therefore, two pieces of information
must be returned (error value, DAC flag(s)), which lends itself more to
leaving my version as-is ;-)


> I note ithat both this and your patch will lead to two errors being
> printed on 64-bit consistent failure; one by tg3 and one by the PCI
> layer; this seems suboptimal. I suspect you want to do away with the
> error printk in the tg3 driver.

That was intentional in my patch, as it's a warning not an error in my
pci_set_dac. In your version I would agree.

Jeff



-
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: 2005-03-22 13:59    [W:0.046 / U:0.244 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site