]> err.no Git - linux-2.6/blobdiff - drivers/ide/ide-taskfile.c
Merge master.kernel.org:/home/rmk/linux-2.6-arm
[linux-2.6] / drivers / ide / ide-taskfile.c
index 9834dce4e20fa93715c62f63f8d457eed6510ce5..a839b2a8f6f485d17f30a1d861bbb7ecb7deda63 100644 (file)
@@ -34,6 +34,7 @@
 #include <linux/kernel.h>
 #include <linux/timer.h>
 #include <linux/mm.h>
+#include <linux/sched.h>
 #include <linux/interrupt.h>
 #include <linux/major.h>
 #include <linux/errno.h>
@@ -195,8 +196,7 @@ ide_startstop_t set_geometry_intr (ide_drive_t *drive)
        if (stat & (ERR_STAT|DRQ_STAT))
                return ide_error(drive, "set_geometry_intr", stat);
 
-       if (HWGROUP(drive)->handler != NULL)
-               BUG();
+       BUG_ON(HWGROUP(drive)->handler != NULL);
        ide_set_handler(drive, &set_geometry_intr, WAIT_WORSTCASE, NULL);
        return ide_started;
 }
@@ -314,6 +314,8 @@ static void ide_pio_datablock(ide_drive_t *drive, struct request *rq,
        if (rq->bio)    /* fs request */
                rq->errors = 0;
 
+       touch_softlockup_watchdog();
+
        switch (drive->hwif->data_phase) {
        case TASKFILE_MULTI_IN:
        case TASKFILE_MULTI_OUT:
@@ -372,7 +374,13 @@ static void task_end_request(ide_drive_t *drive, struct request *rq, u8 stat)
                }
        }
 
-       ide_end_request(drive, 1, rq->hard_nr_sectors);
+       if (rq->rq_disk) {
+               ide_driver_t *drv;
+
+               drv = *(ide_driver_t **)rq->rq_disk->private_data;;
+               drv->end_request(drive, 1, rq->hard_nr_sectors);
+       } else
+               ide_end_request(drive, 1, rq->hard_nr_sectors);
 }
 
 /*