Newsgroups: comp.os.minix Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!van-bc!ubc-cs!news.UVic.CA!sol.UVic.CA!pmacdona From: pmacdona@sol.uvic.ca (Peter MacDonald) Subject: IDE fix for wini.c problem Message-ID: <1991Mar27.080437.6998@sol.UVic.CA> Sender: pmacdona@sol.UVic.CA (Peter MacDonald) Organization: University of Victoria, Victoria B.C. CANADA Date: Wed, 27 Mar 91 08:04:37 GMT The following problem (or variations thereof) has been posted by a number of people over the last few months. The problem manifests itself as unexpected interrupts during disk reads in protected mode, causing the 386 to hang, usually with the drive light stuck on. In my case, I can invariably induce this condition by running fsck /dev/hd2. I have been wrestling with this problem since last October and think I finally have a (kludgy) fix. After all this time, elegance has ceased to be an issue. After reading an article about IDE drives in the Mar 90 issue of byte (Under The Hood) about how some IDE drives can't keep up with the command streams when doing loads of reads in protected mode, I began to suspect that minix was doing just that to my IDE. Therefore, inserting an artificial delay before reading each sector, should slow down the entire stream. Add to w_transfer in wini.c the lines preceeded with a plus (+): if (wn->wn_opcode == DISK_READ) { for (i=0; i