ide: ide_timing_compute() fixup
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Tue, 19 Jan 2010 19:30:09 +0000 (11:30 -0800)
committerDavid S. Miller <davem@davemloft.net>
Tue, 19 Jan 2010 19:30:09 +0000 (11:30 -0800)
XFER_SW_DMA_0 mode should be excluded from the extended cycle
timing computations.

[ This is just a documentation fix -- code inside the affected
  'if' block already makes sure to accept only PIO modes. ]

Noticed-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/ide/ide-timings.c

index c7a65ee..0e05f75 100644 (file)
@@ -166,7 +166,7 @@ int ide_timing_compute(ide_drive_t *drive, u8 speed,
        if (id[ATA_ID_FIELD_VALID] & 2) {       /* EIDE drive */
                memset(&p, 0, sizeof(p));
 
-               if (speed >= XFER_PIO_0 && speed <= XFER_SW_DMA_0) {
+               if (speed >= XFER_PIO_0 && speed < XFER_SW_DMA_0) {
                        if (speed <= XFER_PIO_2)
                                p.cycle = p.cyc8b = id[ATA_ID_EIDE_PIO];
                        else if ((speed <= XFER_PIO_4) ||