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

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

diff -u --recursive --new-file v2.4.0-test1/linux/drivers/scsi/qlogicisp.c linux/drivers/scsi/qlogicisp.c
@@ -678,6 +678,9 @@
 
 	while ((pdev = pci_find_device(PCI_VENDOR_ID_QLOGIC, PCI_DEVICE_ID_QLOGIC_ISP1020, pdev)))
 	{
+		if (pci_enable_device(pdev))
+			continue;
+
 		host = scsi_register(tmpt, sizeof(struct isp1020_hostdata));
 		hostdata = (struct isp1020_hostdata *) host->hostdata;
 
@@ -1371,10 +1374,10 @@
 		return 1;
 	}
 
-	io_base = pdev->resource[0].start;
-	mem_base = pdev->resource[1].start;
-	io_flags = pdev->resource[0].flags;
-	mem_flags = pdev->resource[1].flags;
+	io_base = pci_resource_start(pdev, 0);
+	mem_base = pci_resource_start(pdev, 1);
+	io_flags = pci_resource_flags(pdev, 0);
+	mem_flags = pci_resource_flags(pdev, 1);
 	irq = pdev->irq;
 
 	if (pdev->vendor != PCI_VENDOR_ID_QLOGIC) {

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