patch-2.4.0-test2 linux/drivers/net/fc/iph5526.c

Next file: linux/drivers/net/fmv18x.c
Previous file: linux/drivers/net/eth16i.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.4.0-test1/linux/drivers/net/fc/iph5526.c linux/drivers/net/fc/iph5526.c
@@ -3771,7 +3771,9 @@
 
 	for (i = 0; i < clone_list[i].vendor_id != 0; i++)
 	while ((pdev = pci_find_device(clone_list[i].vendor_id, clone_list[i].device_id, pdev))) {
-	unsigned short pci_command;
+		unsigned short pci_command;
+		if (pci_enable_device(pdev))
+			continue;
 		if (count < MAX_FC_CARDS) {
 			fc[count] = kmalloc(sizeof(struct fc_info), GFP_ATOMIC);
 			if (fc[count] == NULL) {
@@ -3800,8 +3802,8 @@
 		host->hostt->use_new_eh_code = 1;
 		host->this_id = tmpt->this_id;
 
-		pci_maddr = pdev->resource[0].start;
-		if ( (pdev->resource[0].flags & PCI_BASE_ADDRESS_SPACE) != PCI_BASE_ADDRESS_SPACE_MEMORY) {
+		pci_maddr = pci_resource_start(pdev, 0);
+		if (pci_resource_flags(pdev, 0) & IORESOURCE_IO) {
 			printk("iph5526.c : Cannot find proper PCI device base address.\n");
 			scsi_unregister(host);
 			kfree(fc[count]);

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