Skip to content

Commit 280d69b

Browse files
bzolnierdavem330
authored andcommitted
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>
1 parent a298dc0 commit 280d69b

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎drivers/ide/cs5536.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ static void cs5536_set_pio_mode(ide_hwif_t *hwif, ide_drive_t *drive)
152152
u8 cmd_pio = pio;
153153

154154
if (pair)
155-
cmd_pio = min(pio, ide_get_best_pio_mode(pair, 255, 4));
155+
cmd_pio = min_t(u8, pio, pair->pio_mode - XFER_PIO_0);
156156

157157
timings &= (IDE_DRV_MASK << 8);
158158
timings |= drv_timings[pio];

0 commit comments

Comments
 (0)