diff options
author | Matthias Gehre <M.Gehre@gmx.de> | 2006-03-28 04:56:48 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-03-28 12:16:07 -0500 |
commit | 910638ae7ed4be27d6af55f6c9b5bf54b838e78b (patch) | |
tree | 5eda3cfd0e312c8b0916f6d5eb1cd98225e67891 /drivers | |
parent | 60c904ae5bded8bb71f7bff7d63f2a6959d2a8e4 (diff) |
[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 <M.Gehre@gmx.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/atm/lanai.c | 2 | ||||
-rw-r--r-- | drivers/block/umem.c | 5 | ||||
-rw-r--r-- | drivers/net/forcedeth.c | 3 | ||||
-rw-r--r-- | drivers/net/ioc3-eth.c | 7 | ||||
-rw-r--r-- | drivers/net/ns83820.c | 6 | ||||
-rw-r--r-- | drivers/net/wan/wanxl.c | 4 | ||||
-rw-r--r-- | drivers/net/wireless/prism54/islpci_hotplug.c | 3 | ||||
-rw-r--r-- | drivers/scsi/BusLogic.c | 7 | ||||
-rw-r--r-- | drivers/scsi/a100u2w.c | 3 | ||||
-rw-r--r-- | drivers/scsi/aacraid/aachba.c | 1 | ||||
-rw-r--r-- | drivers/scsi/aacraid/linit.c | 5 | ||||
-rw-r--r-- | drivers/scsi/atp870u.c | 3 | ||||
-rw-r--r-- | drivers/scsi/dpt_i2o.c | 5 | ||||
-rw-r--r-- | drivers/scsi/eata.c | 3 | ||||
-rw-r--r-- | drivers/scsi/gdth.c | 7 | ||||
-rw-r--r-- | drivers/scsi/initio.c | 3 | ||||
-rw-r--r-- | drivers/scsi/ips.c | 5 | ||||
-rw-r--r-- | drivers/scsi/megaraid.c | 7 | ||||
-rw-r--r-- | drivers/scsi/nsp32.c | 3 | ||||
-rw-r--r-- | drivers/scsi/qla1280.c | 5 | ||||
-rw-r--r-- | drivers/scsi/qlogicfc.c | 5 |
21 files changed, 55 insertions, 37 deletions
diff --git a/drivers/atm/lanai.c b/drivers/atm/lanai.c index 69f4c7ce9a63..cac09e353be8 100644 --- a/drivers/atm/lanai.c +++ b/drivers/atm/lanai.c | |||
@@ -1972,7 +1972,7 @@ static int __devinit lanai_pci_start(struct lanai_dev *lanai) | |||
1972 | "(itf %d): No suitable DMA available.\n", lanai->number); | 1972 | "(itf %d): No suitable DMA available.\n", lanai->number); |
1973 | return -EBUSY; | 1973 | return -EBUSY; |
1974 | } | 1974 | } |
1975 | if (pci_set_consistent_dma_mask(pci, 0xFFFFFFFF) != 0) { | 1975 | if (pci_set_consistent_dma_mask(pci, DMA_32BIT_MASK) != 0) { |
1976 | printk(KERN_WARNING DEV_LABEL | 1976 | printk(KERN_WARNING DEV_LABEL |
1977 | "(itf %d): No suitable DMA available.\n", lanai->number); | 1977 | "(itf %d): No suitable DMA available.\n", lanai->number); |
1978 | return -EBUSY; | 1978 | return -EBUSY; |
diff --git a/drivers/block/umem.c b/drivers/block/umem.c index c16e66b9c7a7..f7d4c65a7b8c 100644 --- a/drivers/block/umem.c +++ b/drivers/block/umem.c | |||
@@ -50,6 +50,7 @@ | |||
50 | #include <linux/timer.h> | 50 | #include <linux/timer.h> |
51 | #include <linux/pci.h> | 51 | #include <linux/pci.h> |
52 | #include <linux/slab.h> | 52 | #include <linux/slab.h> |
53 | #include <linux/dma-mapping.h> | ||
53 | 54 | ||
54 | #include <linux/fcntl.h> /* O_ACCMODE */ | 55 | #include <linux/fcntl.h> /* O_ACCMODE */ |
55 | #include <linux/hdreg.h> /* HDIO_GETGEO */ | 56 | #include <linux/hdreg.h> /* HDIO_GETGEO */ |
@@ -881,8 +882,8 @@ static int __devinit mm_pci_probe(struct pci_dev *dev, const struct pci_device_i | |||
881 | printk(KERN_INFO "Micro Memory(tm) controller #%d found at %02x:%02x (PCI Mem Module (Battery Backup))\n", | 882 | printk(KERN_INFO "Micro Memory(tm) controller #%d found at %02x:%02x (PCI Mem Module (Battery Backup))\n", |
882 | card->card_number, dev->bus->number, dev->devfn); | 883 | card->card_number, dev->bus->number, dev->devfn); |
883 | 884 | ||
884 | if (pci_set_dma_mask(dev, 0xffffffffffffffffLL) && | 885 | if (pci_set_dma_mask(dev, DMA_64BIT_MASK) && |
885 | pci_set_dma_mask(dev, 0xffffffffLL)) { | 886 | pci_set_dma_mask(dev, DMA_32BIT_MASK)) { |
886 | printk(KERN_WARNING "MM%d: NO suitable DMA found\n",num_cards); | 887 | printk(KERN_WARNING "MM%d: NO suitable DMA found\n",num_cards); |
887 | return -ENOMEM; | 888 | return -ENOMEM; |
888 | } | 889 | } |
diff --git a/drivers/net/forcedeth.c b/drivers/net/forcedeth.c index e7fc28b07e5a..7627a75f4f7c 100644 --- a/drivers/net/forcedeth.c +++ b/drivers/net/forcedeth.c | |||
@@ -134,6 +134,7 @@ | |||
134 | #include <linux/random.h> | 134 | #include <linux/random.h> |
135 | #include <linux/init.h> | 135 | #include <linux/init.h> |
136 | #include <linux/if_vlan.h> | 136 | #include <linux/if_vlan.h> |
137 | #include <linux/dma-mapping.h> | ||
137 | 138 | ||
138 | #include <asm/irq.h> | 139 | #include <asm/irq.h> |
139 | #include <asm/io.h> | 140 | #include <asm/io.h> |
@@ -2932,7 +2933,7 @@ static int __devinit nv_probe(struct pci_dev *pci_dev, const struct pci_device_i | |||
2932 | if (id->driver_data & DEV_HAS_HIGH_DMA) { | 2933 | if (id->driver_data & DEV_HAS_HIGH_DMA) { |
2933 | /* packet format 3: supports 40-bit addressing */ | 2934 | /* packet format 3: supports 40-bit addressing */ |
2934 | np->desc_ver = DESC_VER_3; | 2935 | np->desc_ver = DESC_VER_3; |
2935 | if (pci_set_dma_mask(pci_dev, 0x0000007fffffffffULL)) { | 2936 | if (pci_set_dma_mask(pci_dev, DMA_39BIT_MASK)) { |
2936 | printk(KERN_INFO "forcedeth: 64-bit DMA failed, using 32-bit addressing for device %s.\n", | 2937 | printk(KERN_INFO "forcedeth: 64-bit DMA failed, using 32-bit addressing for device %s.\n", |
2937 | pci_name(pci_dev)); | 2938 | pci_name(pci_dev)); |
2938 | } else { | 2939 | } else { |
diff --git a/drivers/net/ioc3-eth.c b/drivers/net/ioc3-eth.c index 9b8295ee06ef..ae71ed57c12d 100644 --- a/drivers/net/ioc3-eth.c +++ b/drivers/net/ioc3-eth.c | |||
@@ -44,6 +44,7 @@ | |||
44 | #include <linux/ip.h> | 44 | #include <linux/ip.h> |
45 | #include <linux/tcp.h> | 45 | #include <linux/tcp.h> |
46 | #include <linux/udp.h> | 46 | #include <linux/udp.h> |
47 | #include <linux/dma-mapping.h> | ||
47 | 48 | ||
48 | #ifdef CONFIG_SERIAL_8250 | 49 | #ifdef CONFIG_SERIAL_8250 |
49 | #include <linux/serial_core.h> | 50 | #include <linux/serial_core.h> |
@@ -1195,17 +1196,17 @@ static int ioc3_probe(struct pci_dev *pdev, const struct pci_device_id *ent) | |||
1195 | int err, pci_using_dac; | 1196 | int err, pci_using_dac; |
1196 | 1197 | ||
1197 | /* Configure DMA attributes. */ | 1198 | /* Configure DMA attributes. */ |
1198 | err = pci_set_dma_mask(pdev, 0xffffffffffffffffULL); | 1199 | err = pci_set_dma_mask(pdev, DMA_64BIT_MASK); |
1199 | if (!err) { | 1200 | if (!err) { |
1200 | pci_using_dac = 1; | 1201 | pci_using_dac = 1; |
1201 | err = pci_set_consistent_dma_mask(pdev, 0xffffffffffffffffULL); | 1202 | err = pci_set_consistent_dma_mask(pdev, DMA_64BIT_MASK); |
1202 | if (err < 0) { | 1203 | if (err < 0) { |
1203 | printk(KERN_ERR "%s: Unable to obtain 64 bit DMA " | 1204 | printk(KERN_ERR "%s: Unable to obtain 64 bit DMA " |
1204 | "for consistent allocations\n", pci_name(pdev)); | 1205 | "for consistent allocations\n", pci_name(pdev)); |
1205 | goto out; | 1206 | goto out; |
1206 | } | 1207 | } |
1207 | } else { | 1208 | } else { |
1208 | err = pci_set_dma_mask(pdev, 0xffffffffULL); | 1209 | err = pci_set_dma_mask(pdev, DMA_32BIT_MASK); |
1209 | if (err) { | 1210 | if (err) { |
1210 | printk(KERN_ERR "%s: No usable DMA configuration, " | 1211 | printk(KERN_ERR "%s: No usable DMA configuration, " |
1211 | "aborting.\n", pci_name(pdev)); | 1212 | "aborting.\n", pci_name(pdev)); |
diff --git a/drivers/net/ns83820.c b/drivers/net/ns83820.c index 0fede50abd3e..8e9b1a537dee 100644 --- a/drivers/net/ns83820.c +++ b/drivers/net/ns83820.c | |||
@@ -1828,10 +1828,10 @@ static int __devinit ns83820_init_one(struct pci_dev *pci_dev, const struct pci_ | |||
1828 | int using_dac = 0; | 1828 | int using_dac = 0; |
1829 | 1829 | ||
1830 | /* See if we can set the dma mask early on; failure is fatal. */ | 1830 | /* See if we can set the dma mask early on; failure is fatal. */ |
1831 | if (sizeof(dma_addr_t) == 8 && | 1831 | if (sizeof(dma_addr_t) == 8 && |
1832 | !pci_set_dma_mask(pci_dev, 0xffffffffffffffffULL)) { | 1832 | !pci_set_dma_mask(pci_dev, DMA_64BIT_MASK)) { |
1833 | using_dac = 1; | 1833 | using_dac = 1; |
1834 | } else if (!pci_set_dma_mask(pci_dev, 0xffffffff)) { | 1834 | } else if (!pci_set_dma_mask(pci_dev, DMA_32BIT_MASK)) { |
1835 | using_dac = 0; | 1835 | using_dac = 0; |
1836 | } else { | 1836 | } else { |
1837 | printk(KERN_WARNING "ns83820.c: pci_set_dma_mask failed!\n"); | 1837 | printk(KERN_WARNING "ns83820.c: pci_set_dma_mask failed!\n"); |
diff --git a/drivers/net/wan/wanxl.c b/drivers/net/wan/wanxl.c index 9d3b51c3ef54..29a756dd979b 100644 --- a/drivers/net/wan/wanxl.c +++ b/drivers/net/wan/wanxl.c | |||
@@ -577,8 +577,8 @@ static int __devinit wanxl_pci_init_one(struct pci_dev *pdev, | |||
577 | We set both dma_mask and consistent_dma_mask to 28 bits | 577 | We set both dma_mask and consistent_dma_mask to 28 bits |
578 | and pray pci_alloc_consistent() will use this info. It should | 578 | and pray pci_alloc_consistent() will use this info. It should |
579 | work on most platforms */ | 579 | work on most platforms */ |
580 | if (pci_set_consistent_dma_mask(pdev, 0x0FFFFFFF) || | 580 | if (pci_set_consistent_dma_mask(pdev, DMA_28BIT_MASK) || |
581 | pci_set_dma_mask(pdev, 0x0FFFFFFF)) { | 581 | pci_set_dma_mask(pdev, DMA_28BIT_MASK)) { |
582 | printk(KERN_ERR "wanXL: No usable DMA configuration\n"); | 582 | printk(KERN_ERR "wanXL: No usable DMA configuration\n"); |
583 | return -EIO; | 583 | return -EIO; |
584 | } | 584 | } |
diff --git a/drivers/net/wireless/prism54/islpci_hotplug.c b/drivers/net/wireless/prism54/islpci_hotplug.c index b41d666fea3c..bfa0cc319a09 100644 --- a/drivers/net/wireless/prism54/islpci_hotplug.c +++ b/drivers/net/wireless/prism54/islpci_hotplug.c | |||
@@ -22,6 +22,7 @@ | |||
22 | #include <linux/pci.h> | 22 | #include <linux/pci.h> |
23 | #include <linux/delay.h> | 23 | #include <linux/delay.h> |
24 | #include <linux/init.h> /* For __init, __exit */ | 24 | #include <linux/init.h> /* For __init, __exit */ |
25 | #include <linux/dma-mapping.h> | ||
25 | 26 | ||
26 | #include "prismcompat.h" | 27 | #include "prismcompat.h" |
27 | #include "islpci_dev.h" | 28 | #include "islpci_dev.h" |
@@ -124,7 +125,7 @@ prism54_probe(struct pci_dev *pdev, const struct pci_device_id *id) | |||
124 | } | 125 | } |
125 | 126 | ||
126 | /* enable PCI DMA */ | 127 | /* enable PCI DMA */ |
127 | if (pci_set_dma_mask(pdev, 0xffffffff)) { | 128 | if (pci_set_dma_mask(pdev, DMA_32BIT_MASK)) { |
128 | printk(KERN_ERR "%s: 32-bit PCI DMA not supported", DRV_NAME); | 129 | printk(KERN_ERR "%s: 32-bit PCI DMA not supported", DRV_NAME); |
129 | goto do_pci_disable_device; | 130 | goto do_pci_disable_device; |
130 | } | 131 | } |
diff --git a/drivers/scsi/BusLogic.c b/drivers/scsi/BusLogic.c index 5bf83cbca868..bde3d5834ade 100644 --- a/drivers/scsi/BusLogic.c +++ b/drivers/scsi/BusLogic.c | |||
@@ -42,6 +42,7 @@ | |||
42 | #include <linux/pci.h> | 42 | #include <linux/pci.h> |
43 | #include <linux/spinlock.h> | 43 | #include <linux/spinlock.h> |
44 | #include <linux/jiffies.h> | 44 | #include <linux/jiffies.h> |
45 | #include <linux/dma-mapping.h> | ||
45 | #include <scsi/scsicam.h> | 46 | #include <scsi/scsicam.h> |
46 | 47 | ||
47 | #include <asm/dma.h> | 48 | #include <asm/dma.h> |
@@ -677,7 +678,7 @@ static int __init BusLogic_InitializeMultiMasterProbeInfo(struct BusLogic_HostAd | |||
677 | if (pci_enable_device(PCI_Device)) | 678 | if (pci_enable_device(PCI_Device)) |
678 | continue; | 679 | continue; |
679 | 680 | ||
680 | if (pci_set_dma_mask(PCI_Device, (u64) 0xffffffff)) | 681 | if (pci_set_dma_mask(PCI_Device, DMA_32BIT_MASK )) |
681 | continue; | 682 | continue; |
682 | 683 | ||
683 | Bus = PCI_Device->bus->number; | 684 | Bus = PCI_Device->bus->number; |
@@ -832,7 +833,7 @@ static int __init BusLogic_InitializeMultiMasterProbeInfo(struct BusLogic_HostAd | |||
832 | if (pci_enable_device(PCI_Device)) | 833 | if (pci_enable_device(PCI_Device)) |
833 | continue; | 834 | continue; |
834 | 835 | ||
835 | if (pci_set_dma_mask(PCI_Device, (u64) 0xffffffff)) | 836 | if (pci_set_dma_mask(PCI_Device, DMA_32BIT_MASK)) |
836 | continue; | 837 | continue; |
837 | 838 | ||
838 | Bus = PCI_Device->bus->number; | 839 | Bus = PCI_Device->bus->number; |
@@ -886,7 +887,7 @@ static int __init BusLogic_InitializeFlashPointProbeInfo(struct BusLogic_HostAda | |||
886 | if (pci_enable_device(PCI_Device)) | 887 | if (pci_enable_device(PCI_Device)) |
887 | continue; | 888 | continue; |
888 | 889 | ||
889 | if (pci_set_dma_mask(PCI_Device, (u64) 0xffffffff)) | 890 | if (pci_set_dma_mask(PCI_Device, DMA_32BIT_MASK)) |
890 | continue; | 891 | continue; |
891 | 892 | ||
892 | Bus = PCI_Device->bus->number; | 893 | Bus = PCI_Device->bus->number; |
diff --git a/drivers/scsi/a100u2w.c b/drivers/scsi/a100u2w.c index 9f45ae1745da..3dce21c78737 100644 --- a/drivers/scsi/a100u2w.c +++ b/drivers/scsi/a100u2w.c | |||
@@ -89,6 +89,7 @@ | |||
89 | #include <linux/string.h> | 89 | #include <linux/string.h> |
90 | #include <linux/ioport.h> | 90 | #include <linux/ioport.h> |
91 | #include <linux/slab.h> | 91 | #include <linux/slab.h> |
92 | #include <linux/dma-mapping.h> | ||
92 | 93 | ||
93 | #include <asm/io.h> | 94 | #include <asm/io.h> |
94 | #include <asm/irq.h> | 95 | #include <asm/irq.h> |
@@ -1052,7 +1053,7 @@ static int __devinit inia100_probe_one(struct pci_dev *pdev, | |||
1052 | 1053 | ||
1053 | if (pci_enable_device(pdev)) | 1054 | if (pci_enable_device(pdev)) |
1054 | goto out; | 1055 | goto out; |
1055 | if (pci_set_dma_mask(pdev, 0xffffffffULL)) { | 1056 | if (pci_set_dma_mask(pdev, DMA_32BIT_MASK)) { |
1056 | printk(KERN_WARNING "Unable to set 32bit DMA " | 1057 | printk(KERN_WARNING "Unable to set 32bit DMA " |
1057 | "on inia100 adapter, ignoring.\n"); | 1058 | "on inia100 adapter, ignoring.\n"); |
1058 | goto out_disable_device; | 1059 | goto out_disable_device; |
diff --git a/drivers/scsi/aacraid/aachba.c b/drivers/scsi/aacraid/aachba.c index a16f8ded8f1d..8df4a0ea3761 100644 --- a/drivers/scsi/aacraid/aachba.c +++ b/drivers/scsi/aacraid/aachba.c | |||
@@ -32,6 +32,7 @@ | |||
32 | #include <linux/slab.h> | 32 | #include <linux/slab.h> |
33 | #include <linux/completion.h> | 33 | #include <linux/completion.h> |
34 | #include <linux/blkdev.h> | 34 | #include <linux/blkdev.h> |
35 | #include <linux/dma-mapping.h> | ||
35 | #include <asm/semaphore.h> | 36 | #include <asm/semaphore.h> |
36 | #include <asm/uaccess.h> | 37 | #include <asm/uaccess.h> |
37 | 38 | ||
diff --git a/drivers/scsi/aacraid/linit.c b/drivers/scsi/aacraid/linit.c index c2596335549d..720330778648 100644 --- a/drivers/scsi/aacraid/linit.c +++ b/drivers/scsi/aacraid/linit.c | |||
@@ -45,6 +45,7 @@ | |||
45 | #include <linux/pci.h> | 45 | #include <linux/pci.h> |
46 | #include <linux/slab.h> | 46 | #include <linux/slab.h> |
47 | #include <linux/spinlock.h> | 47 | #include <linux/spinlock.h> |
48 | #include <linux/dma-mapping.h> | ||
48 | #include <linux/syscalls.h> | 49 | #include <linux/syscalls.h> |
49 | #include <linux/delay.h> | 50 | #include <linux/delay.h> |
50 | #include <linux/smp_lock.h> | 51 | #include <linux/smp_lock.h> |
@@ -806,8 +807,8 @@ static int __devinit aac_probe_one(struct pci_dev *pdev, | |||
806 | * to driver communication memory to be allocated below 2gig | 807 | * to driver communication memory to be allocated below 2gig |
807 | */ | 808 | */ |
808 | if (aac_drivers[index].quirks & AAC_QUIRK_31BIT) | 809 | if (aac_drivers[index].quirks & AAC_QUIRK_31BIT) |
809 | if (pci_set_dma_mask(pdev, 0x7FFFFFFFULL) || | 810 | if (pci_set_dma_mask(pdev, DMA_31BIT_MASK) || |
810 | pci_set_consistent_dma_mask(pdev, 0x7FFFFFFFULL)) | 811 | pci_set_consistent_dma_mask(pdev, DMA_31BIT_MASK)) |
811 | goto out; | 812 | goto out; |
812 | 813 | ||
813 | pci_set_master(pdev); | 814 | pci_set_master(pdev); |
diff --git a/drivers/scsi/atp870u.c b/drivers/scsi/atp870u.c index 5227a779c05c..a198d86667e9 100644 --- a/drivers/scsi/atp870u.c +++ b/drivers/scsi/atp870u.c | |||
@@ -28,6 +28,7 @@ | |||
28 | #include <linux/spinlock.h> | 28 | #include <linux/spinlock.h> |
29 | #include <linux/pci.h> | 29 | #include <linux/pci.h> |
30 | #include <linux/blkdev.h> | 30 | #include <linux/blkdev.h> |
31 | #include <linux/dma-mapping.h> | ||
31 | #include <asm/system.h> | 32 | #include <asm/system.h> |
32 | #include <asm/io.h> | 33 | #include <asm/io.h> |
33 | 34 | ||
@@ -2631,7 +2632,7 @@ static int atp870u_probe(struct pci_dev *pdev, const struct pci_device_id *ent) | |||
2631 | if (pci_enable_device(pdev)) | 2632 | if (pci_enable_device(pdev)) |
2632 | return -EIO; | 2633 | return -EIO; |
2633 | 2634 | ||
2634 | if (!pci_set_dma_mask(pdev, 0xFFFFFFFFUL)) { | 2635 | if (!pci_set_dma_mask(pdev, DMA_32BIT_MASK)) { |
2635 | printk(KERN_INFO "atp870u: use 32bit DMA mask.\n"); | 2636 | printk(KERN_INFO "atp870u: use 32bit DMA mask.\n"); |
2636 | } else { | 2637 | } else { |
2637 | printk(KERN_ERR "atp870u: DMA mask required but not available.\n"); | 2638 | printk(KERN_ERR "atp870u: DMA mask required but not available.\n"); |
diff --git a/drivers/scsi/dpt_i2o.c b/drivers/scsi/dpt_i2o.c index 6e6b293dcb28..b1b704a42efd 100644 --- a/drivers/scsi/dpt_i2o.c +++ b/drivers/scsi/dpt_i2o.c | |||
@@ -57,6 +57,7 @@ MODULE_DESCRIPTION("Adaptec I2O RAID Driver"); | |||
57 | #include <linux/reboot.h> | 57 | #include <linux/reboot.h> |
58 | #include <linux/spinlock.h> | 58 | #include <linux/spinlock.h> |
59 | #include <linux/smp_lock.h> | 59 | #include <linux/smp_lock.h> |
60 | #include <linux/dma-mapping.h> | ||
60 | 61 | ||
61 | #include <linux/timer.h> | 62 | #include <linux/timer.h> |
62 | #include <linux/string.h> | 63 | #include <linux/string.h> |
@@ -906,8 +907,8 @@ static int adpt_install_hba(struct scsi_host_template* sht, struct pci_dev* pDev | |||
906 | } | 907 | } |
907 | 908 | ||
908 | pci_set_master(pDev); | 909 | pci_set_master(pDev); |
909 | if (pci_set_dma_mask(pDev, 0xffffffffffffffffULL) && | 910 | if (pci_set_dma_mask(pDev, DMA_64BIT_MASK) && |
910 | pci_set_dma_mask(pDev, 0xffffffffULL)) | 911 | pci_set_dma_mask(pDev, DMA_32BIT_MASK)) |
911 | return -EINVAL; | 912 | return -EINVAL; |
912 | 913 | ||
913 | base_addr0_phys = pci_resource_start(pDev,0); | 914 | base_addr0_phys = pci_resource_start(pDev,0); |
diff --git a/drivers/scsi/eata.c b/drivers/scsi/eata.c index b3f9de8f7595..059eeee4b554 100644 --- a/drivers/scsi/eata.c +++ b/drivers/scsi/eata.c | |||
@@ -490,6 +490,7 @@ | |||
490 | #include <linux/init.h> | 490 | #include <linux/init.h> |
491 | #include <linux/ctype.h> | 491 | #include <linux/ctype.h> |
492 | #include <linux/spinlock.h> | 492 | #include <linux/spinlock.h> |
493 | #include <linux/dma-mapping.h> | ||
493 | #include <asm/byteorder.h> | 494 | #include <asm/byteorder.h> |
494 | #include <asm/dma.h> | 495 | #include <asm/dma.h> |
495 | #include <asm/io.h> | 496 | #include <asm/io.h> |
@@ -1426,7 +1427,7 @@ static int port_detect(unsigned long port_base, unsigned int j, | |||
1426 | 1427 | ||
1427 | if (ha->pdev) { | 1428 | if (ha->pdev) { |
1428 | pci_set_master(ha->pdev); | 1429 | pci_set_master(ha->pdev); |
1429 | if (pci_set_dma_mask(ha->pdev, 0xffffffff)) | 1430 | if (pci_set_dma_mask(ha->pdev, DMA_32BIT_MASK)) |
1430 | printk("%s: warning, pci_set_dma_mask failed.\n", | 1431 | printk("%s: warning, pci_set_dma_mask failed.\n", |
1431 | ha->board_name); | 1432 | ha->board_name); |
1432 | } | 1433 | } |
diff --git a/drivers/scsi/gdth.c b/drivers/scsi/gdth.c index 7f7013e80a88..d5740bbdef3e 100644 --- a/drivers/scsi/gdth.c +++ b/drivers/scsi/gdth.c | |||
@@ -388,6 +388,7 @@ | |||
388 | #include <linux/proc_fs.h> | 388 | #include <linux/proc_fs.h> |
389 | #include <linux/time.h> | 389 | #include <linux/time.h> |
390 | #include <linux/timer.h> | 390 | #include <linux/timer.h> |
391 | #include <linux/dma-mapping.h> | ||
391 | #ifdef GDTH_RTC | 392 | #ifdef GDTH_RTC |
392 | #include <linux/mc146818rtc.h> | 393 | #include <linux/mc146818rtc.h> |
393 | #endif | 394 | #endif |
@@ -4527,15 +4528,15 @@ static int __init gdth_detect(struct scsi_host_template *shtp) | |||
4527 | if (!(ha->cache_feat & ha->raw_feat & ha->screen_feat &GDT_64BIT)|| | 4528 | if (!(ha->cache_feat & ha->raw_feat & ha->screen_feat &GDT_64BIT)|| |
4528 | /* 64-bit DMA only supported from FW >= x.43 */ | 4529 | /* 64-bit DMA only supported from FW >= x.43 */ |
4529 | (!ha->dma64_support)) { | 4530 | (!ha->dma64_support)) { |
4530 | if (pci_set_dma_mask(pcistr[ctr].pdev, 0xffffffff)) { | 4531 | if (pci_set_dma_mask(pcistr[ctr].pdev, DMA_32BIT_MASK)) { |
4531 | printk(KERN_WARNING "GDT-PCI %d: Unable to set 32-bit DMA\n", hanum); | 4532 | printk(KERN_WARNING "GDT-PCI %d: Unable to set 32-bit DMA\n", hanum); |
4532 | err = TRUE; | 4533 | err = TRUE; |
4533 | } | 4534 | } |
4534 | } else { | 4535 | } else { |
4535 | shp->max_cmd_len = 16; | 4536 | shp->max_cmd_len = 16; |
4536 | if (!pci_set_dma_mask(pcistr[ctr].pdev, 0xffffffffffffffffULL)) { | 4537 | if (!pci_set_dma_mask(pcistr[ctr].pdev, DMA_64BIT_MASK)) { |
4537 | printk("GDT-PCI %d: 64-bit DMA enabled\n", hanum); | 4538 | printk("GDT-PCI %d: 64-bit DMA enabled\n", hanum); |
4538 | } else if (pci_set_dma_mask(pcistr[ctr].pdev, 0xffffffff)) { | 4539 | } else if (pci_set_dma_mask(pcistr[ctr].pdev, DMA_32BIT_MASK)) { |
4539 | printk(KERN_WARNING "GDT-PCI %d: Unable to set 64/32-bit DMA\n", hanum); | 4540 | printk(KERN_WARNING "GDT-PCI %d: Unable to set 64/32-bit DMA\n", hanum); |
4540 | err = TRUE; | 4541 | err = TRUE; |
4541 | } | 4542 | } |
diff --git a/drivers/scsi/initio.c b/drivers/scsi/initio.c index ea6f3c0e05d9..0cc7f65b584f 100644 --- a/drivers/scsi/initio.c +++ b/drivers/scsi/initio.c | |||
@@ -127,6 +127,7 @@ | |||
127 | #include <linux/sched.h> | 127 | #include <linux/sched.h> |
128 | #include <linux/slab.h> | 128 | #include <linux/slab.h> |
129 | #include <linux/jiffies.h> | 129 | #include <linux/jiffies.h> |
130 | #include <linux/dma-mapping.h> | ||
130 | #include <asm/io.h> | 131 | #include <asm/io.h> |
131 | 132 | ||
132 | #include <scsi/scsi.h> | 133 | #include <scsi/scsi.h> |
@@ -2780,7 +2781,7 @@ static int tul_NewReturnNumberOfAdapters(void) | |||
2780 | if (((dRegValue & 0xFF00) >> 8) == 0xFF) | 2781 | if (((dRegValue & 0xFF00) >> 8) == 0xFF) |
2781 | dRegValue = 0; | 2782 | dRegValue = 0; |
2782 | wBIOS = (wBIOS << 8) + ((UWORD) ((dRegValue & 0xFF00) >> 8)); | 2783 | wBIOS = (wBIOS << 8) + ((UWORD) ((dRegValue & 0xFF00) >> 8)); |
2783 | if (pci_set_dma_mask(pDev, 0xffffffff)) { | 2784 | if (pci_set_dma_mask(pDev, DMA_32BIT_MASK)) { |
2784 | printk(KERN_WARNING | 2785 | printk(KERN_WARNING |
2785 | "i91u: Could not set 32 bit DMA mask\n"); | 2786 | "i91u: Could not set 32 bit DMA mask\n"); |
2786 | continue; | 2787 | continue; |
diff --git a/drivers/scsi/ips.c b/drivers/scsi/ips.c index 481708d527ae..a4c0b04cfdbd 100644 --- a/drivers/scsi/ips.c +++ b/drivers/scsi/ips.c | |||
@@ -179,6 +179,7 @@ | |||
179 | 179 | ||
180 | #include <linux/blkdev.h> | 180 | #include <linux/blkdev.h> |
181 | #include <linux/types.h> | 181 | #include <linux/types.h> |
182 | #include <linux/dma-mapping.h> | ||
182 | 183 | ||
183 | #include <scsi/sg.h> | 184 | #include <scsi/sg.h> |
184 | 185 | ||
@@ -7284,10 +7285,10 @@ ips_init_phase1(struct pci_dev *pci_dev, int *indexPtr) | |||
7284 | * are guaranteed to be < 4G. | 7285 | * are guaranteed to be < 4G. |
7285 | */ | 7286 | */ |
7286 | if (IPS_ENABLE_DMA64 && IPS_HAS_ENH_SGLIST(ha) && | 7287 | if (IPS_ENABLE_DMA64 && IPS_HAS_ENH_SGLIST(ha) && |
7287 | !pci_set_dma_mask(ha->pcidev, 0xffffffffffffffffULL)) { | 7288 | !pci_set_dma_mask(ha->pcidev, DMA_64BIT_MASK)) { |
7288 | (ha)->flags |= IPS_HA_ENH_SG; | 7289 | (ha)->flags |= IPS_HA_ENH_SG; |
7289 | } else { | 7290 | } else { |
7290 | if (pci_set_dma_mask(ha->pcidev, 0xffffffffULL) != 0) { | 7291 | if (pci_set_dma_mask(ha->pcidev, DMA_32BIT_MASK) != 0) { |
7291 | printk(KERN_WARNING "Unable to set DMA Mask\n"); | 7292 | printk(KERN_WARNING "Unable to set DMA Mask\n"); |
7292 | return ips_abort_init(ha, index); | 7293 | return ips_abort_init(ha, index); |
7293 | } | 7294 | } |
diff --git a/drivers/scsi/megaraid.c b/drivers/scsi/megaraid.c index 7144674bc8e6..80b68a2481b3 100644 --- a/drivers/scsi/megaraid.c +++ b/drivers/scsi/megaraid.c | |||
@@ -45,6 +45,7 @@ | |||
45 | #include <linux/interrupt.h> | 45 | #include <linux/interrupt.h> |
46 | #include <linux/pci.h> | 46 | #include <linux/pci.h> |
47 | #include <linux/init.h> | 47 | #include <linux/init.h> |
48 | #include <linux/dma-mapping.h> | ||
48 | #include <scsi/scsicam.h> | 49 | #include <scsi/scsicam.h> |
49 | 50 | ||
50 | #include "scsi.h" | 51 | #include "scsi.h" |
@@ -2094,7 +2095,7 @@ make_local_pdev(adapter_t *adapter, struct pci_dev **pdev) | |||
2094 | 2095 | ||
2095 | memcpy(*pdev, adapter->dev, sizeof(struct pci_dev)); | 2096 | memcpy(*pdev, adapter->dev, sizeof(struct pci_dev)); |
2096 | 2097 | ||
2097 | if( pci_set_dma_mask(*pdev, 0xffffffff) != 0 ) { | 2098 | if( pci_set_dma_mask(*pdev, DMA_32BIT_MASK) != 0 ) { |
2098 | kfree(*pdev); | 2099 | kfree(*pdev); |
2099 | return -1; | 2100 | return -1; |
2100 | } | 2101 | } |
@@ -4859,10 +4860,10 @@ megaraid_probe_one(struct pci_dev *pdev, const struct pci_device_id *id) | |||
4859 | 4860 | ||
4860 | /* Set the Mode of addressing to 64 bit if we can */ | 4861 | /* Set the Mode of addressing to 64 bit if we can */ |
4861 | if ((adapter->flag & BOARD_64BIT) && (sizeof(dma_addr_t) == 8)) { | 4862 | if ((adapter->flag & BOARD_64BIT) && (sizeof(dma_addr_t) == 8)) { |
4862 | pci_set_dma_mask(pdev, 0xffffffffffffffffULL); | 4863 | pci_set_dma_mask(pdev, DMA_64BIT_MASK); |
4863 | adapter->has_64bit_addr = 1; | 4864 | adapter->has_64bit_addr = 1; |
4864 | } else { | 4865 | } else { |
4865 | pci_set_dma_mask(pdev, 0xffffffff); | 4866 | pci_set_dma_mask(pdev, DMA_32BIT_MASK); |
4866 | adapter->has_64bit_addr = 0; | 4867 | adapter->has_64bit_addr = 0; |
4867 | } | 4868 | } |
4868 | 4869 | ||
diff --git a/drivers/scsi/nsp32.c b/drivers/scsi/nsp32.c index a279ebb61447..30ee0ef4b459 100644 --- a/drivers/scsi/nsp32.c +++ b/drivers/scsi/nsp32.c | |||
@@ -38,6 +38,7 @@ | |||
38 | #include <linux/pci.h> | 38 | #include <linux/pci.h> |
39 | #include <linux/delay.h> | 39 | #include <linux/delay.h> |
40 | #include <linux/ctype.h> | 40 | #include <linux/ctype.h> |
41 | #include <linux/dma-mapping.h> | ||
41 | 42 | ||
42 | #include <asm/dma.h> | 43 | #include <asm/dma.h> |
43 | #include <asm/system.h> | 44 | #include <asm/system.h> |
@@ -2776,7 +2777,7 @@ static int nsp32_detect(struct scsi_host_template *sht) | |||
2776 | /* | 2777 | /* |
2777 | * setup DMA | 2778 | * setup DMA |
2778 | */ | 2779 | */ |
2779 | if (pci_set_dma_mask(PCIDEV, 0xffffffffUL) != 0) { | 2780 | if (pci_set_dma_mask(PCIDEV, DMA_32BIT_MASK) != 0) { |
2780 | nsp32_msg (KERN_ERR, "failed to set PCI DMA mask"); | 2781 | nsp32_msg (KERN_ERR, "failed to set PCI DMA mask"); |
2781 | goto scsi_unregister; | 2782 | goto scsi_unregister; |
2782 | } | 2783 | } |
diff --git a/drivers/scsi/qla1280.c b/drivers/scsi/qla1280.c index e0230249fa0f..5a48e55f9418 100644 --- a/drivers/scsi/qla1280.c +++ b/drivers/scsi/qla1280.c | |||
@@ -350,6 +350,7 @@ | |||
350 | #include <linux/pci_ids.h> | 350 | #include <linux/pci_ids.h> |
351 | #include <linux/interrupt.h> | 351 | #include <linux/interrupt.h> |
352 | #include <linux/init.h> | 352 | #include <linux/init.h> |
353 | #include <linux/dma-mapping.h> | ||
353 | 354 | ||
354 | #include <asm/io.h> | 355 | #include <asm/io.h> |
355 | #include <asm/irq.h> | 356 | #include <asm/irq.h> |
@@ -4321,7 +4322,7 @@ qla1280_probe_one(struct pci_dev *pdev, const struct pci_device_id *id) | |||
4321 | 4322 | ||
4322 | #ifdef QLA_64BIT_PTR | 4323 | #ifdef QLA_64BIT_PTR |
4323 | if (pci_set_dma_mask(ha->pdev, (dma_addr_t) ~ 0ULL)) { | 4324 | if (pci_set_dma_mask(ha->pdev, (dma_addr_t) ~ 0ULL)) { |
4324 | if (pci_set_dma_mask(ha->pdev, 0xffffffff)) { | 4325 | if (pci_set_dma_mask(ha->pdev, DMA_32BIT_MASK)) { |
4325 | printk(KERN_WARNING "scsi(%li): Unable to set a " | 4326 | printk(KERN_WARNING "scsi(%li): Unable to set a " |
4326 | "suitable DMA mask - aborting\n", ha->host_no); | 4327 | "suitable DMA mask - aborting\n", ha->host_no); |
4327 | error = -ENODEV; | 4328 | error = -ENODEV; |
@@ -4331,7 +4332,7 @@ qla1280_probe_one(struct pci_dev *pdev, const struct pci_device_id *id) | |||
4331 | dprintk(2, "scsi(%li): 64 Bit PCI Addressing Enabled\n", | 4332 | dprintk(2, "scsi(%li): 64 Bit PCI Addressing Enabled\n", |
4332 | ha->host_no); | 4333 | ha->host_no); |
4333 | #else | 4334 | #else |
4334 | if (pci_set_dma_mask(ha->pdev, 0xffffffff)) { | 4335 | if (pci_set_dma_mask(ha->pdev, DMA_32BIT_MASK)) { |
4335 | printk(KERN_WARNING "scsi(%li): Unable to set a " | 4336 | printk(KERN_WARNING "scsi(%li): Unable to set a " |
4336 | "suitable DMA mask - aborting\n", ha->host_no); | 4337 | "suitable DMA mask - aborting\n", ha->host_no); |
4337 | error = -ENODEV; | 4338 | error = -ENODEV; |
diff --git a/drivers/scsi/qlogicfc.c b/drivers/scsi/qlogicfc.c index 5b15998c71a6..52b224a5d6fd 100644 --- a/drivers/scsi/qlogicfc.c +++ b/drivers/scsi/qlogicfc.c | |||
@@ -61,6 +61,7 @@ | |||
61 | #include <linux/unistd.h> | 61 | #include <linux/unistd.h> |
62 | #include <linux/spinlock.h> | 62 | #include <linux/spinlock.h> |
63 | #include <linux/interrupt.h> | 63 | #include <linux/interrupt.h> |
64 | #include <linux/dma-mapping.h> | ||
64 | #include <linux/jiffies.h> | 65 | #include <linux/jiffies.h> |
65 | #include <asm/io.h> | 66 | #include <asm/io.h> |
66 | #include <asm/irq.h> | 67 | #include <asm/irq.h> |
@@ -738,8 +739,8 @@ static int isp2x00_detect(struct scsi_host_template * tmpt) | |||
738 | continue; | 739 | continue; |
739 | 740 | ||
740 | /* Try to configure DMA attributes. */ | 741 | /* Try to configure DMA attributes. */ |
741 | if (pci_set_dma_mask(pdev, 0xffffffffffffffffULL) && | 742 | if (pci_set_dma_mask(pdev, DMA_64BIT_MASK) && |
742 | pci_set_dma_mask(pdev, 0xffffffffULL)) | 743 | pci_set_dma_mask(pdev, DMA_32BIT_MASK)) |
743 | continue; | 744 | continue; |
744 | 745 | ||
745 | host = scsi_register(tmpt, sizeof(struct isp2x00_hostdata)); | 746 | host = scsi_register(tmpt, sizeof(struct isp2x00_hostdata)); |