Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 137645
b: refs/heads/master
c: e120237
h: refs/heads/master
i:
  137643: 9e9332e
v: v3
  • Loading branch information
Bartlomiej Zolnierkiewicz committed Mar 27, 2009
1 parent 399f9dd commit fe4ea04
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 12 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 3616b6536a74ff1c56029c17cbb3575c69c0a574
refs/heads/master: e120237c0e4d9a83c1380f5ff7b5f2ba31f1c820
27 changes: 16 additions & 11 deletions trunk/drivers/ide/ide-io.c
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,20 @@ int ide_end_dequeued_request(ide_drive_t *drive, struct request *rq,
}
EXPORT_SYMBOL_GPL(ide_end_dequeued_request);

static void ide_complete_task(ide_drive_t *drive, ide_task_t *task,
u8 stat, u8 err)
{
struct ide_taskfile *tf = &task->tf;

tf->error = err;
tf->status = stat;

drive->hwif->tp_ops->tf_read(drive, task);

if (task->tf_flags & IDE_TFLAG_DYN)
kfree(task);
}

/**
* ide_end_drive_cmd - end an explicit drive command
* @drive: command
Expand All @@ -166,17 +180,8 @@ void ide_end_drive_cmd (ide_drive_t *drive, u8 stat, u8 err)
if (rq->cmd_type == REQ_TYPE_ATA_TASKFILE) {
ide_task_t *task = (ide_task_t *)rq->special;

if (task) {
struct ide_taskfile *tf = &task->tf;

tf->error = err;
tf->status = stat;

drive->hwif->tp_ops->tf_read(drive, task);

if (task->tf_flags & IDE_TFLAG_DYN)
kfree(task);
}
if (task)
ide_complete_task(drive, task, stat, err);
} else if (blk_pm_request(rq)) {
ide_complete_pm_rq(drive, rq);
return;
Expand Down

0 comments on commit fe4ea04

Please sign in to comment.