Re: how to slow down IDE ?

MOLNAR Ingo (mingo@chiara.csoma.elte.hu)
Fri, 3 Apr 1998 19:30:56 +0200 (CEST)


On Fri, 3 Apr 1998, Harald Koenig wrote:

> I need to slow down IDE accesses for a Toshiba notebook with unknown
> PCI/IDE chipset

does the attached 2.1.92 patch help? It puts a 10 usecs delay between
individual port IO accesses, and a 1 millisec delay between sector
accesses ... it's sure an overkill, change the defines if too slow.

--- linux/drivers/block/ide.c.orig Thu Apr 9 07:45:24 1998
+++ linux/drivers/block/ide.c Thu Apr 9 07:48:24 1998
@@ -309,16 +309,16 @@
#endif /* SUPPORT_VLB_SYNC */
insl(IDE_DATA_REG, buffer, wcount);
} else {
-#if SUPPORT_SLOW_DATA_PORTS
- if (drive->slow) {
- unsigned short *ptr = (unsigned short *) buffer;
- while (wcount--) {
- *ptr++ = inw_p(IDE_DATA_REG);
- *ptr++ = inw_p(IDE_DATA_REG);
- }
- } else
-#endif /* SUPPORT_SLOW_DATA_PORTS */
- insw(IDE_DATA_REG, buffer, wcount<<1);
+#define DELAY_1 10
+#define DELAY_2 1000
+ unsigned short *ptr = (unsigned short *) buffer;
+ while (wcount--) {
+ *ptr++ = inw_p(IDE_DATA_REG);
+ udelay(DELAY_1);
+ *ptr++ = inw_p(IDE_DATA_REG);
+ udelay(DELAY_1);
+ }
+ udelay(DELAY_2);
}
}

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu