diff options
author | Sergei Shtylyov <sshtylyov@ru.mvista.com> | 2009-04-08 08:13:02 -0400 |
---|---|---|
committer | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2009-04-08 08:13:02 -0400 |
commit | 4109d19af73826aa6fee1a1b951670381be88f8b (patch) | |
tree | 345093962cee2b99228f39a467020d2b0dd5572d /drivers/ide/ide-taskfile.c | |
parent | 745483f10c6cefb303007c6873e2bfce54efa8ed (diff) |
ide: move common code out of tf_load() method
Move device register masking (and setting drive->select) out of tf_load() method
and into the only function that needs to use this code, do_rw_taskfile()...
Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
[bart: fix whitespace error]
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers/ide/ide-taskfile.c')
-rw-r--r-- | drivers/ide/ide-taskfile.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/ide/ide-taskfile.c b/drivers/ide/ide-taskfile.c index 3160be494aa0..0318a4cb09de 100644 --- a/drivers/ide/ide-taskfile.c +++ b/drivers/ide/ide-taskfile.c | |||
@@ -88,6 +88,16 @@ ide_startstop_t do_rw_taskfile(ide_drive_t *drive, struct ide_cmd *orig_cmd) | |||
88 | 88 | ||
89 | tp_ops->output_data(drive, cmd, data, 2); | 89 | tp_ops->output_data(drive, cmd, data, 2); |
90 | } | 90 | } |
91 | |||
92 | if (cmd->valid.out.tf & IDE_VALID_DEVICE) { | ||
93 | u8 HIHI = (cmd->tf_flags & IDE_TFLAG_LBA48) ? | ||
94 | 0xE0 : 0xEF; | ||
95 | |||
96 | if (!(cmd->ftf_flags & IDE_FTFLAG_FLAGGED)) | ||
97 | cmd->tf.device &= HIHI; | ||
98 | cmd->tf.device |= drive->select; | ||
99 | } | ||
100 | |||
91 | tp_ops->tf_load(drive, cmd); | 101 | tp_ops->tf_load(drive, cmd); |
92 | } | 102 | } |
93 | 103 | ||