cs5536: use ->pio_mode value to determine pair device speed
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Mon, 18 Jan 2010 07:21:55 +0000 (07:21 +0000)
committerDavid S. Miller <davem@davemloft.net>
Tue, 19 Jan 2010 09:52:33 +0000 (01:52 -0800)
Use the current PIO mode value instead of the physical maximum one
of the pair device on the port to determine PIO commmand timings used
for both devices on the port.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/ide/cs5536.c

index 70871fbc3c0a150c25d2cb5e2b838fc6cc7ed9dd..24214ab60ac0b887a5262c8034d616459ac208d5 100644 (file)
@@ -152,7 +152,7 @@ static void cs5536_set_pio_mode(ide_hwif_t *hwif, ide_drive_t *drive)
        u8 cmd_pio = pio;
 
        if (pair)
-               cmd_pio = min(pio, ide_get_best_pio_mode(pair, 255, 4));
+               cmd_pio = min_t(u8, pio, pair->pio_mode - XFER_PIO_0);
 
        timings &= (IDE_DRV_MASK << 8);
        timings |= drv_timings[pio];
This page took 0.026633 seconds and 5 git commands to generate.