ide: move IRQ unmasking out from ->tf_load method
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Tue, 15 Jul 2008 19:21:48 +0000 (21:21 +0200)
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Tue, 15 Jul 2008 19:21:48 +0000 (21:21 +0200)
Move IRQ unmasking out from ->tf_load method to its users.

There should be no functional changes caused by this patch
(SELECT_MASK() is NOP except for hpt366, icside and sgiioc4).

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
drivers/ide/h8300/ide-h8300.c
drivers/ide/ide-io.c
drivers/ide/ide-iops.c
drivers/ide/ide-taskfile.c
drivers/ide/pci/scc_pata.c
include/linux/ide.h

index ecf53bb0d2aa2941da54aa772485daa0bfb3a616..d5afc28eaae7e47a2c5633b0a1e0dbc5cbbb8977 100644 (file)
@@ -52,8 +52,6 @@ static void h8300_tf_load(ide_drive_t *drive, ide_task_t *task)
        if (task->tf_flags & IDE_TFLAG_FLAGGED)
                HIHI = 0xFF;
 
-       ide_set_irq(drive, 1);
-
        if (task->tf_flags & IDE_TFLAG_OUT_DATA)
                mm_outw((tf->hob_data << 8) | tf->data, io_ports->data_addr);
 
index c22a337ced4eaf1b9b42e9f1bdcfca6dae6ef289..2083cc08b2ce96f74e96f804acc1f3d50e08a93f 100644 (file)
@@ -1579,6 +1579,8 @@ void ide_pktcmd_tf_load(ide_drive_t *drive, u32 tf_flags, u16 bcount, u8 dma)
        task.tf.lbah    = (bcount >> 8) & 0xff;
 
        ide_tf_dump(drive->name, &task.tf);
+       ide_set_irq(drive, 1);
+       SELECT_MASK(drive, 0);
        drive->hwif->tf_load(drive, &task);
 }
 
index 9f9916fe6c2f46ff9bf430390f6a4f05509499ce..491980aab86645d8ef4dd4dc3670021bb896d58c 100644 (file)
@@ -95,7 +95,7 @@ void SELECT_DRIVE (ide_drive_t *drive)
        hwif->OUTB(drive->select.all, hwif->io_ports.device_addr);
 }
 
-static void SELECT_MASK(ide_drive_t *drive, int mask)
+void SELECT_MASK(ide_drive_t *drive, int mask)
 {
        const struct ide_port_ops *port_ops = drive->hwif->port_ops;
 
@@ -120,9 +120,6 @@ static void ide_tf_load(ide_drive_t *drive, ide_task_t *task)
        if (task->tf_flags & IDE_TFLAG_FLAGGED)
                HIHI = 0xFF;
 
-       ide_set_irq(drive, 1);
-       SELECT_MASK(drive, 0);
-
        if (task->tf_flags & IDE_TFLAG_OUT_DATA) {
                u16 data = (tf->hob_data << 8) | tf->data;
 
index b6a1c4b511299a1380de86a70430c679507dbf8e..6a17ab54f80152f4a81ca7411049f334e0f114af 100644 (file)
@@ -109,6 +109,8 @@ ide_startstop_t do_rw_taskfile (ide_drive_t *drive, ide_task_t *task)
 
        if ((task->tf_flags & IDE_TFLAG_DMA_PIO_FALLBACK) == 0) {
                ide_tf_dump(drive->name, tf);
+               ide_set_irq(drive, 1);
+               SELECT_MASK(drive, 0);
                hwif->tf_load(drive, task);
        }
 
index 910fb00deb71486e8d0e7da1a3b922fc5009d4b5..37e8cfcabb4b99afe2a6ea90f3ed037e328d4ac7 100644 (file)
@@ -662,8 +662,6 @@ static void scc_tf_load(ide_drive_t *drive, ide_task_t *task)
        if (task->tf_flags & IDE_TFLAG_FLAGGED)
                HIHI = 0xFF;
 
-       ide_set_irq(drive, 1);
-
        if (task->tf_flags & IDE_TFLAG_OUT_DATA)
                out_be32((void *)io_ports->data_addr,
                         (tf->hob_data << 8) | tf->data);
index d4a910cdb90719b32e8407cd2bd18dfcd25d7d70..56d0bc2dffeebc825882b67cb290cb36caf2dd1c 100644 (file)
@@ -973,6 +973,7 @@ typedef struct ide_task_s {
 void ide_tf_dump(const char *, struct ide_taskfile *);
 
 extern void SELECT_DRIVE(ide_drive_t *);
+void SELECT_MASK(ide_drive_t *, int);
 
 extern int drive_is_ready(ide_drive_t *);