mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 19:51: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
|
|
@ -42,6 +42,7 @@
|
|||
#include <linux/pci.h>
|
||||
#include <linux/spinlock.h>
|
||||
#include <linux/jiffies.h>
|
||||
#include <linux/dma-mapping.h>
|
||||
#include <scsi/scsicam.h>
|
||||
|
||||
#include <asm/dma.h>
|
||||
|
|
@ -677,7 +678,7 @@ static int __init BusLogic_InitializeMultiMasterProbeInfo(struct BusLogic_HostAd
|
|||
if (pci_enable_device(PCI_Device))
|
||||
continue;
|
||||
|
||||
if (pci_set_dma_mask(PCI_Device, (u64) 0xffffffff))
|
||||
if (pci_set_dma_mask(PCI_Device, DMA_32BIT_MASK ))
|
||||
continue;
|
||||
|
||||
Bus = PCI_Device->bus->number;
|
||||
|
|
@ -832,7 +833,7 @@ static int __init BusLogic_InitializeMultiMasterProbeInfo(struct BusLogic_HostAd
|
|||
if (pci_enable_device(PCI_Device))
|
||||
continue;
|
||||
|
||||
if (pci_set_dma_mask(PCI_Device, (u64) 0xffffffff))
|
||||
if (pci_set_dma_mask(PCI_Device, DMA_32BIT_MASK))
|
||||
continue;
|
||||
|
||||
Bus = PCI_Device->bus->number;
|
||||
|
|
@ -886,7 +887,7 @@ static int __init BusLogic_InitializeFlashPointProbeInfo(struct BusLogic_HostAda
|
|||
if (pci_enable_device(PCI_Device))
|
||||
continue;
|
||||
|
||||
if (pci_set_dma_mask(PCI_Device, (u64) 0xffffffff))
|
||||
if (pci_set_dma_mask(PCI_Device, DMA_32BIT_MASK))
|
||||
continue;
|
||||
|
||||
Bus = PCI_Device->bus->number;
|
||||
|
|
|
|||
|
|
@ -89,6 +89,7 @@
|
|||
#include <linux/string.h>
|
||||
#include <linux/ioport.h>
|
||||
#include <linux/slab.h>
|
||||
#include <linux/dma-mapping.h>
|
||||
|
||||
#include <asm/io.h>
|
||||
#include <asm/irq.h>
|
||||
|
|
@ -1052,7 +1053,7 @@ static int __devinit inia100_probe_one(struct pci_dev *pdev,
|
|||
|
||||
if (pci_enable_device(pdev))
|
||||
goto out;
|
||||
if (pci_set_dma_mask(pdev, 0xffffffffULL)) {
|
||||
if (pci_set_dma_mask(pdev, DMA_32BIT_MASK)) {
|
||||
printk(KERN_WARNING "Unable to set 32bit DMA "
|
||||
"on inia100 adapter, ignoring.\n");
|
||||
goto out_disable_device;
|
||||
|
|
|
|||
|
|
@ -32,6 +32,7 @@
|
|||
#include <linux/slab.h>
|
||||
#include <linux/completion.h>
|
||||
#include <linux/blkdev.h>
|
||||
#include <linux/dma-mapping.h>
|
||||
#include <asm/semaphore.h>
|
||||
#include <asm/uaccess.h>
|
||||
|
||||
|
|
|
|||
|
|
@ -45,6 +45,7 @@
|
|||
#include <linux/pci.h>
|
||||
#include <linux/slab.h>
|
||||
#include <linux/spinlock.h>
|
||||
#include <linux/dma-mapping.h>
|
||||
#include <linux/syscalls.h>
|
||||
#include <linux/delay.h>
|
||||
#include <linux/smp_lock.h>
|
||||
|
|
@ -806,8 +807,8 @@ static int __devinit aac_probe_one(struct pci_dev *pdev,
|
|||
* to driver communication memory to be allocated below 2gig
|
||||
*/
|
||||
if (aac_drivers[index].quirks & AAC_QUIRK_31BIT)
|
||||
if (pci_set_dma_mask(pdev, 0x7FFFFFFFULL) ||
|
||||
pci_set_consistent_dma_mask(pdev, 0x7FFFFFFFULL))
|
||||
if (pci_set_dma_mask(pdev, DMA_31BIT_MASK) ||
|
||||
pci_set_consistent_dma_mask(pdev, DMA_31BIT_MASK))
|
||||
goto out;
|
||||
|
||||
pci_set_master(pdev);
|
||||
|
|
|
|||
|
|
@ -28,6 +28,7 @@
|
|||
#include <linux/spinlock.h>
|
||||
#include <linux/pci.h>
|
||||
#include <linux/blkdev.h>
|
||||
#include <linux/dma-mapping.h>
|
||||
#include <asm/system.h>
|
||||
#include <asm/io.h>
|
||||
|
||||
|
|
@ -2631,7 +2632,7 @@ static int atp870u_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
|
|||
if (pci_enable_device(pdev))
|
||||
return -EIO;
|
||||
|
||||
if (!pci_set_dma_mask(pdev, 0xFFFFFFFFUL)) {
|
||||
if (!pci_set_dma_mask(pdev, DMA_32BIT_MASK)) {
|
||||
printk(KERN_INFO "atp870u: use 32bit DMA mask.\n");
|
||||
} else {
|
||||
printk(KERN_ERR "atp870u: DMA mask required but not available.\n");
|
||||
|
|
|
|||
|
|
@ -57,6 +57,7 @@ MODULE_DESCRIPTION("Adaptec I2O RAID Driver");
|
|||
#include <linux/reboot.h>
|
||||
#include <linux/spinlock.h>
|
||||
#include <linux/smp_lock.h>
|
||||
#include <linux/dma-mapping.h>
|
||||
|
||||
#include <linux/timer.h>
|
||||
#include <linux/string.h>
|
||||
|
|
@ -906,8 +907,8 @@ static int adpt_install_hba(struct scsi_host_template* sht, struct pci_dev* pDev
|
|||
}
|
||||
|
||||
pci_set_master(pDev);
|
||||
if (pci_set_dma_mask(pDev, 0xffffffffffffffffULL) &&
|
||||
pci_set_dma_mask(pDev, 0xffffffffULL))
|
||||
if (pci_set_dma_mask(pDev, DMA_64BIT_MASK) &&
|
||||
pci_set_dma_mask(pDev, DMA_32BIT_MASK))
|
||||
return -EINVAL;
|
||||
|
||||
base_addr0_phys = pci_resource_start(pDev,0);
|
||||
|
|
|
|||
|
|
@ -490,6 +490,7 @@
|
|||
#include <linux/init.h>
|
||||
#include <linux/ctype.h>
|
||||
#include <linux/spinlock.h>
|
||||
#include <linux/dma-mapping.h>
|
||||
#include <asm/byteorder.h>
|
||||
#include <asm/dma.h>
|
||||
#include <asm/io.h>
|
||||
|
|
@ -1426,7 +1427,7 @@ static int port_detect(unsigned long port_base, unsigned int j,
|
|||
|
||||
if (ha->pdev) {
|
||||
pci_set_master(ha->pdev);
|
||||
if (pci_set_dma_mask(ha->pdev, 0xffffffff))
|
||||
if (pci_set_dma_mask(ha->pdev, DMA_32BIT_MASK))
|
||||
printk("%s: warning, pci_set_dma_mask failed.\n",
|
||||
ha->board_name);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -388,6 +388,7 @@
|
|||
#include <linux/proc_fs.h>
|
||||
#include <linux/time.h>
|
||||
#include <linux/timer.h>
|
||||
#include <linux/dma-mapping.h>
|
||||
#ifdef GDTH_RTC
|
||||
#include <linux/mc146818rtc.h>
|
||||
#endif
|
||||
|
|
@ -4527,15 +4528,15 @@ static int __init gdth_detect(struct scsi_host_template *shtp)
|
|||
if (!(ha->cache_feat & ha->raw_feat & ha->screen_feat &GDT_64BIT)||
|
||||
/* 64-bit DMA only supported from FW >= x.43 */
|
||||
(!ha->dma64_support)) {
|
||||
if (pci_set_dma_mask(pcistr[ctr].pdev, 0xffffffff)) {
|
||||
if (pci_set_dma_mask(pcistr[ctr].pdev, DMA_32BIT_MASK)) {
|
||||
printk(KERN_WARNING "GDT-PCI %d: Unable to set 32-bit DMA\n", hanum);
|
||||
err = TRUE;
|
||||
}
|
||||
} else {
|
||||
shp->max_cmd_len = 16;
|
||||
if (!pci_set_dma_mask(pcistr[ctr].pdev, 0xffffffffffffffffULL)) {
|
||||
if (!pci_set_dma_mask(pcistr[ctr].pdev, DMA_64BIT_MASK)) {
|
||||
printk("GDT-PCI %d: 64-bit DMA enabled\n", hanum);
|
||||
} else if (pci_set_dma_mask(pcistr[ctr].pdev, 0xffffffff)) {
|
||||
} else if (pci_set_dma_mask(pcistr[ctr].pdev, DMA_32BIT_MASK)) {
|
||||
printk(KERN_WARNING "GDT-PCI %d: Unable to set 64/32-bit DMA\n", hanum);
|
||||
err = TRUE;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -127,6 +127,7 @@
|
|||
#include <linux/sched.h>
|
||||
#include <linux/slab.h>
|
||||
#include <linux/jiffies.h>
|
||||
#include <linux/dma-mapping.h>
|
||||
#include <asm/io.h>
|
||||
|
||||
#include <scsi/scsi.h>
|
||||
|
|
@ -2780,7 +2781,7 @@ static int tul_NewReturnNumberOfAdapters(void)
|
|||
if (((dRegValue & 0xFF00) >> 8) == 0xFF)
|
||||
dRegValue = 0;
|
||||
wBIOS = (wBIOS << 8) + ((UWORD) ((dRegValue & 0xFF00) >> 8));
|
||||
if (pci_set_dma_mask(pDev, 0xffffffff)) {
|
||||
if (pci_set_dma_mask(pDev, DMA_32BIT_MASK)) {
|
||||
printk(KERN_WARNING
|
||||
"i91u: Could not set 32 bit DMA mask\n");
|
||||
continue;
|
||||
|
|
|
|||
|
|
@ -179,6 +179,7 @@
|
|||
|
||||
#include <linux/blkdev.h>
|
||||
#include <linux/types.h>
|
||||
#include <linux/dma-mapping.h>
|
||||
|
||||
#include <scsi/sg.h>
|
||||
|
||||
|
|
@ -7284,10 +7285,10 @@ ips_init_phase1(struct pci_dev *pci_dev, int *indexPtr)
|
|||
* are guaranteed to be < 4G.
|
||||
*/
|
||||
if (IPS_ENABLE_DMA64 && IPS_HAS_ENH_SGLIST(ha) &&
|
||||
!pci_set_dma_mask(ha->pcidev, 0xffffffffffffffffULL)) {
|
||||
!pci_set_dma_mask(ha->pcidev, DMA_64BIT_MASK)) {
|
||||
(ha)->flags |= IPS_HA_ENH_SG;
|
||||
} else {
|
||||
if (pci_set_dma_mask(ha->pcidev, 0xffffffffULL) != 0) {
|
||||
if (pci_set_dma_mask(ha->pcidev, DMA_32BIT_MASK) != 0) {
|
||||
printk(KERN_WARNING "Unable to set DMA Mask\n");
|
||||
return ips_abort_init(ha, index);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -45,6 +45,7 @@
|
|||
#include <linux/interrupt.h>
|
||||
#include <linux/pci.h>
|
||||
#include <linux/init.h>
|
||||
#include <linux/dma-mapping.h>
|
||||
#include <scsi/scsicam.h>
|
||||
|
||||
#include "scsi.h"
|
||||
|
|
@ -2094,7 +2095,7 @@ make_local_pdev(adapter_t *adapter, struct pci_dev **pdev)
|
|||
|
||||
memcpy(*pdev, adapter->dev, sizeof(struct pci_dev));
|
||||
|
||||
if( pci_set_dma_mask(*pdev, 0xffffffff) != 0 ) {
|
||||
if( pci_set_dma_mask(*pdev, DMA_32BIT_MASK) != 0 ) {
|
||||
kfree(*pdev);
|
||||
return -1;
|
||||
}
|
||||
|
|
@ -4859,10 +4860,10 @@ megaraid_probe_one(struct pci_dev *pdev, const struct pci_device_id *id)
|
|||
|
||||
/* Set the Mode of addressing to 64 bit if we can */
|
||||
if ((adapter->flag & BOARD_64BIT) && (sizeof(dma_addr_t) == 8)) {
|
||||
pci_set_dma_mask(pdev, 0xffffffffffffffffULL);
|
||||
pci_set_dma_mask(pdev, DMA_64BIT_MASK);
|
||||
adapter->has_64bit_addr = 1;
|
||||
} else {
|
||||
pci_set_dma_mask(pdev, 0xffffffff);
|
||||
pci_set_dma_mask(pdev, DMA_32BIT_MASK);
|
||||
adapter->has_64bit_addr = 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -38,6 +38,7 @@
|
|||
#include <linux/pci.h>
|
||||
#include <linux/delay.h>
|
||||
#include <linux/ctype.h>
|
||||
#include <linux/dma-mapping.h>
|
||||
|
||||
#include <asm/dma.h>
|
||||
#include <asm/system.h>
|
||||
|
|
@ -2776,7 +2777,7 @@ static int nsp32_detect(struct scsi_host_template *sht)
|
|||
/*
|
||||
* setup DMA
|
||||
*/
|
||||
if (pci_set_dma_mask(PCIDEV, 0xffffffffUL) != 0) {
|
||||
if (pci_set_dma_mask(PCIDEV, DMA_32BIT_MASK) != 0) {
|
||||
nsp32_msg (KERN_ERR, "failed to set PCI DMA mask");
|
||||
goto scsi_unregister;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -350,6 +350,7 @@
|
|||
#include <linux/pci_ids.h>
|
||||
#include <linux/interrupt.h>
|
||||
#include <linux/init.h>
|
||||
#include <linux/dma-mapping.h>
|
||||
|
||||
#include <asm/io.h>
|
||||
#include <asm/irq.h>
|
||||
|
|
@ -4321,7 +4322,7 @@ qla1280_probe_one(struct pci_dev *pdev, const struct pci_device_id *id)
|
|||
|
||||
#ifdef QLA_64BIT_PTR
|
||||
if (pci_set_dma_mask(ha->pdev, (dma_addr_t) ~ 0ULL)) {
|
||||
if (pci_set_dma_mask(ha->pdev, 0xffffffff)) {
|
||||
if (pci_set_dma_mask(ha->pdev, DMA_32BIT_MASK)) {
|
||||
printk(KERN_WARNING "scsi(%li): Unable to set a "
|
||||
"suitable DMA mask - aborting\n", ha->host_no);
|
||||
error = -ENODEV;
|
||||
|
|
@ -4331,7 +4332,7 @@ qla1280_probe_one(struct pci_dev *pdev, const struct pci_device_id *id)
|
|||
dprintk(2, "scsi(%li): 64 Bit PCI Addressing Enabled\n",
|
||||
ha->host_no);
|
||||
#else
|
||||
if (pci_set_dma_mask(ha->pdev, 0xffffffff)) {
|
||||
if (pci_set_dma_mask(ha->pdev, DMA_32BIT_MASK)) {
|
||||
printk(KERN_WARNING "scsi(%li): Unable to set a "
|
||||
"suitable DMA mask - aborting\n", ha->host_no);
|
||||
error = -ENODEV;
|
||||
|
|
|
|||
|
|
@ -61,6 +61,7 @@
|
|||
#include <linux/unistd.h>
|
||||
#include <linux/spinlock.h>
|
||||
#include <linux/interrupt.h>
|
||||
#include <linux/dma-mapping.h>
|
||||
#include <linux/jiffies.h>
|
||||
#include <asm/io.h>
|
||||
#include <asm/irq.h>
|
||||
|
|
@ -738,8 +739,8 @@ static int isp2x00_detect(struct scsi_host_template * tmpt)
|
|||
continue;
|
||||
|
||||
/* Try to configure DMA attributes. */
|
||||
if (pci_set_dma_mask(pdev, 0xffffffffffffffffULL) &&
|
||||
pci_set_dma_mask(pdev, 0xffffffffULL))
|
||||
if (pci_set_dma_mask(pdev, DMA_64BIT_MASK) &&
|
||||
pci_set_dma_mask(pdev, DMA_32BIT_MASK))
|
||||
continue;
|
||||
|
||||
host = scsi_register(tmpt, sizeof(struct isp2x00_hostdata));
|
||||
|
|
|
|||
Loading…
Reference in a new issue