aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2011-10-13 09:17:32 -0400
committerJeff Garzik <jgarzik@redhat.com>2011-10-14 13:21:54 -0400
commitbff00256f1b2d762dea3d6c2c9dc85d453fa3e8f (patch)
tree5b1710ddc971faa4c27fa898434800bdfa8faaac /drivers
parent9f8abf8248f8b90532a201845654d467f4388474 (diff)
libata: ata_timing_compute() fixup
XFER_SW_DMA_0 mode should be excluded from the extended cycle timing computations. Acked-by: Alan Cox <alan@linux.intel.com> Noticed-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/ata/libata-core.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c
index 4a3a5ae7bb45..32fc41c1da30 100644
--- a/drivers/ata/libata-core.c
+++ b/drivers/ata/libata-core.c
@@ -2938,7 +2938,7 @@ int ata_timing_compute(struct ata_device *adev, unsigned short speed,
2938 if (id[ATA_ID_FIELD_VALID] & 2) { /* EIDE drive */ 2938 if (id[ATA_ID_FIELD_VALID] & 2) { /* EIDE drive */
2939 memset(&p, 0, sizeof(p)); 2939 memset(&p, 0, sizeof(p));
2940 2940
2941 if (speed >= XFER_PIO_0 && speed <= XFER_SW_DMA_0) { 2941 if (speed >= XFER_PIO_0 && speed < XFER_SW_DMA_0) {
2942 if (speed <= XFER_PIO_2) 2942 if (speed <= XFER_PIO_2)
2943 p.cycle = p.cyc8b = id[ATA_ID_EIDE_PIO]; 2943 p.cycle = p.cyc8b = id[ATA_ID_EIDE_PIO];
2944 else if ((speed <= XFER_PIO_4) || 2944 else if ((speed <= XFER_PIO_4) ||