aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/ide-iops.c
diff options
context:
space:
mode:
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2007-08-20 16:42:56 -0400
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2007-08-20 16:42:56 -0400
commitadcd33d41bfea8fb6870cf1f7e7ed2e5f7323fc1 (patch)
tree5e5694c40371b67317e124b5801f4ceb4c6d4a31 /drivers/ide/ide-iops.c
parenta5b7e70d787f528386eda025d3e38f545017f241 (diff)
ide: ide_config_drive_speed() bugfixes
* Use ->OUTBSYNC instead of ->OUTB when writing command register (needed for scc_pata and pmac host drivers). * Don't check DRDY bit of the status register on ATAPI devices (ATAPI devices are free to ignore DRDY bit). Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: Kou Ishizaki <kou.ishizaki@toshiba.co.jp> Cc: Akira Iguchi <akira2.iguchi@toshiba.co.jp> Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers/ide/ide-iops.c')
-rw-r--r--drivers/ide/ide-iops.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/ide/ide-iops.c b/drivers/ide/ide-iops.c
index fe2a69fed72b..18cf3a66a1a3 100644
--- a/drivers/ide/ide-iops.c
+++ b/drivers/ide/ide-iops.c
@@ -828,7 +828,7 @@ int ide_config_drive_speed (ide_drive_t *drive, u8 speed)
828 hwif->OUTB(drive->ctl | 2, IDE_CONTROL_REG); 828 hwif->OUTB(drive->ctl | 2, IDE_CONTROL_REG);
829 hwif->OUTB(speed, IDE_NSECTOR_REG); 829 hwif->OUTB(speed, IDE_NSECTOR_REG);
830 hwif->OUTB(SETFEATURES_XFER, IDE_FEATURE_REG); 830 hwif->OUTB(SETFEATURES_XFER, IDE_FEATURE_REG);
831 hwif->OUTB(WIN_SETFEATURES, IDE_COMMAND_REG); 831 hwif->OUTBSYNC(drive, WIN_SETFEATURES, IDE_COMMAND_REG);
832 if ((IDE_CONTROL_REG) && (drive->quirk_list == 2)) 832 if ((IDE_CONTROL_REG) && (drive->quirk_list == 2))
833 hwif->OUTB(drive->ctl, IDE_CONTROL_REG); 833 hwif->OUTB(drive->ctl, IDE_CONTROL_REG);
834 udelay(1); 834 udelay(1);
@@ -855,7 +855,7 @@ int ide_config_drive_speed (ide_drive_t *drive, u8 speed)
855 */ 855 */
856 for (i = 0; i < 10; i++) { 856 for (i = 0; i < 10; i++) {
857 udelay(1); 857 udelay(1);
858 if (OK_STAT((stat = hwif->INB(IDE_STATUS_REG)), DRIVE_READY, BUSY_STAT|DRQ_STAT|ERR_STAT)) { 858 if (OK_STAT((stat = hwif->INB(IDE_STATUS_REG)), drive->ready_stat, BUSY_STAT|DRQ_STAT|ERR_STAT)) {
859 error = 0; 859 error = 0;
860 break; 860 break;
861 } 861 }