aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi
diff options
context:
space:
mode:
authorMatthias Gehre <M.Gehre@gmx.de>2006-03-28 04:56:48 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2006-03-28 12:16:07 -0500
commit910638ae7ed4be27d6af55f6c9b5bf54b838e78b (patch)
tree5eda3cfd0e312c8b0916f6d5eb1cd98225e67891 /drivers/scsi
parent60c904ae5bded8bb71f7bff7d63f2a6959d2a8e4 (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/scsi')
-rw-r--r--drivers/scsi/BusLogic.c7
-rw-r--r--drivers/scsi/a100u2w.c3
-rw-r--r--drivers/scsi/aacraid/aachba.c1
-rw-r--r--drivers/scsi/aacraid/linit.c5
-rw-r--r--drivers/scsi/atp870u.c3
-rw-r--r--drivers/scsi/dpt_i2o.c5
-rw-r--r--drivers/scsi/eata.c3
-rw-r--r--drivers/scsi/gdth.c7
-rw-r--r--drivers/scsi/initio.c3
-rw-r--r--drivers/scsi/ips.c5
-rw-r--r--drivers/scsi/megaraid.c7
-rw-r--r--drivers/scsi/nsp32.c3
-rw-r--r--drivers/scsi/qla1280.c5
-rw-r--r--drivers/scsi/qlogicfc.c5
14 files changed, 38 insertions, 24 deletions
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));