lkml.org 
[lkml]   [2010]   [Feb]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH -mm 3/7] pci: convert pci_set_dma_mask to call dma_set_mask
From
Date
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)
> {




\
 
 \ /
  Last update: 2010-02-15 00:37    [from the cache]
©2003-2011 Jasper Spaans