]> err.no Git - linux-2.6/blobdiff - drivers/ide/legacy/ht6560b.c
Merge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc
[linux-2.6] / drivers / ide / legacy / ht6560b.c
index 02d12c74764a6a6fcd38935f8cbba4286398b4f7..78ca68e60f97e141dd9fc96806aa8d33bcaafb10 100644 (file)
  *                      "Prefetch" mode bit OFF for ide disks and
  *                      ON for anything else.
  *
+ *  Version 0.08        Need to force prefetch for CDs and other non-disk
+ *                      devices. (not sure which devices exactly need
+ *                      prefetch)
  *
  *  HT-6560B EIDE-controller support
  *  To activate controller support use kernel parameter "ide0=ht6560b".
  *  Use hdparm utility to enable PIO mode support.
  *
  *  Author:    Mikko Ala-Fossi            <maf@iki.fi>
- *             Jan Evert van Grootheest   <janevert@iae.nl>
+ *             Jan Evert van Grootheest   <janevert@caiway.nl>
  *
  *  Try:  http://www.maf.iki.fi/~maf/ht6560b/
  */
 
-#define HT6560B_VERSION "v0.07"
+#define HT6560B_VERSION "v0.08"
 
 #include <linux/module.h>
 #include <linux/types.h>
@@ -130,15 +133,20 @@ static void ht6560b_selectproc (ide_drive_t *drive)
        u8 select, timing;
        
        local_irq_save(flags);
-       
+
        select = HT_CONFIG(drive);
        timing = HT_TIMING(drive);
-       
+
+       /*
+        * Need to enforce prefetch sometimes because otherwise
+        * it'll hang (hard).
+        */
+       if (drive->media != ide_disk || !drive->present)
+               select |= HT_PREFETCH_MODE;
+
        if (select != current_select || timing != current_timing) {
                current_select = select;
                current_timing = timing;
-               if (drive->media != ide_disk || !drive->present)
-                       select |= HT_PREFETCH_MODE;
                (void)inb(HT_CONFIG_PORT);
                (void)inb(HT_CONFIG_PORT);
                (void)inb(HT_CONFIG_PORT);
@@ -188,11 +196,12 @@ static int __init try_to_init_ht6560b(void)
        outb(HT_TIMING_DEFAULT, 0x1f6);  /* IDE_SELECT_REG */
        (void) inb(0x1f7);               /* IDE_STATUS_REG */
        
-       printk("\nht6560b " HT6560B_VERSION
+       printk("ht6560b " HT6560B_VERSION
               ": chipset detected and initialized"
 #ifdef DEBUG
               " with debug enabled"
 #endif
+              "\n"
                );
        return 1;
 }
@@ -323,7 +332,7 @@ static const struct ide_port_info ht6560b_port_info __initdata = {
                                  IDE_HFLAG_NO_DMA |
                                  IDE_HFLAG_NO_AUTOTUNE |
                                  IDE_HFLAG_ABUSE_PREFETCH,
-       .pio_mask               = ATA_PIO5,
+       .pio_mask               = ATA_PIO4,
 };
 
 static int __init ht6560b_init(void)