lkml.org 
[lkml]   [2009]   [Feb]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
SubjectRe: [PATCH] ide: move request type specific code from ide_end_drive_cmd() to callers (v2)
Date
On Thursday 05 February 2009, Bartlomiej Zolnierkiewicz wrote:
> From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
> Subject: [PATCH] ide: move request type specific code from ide_end_drive_cmd() to callers (v2)
>
> * Move request type specific code from ide_end_drive_cmd() to callers.
>
> * Remove stale ide_end_drive_cmd() documentation and drop no longer
> used 'stat' argument. Then rename the function to ide_complete_rq().
>
> v2:
> * Fix handling of blk_pm_request() requests in task_no_data_intr().

v2->v3 interdiff:

...
v3:
* Some ide_no_data_taskfile() users (HPA code and HDIO_DRIVE_* ioctls
handlers) access original command later so we need to update it in
ide_complete_task().
...
diff -u b/drivers/ide/ide-io.c b/drivers/ide/ide-io.c
--- b/drivers/ide/ide-io.c
+++ b/drivers/ide/ide-io.c
@@ -147,12 +147,16 @@
void ide_complete_task(ide_drive_t *drive, ide_task_t *task, u8 stat, u8 err)
{
struct ide_taskfile *tf = &task->tf;
+ struct request *rq = task->rq;

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

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

+ if (rq && rq->cmd_type == REQ_TYPE_ATA_TASKFILE)
+ memcpy(rq->special, task, sizeof(*task));
+
if (task->tf_flags & IDE_TFLAG_DYN)
kfree(task);
}

\
 
 \ /
  Last update: 2009-02-10 22:55    [W:0.504 / U:0.552 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site