Merge master.kernel.org:/pub/scm/linux/kernel/git/acme/net-2.6
[pandora-kernel.git] / drivers / ata / libata-sff.c
index 7605028..688bb55 100644 (file)
@@ -858,6 +858,7 @@ ata_pci_init_native_mode(struct pci_dev *pdev, struct ata_port_info **port, int
                        probe_ent->port[p].bmdma_addr = bmdma;
                }
                ata_std_ports(&probe_ent->port[p]);
+               probe_ent->pinfo2 = port[1];
                p++;
        }
 
@@ -907,6 +908,7 @@ static struct ata_probe_ent *ata_pci_init_legacy_port(struct pci_dev *pdev,
                                probe_ent->_host_flags |= ATA_HOST_SIMPLEX;
                }
                ata_std_ports(&probe_ent->port[1]);
+               probe_ent->pinfo2 = port[1];
        } else
                probe_ent->dummy_port_mask |= ATA_PORT_SECONDARY;
 
@@ -997,11 +999,16 @@ int ata_pci_init_one (struct pci_dev *pdev, struct ata_port_info **port_info,
                        res.start = ATA_PRIMARY_CMD;
                        res.end = ATA_PRIMARY_CMD + 8 - 1;
                        conflict = ____request_resource(&ioport_resource, &res);
+                       while (conflict->child)
+                               conflict = ____request_resource(conflict, &res);
                        if (!strcmp(conflict->name, "libata"))
                                legacy_mode |= ATA_PORT_PRIMARY;
                        else {
                                disable_dev_on_err = 0;
-                               printk(KERN_WARNING "ata: 0x%0X IDE port busy\n", ATA_PRIMARY_CMD);
+                               printk(KERN_WARNING "ata: 0x%0X IDE port busy\n" \
+                                                   "ata: conflict with %s\n",
+                                                   ATA_PRIMARY_CMD,
+                                                   conflict->name);
                        }
                } else
                        legacy_mode |= ATA_PORT_PRIMARY;
@@ -1011,11 +1018,16 @@ int ata_pci_init_one (struct pci_dev *pdev, struct ata_port_info **port_info,
                        res.start = ATA_SECONDARY_CMD;
                        res.end = ATA_SECONDARY_CMD + 8 - 1;
                        conflict = ____request_resource(&ioport_resource, &res);
+                       while (conflict->child)
+                               conflict = ____request_resource(conflict, &res);
                        if (!strcmp(conflict->name, "libata"))
                                legacy_mode |= ATA_PORT_SECONDARY;
                        else {
                                disable_dev_on_err = 0;
-                               printk(KERN_WARNING "ata: 0x%X IDE port busy\n", ATA_SECONDARY_CMD);
+                               printk(KERN_WARNING "ata: 0x%X IDE port busy\n" \
+                                                   "ata: conflict with %s\n",
+                                                   ATA_SECONDARY_CMD,
+                                                   conflict->name);
                        }
                } else
                        legacy_mode |= ATA_PORT_SECONDARY;