public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Cc: linux-kernel@vger.kernel.org, akpm@linux-foundation.org,
	James Bottomley <James.Bottomley@suse.de>,
	"David S. Miller" <davem@davemloft.net>,
	Jesse Barnes <jbarnes@virtuousgeek.org>,
	Russell King <linux@arm.linux.org.uk>
Subject: Re: [PATCH -mm 3/7] pci: convert pci_set_dma_mask to call dma_set_mask
Date: Mon, 15 Feb 2010 10:33:41 +1100	[thread overview]
Message-ID: <1266190421.16346.71.camel@pasglop> (raw)
In-Reply-To: <1265967212-9126-4-git-send-email-fujita.tomonori@lab.ntt.co.jp>

On Fri, 2010-02-12 at 18:33 +0900, FUJITA Tomonori wrote:
> This changes pci_set_dma_mask to call the generic DMA API,
> dma_set_mask.
> 
> pci_set_dma_mask (in drivers/pci/pci.c) does the same things that
> dma_set_mask does on all the architectures that use pci_set_dma_mask;
> calls dma_supprted and sets dev->dma_mask. So we safely change
> pci_set_dma_mask to simply call dma_set_mask.
> 
> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
> Cc: James Bottomley <James.Bottomley@suse.de>
> Cc: David S. Miller <davem@davemloft.net>
> Cc: Jesse Barnes <jbarnes@virtuousgeek.org>

Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>

> Cc: Russell King <linux@arm.linux.org.uk>
> ---
>  drivers/pci/pci.c |   10 ++++------
>  1 files changed, 4 insertions(+), 6 deletions(-)
> 
> diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c
> index 315fea4..5c881e9 100644
> --- a/drivers/pci/pci.c
> +++ b/drivers/pci/pci.c
> @@ -2121,15 +2121,13 @@ void pci_msi_off(struct pci_dev *dev)
>  int
>  pci_set_dma_mask(struct pci_dev *dev, u64 mask)
>  {
> -	if (!pci_dma_supported(dev, mask))
> -		return -EIO;
> -
> -	dev->dma_mask = mask;
> +	int ret = dma_set_mask(&dev->dev, mask);
> +	if (ret)
> +		return ret;
>  	dev_dbg(&dev->dev, "using %dbit DMA mask\n", fls64(mask));
> -
>  	return 0;
>  }
> -    
> +
>  int
>  pci_set_consistent_dma_mask(struct pci_dev *dev, u64 mask)
>  {



  reply	other threads:[~2010-02-14 23:34 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-12  9:33 [PATCH -mm 0/7] transforming the PCI DMA API into the generic device model FUJITA Tomonori
2010-02-12  9:33 ` [PATCH -mm 1/7] sparc: unify 32bit and 64bit dma_set_mask FUJITA Tomonori
2010-02-13  1:09   ` David Miller
2010-02-12  9:33 ` [PATCH -mm 2/7] alpha: use include/linux/pci-dma-compat.h FUJITA Tomonori
2010-02-12  9:33 ` [PATCH -mm 3/7] pci: convert pci_set_dma_mask to call dma_set_mask FUJITA Tomonori
2010-02-14 23:33   ` Benjamin Herrenschmidt [this message]
2010-02-12  9:33 ` [PATCH -mm 4/7] dma-mapping.h: add dma_set_coherent_mask FUJITA Tomonori
2010-02-12  9:33 ` [PATCH -mm 5/7] powerpc: use generic pci_set_dma_mask and pci_set_consistent_dma_mask FUJITA Tomonori
2010-02-14 23:36   ` Benjamin Herrenschmidt
2010-02-15  1:57     ` FUJITA Tomonori
2010-02-15  2:41       ` Benjamin Herrenschmidt
2010-02-12  9:33 ` [PATCH -mm 6/7] arm: " FUJITA Tomonori
2010-02-12 15:01   ` Russell King - ARM Linux
2010-02-12  9:33 ` [PATCH -mm 7/7] pci: move pci_set_dma_mask and pci_set_consistent_dma_mask to pci-dma-compat.h FUJITA Tomonori
2010-03-03  2:29   ` Andrew Morton
2010-03-03  2:58     ` FUJITA Tomonori
2010-03-03 16:23       ` Jesse Barnes

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=1266190421.16346.71.camel@pasglop \
    --to=benh@kernel.crashing.org \
    --cc=James.Bottomley@suse.de \
    --cc=akpm@linux-foundation.org \
    --cc=davem@davemloft.net \
    --cc=fujita.tomonori@lab.ntt.co.jp \
    --cc=jbarnes@virtuousgeek.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@arm.linux.org.uk \
    /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