]> err.no Git - linux-2.6/blobdiff - drivers/scsi/ahci.c
Merge git://git.skbuff.net/gitroot/yoshfuji/linux-2.6-git-rfc3542
[linux-2.6] / drivers / scsi / ahci.c
index 4cfb257a0f67b8b00a946d4e919f9298c6c6b176..320df6cd3defd6195ffd3eb759ac11906b377586 100644 (file)
@@ -250,7 +250,7 @@ static struct ata_port_info ahci_port_info[] = {
                .host_flags     = ATA_FLAG_SATA | ATA_FLAG_NO_LEGACY |
                                  ATA_FLAG_SATA_RESET | ATA_FLAG_MMIO |
                                  ATA_FLAG_PIO_DMA,
-               .pio_mask       = 0x03, /* pio3-4 */
+               .pio_mask       = 0x1f, /* pio0-4 */
                .udma_mask      = 0x7f, /* udma0-6 ; FIXME */
                .port_ops       = &ahci_ops,
        },
@@ -995,8 +995,7 @@ static int ahci_init_one (struct pci_dev *pdev, const struct pci_device_id *ent)
        probe_ent->dev = pci_dev_to_dev(pdev);
        INIT_LIST_HEAD(&probe_ent->node);
 
-       mmio_base = ioremap(pci_resource_start(pdev, AHCI_PCI_BAR),
-                           pci_resource_len(pdev, AHCI_PCI_BAR));
+       mmio_base = pci_iomap(pdev, AHCI_PCI_BAR, 0);
        if (mmio_base == NULL) {
                rc = -ENOMEM;
                goto err_out_free_ent;
@@ -1040,7 +1039,7 @@ static int ahci_init_one (struct pci_dev *pdev, const struct pci_device_id *ent)
 err_out_hpriv:
        kfree(hpriv);
 err_out_iounmap:
-       iounmap(mmio_base);
+       pci_iounmap(pdev, mmio_base);
 err_out_free_ent:
        kfree(probe_ent);
 err_out_msi:
@@ -1081,7 +1080,7 @@ static void ahci_remove_one (struct pci_dev *pdev)
        }
 
        kfree(hpriv);
-       iounmap(host_set->mmio_base);
+       pci_iounmap(pdev, host_set->mmio_base);
        kfree(host_set);
 
        if (have_msi)