Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=4d7a984bdcbdda69fc6b2a4a655415140270aa7b
Commit:     4d7a984bdcbdda69fc6b2a4a655415140270aa7b
Parent:     79f21b84d94c02b941818df282b61f2a5a028722
Author:     Tejun Heo <[EMAIL PROTECTED]>
AuthorDate: Sat Jan 26 20:13:11 2008 +0100
Committer:  Bartlomiej Zolnierkiewicz <[EMAIL PROTECTED]>
CommitDate: Sat Jan 26 20:13:11 2008 +0100

    ide: task_end_request() fix
    
    task_end_request() modified to always call ide_end_drive_cmd()
    for taskfile requests.  Previously, ide_end_drive_cmd() was
    called only when IDE_TFLAG_FLAGGED was set.  Also,
    ide_dma_intr() is modified to use task_end_request().
    
    Enables TASKFILE ioctls to get valid register outputs on
    successful completion.
    
    Bart:
    - ported it over recent IDE changes
    
    Signed-off-by: Tejun Heo <[EMAIL PROTECTED]>
    Signed-off-by: Bartlomiej Zolnierkiewicz <[EMAIL PROTECTED]>
---
 drivers/ide/ide-dma.c      |    8 +-------
 drivers/ide/ide-taskfile.c |   11 ++++-------
 include/linux/ide.h        |    2 ++
 3 files changed, 7 insertions(+), 14 deletions(-)

diff --git a/drivers/ide/ide-dma.c b/drivers/ide/ide-dma.c
index c9648b1..5bf3203 100644
--- a/drivers/ide/ide-dma.c
+++ b/drivers/ide/ide-dma.c
@@ -153,13 +153,7 @@ ide_startstop_t ide_dma_intr (ide_drive_t *drive)
                if (!dma_stat) {
                        struct request *rq = HWGROUP(drive)->rq;
 
-                       if (rq->rq_disk) {
-                               ide_driver_t *drv;
-
-                               drv = *(ide_driver_t 
**)rq->rq_disk->private_data;
-                               drv->end_request(drive, 1, rq->nr_sectors);
-                       } else
-                               ide_end_request(drive, 1, rq->nr_sectors);
+                       task_end_request(drive, rq, stat);
                        return ide_stopped;
                }
                printk(KERN_ERR "%s: dma_intr: bad DMA status (dma_stat=%x)\n", 
diff --git a/drivers/ide/ide-taskfile.c b/drivers/ide/ide-taskfile.c
index 3bbb438..17c2c04 100644
--- a/drivers/ide/ide-taskfile.c
+++ b/drivers/ide/ide-taskfile.c
@@ -408,16 +408,13 @@ static ide_startstop_t task_error(ide_drive_t *drive, 
struct request *rq,
        return ide_error(drive, s, stat);
 }
 
-static void task_end_request(ide_drive_t *drive, struct request *rq, u8 stat)
+void task_end_request(ide_drive_t *drive, struct request *rq, u8 stat)
 {
        if (rq->cmd_type == REQ_TYPE_ATA_TASKFILE) {
-               ide_task_t *task = rq->special;
+               u8 err = drive->hwif->INB(IDE_ERROR_REG);
 
-               if (task->tf_flags & IDE_TFLAG_FLAGGED) {
-                       u8 err = drive->hwif->INB(IDE_ERROR_REG);
-                       ide_end_drive_cmd(drive, stat, err);
-                       return;
-               }
+               ide_end_drive_cmd(drive, stat, err);
+               return;
        }
 
        if (rq->rq_disk) {
diff --git a/include/linux/ide.h b/include/linux/ide.h
index 02493db..6192564 100644
--- a/include/linux/ide.h
+++ b/include/linux/ide.h
@@ -993,6 +993,8 @@ void ide_pktcmd_tf_load(ide_drive_t *, u32, u16, u8);
 
 ide_startstop_t do_rw_taskfile(ide_drive_t *, ide_task_t *);
 
+void task_end_request(ide_drive_t *, struct request *, u8);
+
 int ide_raw_taskfile(ide_drive_t *, ide_task_t *, u8 *, u16);
 int ide_no_data_taskfile(ide_drive_t *, ide_task_t *);
 
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to