libata/IDE: remove combined mode quirk
[pandora-kernel.git] / drivers / ata / libata-sff.c
index 16bc3e3..0a19466 100644 (file)
@@ -175,7 +175,7 @@ void ata_tf_load(struct ata_port *ap, const struct ata_taskfile *tf)
  */
 void ata_exec_command(struct ata_port *ap, const struct ata_taskfile *tf)
 {
-       DPRINTK("ata%u: cmd 0x%X\n", ap->id, tf->command);
+       DPRINTK("ata%u: cmd 0x%X\n", ap->print_id, tf->command);
 
        iowrite8(tf->command, ap->ioaddr.command_addr);
        ata_pause(ap);
@@ -521,7 +521,7 @@ void ata_bmdma_post_internal_cmd(struct ata_queued_cmd *qc)
 static int ata_resources_present(struct pci_dev *pdev, int port)
 {
        int i;
-       
+
        /* Check the PCI resources for this channel are enabled */
        port = port * 2;
        for (i = 0; i < 2; i ++) {
@@ -531,7 +531,7 @@ static int ata_resources_present(struct pci_dev *pdev, int port)
        }
        return 1;
 }
-               
+
 /**
  *     ata_pci_init_native_mode - Initialize native-mode driver
  *     @pdev:  pci device to be initialized
@@ -576,7 +576,7 @@ ata_pci_init_native_mode(struct pci_dev *pdev, struct ata_port_info **port, int
 
        probe_ent->irq = pdev->irq;
        probe_ent->irq_flags = IRQF_SHARED;
-       
+
        /* Discard disabled ports. Some controllers show their
           unused channels this way */
        if (ata_resources_present(pdev, 0) == 0)
@@ -779,40 +779,16 @@ int ata_pci_init_one (struct pci_dev *pdev, struct ata_port_info **port_info,
                /* Deal with combined mode hack. This side of the logic all
                   goes away once the combined mode hack is killed in 2.6.21 */
                if (!devm_request_region(dev, ATA_PRIMARY_CMD, 8, "libata")) {
-                       struct resource *conflict, res;
-                       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 {
-                               pcim_pin_device(pdev);
-                               printk(KERN_WARNING "ata: 0x%0X IDE port busy\n" \
-                                                   "ata: conflict with %s\n",
-                                                   ATA_PRIMARY_CMD,
-                                                   conflict->name);
-                       }
+                       pcim_pin_device(pdev);
+                       printk(KERN_WARNING "ata: 0x%0X IDE port busy\n",
+                                           ATA_PRIMARY_CMD);
                } else
                        legacy_mode |= ATA_PORT_PRIMARY;
 
                if (!devm_request_region(dev, ATA_SECONDARY_CMD, 8, "libata")) {
-                       struct resource *conflict, res;
-                       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 {
-                               pcim_pin_device(pdev);
-                               printk(KERN_WARNING "ata: 0x%X IDE port busy\n" \
-                                                   "ata: conflict with %s\n",
-                                                   ATA_SECONDARY_CMD,
-                                                   conflict->name);
-                       }
+                       pcim_pin_device(pdev);
+                       printk(KERN_WARNING "ata: 0x%X IDE port busy\n",
+                                           ATA_SECONDARY_CMD);
                } else
                        legacy_mode |= ATA_PORT_SECONDARY;
 
@@ -893,12 +869,12 @@ int ata_pci_clear_simplex(struct pci_dev *pdev)
        return 0;
 }
 
-unsigned long ata_pci_default_filter(const struct ata_port *ap, struct ata_device *adev, unsigned long xfer_mask)
+unsigned long ata_pci_default_filter(struct ata_device *adev, unsigned long xfer_mask)
 {
        /* Filter out DMA modes if the device has been configured by
           the BIOS as PIO only */
 
-       if (ap->ioaddr.bmdma_addr == 0)
+       if (adev->ap->ioaddr.bmdma_addr == 0)
                xfer_mask &= ~(ATA_MASK_MWDMA | ATA_MASK_UDMA);
        return xfer_mask;
 }