From: Grant Grundler <grundler@dsl2.external.hp.com>
To: "Adam J. Richter" <adam@yggdrasil.com>
Cc: parisc-linux@lists.parisc-linux.org
Subject: Re: [parisc-linux] Patch: linux-2.5.47/drivers/parisc/ - pci_dma_supported had side effect
Date: Sat, 16 Nov 2002 23:20:25 -0700 [thread overview]
Message-ID: <20021117062025.A10E8482E@dsl2.external.hp.com> (raw)
In-Reply-To: Message from "Adam J. Richter" <adam@yggdrasil.com> of "Sat, 16 Nov 2002 05:49:41 PST." <20021116054941.A3448@baldur.yggdrasil.com>
"Adam J. Richter" wrote:
> pci_dma_supported is not supposed to have any side effects,
> but the parisc versions set pci_dev->dma_mask, which is not the
> intended behavior.
That's my bad. At some point in time, it was in fact correct.
Thanks for catching this.
> A driver could call check pci_dma_supported for a
> variety of values in any particular order without expected the dma
> mask to have actually been changed.
I think pci_dma_supported() is obsoleted by pci_set_dma_mask().
Maybe they mean/do slightly different things.
But most of the drivers I've looked at only use pci_set_dma_mask().
> To change the DMA mask, drivers
> call pci_set_dma_mask (in drivers/pci/pci.c), which, by the way, does
> call machine-specific pci_dma_supported routine to ensure that the
> desired mask is acceptable.
Yes. I can feel a bit better since I suggested davem use a macro
(pci_set_dma_mask()) to set the dma_mask field instead of just
having drivers set the dma_mask field themselves.
> The following patch fixes the problem. It also has the
> benefit of eliminating some direct writing to pci_dev->dma_mask,
> which is what caused me to notice this problem.
>
> I do not have any parisc machines or normally build parisc
> kernels. So, I have not even verified that this change compiles.
>
> If somebody could give these deletions a whirl and then send
> them by whatever the preferred process is to get them into the
> mainline kernel, I would appreciate it. If there is more that I
> should do to facilitate this, please let me know.
I'll take care it. Thanks!
grant
next prev parent reply other threads:[~2002-11-17 6:20 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-11-16 13:49 [parisc-linux] Patch: linux-2.5.47/drivers/parisc/ - pci_dma_supported had side effect Adam J. Richter
2002-11-17 6:20 ` Grant Grundler [this message]
2002-11-17 6:52 ` 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=20021117062025.A10E8482E@dsl2.external.hp.com \
--to=grundler@dsl2.external.hp.com \
--cc=adam@yggdrasil.com \
--cc=parisc-linux@lists.parisc-linux.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