]> err.no Git - linux-2.6/blobdiff - drivers/ata/pata_acpi.c
Merge git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6
[linux-2.6] / drivers / ata / pata_acpi.c
index a4737a3d31cbd67c12249dfbe596a0d7e35f1350..bdc3b9d7395c9ff0481dee0aa5a27d7d039e2b17 100644 (file)
@@ -77,8 +77,8 @@ static int pacpi_cable_detect(struct ata_port *ap)
 
 static void pacpi_error_handler(struct ata_port *ap)
 {
-       return ata_bmdma_drive_eh(ap, pacpi_pre_reset, ata_std_softreset,
-                                 NULL, ata_std_postreset);
+       ata_bmdma_drive_eh(ap, pacpi_pre_reset, ata_std_softreset, NULL,
+                          ata_std_postreset);
 }
 
 /**
@@ -133,13 +133,14 @@ static void pacpi_set_piomode(struct ata_port *ap, struct ata_device *adev)
 {
        int unit = adev->devno;
        struct pata_acpi *acpi = ap->private_data;
+       const struct ata_timing *t;
 
        if (!(acpi->gtm.flags & 0x10))
                unit = 0;
 
        /* Now stuff the nS values into the structure */
-       acpi->gtm.drive[unit].pio =
-               ata_acpi_pio_cycle[adev->pio_mode - XFER_PIO_0];
+       t = ata_timing_find_mode(adev->pio_mode);
+       acpi->gtm.drive[unit].pio = t->cycle;
        ata_acpi_stm(ap, &acpi->gtm);
        /* See what mode we actually got */
        ata_acpi_gtm(ap, &acpi->gtm);
@@ -155,18 +156,18 @@ static void pacpi_set_dmamode(struct ata_port *ap, struct ata_device *adev)
 {
        int unit = adev->devno;
        struct pata_acpi *acpi = ap->private_data;
+       const struct ata_timing *t;
 
        if (!(acpi->gtm.flags & 0x10))
                unit = 0;
 
        /* Now stuff the nS values into the structure */
+       t = ata_timing_find_mode(adev->dma_mode);
        if (adev->dma_mode >= XFER_UDMA_0) {
-               acpi->gtm.drive[unit].dma =
-                       ata_acpi_udma_cycle[adev->dma_mode - XFER_UDMA_0];
+               acpi->gtm.drive[unit].dma = t->udma;
                acpi->gtm.flags |= (1 << (2 * unit));
        } else {
-               acpi->gtm.drive[unit].dma =
-                       ata_acpi_mwdma_cycle[adev->dma_mode - XFER_MW_DMA_0];
+               acpi->gtm.drive[unit].dma = t->cycle;
                acpi->gtm.flags &= ~(1 << (2 * unit));
        }
        ata_acpi_stm(ap, &acpi->gtm);