it821x: use ->pio_mode value to determine pair device speed
[safe/jmp/linux-2.6] / drivers / ide / ide-iops.c
index fa04715..376f2dc 100644 (file)
@@ -102,8 +102,8 @@ EXPORT_SYMBOL(ide_fixstring);
  * setting a timer to wake up at half second intervals thereafter,
  * until timeout is achieved, before timing out.
  */
-static int __ide_wait_stat(ide_drive_t *drive, u8 good, u8 bad,
-                          unsigned long timeout, u8 *rstat)
+int __ide_wait_stat(ide_drive_t *drive, u8 good, u8 bad,
+                   unsigned long timeout, u8 *rstat)
 {
        ide_hwif_t *hwif = drive->hwif;
        const struct ide_tp_ops *tp_ops = hwif->tp_ops;
@@ -210,6 +210,7 @@ EXPORT_SYMBOL_GPL(ide_in_drive_list);
  */
 static const struct drive_list_entry ivb_list[] = {
        { "QUANTUM FIREBALLlct10 05"    , "A03.0900"    },
+       { "QUANTUM FIREBALLlct20 30"    , "APL.0900"    },
        { "TSSTcorp CDDVDW SH-S202J"    , "SB00"        },
        { "TSSTcorp CDDVDW SH-S202J"    , "SB01"        },
        { "TSSTcorp CDDVDW SH-S202N"    , "SB00"        },
@@ -230,7 +231,7 @@ u8 eighty_ninty_three(ide_drive_t *drive)
        u16 *id = drive->id;
        int ivb = ide_in_drive_list(id, ivb_list);
 
-       if (hwif->cbl == ATA_CBL_PATA40_SHORT)
+       if (hwif->cbl == ATA_CBL_SATA || hwif->cbl == ATA_CBL_PATA40_SHORT)
                return 1;
 
        if (ivb)
@@ -291,6 +292,7 @@ static const char *nien_quirk_list[] = {
        "QUANTUM FIREBALLP KX27.3",
        "QUANTUM FIREBALLP LM20.4",
        "QUANTUM FIREBALLP LM20.5",
+       "FUJITSU MHZ2160BH G2",
        NULL
 };
 
@@ -315,7 +317,7 @@ int ide_driveid_update(ide_drive_t *drive)
                return 0;
 
        SELECT_MASK(drive, 1);
-       rc = ide_dev_read_id(drive, ATA_CMD_ID_ATA, id);
+       rc = ide_dev_read_id(drive, ATA_CMD_ID_ATA, id, 1);
        SELECT_MASK(drive, 0);
 
        if (rc)
@@ -329,9 +331,6 @@ int ide_driveid_update(ide_drive_t *drive)
 
        kfree(id);
 
-       if ((drive->dev_flags & IDE_DFLAG_USING_DMA) && ide_id_dma_bug(drive))
-               ide_dma_off(drive);
-
        return 1;
 out_err:
        if (rc == 2)
@@ -365,14 +364,6 @@ int ide_config_drive_speed(ide_drive_t *drive, u8 speed)
         * this point (lost interrupt).
         */
 
-       /*
-        *      FIXME: we race against the running IRQ here if
-        *      this is called from non IRQ context. If we use
-        *      disable_irq() we hang on the error path. Work
-        *      is needed.
-        */
-       disable_irq_nosync(hwif->irq);
-
        udelay(1);
        tp_ops->dev_select(drive);
        SELECT_MASK(drive, 1);
@@ -396,8 +387,6 @@ int ide_config_drive_speed(ide_drive_t *drive, u8 speed)
 
        SELECT_MASK(drive, 0);
 
-       enable_irq(hwif->irq);
-
        if (error) {
                (void) ide_dump_status(drive, "set_drive_speed_status", stat);
                return error;