lkml.org 
[lkml]   [1998]   [Apr]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: how to slow down IDE ?
On Apr 03, MOLNAR Ingo wrote:

> 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.

thanks for the pointer!

yes, those values are overkill, they lowered transfer rate to ~120 kB/sec.

with DELAY_1==1 and DELAY_2==0 I got ~600kB/sec,
with DELAY_1==0 and DELAY_2==100 I got ~1200kB/sec,
with DELAY_1==0 and DELAY_2==0 I got ~1600kB/sec (this is just like
SUPPORT_SLOW_DATA_PORTS defined and drive->slow set with "idex=slow").

even with the last setting, the machine/disk works rock solid.
is this a known problem for IDE disks dying (or for IDE chipsets) ?


> --- 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);
> }
> }



Harald
--
All SCSI disks will from now on ___ _____
be required to send an email notice 0--,| /OOOOOOO\
24 hours prior to complete hardware failure! <_/ / /OOOOOOOOOOO\
\ \/OOOOOOOOOOOOOOO\
\ OOOOOOOOOOOOOOOOO|//
Harald Koenig, \/\/\/\/\/\/\/\/\/
Inst.f.Theoret.Astrophysik // / \\ \
koenig@tat.physik.uni-tuebingen.de ^^^^^ ^^^^^

-
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:2.360 / U:0.008 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site