Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=0e7d8d480259319649f7a2c230622b98758d1c83
Commit:     0e7d8d480259319649f7a2c230622b98758d1c83
Parent:     1a1990f5479b0c9055c133b7e0e7fedfcbe11512
Author:     Jan Evert van Grootheest <[EMAIL PROTECTED]>
AuthorDate: Tue Feb 19 01:41:26 2008 +0100
Committer:  Bartlomiej Zolnierkiewicz <[EMAIL PROTECTED]>
CommitDate: Tue Feb 19 01:41:26 2008 +0100

    ht6560b: force prefetch for some devices
    
    Prefetch needs to be set for some ide devices to work when connected to
    a ht6560b interface. This was not always done properly, causing a system
    with a HD and CD on the primary interface to not work properly. Or, in
    effect, hang hard.
    
    This patch forces prefetch on devices before checking whether it
    is necessary to change the settings in the interface
    
    This patch should also be applied to 2.4. I don't currently have a
    2.4 tree around.
    
    (also change my email address)
    
    Signed-off-by: Jan Evert van Grootheest <[EMAIL PROTECTED]>
    Cc: Sergei Shtylyov <[EMAIL PROTECTED]>
    Cc: Alan Cox <[EMAIL PROTECTED]>
    Signed-off-by: Bartlomiej Zolnierkiewicz <[EMAIL PROTECTED]>
---
 drivers/ide/legacy/ht6560b.c |   23 ++++++++++++++++-------
 1 files changed, 16 insertions(+), 7 deletions(-)

diff --git a/drivers/ide/legacy/ht6560b.c b/drivers/ide/legacy/ht6560b.c
index 2701e7d..78ca68e 100644
--- a/drivers/ide/legacy/ht6560b.c
+++ b/drivers/ide/legacy/ht6560b.c
@@ -21,18 +21,21 @@
  *                      "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            <[EMAIL PROTECTED]>
- *             Jan Evert van Grootheest   <[EMAIL PROTECTED]>
+ *             Jan Evert van Grootheest   <[EMAIL PROTECTED]>
  *
  *  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;
 }
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to