On Thursday 05 February 2009, Bartlomiej Zolnierkiewicz wrote: > From: Bartlomiej Zolnierkiewicz <bzolnier@xxxxxxxxx> > 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); } -- To unsubscribe from this list: send the line "unsubscribe linux-ide" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html