From: Bartlomiej Zolnierkiewicz Date: Fri, 25 Jan 2008 21:17:06 +0000 (+0100) Subject: ide-disk: fix taskfile registers loading order in __ide_do_rw_disk() X-Git-Tag: v2.6.25-rc1~1236^2~58 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=d00e42dd26bbda6a39aead6a47c59221e03a08f8;p=karo-tx-linux.git ide-disk: fix taskfile registers loading order in __ide_do_rw_disk() Load IDE_SECTOR_REG after IDE_FEATURE_REG and IDE_NSECTOR_REG when using CHS. This patch is basically a preparation for the next one which converts __ide_do_rw_disk() to use struct ide_taskfile. It shouldn't affect anything (just a usual paranoia to separate changes which change the way in which hardware is accessed from code cleanups). Signed-off-by: Bartlomiej Zolnierkiewicz --- diff --git a/drivers/ide/ide-disk.c b/drivers/ide/ide-disk.c index 88c270fad684..9b63e15d67e2 100644 --- a/drivers/ide/ide-disk.c +++ b/drivers/ide/ide-disk.c @@ -212,7 +212,6 @@ static ide_startstop_t __ide_do_rw_disk(ide_drive_t *drive, struct request *rq, unsigned int sect,head,cyl,track; track = (int)block / drive->sect; sect = (int)block % drive->sect + 1; - hwif->OUTB(sect, IDE_SECTOR_REG); head = track % drive->head; cyl = track / drive->head; @@ -220,6 +219,7 @@ static ide_startstop_t __ide_do_rw_disk(ide_drive_t *drive, struct request *rq, hwif->OUTB(0x00, IDE_FEATURE_REG); hwif->OUTB(nsectors.b.low, IDE_NSECTOR_REG); + hwif->OUTB(sect, IDE_SECTOR_REG); hwif->OUTB(cyl, IDE_LCYL_REG); hwif->OUTB(cyl>>8, IDE_HCYL_REG); hwif->OUTB(head|drive->select.all,IDE_SELECT_REG);