diff options
author | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2008-01-25 16:17:06 -0500 |
---|---|---|
committer | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2008-01-25 16:17:06 -0500 |
commit | d00e42dd26bbda6a39aead6a47c59221e03a08f8 (patch) | |
tree | 5aac741e8318f52f6fde8a3b180a774bf355719c /drivers/ide/ide-disk.c | |
parent | 7a3b7512d0d7e78353e99f4538eb6d3354019d92 (diff) |
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 <bzolnier@gmail.com>
Diffstat (limited to 'drivers/ide/ide-disk.c')
-rw-r--r-- | drivers/ide/ide-disk.c | 2 |
1 files changed, 1 insertions, 1 deletions
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, | |||
212 | unsigned int sect,head,cyl,track; | 212 | unsigned int sect,head,cyl,track; |
213 | track = (int)block / drive->sect; | 213 | track = (int)block / drive->sect; |
214 | sect = (int)block % drive->sect + 1; | 214 | sect = (int)block % drive->sect + 1; |
215 | hwif->OUTB(sect, IDE_SECTOR_REG); | ||
216 | head = track % drive->head; | 215 | head = track % drive->head; |
217 | cyl = track / drive->head; | 216 | cyl = track / drive->head; |
218 | 217 | ||
@@ -220,6 +219,7 @@ static ide_startstop_t __ide_do_rw_disk(ide_drive_t *drive, struct request *rq, | |||
220 | 219 | ||
221 | hwif->OUTB(0x00, IDE_FEATURE_REG); | 220 | hwif->OUTB(0x00, IDE_FEATURE_REG); |
222 | hwif->OUTB(nsectors.b.low, IDE_NSECTOR_REG); | 221 | hwif->OUTB(nsectors.b.low, IDE_NSECTOR_REG); |
222 | hwif->OUTB(sect, IDE_SECTOR_REG); | ||
223 | hwif->OUTB(cyl, IDE_LCYL_REG); | 223 | hwif->OUTB(cyl, IDE_LCYL_REG); |
224 | hwif->OUTB(cyl>>8, IDE_HCYL_REG); | 224 | hwif->OUTB(cyl>>8, IDE_HCYL_REG); |
225 | hwif->OUTB(head|drive->select.all,IDE_SELECT_REG); | 225 | hwif->OUTB(head|drive->select.all,IDE_SELECT_REG); |