diff options
Diffstat (limited to 'drivers/ide/ide-io.c')
-rw-r--r-- | drivers/ide/ide-io.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/ide/ide-io.c b/drivers/ide/ide-io.c index c27eaab1ffcf..c33a8006838b 100644 --- a/drivers/ide/ide-io.c +++ b/drivers/ide/ide-io.c | |||
@@ -147,12 +147,23 @@ void ide_complete_cmd(ide_drive_t *drive, struct ide_cmd *cmd, u8 stat, u8 err) | |||
147 | { | 147 | { |
148 | struct ide_taskfile *tf = &cmd->tf; | 148 | struct ide_taskfile *tf = &cmd->tf; |
149 | struct request *rq = cmd->rq; | 149 | struct request *rq = cmd->rq; |
150 | u8 tf_cmd = tf->command; | ||
150 | 151 | ||
151 | tf->error = err; | 152 | tf->error = err; |
152 | tf->status = stat; | 153 | tf->status = stat; |
153 | 154 | ||
154 | drive->hwif->tp_ops->tf_read(drive, cmd); | 155 | drive->hwif->tp_ops->tf_read(drive, cmd); |
155 | 156 | ||
157 | if ((cmd->tf_flags & IDE_TFLAG_CUSTOM_HANDLER) && | ||
158 | tf_cmd == ATA_CMD_IDLEIMMEDIATE) { | ||
159 | if (tf->lbal != 0xc4) { | ||
160 | printk(KERN_ERR "%s: head unload failed!\n", | ||
161 | drive->name); | ||
162 | ide_tf_dump(drive->name, tf); | ||
163 | } else | ||
164 | drive->dev_flags |= IDE_DFLAG_PARKED; | ||
165 | } | ||
166 | |||
156 | if (rq && rq->cmd_type == REQ_TYPE_ATA_TASKFILE) | 167 | if (rq && rq->cmd_type == REQ_TYPE_ATA_TASKFILE) |
157 | memcpy(rq->special, cmd, sizeof(*cmd)); | 168 | memcpy(rq->special, cmd, sizeof(*cmd)); |
158 | 169 | ||