This package contains an experimental driver for the adapters using FUJITSU MB89352A SCSI controller aka SPC (SCSI protocol controller) for Minix 2.0.0 and its porting to Minix-vmd 1.7.0. Here's a brief instruction to get started. NO WARRANTY ~~~~~~~~~~~ The driver has been tested in very limitted configuration. Try this out on your own risk. COPYRIGHT CONDITION ~~~~~~~~~~~~~~~~~~~ These are basically revision of the part of Minix 2.0.0. Check with Kees :-) (kjb@cs.vu.nl). Ia. INSTALLATION (Standard Minix 2.0.0) Following files will be replaced. Keep them elsewhere before you mess around. /usr/include/minix/config.h /usr/src/kernel/Makefile /usr/src/kernel/driver.h /usr/src/kernel/proto.h /usr/src/kernel/aha_scsi.c /usr/src/kernel/driver.c /usr/src/kernel/table.c On /usr directory extract spc-b4.tar.Z. In addition to the above you'll get the followings. /usr/CHANGES /usr/src/kernel/scsi.h /usr/src/kernel/i8237.c /usr/src/kernel/scsi.c /usr/src/kernel/spc_scsi.c Reconfigure /usr/include/minix/config.h to suit your PC. ENABLE_SPC_SCSI must be set to one to enable SPC driver. Make kernel and install as usual. Ib. INSTALLATION (Minix-vmd 1.7.0) Following files will be replaced. Keep them elsewhere before you mess around. /usr/src/sys/kernel/config.h /usr/src/sys/kernel/driver.h /usr/src/sys/kernel/proto.h /usr/src/sys/kernel/table.c /usr/src/sys/kernel/ibm/Makefile /usr/src/sys/kernel/ibm/aha_scsi.c On /usr/src/sys/kernel directory extract spc-vmd.tar.gz. In addition to the above you'll get the followings. /usr/src/sys/kernel/ibm/i8237.c /usr/src/sys/kernel/ibm/scsi.c /usr/src/sys/kernel/ibm/scsi.h /usr/src/sys/kernel/ibm/spc_scsi.c Reconfigure /usr/src/sys/kernel/config.h to suit your PC. ENABLE_SPC_SCSI must be set to one to enable SPC driver. You also want to reconfigure KEYMAP = XXXX in /usr/src/sys/kernel/ibm/Makefile if you're using a non-USA keyboard. Make kernel and install as usual. II. CONFIGURATION If you have set both ENABLE_AHA_SCSI and ENABLE_SPC_SCSI in config.h, kernel installs Adaptec SCSI driver. To select SPC driver, specify boot parameter scsi=spc just like you select winchester drivers. To see what boot parameter is about, try man edparams. By default the driver assumes that base I/O address is 300H. If not, specify by boot parameter SPC. It has the format SPC=IO:IRQ:DMA where IO, IRQ and DMA stands for base I/O address, interrupt number, and DMA channel respectively. IO is a hexadecimal figure while IRQ and DMA are decimal figures. For example, if your controller has base I/O at 320H, specify: SPC=320 IRQ and DMA are optional and discussed below. Some adapters map I/O ports serially (e.g. 300H, 301H, ...) while others map on even addresses (e.g. 300H, 302H, ...). The driver detects such mapping itself. III. HARDWARE TRANSFER MODES The controller can perform data transfer either by PIO or DMA in addition to manual byte-by-byte transfer. Unless specified by SPC parameter, the driver performs PIO transfer by polling the status of the controller and it usually works fine. By specifying IRQ you can prevent the driver from polling. For example, if interrupt 5 is assigned to your adapter, specify: SPC=320:5 where base I/O is 320H. For some reason if you want to try DMA transfer (extremely slow or fast PC, for example), specify. If channel 3 is assigned to your adapter, specify: SPC=320::3 where base I/O is 320H. You can specify IRQ as well if you want. In any case the driver polls the DMA controller to finish the operation. You need to set DMA_SECTORS in config.h to 8 or greater and recompile kernel to enable DMA transfer, because the driver needs buffer in case the memory address wraps around stepping out of 64 KB boundary or it exceeds 16 MB. You can omit the first field (IO) if it's the default value (300H). Separators (colons) tell which field you're specifying. IV. LIMITATIONS AND KNOWN BUGS The driver has been only tested the use of writable optical disk drive. Hope it works fine on most disk devices. I dared to leave codes to handle tape devices from Adaptec driver which have never been tested. You brave guys try this out and tell me what happens at isibasi@nsknet.or.jp. I got serious troubles including stalling the whole system in the previous beta versions which I have already fixed. The current version seems quite stable under my condition. I controlled the interrupt handler so that you can freely hook, turn on, turn off and remove devices while minix is up and running, but don't do that while the media are mounted, of course. Removable media are locked while mounted. If the medium is write-protected, mount claims "invalid file system" (standard Minix 2.0.0) or "Permission denied" (Minix-vmd 1.7.0) unless you specify -r option. The operating system but not the driver prompts this funny message. Report bugs and impairments to: osamu@isibasi.com. You're welcome to report good results on your particular machines, of course. May 23, 2000 Osamu Ishibashi, M.D., Ph.D.