[PATCH 09/86] pata_atiixp: no need to program PIO timings for MWDMA

From: Bartlomiej Zolnierkiewicz
Date: Wed Nov 25 2009 - 12:04:15 EST


From: Bartlomiej Zolnierkiewicz <bzolnier@xxxxxxxxx>
Subject: [PATCH] pata_atiixp: no need to program PIO timings for MWDMA

Moreover the code to do it was buggy and programmed PIO timings
even if they were already set to a desired values.

There shouldn't be any problems with it as IDE atiixp host driver
has been allowing separate PIO/MWDMA timings for last two years.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@xxxxxxxxx>
---
drivers/ata/pata_atiixp.c | 15 ---------------
1 file changed, 15 deletions(-)

Index: b/drivers/ata/pata_atiixp.c
===================================================================
--- a/drivers/ata/pata_atiixp.c
+++ b/drivers/ata/pata_atiixp.c
@@ -107,7 +107,6 @@ static void atiixp_set_dmamode(struct at
struct pci_dev *pdev = to_pci_dev(ap->host->dev);
int dma = adev->dma_mode;
int dn = 2 * ap->port_no + adev->devno;
- int wanted_pio;

if (adev->dma_mode >= XFER_UDMA_0) {
u16 udma_mode_data;
@@ -131,20 +130,6 @@ static void atiixp_set_dmamode(struct at
pci_write_config_dword(pdev, ATIIXP_IDE_MWDMA_TIMING,
mwdma_timing_data);
}
- /*
- * We must now look at the PIO mode situation. We may need to
- * adjust the PIO mode to keep the timings acceptable
- */
- if (adev->dma_mode >= XFER_MW_DMA_2)
- wanted_pio = 4;
- else if (adev->dma_mode == XFER_MW_DMA_1)
- wanted_pio = 3;
- else if (adev->dma_mode == XFER_MW_DMA_0)
- wanted_pio = 0;
- else BUG();
-
- if (adev->pio_mode != wanted_pio)
- atiixp_set_pio_timing(ap, adev, wanted_pio);
}

/**
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/