Skip to content

Commit

Permalink
ide: fix registers loading order for WIN_SMART in execute_drive_cmd()
Browse files Browse the repository at this point in the history
Fix registers loading order for REQ_TYPE_ATA_CMD request with WIN_SMART
command in execute_drive_cmd() (load IDE_FEATURE_REG and IDE_SECTOR_REG
before loading IDE_LCYL_REG and IDE_HCYL_REG).

It shouldn't affect anything (just a usual paranoia to separate changes
which change the way in which hardware is accessed from code cleanups).

Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
  • Loading branch information
Bartlomiej Zolnierkiewicz committed Jan 25, 2008
1 parent d3bb034 commit 46f26c3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/ide/ide-io.c
Original file line number Diff line number Diff line change
Expand Up @@ -932,10 +932,10 @@ static ide_startstop_t execute_drive_cmd (ide_drive_t *drive,
printk("xx=0x%02x\n", args[3]);
#endif
if (args[0] == WIN_SMART) {
hwif->OUTB(0x4f, IDE_LCYL_REG);
hwif->OUTB(0xc2, IDE_HCYL_REG);
hwif->OUTB(args[2],IDE_FEATURE_REG);
hwif->OUTB(args[1],IDE_SECTOR_REG);
hwif->OUTB(0x4f, IDE_LCYL_REG);
hwif->OUTB(0xc2, IDE_HCYL_REG);
ide_cmd(drive, args[0], args[3], &drive_cmd_intr);
return ide_started;
}
Expand Down

0 comments on commit 46f26c3

Please sign in to comment.