
##	-*-Fundamental-*- (Just help Emacs)
##	Name	:	cyril
##	Date	:	Fri Mar 11 10:29:12 1994
##	Subject	:	How to install the dpt driver
##	File	:	dpt.info
##	Modif	:	Thu Sep 22 20:41:21 1994
##	Version	:	$Id: README,v 1.3 1994/09/22 19:51:31 cyril Exp $
##


#
# Sorry for my english I am french
# if someone wants to correct this you can do it and send to me 
# the correct version
#
# E-MAIL : cyrilsz@renux.frmug.fr.net

	Hello,

This file describes the installation of the DPT driver.

The driver works with Linux Version 1.1.45 (current release when I wrote these
lines).

Don't forget to backup your system before install the driver we never know.

What's new since 1.1
--------------------

All parameters are dynamic change (because i can alloc memory at boot time).
New Alloc Bitmap Function (No limit to 32 max queuecommands).
Multi Board  support (I hope).
scsicam_bios_param is use (remove dpt_bios <- Was ugly).
When printk use KERN_ for debug warning and info.
Of corse Cleanup.

What's new since 1.2
--------------------

Some cleanup.
Support Linux 1.1.51.

INFO
----

I have been using this driver for several weeks and I did not find any problem,
but I have a 2122 board, EISA version and 68020 CPU and I have never tested it
with an ISA board.

If it works for you on an ISA board, please let me know.  Send me a mail and
tell me that it is working (I hope to receive such mails ;-)).

Last Info: 
No more Bug, I reach the stress test.
Two Warning appear when compile dpt.c that value compute is not used 
i am sorry this value is used and is working Why this Message ??.

DMA MODE ONLY 
-------------

The driver currently only works in DMA mode and not in PIO mode (I don't know
if I will work on the support of PIO mode -- it depends on the mail that I
will hopefully receive about this problem.)

I will not support the PIO the last PIO routine (detect) is now in DMA
mode so ...

Caution
=======

I have no idea of what happens in a normal DPT board, because i have a 
EISA DPT board (2122 68020 CPU and EISA BUS), but normally it is  
working.  The only problem is the automatic routine that detects the DPT. 
If it doesn't detect your board, change the value iobase in the file dpt.c.

ushort dpt_iobase[] = { 0x1c88, 0x0  };

and put in first the address of the board.  The driver normally detects the
irq used by the board.

If there are any time-out problems (the kernel prints some messages and these
messages should be in your syslog output), increase the value of the variable
TIMEOUT in the file dpt.h.  The default value is set for a 486DX50 and it's
large.

SOME INFO
=========

This part is give some info how to configure the DPT board.

First pay attention to the terminator (If it working under DOS it is not 
a reason to pass this part,DOS is slow and do I/O Slowly, and LINUX do it
faster ;-). And the position of the terminator is very important
you must have a terminator ONLY in the last device in the scsi bus, you
have to do it for internal and external bus.

					   ---- Terminator 		
		 ---------------           v
                |     DPT  	|----o-o-o-|
 		|    BOARD	|    ^ ^ ^----- Device (Disk Tape ..)
		 ---------------    
			~~~~~~~~

Next Part if for the setup part.

CONTROLLER PARAMETERS 
=====================

WD1003 Boot Adress			: 	Never Mind
Interrupt Number			:	It is up to you
Floppy Disk Controller			: 	You must know ;-)
SCSI BIOS ROM Adress			:	Not used By the driver but 
						use by lilo for load Kernel
Host Bus Adapter SCSI ID		: 	7 (Like every body)

SCSI PARAMETERS
===============

Maximum Tranfert Rate 			:	10 MB/s (internal Bus)
External Cable Detection		: 	Disable (external Bus)
If no external device, if you have some external devices try Disable,
but if there is some probleme Enable (5 MB/s).
SCSI Terminator				: 	Enable, it is not a good 
						idea to Disable 
Command Queueing			:	Enable (Of course)
Comand Timeout				:	Up to You, Linux Do it too.

CACHE PARAMETERS
================

Cache					: 	Read and Write Caching
Maximum Percentage Dirty		: 	50 % 
Maximum Percentage Read-Ahead		:	30 % 
Read-Ahead				: 	Disabled
Long Record Caching			: 	Disabled

Fot the Last Parameters i know that this is poor value, but Linux do the 
same think so we do it twice. I will made some test for the best values.

PERF
====

I compare two board (Gniark)
The First Competitor is ...		ADAPTECH 1742
The Second is ...			DPT 2122
Both test on the same computer 486DX50 32 Mo Memorys, and Disk Seagate, and
EISA bus.

The Result
==========
			ADAPTECH 		DPT
mkfs   100 Mo		0:58 m			0:46 m
dd of  100 Mo		1:07 m			0:52 m
tar of 100 Mo		4:03 m			3:40 m

The Winner is DPT. 
	Why : 	Because the Scatter/Gather List is larger in the DPT board
		so with big file the DPT is faster (simple).


HOW TO INSTALL
==============

DPT FILE
--------

To install, first put the file dpt.c and dpt.h in the scsi subdirectory in
the kernel sources (normally /usr/src/linux/drivers/scsi).

Then, you have to apply patches to integrate the DPT driver into the
kernel.  You can use the patch file included in the package or do it
the hard way (i.e. modify the source files yourself).

If you choose to use the patch file, all you have to do is:
	cd /usr/src
	patch -p -s <dpt.diff
then, you have to recompile the kernel.

If you prefer to change every file yourself, follow these instructions:

CONFIG.IN
---------

You have to modify the file config.in to add the DPT driver in the SCSI part.
	*
	* SCSI low-level drivers
	*
(..)
bool 'DPT support' CONFIG_SCSI_DPT y

This is for the automatic config of the kernel.

HOSTS.C
-------

You have to change the file hosts.c located in the directory drivers/scsi.

Now the hosts.c file in the directory ( $HOME_LINUX_PATH/driver/scsi)
edit it (vi or emacs), in the beginning of the file you can see lots of include 
so insert in all this include this line 

First, at the beginning of the file, you have to insert the following lines:

#ifdef CONFIG_SCSI_DPT
#include "dpt.h"
#endif
 
these lines should be added after the other #include directives.

Then, change the declaration of the structure 'scsi_hosts[]' to add:

#ifdef CONFIG_SCSI_DPT
	DPT,
#endif

MAKEFILE 
--------

Last, you have to change the file Makefile in drivers/scsi to include these
lines:

ifdef CONFIG_SCSI_DPT
SCSI_OBJS := $(SCSI_OBJS) dpt.o
SCSI_SRCS := $(SCSI_SRCS) dpt.c
endif

MAKE THE NEW KERNEL
-------------------

Now, you have to compile a new kernel.  To do so, run the following commands:

make mkproper (Clean everything)
make config (And don't forget to include the DPT driver in the configuration ;-)) 
make depend 
make (And wait)

You should obtain a new kernel able to support a DPT board.


NEXT TASK
=========

I would like to port the UFS filesystem to Linux so if you have some info,
ideas, or anything, please mail me and I'll try to work on it.

	Enjoy !

		Cyril


