]> Pileus Git - ~andy/linux/blobdiff - drivers/ide/ide-iops.c
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
[~andy/linux] / drivers / ide / ide-iops.c
index daa23b19440e1881d7fc4ed3bcc493f3a8c9113b..0daf923541ffbc50fe7a9e139e8f172d882b6c78 100644 (file)
@@ -95,7 +95,7 @@ void SELECT_DRIVE (ide_drive_t *drive)
        hwif->OUTB(drive->select.all, hwif->io_ports.device_addr);
 }
 
-void SELECT_MASK (ide_drive_t *drive, int mask)
+static void SELECT_MASK(ide_drive_t *drive, int mask)
 {
        const struct ide_port_ops *port_ops = drive->hwif->port_ops;
 
@@ -227,11 +227,11 @@ static void ide_tf_read(ide_drive_t *drive, ide_task_t *task)
  * of the sector count register location, with interrupts disabled
  * to ensure that the reads all happen together.
  */
-static void ata_vlb_sync(ide_drive_t *drive, unsigned long port)
+static void ata_vlb_sync(unsigned long port)
 {
-       (void) HWIF(drive)->INB(port);
-       (void) HWIF(drive)->INB(port);
-       (void) HWIF(drive)->INB(port);
+       (void)inb(port);
+       (void)inb(port);
+       (void)inb(port);
 }
 
 /*
@@ -255,9 +255,9 @@ static void ata_input_data(ide_drive_t *drive, struct request *rq,
        if (io_32bit) {
                unsigned long uninitialized_var(flags);
 
-               if (io_32bit & 2) {
+               if ((io_32bit & 2) && !mmio) {
                        local_irq_save(flags);
-                       ata_vlb_sync(drive, io_ports->nsect_addr);
+                       ata_vlb_sync(io_ports->nsect_addr);
                }
 
                if (mmio)
@@ -265,7 +265,7 @@ static void ata_input_data(ide_drive_t *drive, struct request *rq,
                else
                        insl(data_addr, buf, len / 4);
 
-               if (io_32bit & 2)
+               if ((io_32bit & 2) && !mmio)
                        local_irq_restore(flags);
 
                if ((len & 3) >= 2) {
@@ -298,9 +298,9 @@ static void ata_output_data(ide_drive_t *drive, struct request *rq,
        if (io_32bit) {
                unsigned long uninitialized_var(flags);
 
-               if (io_32bit & 2) {
+               if ((io_32bit & 2) && !mmio) {
                        local_irq_save(flags);
-                       ata_vlb_sync(drive, io_ports->nsect_addr);
+                       ata_vlb_sync(io_ports->nsect_addr);
                }
 
                if (mmio)
@@ -308,7 +308,7 @@ static void ata_output_data(ide_drive_t *drive, struct request *rq,
                else
                        outsl(data_addr, buf, len / 4);
 
-               if (io_32bit & 2)
+               if ((io_32bit & 2) && !mmio)
                        local_irq_restore(flags);
 
                if ((len & 3) >= 2) {
@@ -625,6 +625,8 @@ static const struct drive_list_entry ivb_list[] = {
        { "TSSTcorp CDDVDW SH-S202J"    , "SB01"        },
        { "TSSTcorp CDDVDW SH-S202N"    , "SB00"        },
        { "TSSTcorp CDDVDW SH-S202N"    , "SB01"        },
+       { "TSSTcorp CDDVDW SH-S202H"    , "SB00"        },
+       { "TSSTcorp CDDVDW SH-S202H"    , "SB01"        },
        { NULL                          , NULL          }
 };