Messages in this thread | | | Date | Wed, 31 Dec 2003 14:05:31 -0500 | From | Jeff Garzik <> | Subject | Re: [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/
| |