patch-2.3.14 linux/drivers/scsi/BusLogic.c

Next file: linux/drivers/scsi/Makefile
Previous file: linux/drivers/scsi/53c7xx.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.3.13/linux/drivers/scsi/BusLogic.c linux/drivers/scsi/BusLogic.c
@@ -783,12 +783,10 @@
       unsigned int IRQ_Channel = PCI_Device->irq;
       unsigned long BaseAddress0 = PCI_Device->resource[0].start;
       unsigned long BaseAddress1 = PCI_Device->resource[1].start;
-      BusLogic_IO_Address_T IO_Address =
-	BaseAddress0 & PCI_BASE_ADDRESS_IO_MASK;
-      BusLogic_PCI_Address_T PCI_Address =
-	BaseAddress1 & PCI_BASE_ADDRESS_MEM_MASK;
-      if ((BaseAddress0 & PCI_BASE_ADDRESS_SPACE)
-	  != PCI_BASE_ADDRESS_SPACE_IO)
+      BusLogic_IO_Address_T IO_Address = BaseAddress0;
+      BusLogic_PCI_Address_T PCI_Address = BaseAddress1;
+      
+      if (!(PCI_Device->resource[0].flags & PCI_BASE_ADDRESS_SPACE_IO))
 	{
 	  BusLogic_Error("BusLogic: Base Address0 0x%X not I/O for "
 			 "MultiMaster Host Adapter\n", NULL, BaseAddress0);
@@ -796,8 +794,7 @@
 			 NULL, Bus, Device, IO_Address);
 	  continue;
 	}
-      if ((BaseAddress1 & PCI_BASE_ADDRESS_SPACE)
-	  != PCI_BASE_ADDRESS_SPACE_MEMORY)
+      if (PCI_Device->resource[1].flags & PCI_BASE_ADDRESS_SPACE_IO)
 	{
 	  BusLogic_Error("BusLogic: Base Address1 0x%X not Memory for "
 			 "MultiMaster Host Adapter\n", NULL, BaseAddress1);
@@ -986,8 +983,8 @@
       unsigned char Bus = PCI_Device->bus->number;
       unsigned char Device = PCI_Device->devfn >> 3;
       unsigned int IRQ_Channel = PCI_Device->irq;
-      BusLogic_IO_Address_T IO_Address =
-	PCI_Device->resource[0].start & PCI_BASE_ADDRESS_IO_MASK;
+      BusLogic_IO_Address_T IO_Address = PCI_Device->resource[0].start;
+
       if (IO_Address == 0 || IRQ_Channel == 0) continue;
       for (i = 0; i < BusLogic_ProbeInfoCount; i++)
 	{
@@ -1032,13 +1029,10 @@
       unsigned int IRQ_Channel = PCI_Device->irq;
       unsigned long BaseAddress0 = PCI_Device->resource[0].start;
       unsigned long BaseAddress1 = PCI_Device->resource[1].start;
-      BusLogic_IO_Address_T IO_Address =
-	BaseAddress0 & PCI_BASE_ADDRESS_IO_MASK;
-      BusLogic_PCI_Address_T PCI_Address =
-	BaseAddress1 & PCI_BASE_ADDRESS_MEM_MASK;
+      BusLogic_IO_Address_T IO_Address = BaseAddress0;
+      BusLogic_PCI_Address_T PCI_Address = BaseAddress1;
 #ifndef CONFIG_SCSI_OMIT_FLASHPOINT
-      if ((BaseAddress0 & PCI_BASE_ADDRESS_SPACE)
-	  != PCI_BASE_ADDRESS_SPACE_IO)
+      if (!(PCI_Device->resource[0].flags & PCI_BASE_ADDRESS_SPACE_IO))
 	{
 	  BusLogic_Error("BusLogic: Base Address0 0x%X not I/O for "
 			 "FlashPoint Host Adapter\n", NULL, BaseAddress0);
@@ -1046,8 +1040,7 @@
 			 NULL, Bus, Device, IO_Address);
 	  continue;
 	}
-      if ((BaseAddress1 & PCI_BASE_ADDRESS_SPACE)
-	  != PCI_BASE_ADDRESS_SPACE_MEMORY)
+      if (PCI_Device->resource[1].flags & PCI_BASE_ADDRESS_SPACE_IO)
 	{
 	  BusLogic_Error("BusLogic: Base Address1 0x%X not Memory for "
 			 "FlashPoint Host Adapter\n", NULL, BaseAddress1);

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)