diff options
author | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2009-03-27 07:46:41 -0400 |
---|---|---|
committer | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2009-03-27 07:46:41 -0400 |
commit | e7fedc3ca0b8fcd3350a40c42a7100a9539e6c4a (patch) | |
tree | 84cd0b58c1c37a4f14f769555ea877b0f4e44efa /drivers/ide/ide-taskfile.c | |
parent | 041cea10a86a25b088185d07ad15d728f503f02c (diff) |
ide: use ide_complete_cmd() for head unload commands
Move handling of head unload commands from task_no_data_intr()
to ide_complete_cmd() and then use ide_complete_cmd() also for
head unload commands.
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers/ide/ide-taskfile.c')
-rw-r--r-- | drivers/ide/ide-taskfile.c | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/drivers/ide/ide-taskfile.c b/drivers/ide/ide-taskfile.c index c02687507682..4883aa4052ac 100644 --- a/drivers/ide/ide-taskfile.c +++ b/drivers/ide/ide-taskfile.c | |||
@@ -146,15 +146,7 @@ static ide_startstop_t task_no_data_intr(ide_drive_t *drive) | |||
146 | return ide_error(drive, "task_no_data_intr", stat); | 146 | return ide_error(drive, "task_no_data_intr", stat); |
147 | } | 147 | } |
148 | 148 | ||
149 | if (custom && tf->command == ATA_CMD_IDLEIMMEDIATE) { | 149 | if (custom && tf->command == ATA_CMD_SET_MULTI) |
150 | hwif->tp_ops->tf_read(drive, cmd); | ||
151 | if (tf->lbal != 0xc4) { | ||
152 | printk(KERN_ERR "%s: head unload failed!\n", | ||
153 | drive->name); | ||
154 | ide_tf_dump(drive->name, tf); | ||
155 | } else | ||
156 | drive->dev_flags |= IDE_DFLAG_PARKED; | ||
157 | } else if (custom && tf->command == ATA_CMD_SET_MULTI) | ||
158 | drive->mult_count = drive->mult_req; | 150 | drive->mult_count = drive->mult_req; |
159 | 151 | ||
160 | if (custom == 0 || tf->command == ATA_CMD_IDLEIMMEDIATE) { | 152 | if (custom == 0 || tf->command == ATA_CMD_IDLEIMMEDIATE) { |
@@ -164,7 +156,8 @@ static ide_startstop_t task_no_data_intr(ide_drive_t *drive) | |||
164 | if (blk_pm_request(rq)) | 156 | if (blk_pm_request(rq)) |
165 | ide_complete_pm_rq(drive, rq); | 157 | ide_complete_pm_rq(drive, rq); |
166 | else { | 158 | else { |
167 | if (rq->cmd_type == REQ_TYPE_ATA_TASKFILE) | 159 | if (rq->cmd_type == REQ_TYPE_ATA_TASKFILE || |
160 | tf->command == ATA_CMD_IDLEIMMEDIATE) | ||
168 | ide_complete_cmd(drive, cmd, stat, err); | 161 | ide_complete_cmd(drive, cmd, stat, err); |
169 | ide_complete_rq(drive, err); | 162 | ide_complete_rq(drive, err); |
170 | } | 163 | } |