2003-08-11 13:22:00

by Andries E. Brouwer

[permalink] [raw]
Subject: [PATCH] hpt366 fix

Another one in the IDE series.

The HPT366 code is broken - it tries to set the interface
to a too high speed, which leads to error messages at boot
time and/or to data corruption.

The typical effect at boot time is

<4>hde: set_drive_speed_status: status=0x51 { DriveReady SeekComplete Error }
<4>hde: set_drive_speed_status: error=0x04 { DriveStatusError }

This is fixed by the patch below.

Andries

diff -u --recursive --new-file -X /linux/dontdiff a/drivers/ide/pci/hpt366.c b/drivers/ide/pci/hpt366.c
--- a/drivers/ide/pci/hpt366.c Sat Aug 9 22:16:42 2003
+++ b/drivers/ide/pci/hpt366.c Mon Aug 11 16:04:06 2003
@@ -440,7 +440,7 @@

static void hpt3xx_tune_drive (ide_drive_t *drive, u8 pio)
{
- pio = ide_get_best_pio_mode(drive, pio, 5, NULL);
+ pio = ide_get_best_pio_mode(drive, 255, pio, NULL);
(void) hpt3xx_tune_chipset(drive, (XFER_PIO_0 + pio));
}