Merge branch 'origin'
[pandora-kernel.git] / drivers / ide / ide-taskfile.c
index 7ec18fa..0606bd2 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>
@@ -51,8 +52,6 @@
 #include <asm/uaccess.h>
 #include <asm/io.h>
 
-#define DEBUG_TASKFILE 0       /* unset when fixed */
-
 static void ata_bswap_data (void *buffer, int wcount)
 {
        u16 *p = buffer;
@@ -161,8 +160,6 @@ ide_startstop_t do_rw_taskfile (ide_drive_t *drive, ide_task_t *task)
        return ide_stopped;
 }
 
-EXPORT_SYMBOL(do_rw_taskfile);
-
 /*
  * set_multmode_intr() is invoked on completion of a WIN_SETMULT cmd.
  */
@@ -312,12 +309,14 @@ static void ide_pio_multi(ide_drive_t *drive, unsigned int write)
                ide_pio_sector(drive, write);
 }
 
-static inline void ide_pio_datablock(ide_drive_t *drive, struct request *rq,
+static void ide_pio_datablock(ide_drive_t *drive, struct request *rq,
                                     unsigned int write)
 {
        if (rq->bio)    /* fs request */
                rq->errors = 0;
 
+       touch_softlockup_watchdog();
+
        switch (drive->hwif->data_phase) {
        case TASKFILE_MULTI_IN:
        case TASKFILE_MULTI_OUT:
@@ -767,9 +766,6 @@ ide_startstop_t flagged_taskfile (ide_drive_t *drive, ide_task_t *task)
        ide_hwif_t *hwif        = HWIF(drive);
        task_struct_t *taskfile = (task_struct_t *) task->tfRegister;
        hob_struct_t *hobfile   = (hob_struct_t *) task->hobRegister;
-#if DEBUG_TASKFILE
-       u8 status;
-#endif
 
        if (task->data_phase == TASKFILE_MULTI_IN ||
            task->data_phase == TASKFILE_MULTI_OUT) {
@@ -780,19 +776,13 @@ ide_startstop_t flagged_taskfile (ide_drive_t *drive, ide_task_t *task)
        }
 
        /*
-        * (ks) Check taskfile in/out flags.
+        * (ks) Check taskfile in flags.
         * If set, then execute as it is defined.
         * If not set, then define default settings.
         * The default values are:
-        *      write and read all taskfile registers (except data) 
-        *      write and read the hob registers (sector,nsector,lcyl,hcyl)
+        *      read all taskfile registers (except data)
+        *      read the hob registers (sector, nsector, lcyl, hcyl)
         */
-       if (task->tf_out_flags.all == 0) {
-               task->tf_out_flags.all = IDE_TASKFILE_STD_OUT_FLAGS;
-               if (drive->addressing == 1)
-                       task->tf_out_flags.all |= (IDE_HOB_STD_OUT_FLAGS << 8);
-        }
-
        if (task->tf_in_flags.all == 0) {
                task->tf_in_flags.all = IDE_TASKFILE_STD_IN_FLAGS;
                if (drive->addressing == 1)
@@ -805,16 +795,6 @@ ide_startstop_t flagged_taskfile (ide_drive_t *drive, ide_task_t *task)
                hwif->OUTB(drive->ctl, IDE_CONTROL_REG);
        SELECT_MASK(drive, 0);
 
-#if DEBUG_TASKFILE
-       status = hwif->INB(IDE_STATUS_REG);
-       if (status & 0x80) {
-               printk("flagged_taskfile -> Bad status. Status = %02x. wait 100 usec ...\n", status);
-               udelay(100);
-               status = hwif->INB(IDE_STATUS_REG);
-               printk("flagged_taskfile -> Status = %02x\n", status);
-       }
-#endif
-
        if (task->tf_out_flags.b.data) {
                u16 data =  taskfile->data + (hobfile->data << 8);
                hwif->OUTW(data, IDE_DATA_REG);