[comp.os.minix] AT Hard Disk Bug Fix

hubble@cae780.UUCP (04/18/87)

For those of you trying to get MINIX to work on an AT's hard disk, there
is a problem in routine win_init of at_wini.c.  This bug probably only
manifests itself if you have an odd number of heads on your particular
disk.  It is wrong for all disks, but probably survives for an even number
of heads.

The drive parameters are sent incorrectly during startup.  Two lines of
win_init as they now exist (incorrectly):

	command[6] = wini[0].wn_heads || 0xA0;
		.
		.
		.
	command[6] = wini[5].wn_heads || 0xA1;

The correct lines should look like (notice the "|" replacing the "||"):

	command[5] = (wini[0].wn_heads-1) | 0xA0;
		.
		.
		.
	command[5] = (wini[5].wn_heads-1) | 0xB0;

With these changes, my Seagate 80 Mbyte now works with MINIX (with 
appropriate drive parameters hard-coded since DOS doesn't understand
the disk either).

MINIX is much nicer to use on the hard disk.  BTW, I tried the recent
suggestion for EGA problems (use vid_mask of 0x7fff rather that 0x3fff),
it does not work.  I will stick with my scrolling patch I posted
earlier.
					     Larry R. Hubble
				      tektronix!hubble@cae780