Notes on the operation of ICP Controllers under LINUX
=====================================================
Date: July/20/2000

We have tested LINUX from:
Caldera
Corel Linux OS
Debian
DLD
LST   
RedHat
S.u.S.E.

1) Available Drivers and Tools
2) Updating the driver using the driver sources
3) ICPCON - monitoring tool
4) gdth driver parameters
5) Further interesting information


1) Available Drivers and Tools:
-------------------------------

gdth.tgz             ICP driver sources for intel and alpha systems
icpcon.tgz           ICPCON for intel systems
icpcon_a.tgz         ICPCON for alpha systems
icpd???s.tgz         Remote access service for SuSE Linux (???=version number)
icpd???r.tgz         Remote access service for Redhat Linux (???=version number)


2) Updating the driver using the driver sources:
------------------------------------------------

a) Copy the driver sources to /usr/src/linux/drivers/scsi
   (for a DOS disk for example with 'mcopy -b a:gdth.tgz')

b) Unpack the archive with 'tar xvfz gdth.tgz

c) Compile a new Kernel
   (procedure depends on the Linux distribution, 'make config',
   'make dep', 'make clean' may become necessary before)


3) ICPCON - Monitoring Tool
---------------------------

icpcon.tgz           (intel)
icpcon_a.tgz         (alpha)

unpack the tgz-file:  'tar xvfz icpcon.tgz'
start icpcon:         './icpcon'

For the usage of ICPCON a gdth driver version 1.21 or higher is required. To check
the current gdth driver version simply type:

'grep Driver /proc/scsi/gdth/0' (/proc/scsi/gdth/1, /proc/scsi/gdth/2, etc.)


4) gdth driver parameters
-------------------------

Driver versions older than 1.05 do not support driver parameters.
From driver version 1.05 to 1.07 it is necessary to add driver parameters
directly in /usr/src/linux/drivers/scsi/gdth.c . From version 1.10 on you may
use for the parameters the LILO boot prompt (gdth=...") or in /etc/lilo.conf
the append command (append = "gdth=...").

Reservation of SCSI devices:

The reservation of SCSI devices becomes necessary if you wish that so-called 
'Direct Access Devices' (e.g. hard disks, removable hard disks like IOMEGA or
SyQuest, some MOs) are directly controlled by Linux and not the ICP
Controller's firmware (i.e., they are not configured as Host Drives). This is
also called "raw-service". In this case the ICP Controller does not cache the
data to/from the reserved SCSI device. This reservation is important for
removable hard disks. If they are controlled by the ICP Controller and are a
Host Drive, a media change is very difficult. 'Non Direct Access Devices' like
CD-ROMs, Streamers, DATs, etc. do NOT require a reservation.
IMPORTANT: The reservation is only possible with not-initialized SCSI devices.
(Use GDTSETUP to de-initialize an already initialized device).

As already mentioned a reservation for driver versions 1.05 to 1.07 has to be
made directly in the driver sources. Look for 'gdth_reserve_str' in  
'/usr/src/linux/drivers/scsi/gdth.c' . You'll find a non-active sample entry,
which you can change according to the coordinates of the device you want to
reserve (enter Adapter, Bus, ID and LUN). Save the file and compile a new
kernel.

From driver version 1.10 on you can add the parameters for the reservation
with the LILO append command:

Excerpt of /etc/lilo.conf:

# End LILO global section
# Linux bootable partition config begins
image = /boot/vmlinuz
root = /dev/sda2
label = Linux
append = "gdth=reserve_list:1,0,6,0"
# Linux bootable partition config ends

This gdth driver parameter reserves the SCSI device which is connected with
ICP Controller 1 (second ICP Controller), SCSI Bus 0 (channel A), ID 6,
LUN 0 for Linux (raw service).

After each change in /etc/lilo.conf , lilo must be loaded once.

Driver parameters may also be entered at the LILO boot prompt.
(e.g.: gdth=reserve_list:1,0,6,0).


Further driver parameters:

irq1,irq2, etc.                  Only for ICP EISA Controllers with disabled
                                 BIOS (irq1, irq2, etc. correspond with the
                                 IRQs of the ICP Controllers)
disable:Y                        deactivates the ICP driver
disable:N                        activates the ICP driver
reserve_mode:0                   reserves no SCSI devices [*1]
reserve_mode:1                   reserves all not-initialized removable
                                 hard disk [*1]
reserve_mode:2                   reserves all not-initialized SCSI devices [*1]
reserve_list:h,b,t,l,h,b,t,l,... reserves SCSI devices at the corresponding
                                 coordinates with
                                 h=Hostadapter, b=SCSI Bus, t=Target ID, l=LUN
reverse_scan:Y                   reversed scanning order of the PCI controllers
reverse_scan:N                   normal scanning order of PCI Controllers
                                 according to the system BIOS
max_ids:x                        x = number of target IDs per SCSI channel
                                 (accelerates the boot process)
rescan:Y                         rescan all SCSI channels / IDs
rescan:N                         scan only those SCSI devices found during
                                 system power up [*1]

[*1] The driver parameters reserve_mode and rescan:N require ICP Controllers
with firmware version FW 1.23.00/2.23.00 or higher.

The current default settings of the driver are:

"gdth=disable:N,reserve_mode:1,reverse_scan:N,max_ids:127,rescan:N"

If gdth is loaded as a module, these parameters can also be added with
a special syntax.
IRQ parameters are entered as 'IRQ=' (e.g. IRQ=10). Several parameters
are not separated with a comma (',') but a space (' ').
All ':' are substituted with '=', all 'Y' with '1' and all 'N' with '0'.

Default: "modprobe gdth disable=0 reserve_mode=1 reverse_scan=0 
 max_ids=127 rescan=0"


5) Further interesting information:
-----------------------------------

/proc-Support:

Read of /proc/scsi/gdth/0, /proc/scsi/gdth/1, .. :
Displays the ICP Controller/SCSI busses, firmware version, driver version
(e.g.: cat /proc/scsi/gdth/0)

Write to /proc/scsi/gdth/0, .. :
    gdth flush          Flush all Host Drives of the ICP Controller
    gdth flush drive    Flush the Host Drive with the number drive
    gdth wbp_off        Disable Write-Back permanently
    gdth wbp_on         Enable Write-Back permanently 
    gdth wb_off         Disable Write-Back for this session
                        (from Firmware version 1.15/2.15)
    gdth wb_on          Enable Write-Back for this session
                        (from Firmware version 1.15/2.15)


- End of file -