Is this adequate?
You need a VIA82xxx board, HLT and pass disableviahlt on boot.
Tested on my system with success. Please check for
errors.
Helmut
--
My GNUpg fingerprint http://www.gnupg.org
4563 F4FB 0B7E 8698 53CD 00E9 E319 35BD 6A91 1656
--- linux-2.6.15/drivers/ide/ide-dma.c 2006-01-19 20:53:01.000000000 +0100
+++ linux-2.6.15.viahlt/drivers/ide/ide-dma.c 2006-01-19 20:50:45.000000000 +0100
@@ -90,6 +90,57 @@
#include <asm/io.h>
#include <asm/irq.h>
+
+
+#ifdef CONFIG_BLK_DEV_VIA82CXXX
+static DEFINE_SPINLOCK(ide_hlt_lock);
+static int hlt_disabled;
+static int disableviahlt;
+static void ide_disable_hlt(void)
+{
+ unsigned long flags;
+
+ spin_lock_irqsave(&ide_hlt_lock, flags);
+ if(!hlt_disabled && disableviahlt) {
+ hlt_disabled = 1;
+#ifdef HAVE_DISABLE_HLT
+ disable_hlt();
+#endif
+ }
+ spin_unlock_irqrestore(&ide_hlt_lock, flags);
+}
+
+static void ide_enable_hlt(void)
+{
+ unsigned long flags;
+
+ spin_lock_irqsave(&ide_hlt_lock, flags);
+ if(hlt_disabled && disableviahlt){
+ hlt_disabled = 0;
+#ifdef HAVE_DISABLE_HLT
+ enable_hlt();
+#endif
+ }
+ spin_unlock_irqrestore(&ide_hlt_lock, flags);
+}
+
+static int __init disableviahlt(char *str)
+{
+ printk(KERN_WARNING "DISABLE VIA HLT activated\n");
+ disableviahlt = 1;
+ return 1;
+}
+
+__setup("disableviahlt", disableviahlt);
+
+
+#else
+static void ide_disable_hlt(void)
+{}
+static void ide_enable_hlt(void)
+{}
+#endif
+
static const struct drive_list_entry drive_whitelist [] = {
{ "Micropolis 2112A" , "ALL" },
@@ -303,6 +354,9 @@
if (count) {
if (!is_trm290)
*--table |= cpu_to_le32(0x80000000);
+#ifdef CONFIG_BLK_DEV_VIA82CXXX
+ ide_disable_hlt();
+#endif
return count;
}
printk(KERN_ERR "%s: empty DMA table?\n", drive->name);
@@ -334,6 +388,9 @@
int nents = HWIF(drive)->sg_nents;
pci_unmap_sg(dev, sg, nents, HWIF(drive)->sg_dma_direction);
+#ifdef CONFIG_BLK_DEV_VIA82CXXX
+ ide_enable_hlt();
+#endif
}
EXPORT_SYMBOL_GPL(ide_destroy_dmatable);