[unix-pc.general] Fix disks: More than 2 drives?

michael@stb.uucp (Michael Gersten) (02/01/90)

Here's a simple question: Did the fix disk hard disk driver allow
using 4 drives (since there is hardware out there that supports it)?

			Michael
-- 
		Michael
denwa!stb!michael anes.ucla.edu!stb!michael 
"The 80's: Ten years that came in a row."

lenny@icus.islp.ny.us (Lenny Tropiano) (02/02/90)

In article <1990Feb1.070641.17593@stb.uucp> michael@stb.uucp (Michael Gersten) 
writes:
|>Here's a simple question: Did the fix disk hard disk driver allow
|>using 4 drives (since there is hardware out there that supports it)?
|>

As per several e-mail messages from John Milton (jbm@uncle), I tried to
get 4 drive support in the now released-UNIX3.51m.  No it's not there.
Unfortunately there were several reasons why this couldn't be put in
(or even snuck in).   Other problems like _risking_ possible other 
bugs sneaking in by changing delicate device drivers (gd).  Again, since
AT&T doesn't _officially_ support the two drive hack, they wouldn't go
for a change like this for a four drive hack.   I certainly would have
enjoyed seeing it if it became a reality!  I wouldn't mind having 
three fixed hard drives, and a removable... dream on.

What is the status on John's board?  Last I heard was Craig Votava saying
he had problems with it?  Are you going to release the two-drive version of
your pre-made PC board to the net? John?

-Lenny
-- 
| Lenny Tropiano            ICUS Software Systems      lenny@icus.islp.ny.us |
| {ames,pacbell,decuac,hombre,sbcs,attctc}!icus!lenny     attmail!icus!lenny |
+------- ICUS Software Systems -- PO Box 1;  Islip Terrace, NY  11752 -------+

kls@ditka.UUCP (Karl Swartz) (02/02/90)

In article <1990Feb1.070641.17593@stb.uucp> michael@stb.uucp (Michael Gersten) writes:
>Here's a simple question: Did the fix disk hard disk driver allow
>using 4 drives (since there is hardware out there that supports it)?

Here's the simple answer: No.

Elaboration: According to what I was told by someone who knows the
code quite well, it won't ever happen, nor will double floppy drives
happen.  Not with a few binary hacks to the drivers, not with a few
days of hacking on the source.  Nothing short of a complete rewrite
of the disk drivers (hard and floppy) would increase the limit above
the present one floppy and two hard disks.

Evidently, there are various places where the drive select is stored
as a two-bit field, where one bit selects hard or floppy.  Alas, the
floppy driver hasn't even a hint of a clue about drive selects so
the bit available for selecting between two floppies is wasted.  At
one point there was thought that it might be stolen for a third hard
drive but it quickly became obvious that that would lead to a major
project too.

Of course one might increase the field to three bits, giving four
ways to select the one floppy plus four hard drive selects, but the
code evidently isn't well parameterized, and would be quite dicey
not to mention difficult to modify in this manner.

So, while John Milton's efforts to support two floppies and four
hard disks in his hardware are admirable, they are wasted, unless
somebody comes up with a new OS for the UNIX PC.

-- 
Karl Swartz			 |UUCP	uunet!apple!zygot!ditka!kls
1-408/223-1308			 |INet	zygot!ditka!kls@apple.com
"I never let my schooling get in |BIX	kswartz
the way of my education."(Twain) |Snail	1738 Deer Creek Ct., San Jose CA 95148

jbm@uncle.UUCP (John B. Milton) (02/05/90)

In article <1083@icus.islp.ny.us> lenny@icus.islp.ny.us (Lenny Tropiano) writes:
>In article <1990Feb1.070641.17593@stb.uucp> michael@stb.uucp (Michael Gersten) 
>writes:
>|>Here's a simple question: Did the fix disk hard disk driver allow
>|>using 4 drives (since there is hardware out there that supports it)?
>As per several e-mail messages from John Milton (jbm@uncle), I tried to
>get 4 drive support in the now released-UNIX3.51m.  No it's not there.
>Unfortunately there were several reasons why this couldn't be put in
>(or even snuck in).   Other problems like _risking_ possible other 
>bugs sneaking in by changing delicate device drivers (gd).  Again, since
>AT&T doesn't _officially_ support the two drive hack, they wouldn't go
>for a change like this for a four drive hack.   I certainly would have
>enjoyed seeing it if it became a reality!  I wouldn't mind having 
>three fixed hard drives, and a removable... dream on.
>
>What is the status on John's board?  Last I heard was Craig Votava saying
>he had problems with it?  Are you going to release the two-drive version of
>your pre-made PC board to the net? John?

Oh well, we tried. The code was actually VERY trivial.

As far as the HD2 project, I am satisfied with the performance so far.
Craig Votava is back up after several problems. The test machine I have
on loan from gws@n8emr ran until the power supply died.

I am now pricing various board building houses to get the HD2 board produced.
I have not changed the design at all, so if a 4 drive kernel ever comes out,
the board will still support it.

Since thing(s) like NMOUNT were changed, could someone please supply accurate
patches to the /usr/include/sys files? Lenny? John?

sys/gdisk.h: change DISKS from 3 to 6 /* two floppies (later) and four HDs */
sys/gdisk.h: change DRVMSK from 3 to 7 /* from two bits to three */
sys/hardware.h:	add DDRIVE2 0x0004
sys/hardware.h:	add DDRIVE3 0x0008
sys/space.h: add:
	char gdh2bbq[HDMAXCYL], gdh3bbq[HDMAXCYL];
	struct bbmcell gdh2bb[HDMAXBADBLK], gdh3bb[HDMAXBADBLK];
	two more structs: (ouch)
struct gdsw gdsw[] = {
	{	0,{"WIN2", 1023, 4, 17, 68,0, 0, 512},
		-1,0,16, 1023*16,40, ghdintr, ghdstart,
		HDMAXCYL, HDMAXBADBLK, gdh2bbq, gdh2bb,0},
	{	0,{"WIN3", 1023, 4, 17, 68,0, 0, 512},
		-1,0,16, 1023*16,40, ghdintr, ghdstart,
		HDMAXCYL, HDMAXBADBLK, gdh3bbq, gdh3bb,0}

struct iobuf	gdutab[DISKS];

I'll get to work on a loadable device driver that provides storage for the
additional arrays and new storage for the expandable arrays. Next, I need to
find all references to gdsw and gdutab so they can be patched at load time.
The last and yuckiest one is to find all the code to patched and patch it.
All this is an incredible bitch, but doable.

John
-- 
John Bly Milton IV, jbm@uncle.UUCP, n8emr!uncle!jbm@osu-cis.cis.ohio-state.edu
(614) h:252-8544, w:469-1990; N8KSN, AMPR: 44.70.0.52; Don't FLAME, inform!