mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 19:21:31 -04:00
[PATCH] Replace 0xff.. with correct DMA_xBIT_MASK
Replace all occurences of 0xff.. in calls to function pci_set_dma_mask() and pci_set_consistant_dma_mask() with the corresponding DMA_xBIT_MASK from linux/dma-mapping.h. Signed-off-by: Matthias Gehre <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
60c904ae5b
commit
910638ae7e
38 changed files with 88 additions and 51 deletions
|
|
@ -134,6 +134,7 @@
|
|||
#include <linux/random.h>
|
||||
#include <linux/init.h>
|
||||
#include <linux/if_vlan.h>
|
||||
#include <linux/dma-mapping.h>
|
||||
|
||||
#include <asm/irq.h>
|
||||
#include <asm/io.h>
|
||||
|
|
@ -2932,7 +2933,7 @@ static int __devinit nv_probe(struct pci_dev *pci_dev, const struct pci_device_i
|
|||
if (id->driver_data & DEV_HAS_HIGH_DMA) {
|
||||
/* packet format 3: supports 40-bit addressing */
|
||||
np->desc_ver = DESC_VER_3;
|
||||
if (pci_set_dma_mask(pci_dev, 0x0000007fffffffffULL)) {
|
||||
if (pci_set_dma_mask(pci_dev, DMA_39BIT_MASK)) {
|
||||
printk(KERN_INFO "forcedeth: 64-bit DMA failed, using 32-bit addressing for device %s.\n",
|
||||
pci_name(pci_dev));
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -44,6 +44,7 @@
|
|||
#include <linux/ip.h>
|
||||
#include <linux/tcp.h>
|
||||
#include <linux/udp.h>
|
||||
#include <linux/dma-mapping.h>
|
||||
|
||||
#ifdef CONFIG_SERIAL_8250
|
||||
#include <linux/serial_core.h>
|
||||
|
|
@ -1195,17 +1196,17 @@ static int ioc3_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
|
|||
int err, pci_using_dac;
|
||||
|
||||
/* Configure DMA attributes. */
|
||||
err = pci_set_dma_mask(pdev, 0xffffffffffffffffULL);
|
||||
err = pci_set_dma_mask(pdev, DMA_64BIT_MASK);
|
||||
if (!err) {
|
||||
pci_using_dac = 1;
|
||||
err = pci_set_consistent_dma_mask(pdev, 0xffffffffffffffffULL);
|
||||
err = pci_set_consistent_dma_mask(pdev, DMA_64BIT_MASK);
|
||||
if (err < 0) {
|
||||
printk(KERN_ERR "%s: Unable to obtain 64 bit DMA "
|
||||
"for consistent allocations\n", pci_name(pdev));
|
||||
goto out;
|
||||
}
|
||||
} else {
|
||||
err = pci_set_dma_mask(pdev, 0xffffffffULL);
|
||||
err = pci_set_dma_mask(pdev, DMA_32BIT_MASK);
|
||||
if (err) {
|
||||
printk(KERN_ERR "%s: No usable DMA configuration, "
|
||||
"aborting.\n", pci_name(pdev));
|
||||
|
|
|
|||
|
|
@ -1828,10 +1828,10 @@ static int __devinit ns83820_init_one(struct pci_dev *pci_dev, const struct pci_
|
|||
int using_dac = 0;
|
||||
|
||||
/* See if we can set the dma mask early on; failure is fatal. */
|
||||
if (sizeof(dma_addr_t) == 8 &&
|
||||
!pci_set_dma_mask(pci_dev, 0xffffffffffffffffULL)) {
|
||||
if (sizeof(dma_addr_t) == 8 &&
|
||||
!pci_set_dma_mask(pci_dev, DMA_64BIT_MASK)) {
|
||||
using_dac = 1;
|
||||
} else if (!pci_set_dma_mask(pci_dev, 0xffffffff)) {
|
||||
} else if (!pci_set_dma_mask(pci_dev, DMA_32BIT_MASK)) {
|
||||
using_dac = 0;
|
||||
} else {
|
||||
printk(KERN_WARNING "ns83820.c: pci_set_dma_mask failed!\n");
|
||||
|
|
|
|||
|
|
@ -577,8 +577,8 @@ static int __devinit wanxl_pci_init_one(struct pci_dev *pdev,
|
|||
We set both dma_mask and consistent_dma_mask to 28 bits
|
||||
and pray pci_alloc_consistent() will use this info. It should
|
||||
work on most platforms */
|
||||
if (pci_set_consistent_dma_mask(pdev, 0x0FFFFFFF) ||
|
||||
pci_set_dma_mask(pdev, 0x0FFFFFFF)) {
|
||||
if (pci_set_consistent_dma_mask(pdev, DMA_28BIT_MASK) ||
|
||||
pci_set_dma_mask(pdev, DMA_28BIT_MASK)) {
|
||||
printk(KERN_ERR "wanXL: No usable DMA configuration\n");
|
||||
return -EIO;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -22,6 +22,7 @@
|
|||
#include <linux/pci.h>
|
||||
#include <linux/delay.h>
|
||||
#include <linux/init.h> /* For __init, __exit */
|
||||
#include <linux/dma-mapping.h>
|
||||
|
||||
#include "prismcompat.h"
|
||||
#include "islpci_dev.h"
|
||||
|
|
@ -124,7 +125,7 @@ prism54_probe(struct pci_dev *pdev, const struct pci_device_id *id)
|
|||
}
|
||||
|
||||
/* enable PCI DMA */
|
||||
if (pci_set_dma_mask(pdev, 0xffffffff)) {
|
||||
if (pci_set_dma_mask(pdev, DMA_32BIT_MASK)) {
|
||||
printk(KERN_ERR "%s: 32-bit PCI DMA not supported", DRV_NAME);
|
||||
goto do_pci_disable_device;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue