public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jeff Garzik <jgarzik@pobox.com>
To: Matthew Wilcox <willy@debian.org>
Cc: Linux Kernel <linux-kernel@vger.kernel.org>,
	"David S. Miller" <davem@redhat.com>,
	Andrew Morton <akpm@osdl.org>,
	linux-pci@atrey.karlin.mff.cuni.cz
Subject: Re: [PATCH] pci_set_dac helper
Date: Wed, 31 Dec 2003 14:05:31 -0500	[thread overview]
Message-ID: <3FF31DFB.9030907@pobox.com> (raw)
In-Reply-To: <20031231185953.GJ6791@parcelfarce.linux.theplanet.co.uk>

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




  reply	other threads:[~2003-12-31 19:05 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-12-31 16:12 [PATCH] pci_set_dac helper Jeff Garzik
2003-12-31 18:37 ` David S. Miller
2003-12-31 18:59 ` Matthew Wilcox
2003-12-31 19:05   ` Jeff Garzik [this message]
2004-01-01  3:03     ` Grant Grundler

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3FF31DFB.9030907@pobox.com \
    --to=jgarzik@pobox.com \
    --cc=akpm@osdl.org \
    --cc=davem@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@atrey.karlin.mff.cuni.cz \
    --cc=willy@debian.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox