]> err.no Git - linux-2.6/blobdiff - drivers/ide/ide-lib.c
ide: remove content related to dead CONFIG_BLK_DEV_MAC_MEDIABAY config variable
[linux-2.6] / drivers / ide / ide-lib.c
index 4557fc5a3ea381c4518b18f48142d39380f2d26d..074bb32a4a406ee2cc54a421c26849129c54adff 100644 (file)
@@ -88,8 +88,15 @@ u8 ide_rate_filter(ide_drive_t *drive, u8 speed)
        if (hwif->udma_filter)
                mask = hwif->udma_filter(drive);
 
-       if ((mask & 0x78) && (eighty_ninty_three(drive) == 0))
-               mask &= 0x07;
+       /*
+        * TODO: speed > XFER_UDMA_2 extra check is needed to avoid false
+        * cable warning from eighty_ninty_three(), moving ide_rate_filter()
+        * calls from ->speedproc to core code will make this hack go away
+        */
+       if (speed > XFER_UDMA_2) {
+               if ((mask & 0x78) && (eighty_ninty_three(drive) == 0))
+                       mask &= 0x07;
+       }
 
        if (mask)
                mode = fls(mask) - 1 + XFER_UDMA_0;
@@ -104,18 +111,6 @@ u8 ide_rate_filter(ide_drive_t *drive, u8 speed)
 
 EXPORT_SYMBOL(ide_rate_filter);
 
-int ide_dma_enable (ide_drive_t *drive)
-{
-       ide_hwif_t *hwif        = HWIF(drive);
-       struct hd_driveid *id   = drive->id;
-
-       return ((int)   ((((id->dma_ultra >> 8) & hwif->ultra_mask) ||
-                         ((id->dma_mword >> 8) & hwif->mwdma_mask) ||
-                         ((id->dma_1word >> 8) & hwif->swdma_mask)) ? 1 : 0));
-}
-
-EXPORT_SYMBOL(ide_dma_enable);
-
 int ide_use_fast_pio(ide_drive_t *drive)
 {
        struct hd_driveid *id = drive->id;