lkml.org 
[lkml]   [1998]   [Apr]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: how to slow down IDE ?


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

\
 
 \ /
  Last update: 2005-03-22 13:42    [W:0.033 / U:0.228 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site