READ.ME for the Linux MCA ST506-Driver (alpha version 0.1a)

***************************************************************************

Warning !

This driver is an alpha version which is currently under development. It is
not fully tested (especially the write_intr routine). There are some parts
missing e.g. the busy indicator support and DMA support which is strongly 
recommended on MCA architectures. This code is not intended as a plug and
play driver. It should be an example for those who would like to write ESDI
or SCSI driver for the MCA architecture.

The use of this driver may cause loss of data under some circumstances. No
warranty could be given !!!

Please report any bugs and/or suggestions to 

    term@godot.stgt.sub.org (Thilo Schuster)

It would be very nice to receive a short description of a bug and not
flames like 'This driver is b*ll sh*t !'.

GNU copy-left licence applies.

****************************************************************************

How to get Linux working on PS/2 machines:

I developed this driver on a PS/2 Model 60-041 with Kingston SX/386 Now !
upgrade option. This computer has got a MCA ST-506 interface. My
development is based on the Linux version 0.98p5 but it should be
possible to adapt these patches to the current Linux version.

I compiled Linux under OS/2 with the EMX gcc 0.8e compiler which worked nice
(many thanks to Eberhard Mattes !) after patching the a.out format.

There are three things you have to path:

kernel/sched.c - do_timer:

Add following to the end of the routine

 x=inb_p(0x61);
 outb_p(x|0x80, 0x61);
 outb_p(x&0x7f, 0x61);
 outb(0x20, 0x20);

and declare x as an unsigned char in the declaration part. This will keep the
interrupt controller happy because we have to release the timer interrupt due
to the face that PS/2 use level triggered ints.

kernel/blk_drv/floppy.c 

Patch the two drive parameter tables (floppy_type and floppy_types) to a step 
rate of 6 ms:

static struct floppy_struct floppy_type[] = {
        {    0, 0,0, 0,0,0x00,0x00,0x00,0x00,NULL },    /* no testing */
        {  720, 9,2,40,0,0x2A,0x02,0xDF,0x50,NULL },    /* 360kB PC diskettes */
        { 2400,15,2,80,0,0x1B,0x00,0xAF,0x54,NULL },    /* 1.2 MB AT-diskettes */
        {  720, 9,2,40,1,0x2A,0x02,0xAF,0x50,NULL },    /* 360kB in 720kB drive */
        { 1440, 9,2,80,0,0x2A,0x02,0xAF,0x50,NULL },    /* 3.5" 720kB diskette */
        {  720, 9,2,40,1,0x23,0x01,0xAF,0x50,NULL },    /* 360kB in 1.2MB drive */
        { 1440, 9,2,80,0,0x23,0x01,0xAF,0x50,NULL },    /* 720kB in 1.2MB drive */
        { 2880,18,2,80,0,0x1B,0x00,0xAF,0x6C,NULL },    /* 1.44MB diskette */
};

static struct floppy_struct floppy_types[] = {                                 
        {  720, 9,2,40,0,0x2A,0x02,0xAF,0x50,"360k/PC" }, 
        {  720, 9,2,40,0,0x2A,0x02,0xAF,0x50,"360k/PC" }, 
        { 2400,15,2,80,0,0x1B,0x00,0xAF,0x54,"1.2M" },    
        {  720, 9,2,40,1,0x23,0x01,0xAF,0x50,"360k/AT" }, 
        { 1440, 9,2,80,0,0x2A,0x02,0xAF,0x50,"720k" },    
        { 1440, 9,2,80,0,0x2A,0x02,0xAF,0x50,"720k" },    
        { 2880,18,2,80,0,0x1B,0x00,0xAF,0x6C,"1.44M" },   
        { 1440, 9,2,80,0,0x2A,0x02,0xAF,0x50,"720k/AT" }, 
};                                                                             


kernel/blk_drv/hd.c

replace the current driver with my driver.


Now you have to recompile the kernel and write a boot image with rawrite. Note
that a complete root disk (including some shared libs) is required to get the 
whole thing working. Perhaps you want to remove the SCSI-drivers which will speed
up booting.

The driver has got many comments so it should be easy to understand it. The
ESDI controller is NOT register compatible with the ST-506 controller but 
there are many similarities. The ESDI controller description could be found 
in the

IBM Personal System/2 Model 50/60/80 Adapters and I/O Technical Reference

or in the Tech. Refs of the newer PS/2 Models. Unfortunately I don't own such a 
beast so I can't develop a driver for it.

Currently I don't have any information about the SCSI controllers. 


Enjoy.

Filderstadt 06/12/93

                                            Thilo Schuster
