patch-2.4.0-test2 linux/drivers/scsi/advansys.c

Next file: linux/drivers/scsi/aha152x.c
Previous file: linux/drivers/scsi/README.ncr53c8xx
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.4.0-test1/linux/drivers/scsi/advansys.c linux/drivers/scsi/advansys.c
@@ -4699,7 +4699,8 @@
                             NULL) {
                             pci_device_id_cnt++;
                         } else {
-                            pci_devicep[pci_card_cnt_max++] = pci_devp;
+			    if (pci_enable_device(pci_devp) == 0)
+                            	pci_devicep[pci_card_cnt_max++] = pci_devp;
                         }
                     }
 
@@ -4739,7 +4740,7 @@
 #if LINUX_VERSION_CODE < ASC_LINUX_VERSION(2,3,13)
                     iop = pci_devp->base_address[0] & PCI_IOADDRESS_MASK;
 #else /* version >= v2.3.13 */ 
-                    iop = pci_devp->resource[0].start & PCI_IOADDRESS_MASK;
+                    iop = pci_resource_start(pci_devp, 0);
 #endif /* version >= v2.3.13 */ 
                     ASC_DBG2(1,
                         "advansys_detect: vendorID %X, deviceID %X\n",
@@ -4900,7 +4901,7 @@
 #if LINUX_VERSION_CODE < ASC_LINUX_VERSION(2,3,13)
                 pci_memory_address = pci_devp->base_address[1];
 #else /* version >= v2.3.13 */ 
-                pci_memory_address = pci_devp->resource[1].start;
+                pci_memory_address = pci_resource_start(pci_devp, 1);
 #endif /* version >= v2.3.13 */ 
                 ASC_DBG1(1, "advansys_detect: pci_memory_address: %x\n",
                     pci_memory_address);

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