summaryrefslogtreecommitdiff
path: root/drivers/ide/cs5536.c
diff options
context:
space:
mode:
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2010-01-18 10:21:55 +0300
committerDavid S. Miller <davem@davemloft.net>2010-01-19 12:52:33 +0300
commit280d69b127f75e1928f583c90f659d49cec4d177 (patch)
tree88a7250ef8fdb3dc6aa73d21d83162bc298e2a0a /drivers/ide/cs5536.c
parenta298dc024c2b0b92d3889d61856117141d693b39 (diff)
downloadlinux-280d69b127f75e1928f583c90f659d49cec4d177.tar.xz
cs5536: use ->pio_mode value to determine pair device speed
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>
Diffstat (limited to 'drivers/ide/cs5536.c')
-rw-r--r--drivers/ide/cs5536.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/ide/cs5536.c b/drivers/ide/cs5536.c
index 70871fbc3c0a..24214ab60ac0 100644
--- a/drivers/ide/cs5536.c
+++ b/drivers/ide/cs5536.c
@@ -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];