• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..--

aacraid/01-Feb-2010-7,2234,496

aic7xxx/01-Feb-2010-72,86756,091

aic7xxx_old/01-Feb-2010-5,5774,925

dpt/01-Feb-2010-2,1611,132

pcmcia/01-Feb-2010-4,6543,222

sym53c8xx_2/01-Feb-2010-20,67211,916

3w-xxxx.cD01-Feb-2010127.7 KiB3,6502,718

3w-xxxx.hD01-Feb-201023.2 KiB603486

53c7,8xx.cD01-Feb-2010201.7 KiB6,4383,874

53c7,8xx.hD01-Feb-201051.7 KiB1,531775

53c7,8xx.scrD01-Feb-201038.5 KiB1,3051,193

53c700.cD01-Feb-201068.3 KiB2,1321,520

53c700.hD01-Feb-201018.7 KiB597447

53c700.scrD01-Feb-201010.6 KiB412374

53c7xx.cD01-Feb-2010190.2 KiB6,1243,649

53c7xx.hD01-Feb-201054.8 KiB1,609818

53c7xx.scrD01-Feb-201045.9 KiB1,5921,472

53c8xx_d.hD01-Feb-201059.1 KiB2,679735

53c8xx_u.hD01-Feb-20102.5 KiB9897

AM53C974.cD01-Feb-201089.3 KiB2,4571,741

AM53C974.hD01-Feb-20103.2 KiB8048

BusLogic.cD01-Feb-2010179.5 KiB5,0013,389

BusLogic.hD01-Feb-201052.3 KiB1,8101,111

ChangeLogD01-Feb-201058.6 KiB2,0241,219

ChangeLog.ipsD01-Feb-20105.7 KiB13889

ChangeLog.ncr53c8xxD01-Feb-201022.2 KiB496450

ChangeLog.serverraidD01-Feb-20104.4 KiB10470

ChangeLog.sym53c8xxD01-Feb-201028.8 KiB594544

Config.inD01-Feb-201014.4 KiB276257

FlashPoint.cD01-Feb-2010308.1 KiB12,1607,990

LICENSE.FlashPointD01-Feb-20102.6 KiB6145

MakefileD01-Feb-20108 KiB237188

NCR5380.cD01-Feb-201097.1 KiB3,0091,495

NCR5380.hD01-Feb-201013.5 KiB435251

NCR53C9x.cD01-Feb-2010100.9 KiB3,6182,442

NCR53C9x.hD01-Feb-201029.6 KiB649421

NCR53c406a.cD01-Feb-201031.3 KiB1,102845

NCR53c406a.hD01-Feb-20102.6 KiB7630

NCR_D700.cD01-Feb-20108.8 KiB332189

NCR_D700.hD01-Feb-20101.2 KiB4623

README.53c700D01-Feb-20104.9 KiB155102

README.AM53C974D01-Feb-20108.8 KiB247197

README.BusLogicD01-Feb-201027.8 KiB614463

README.FlashPointD01-Feb-20108.4 KiB164137

README.MylexD01-Feb-2010301 64

README.aha152xD01-Feb-20106.4 KiB184122

README.aic7xxxD01-Feb-201023.5 KiB478416

README.dptiD01-Feb-20103.5 KiB8482

README.dtc3x80D01-Feb-20101.9 KiB4635

README.g_NCR5380D01-Feb-20102.2 KiB6450

README.ibmmcaD01-Feb-201075.9 KiB1,4031,281

README.in2000D01-Feb-20108.2 KiB203165

README.ncr53c7xxD01-Feb-20101.1 KiB4124

README.ncr53c8xxD01-Feb-201072.1 KiB1,8551,461

README.osstD01-Feb-20108.7 KiB220184

README.ppaD01-Feb-2010392 1711

README.qlogicfasD01-Feb-20103.2 KiB8061

README.qlogicispD01-Feb-2010801 3521

README.stD01-Feb-201020.4 KiB440373

README.tmscsimD01-Feb-201020.6 KiB450376

a2091.cD01-Feb-20106.3 KiB253191

a2091.hD01-Feb-20102.5 KiB9467

a3000.cD01-Feb-20105.8 KiB225160

a3000.hD01-Feb-20102.6 KiB9871

advansys.cD01-Feb-2010724.4 KiB18,68112,809

advansys.hD01-Feb-20104.9 KiB12664

aha152x.cD01-Feb-201097.7 KiB3,9602,803

aha152x.hD01-Feb-201011.1 KiB360273

aha1542.cD01-Feb-201049.2 KiB1,8071,246

aha1542.hD01-Feb-20105.6 KiB173111

aha1740.cD01-Feb-201017.7 KiB624473

aha1740.hD01-Feb-20106.2 KiB189145

ahci.cD01-Feb-201039.4 KiB1,3901,078

aic7xxx_old.cD01-Feb-2010392 KiB11,9868,270

amiga7xx.cD01-Feb-20102.8 KiB11585

amiga7xx.hD01-Feb-20101.1 KiB4031

ata_piix.cD01-Feb-201020.5 KiB758484

atari_NCR5380.cD01-Feb-201092.2 KiB3,0081,585

atari_dma_emul.cD01-Feb-201010.8 KiB467306

atari_scsi.cD01-Feb-201035.7 KiB1,149677

atari_scsi.hD01-Feb-20107.4 KiB268193

atp870u.cD01-Feb-201058.8 KiB2,8902,638

atp870u.hD01-Feb-20101.9 KiB7250

blz1230.cD01-Feb-20107.8 KiB301200

blz1230.hD01-Feb-20102.5 KiB7642

blz2060.cD01-Feb-20106.8 KiB259170

blz2060.hD01-Feb-20102.3 KiB7141

bvme6000.cD01-Feb-20101.1 KiB5336

bvme6000.hD01-Feb-20101.1 KiB4132

changelog.megaraid2D01-Feb-20106.5 KiB153122

constants.cD01-Feb-201044.9 KiB1,006889

constants.hD01-Feb-2010185 76

cpqfc.ReadmeD01-Feb-201011.9 KiB265234

cpqfcTS.hD01-Feb-20101.9 KiB4536

cpqfcTSchip.hD01-Feb-20109 KiB241130

cpqfcTScontrol.cD01-Feb-201065.5 KiB2,028951

cpqfcTSi2c.cD01-Feb-201010.7 KiB435200

cpqfcTSinit.cD01-Feb-201054.7 KiB1,7911,025

cpqfcTSioctl.hD01-Feb-20101.8 KiB6732

cpqfcTSstructs.hD01-Feb-201042.8 KiB1,462944

cpqfcTStrigger.cD01-Feb-2010872 3418

cpqfcTStrigger.hD01-Feb-2010167 86

cpqfcTSworker.cD01-Feb-2010184.8 KiB5,3892,999

cyberstorm.cD01-Feb-20109.3 KiB325204

cyberstorm.hD01-Feb-20102.4 KiB7446

cyberstormII.cD01-Feb-20107.4 KiB276181

cyberstormII.hD01-Feb-20101.9 KiB6141

dc390.hD01-Feb-20103 KiB9569

dec_esp.cD01-Feb-201013.7 KiB535373

dec_esp.hD01-Feb-20101.3 KiB4631

dmx3191d.cD01-Feb-20103.2 KiB12772

dmx3191d.hD01-Feb-20102 KiB6945

dpt_i2o.cD01-Feb-201084.8 KiB3,3382,523

dpti.hD01-Feb-201013.5 KiB404313

dtc.cD01-Feb-201010.9 KiB425252

dtc.hD01-Feb-20103.2 KiB12368

eata.cD01-Feb-201080.5 KiB2,4151,499

eata.hD01-Feb-20101.7 KiB3728

eata_dma.cD01-Feb-201045.4 KiB1,5711,210

eata_dma.hD01-Feb-20104.9 KiB11661

eata_dma_proc.cD01-Feb-201013.4 KiB479389

eata_dma_proc.hD01-Feb-20104.7 KiB261211

eata_generic.hD01-Feb-201014.9 KiB413302

eata_pio.cD01-Feb-201028.5 KiB1,018793

eata_pio.hD01-Feb-20103.6 KiB10859

eata_pio_proc.cD01-Feb-20103.9 KiB12980

esp.cD01-Feb-2010119.7 KiB4,3723,029

esp.hD01-Feb-201021.2 KiB451296

fastlane.cD01-Feb-20109.7 KiB377243

fastlane.hD01-Feb-20102 KiB6644

fcal.cD01-Feb-20109.1 KiB304233

fcal.hD01-Feb-20101.2 KiB4732

fd_mcs.cD01-Feb-201043.3 KiB1,470969

fd_mcs.hD01-Feb-20102 KiB5328

fdomain.cD01-Feb-201065.6 KiB2,0561,189

fdomain.hD01-Feb-20102.3 KiB5427

g_NCR5380.cD01-Feb-201024.9 KiB918580

g_NCR5380.hD01-Feb-20104.1 KiB15092

gdth.cD01-Feb-2010222.1 KiB6,2465,202

gdth.hD01-Feb-201049.7 KiB1,080880

gdth_ioctl.hD01-Feb-201014.9 KiB348304

gdth_proc.cD01-Feb-201037.2 KiB1,112999

gdth_proc.hD01-Feb-20101.5 KiB3928

gvp11.cD01-Feb-20109.9 KiB377268

gvp11.hD01-Feb-20102.3 KiB8255

hosts.cD01-Feb-20108.6 KiB303177

hosts.hD01-Feb-201020.3 KiB600173

i60uscsi.cD01-Feb-201029.2 KiB871584

i60uscsi.hD01-Feb-201022.6 KiB568372

i91uscsi.cD01-Feb-201082.1 KiB2,8092,119

i91uscsi.hD01-Feb-201035 KiB855603

ibmmca.cD01-Feb-201096.4 KiB2,5692,021

ibmmca.hD01-Feb-20102.4 KiB5130

ide-scsi.cD01-Feb-201032.8 KiB1,219965

ide-scsi.hD01-Feb-20101.4 KiB3828

imm.cD01-Feb-201031 KiB1,274896

imm.hD01-Feb-20106.3 KiB18699

in2000.cD01-Feb-201077.2 KiB2,3691,394

in2000.hD01-Feb-201014.8 KiB430309

ini9100u.cD01-Feb-201024.5 KiB830523

ini9100u.hD01-Feb-20109.9 KiB285163

inia100.cD01-Feb-201026.2 KiB799500

inia100.hD01-Feb-201016.6 KiB442275

ips.cD01-Feb-2010242.2 KiB7,4964,711

ips.hD01-Feb-201044 KiB1,3041,001

jazz_esp.cD01-Feb-20107.4 KiB276188

jazz_esp.hD01-Feb-20101.1 KiB4028

lasi700.cD01-Feb-20104.7 KiB199137

lasi700.hD01-Feb-20101.9 KiB6935

libata-core.cD01-Feb-2010119.6 KiB4,9732,713

libata-scsi.cD01-Feb-201061.1 KiB2,5041,338

libata.hD01-Feb-20103.4 KiB8850

mac53c94.cD01-Feb-201013.8 KiB562475

mac53c94.hD01-Feb-20105.6 KiB239160

mac_NCR5380.cD01-Feb-201095.4 KiB3,1411,682

mac_esp.cD01-Feb-201015.9 KiB725440

mac_esp.hD01-Feb-2010933 4225

mac_scsi.cD01-Feb-201014.3 KiB586400

mac_scsi.hD01-Feb-20102.6 KiB11567

mca_53c9x.cD01-Feb-201012.1 KiB479214

mca_53c9x.hD01-Feb-20102 KiB6734

megaraid.cD01-Feb-2010143.7 KiB5,5703,452

megaraid.hD01-Feb-201029.8 KiB1,037725

megaraid2.cD01-Feb-2010125.3 KiB5,5923,168

megaraid2.hD01-Feb-201033 KiB1,211800

mesh.cD01-Feb-201052.4 KiB2,0491,689

mesh.hD01-Feb-20104.5 KiB153113

mvme147.cD01-Feb-20103.2 KiB13297

mvme147.hD01-Feb-20101.3 KiB5133

mvme16x.cD01-Feb-20101.2 KiB5538

mvme16x.hD01-Feb-20101.1 KiB4132

ncr53c8xx.cD01-Feb-2010225 KiB9,2794,893

ncr53c8xx.hD01-Feb-20103.4 KiB10241

nsp32.cD01-Feb-201093.8 KiB3,6212,137

nsp32.hD01-Feb-201023.2 KiB690482

nsp32_debug.cD01-Feb-20108 KiB305249

nsp32_io.hD01-Feb-20105.9 KiB260191

oktagon_esp.cD01-Feb-201014.5 KiB596374

oktagon_esp.hD01-Feb-20102.1 KiB5841

oktagon_io.SD01-Feb-20103.3 KiB196137

osst.cD01-Feb-2010177.7 KiB5,8915,002

osst.hD01-Feb-201023.9 KiB643515

osst_detect.hD01-Feb-2010232 76

osst_options.hD01-Feb-20104 KiB10720

pas16.cD01-Feb-201015.1 KiB542266

pas16.hD01-Feb-20105.3 KiB20091

pci2000.cD01-Feb-201024.5 KiB866591

pci2000.hD01-Feb-20106.6 KiB225173

pci2220i.cD01-Feb-201089.6 KiB2,9332,183

pci2220i.hD01-Feb-20101.9 KiB6236

pluto.cD01-Feb-20108.4 KiB343254

pluto.hD01-Feb-20101.5 KiB6650

ppa.cD01-Feb-201027.8 KiB1,149850

ppa.hD01-Feb-20106.2 KiB194100

psi240i.cD01-Feb-201021.7 KiB724479

psi240i.hD01-Feb-201011.1 KiB339268

psi_chip.hD01-Feb-20106.6 KiB196108

psi_dale.hD01-Feb-201018.9 KiB565440

psi_roy.hD01-Feb-201016 KiB332246

ql12160_fw.hD01-Feb-2010111.3 KiB1,7881,756

ql1280_fw.hD01-Feb-2010126.2 KiB2,0241,991

qla1280.cD01-Feb-2010142.6 KiB5,1723,233

qla1280.hD01-Feb-201035.2 KiB1,113845

qlogicfas.cD01-Feb-201020.2 KiB726502

qlogicfas.hD01-Feb-20101 KiB4334

qlogicfc.cD01-Feb-201064.8 KiB2,2341,729

qlogicfc.hD01-Feb-20103.6 KiB10635

qlogicfc_asm.cD01-Feb-2010617.6 KiB9,7529,707

qlogicisp.cD01-Feb-201054.1 KiB2,0101,560

qlogicisp.hD01-Feb-20102.9 KiB9131

qlogicisp_asm.cD01-Feb-2010128.5 KiB2,0352,026

qlogicpti.cD01-Feb-201042.5 KiB1,5371,166

qlogicpti.hD01-Feb-201020.3 KiB555434

qlogicpti_asm.cD01-Feb-201073.5 KiB1,1611,159

sata_nv.cD01-Feb-201017 KiB611440

sata_promise.cD01-Feb-201019.1 KiB778573

sata_promise.hD01-Feb-20103.7 KiB15889

sata_qstor.cD01-Feb-201019.7 KiB746573

sata_sil.cD01-Feb-201015 KiB541392

sata_sis.cD01-Feb-20109.3 KiB358258

sata_svw.cD01-Feb-201014.8 KiB521330

sata_sx4.cD01-Feb-201039.9 KiB1,5301,135

sata_uli.cD01-Feb-20107.6 KiB298215

sata_via.cD01-Feb-201010.3 KiB409298

sata_vsc.cD01-Feb-201012.3 KiB455309

script_asm.plD01-Feb-201029.3 KiB1,003782

scsi.cD01-Feb-201083.8 KiB2,9281,600

scsi.hD01-Feb-201030.3 KiB874467

scsi_debug.cD01-Feb-201034.6 KiB1,2301,054

scsi_debug.hD01-Feb-20101.7 KiB4938

scsi_dma.cD01-Feb-201013.7 KiB452291

scsi_error.cD01-Feb-201059.6 KiB2,027942

scsi_ioctl.cD01-Feb-201014.8 KiB540344

scsi_lib.cD01-Feb-201034.3 KiB1,203514

scsi_merge.cD01-Feb-201035.6 KiB1,209619

scsi_module.cD01-Feb-20102.6 KiB7217

scsi_obsolete.cD01-Feb-201033 KiB1,163755

scsi_obsolete.hD01-Feb-20104 KiB10723

scsi_proc.cD01-Feb-20108.3 KiB311217

scsi_queue.cD01-Feb-20104.5 KiB15254

scsi_scan.cD01-Feb-201032.4 KiB989654

scsi_syms.cD01-Feb-20102.9 KiB11376

scsicam.cD01-Feb-20106.8 KiB226127

scsiiom.cD01-Feb-201051 KiB1,7891,475

sd.cD01-Feb-201040.9 KiB1,4971,014

sd.hD01-Feb-20101.7 KiB6722

seagate.cD01-Feb-201046.9 KiB1,8051,145

seagate.hD01-Feb-20101,014 3722

sg.cD01-Feb-201096.8 KiB3,0962,771

sgiwd93.cD01-Feb-20107.4 KiB313226

sgiwd93.hD01-Feb-20101.2 KiB4230

sim710.cD01-Feb-201052.2 KiB1,7781,268

sim710.hD01-Feb-201029.3 KiB854509

sim710.scrD01-Feb-201018.5 KiB577554

sim710_d.hD01-Feb-201047.5 KiB2,453975

sim710_u.hD01-Feb-20101.5 KiB6867

sr.cD01-Feb-201026 KiB993671

sr.hD01-Feb-20102.1 KiB6135

sr_ioctl.cD01-Feb-201016 KiB580423

sr_vendor.cD01-Feb-20108.7 KiB312227

st.cD01-Feb-2010113.1 KiB4,0803,390

st.hD01-Feb-20104.7 KiB177138

st_options.hD01-Feb-20103.8 KiB10622

sun3_NCR5380.cD01-Feb-201092.3 KiB3,0241,597

sun3_scsi.cD01-Feb-201013.2 KiB619370

sun3_scsi.hD01-Feb-201010.4 KiB407283

sun3_scsi_vme.cD01-Feb-201012.2 KiB569359

sun3x_esp.cD01-Feb-20109.9 KiB382273

sun3x_esp.hD01-Feb-20101.2 KiB4028

sym53c416.cD01-Feb-201025.5 KiB862708

sym53c416.hD01-Feb-20102.3 KiB6137

sym53c8xx.cD01-Feb-2010368.3 KiB14,7368,147

sym53c8xx.hD01-Feb-20103.9 KiB11943

sym53c8xx_comm.hD01-Feb-201066.9 KiB2,6881,787

sym53c8xx_defs.hD01-Feb-201052.8 KiB1,7651,009

t128.cD01-Feb-20109.3 KiB373187

t128.hD01-Feb-20104.8 KiB17681

tmscsim.cD01-Feb-201090.5 KiB3,0682,149

tmscsim.hD01-Feb-201017.5 KiB706463

u14-34f.cD01-Feb-201063.4 KiB1,9171,161

u14-34f.hD01-Feb-20101.7 KiB3728

ultrastor.cD01-Feb-201034.9 KiB1,179790

ultrastor.hD01-Feb-20102.5 KiB9656

wd33c93.cD01-Feb-201065.4 KiB2,0591,266

wd33c93.hD01-Feb-201010.5 KiB340236

wd7000.cD01-Feb-201053.5 KiB1,7871,089

wd7000.hD01-Feb-20101.8 KiB6335

zalon7xx.cD01-Feb-20103.9 KiB163101

zalon7xx.hD01-Feb-20101.6 KiB6145

README.53c700

1General Description
2===================
3
4This driver supports the 53c700 and 53c700-66 chips.  It also supports
5the 53c710 but only in 53c700 emulation mode.  It is full featured and
6does sync (-66 and 710 only), disconnects and tag command queueing.
7
8Since the 53c700 must be interfaced to a bus, you need to wrapper the
9card detector around this driver.  For an example, see the
10NCR_D700.[ch] or lasi700.[ch] files.
11
12The comments in the 53c700.[ch] files tell you which parts you need to
13fill in to get the driver working.
14
15
16Compile Time Flags
17==================
18
19The driver may be either io mapped or memory mapped.  This is
20selectable by configuration flags:
21
22CONFIG_53C700_MEM_MAPPED
23
24define if the driver is memory mapped.
25
26CONFIG_53C700_IO_MAPPED
27
28define if the driver is to be io mapped.
29
30One or other of the above flags *must* be defined.
31
32Other flags are:
33
34CONFIG_53C700_LE_ON_BE
35
36define if the chipset must be supported in little endian mode on a big
37endian architecture (used for the 700 on parisc).
38
39CONFIG_53C700_USE_CONSISTENT
40
41allocate consistent memory (should only be used if your architecture
42has a mixture of consistent and inconsistent memory).  Fully
43consistent or fully inconsistent architectures should not define this.
44
45
46Using the Chip Core Driver
47==========================
48
49In order to plumb the 53c700 chip core driver into a working SCSI
50driver, you need to know three things about the way the chip is wired
51into your system (or expansion card).
52
531. The clock speed of the SCSI core
542. The interrupt line used
553. The memory (or io space) location of the 53c700 registers.
56
57Optionally, you may also need to know other things, like how to read
58the SCSI Id from the card bios or whether the chip is wired for
59differential operation.
60
61Usually you can find items 2. and 3. from general spec. documents or
62even by examining the configuration of a working driver under another
63operating system.
64
65The clock speed is usually buried deep in the technical literature.
66It is required because it is used to set up both the synchronous and
67asynchronous dividers for the chip.  As a general rule of thumb,
68manufacturers set the clock speed at the lowest possible setting
69consistent with the best operation of the chip (although some choose
70to drive it off the CPU or bus clock rather than going to the expense
71of an extra clock chip).  The best operation clock speeds are:
72
7353c700 - 25MHz
7453c700-66 - 50MHz
7553c710 - 40Mhz
76
77Writing Your Glue Driver
78========================
79
80This will be a standard SCSI driver (I don't know of a good document
81describing this, just copy from some other driver) with at least a
82detect and release entry.
83
84In the detect routine, you need to allocate a struct
85NCR_700_Host_Parameters sized memory area and clear it (so that the
86default values for everything are 0).  Then you must fill in the
87parameters that matter to you (see below), plumb the NCR_700_intr
88routine into the interrupt line and call NCR_700_detect with the host
89template and the new parameters as arguments.  You should also call
90the relevant request_*_region function and place the register base
91address into the `base' pointer of the host parameters.
92
93In the release routine, you must free the NCR_700_Host_Parameters that
94you allocated, call the corresponding release_*_region and free the
95interrupt.
96
97Handling Interrupts
98-------------------
99
100In general, you should just plumb the card's interrupt line in with
101
102request_irq(irq, NCR_700_intr, <irq flags>, <driver name>, host);
103
104where host is the return from the relevant NCR_700_detect() routine.
105
106You may also write your own interrupt handling routine which calls
107NCR_700_intr() directly.  However, you should only really do this if
108you have a card with more than one chip on it and you can read a
109register to tell which set of chips wants the interrupt.
110
111Settable NCR_700_Host_Parameters
112--------------------------------
113
114The following are a list of the user settable parameters:
115
116clock: (MANDATORY)
117
118Set to the clock speed of the chip in MHz.
119
120base: (MANDATORY)
121
122set to the base of the io or mem region for the register set. On 64
123bit architectures this is only 32 bits wide, so the registers must be
124mapped into the low 32 bits of memory.
125
126pci_dev: (OPTIONAL)
127
128set to the PCI board device.  Leave NULL for a non-pci board.  This is
129used for the pci_alloc_consistent() and pci_map_*() functions.
130
131dmode_extra: (OPTIONAL, 53c710 only)
132
133extra flags for the DMODE register.  These are used to control bus
134output pins on the 710.  The settings should be a combination of
135DMODE_FC1 and DMODE_FC2.  What these pins actually do is entirely up
136to the board designer.  Usually it is safe to ignore this setting.
137
138differential: (OPTIONAL)
139
140set to 1 if the chip drives a differential bus.
141
142force_le_on_be: (OPTIONAL, only if CONFIG_53C700_LE_ON_BE is set)
143
144set to 1 if the chip is operating in little endian mode on a big
145endian architecture.
146
147chip710: (OPTIONAL)
148
149set to 1 if the chip is a 53c710.
150
151burst_disable: (OPTIONAL, 53c710 only)
152
153disable 8 byte bursting for DMA transfers.
154
155

README.AM53C974

1SUBJECT
2-------
3AM53/79C974 PC-SCSI Driver
4
5
6DISCLAIMER
7----------
8***  THIS SHOULD BE CONSIDERED AS BETA SOFTWARE  ***
9***  USE AT YOUR OWN RISK!                       ***
10
11
12Copyright
13---------
14The architecture and much of the code of this device driver was
15originally developed by Drew Eckhardt for the NCR5380. The
16following copyrights apply:
17
18For the architecture and all pieces of code which can also be found
19in the NCR5380 device driver:
20Copyright 1993, Drew Eckhardt
21  Visionary Computing
22  (Unix and Linux consulting and custom programming)
23  drew@colorado.edu
24  +1 (303) 666-5836
25
26The AM53C974_nobios_detect code was originally developed by
27Robin Cutshaw (robin@xfree86.org) and is used here in a
28slightly modified form.
29
30For the remaining code:
31  Copyright 1994, D. Frieauff
32  EMail: fri@rsx42sun0.dofn.de
33  Phone: x49-7545-8-2256 , x49-7541-42305
34
35
36Version
37-------
38AM53/79C974 (PC-SCSI) Linux driver ALPHA release 0.5, 19 November 1995
39
40
41Changelog
42---------
430.1 -> 0.2:
44  - Extended message handling re-written to eliminate 'invalid message 17' bug
45  - Parameters of AM53C974_intr adapted
46  - Debug messages structured
47  - Spelling improved
480.2 -> 0.3:
49  - README file updated -- please read this file up to the end!
50  - Automatic scanning of io_port and irq implemented; no need for BIOS32
51    anymore
52  - Improved configuration (now via LILO parameter string)
53  - Cleanup of probing and initialization code
54  - Improved sync. negotiation (can be setup individually for every device)
55  - Improved/ debugged code for reception of ext. messages
560.3 -> 0.4:
57  - Improved PCI probing and initialization code
58  - Compatibility changes for Linux 1.3.x
590.4 -> 0.5:
60  - Compatibility changes for Linux 1.3.42
61
62
63Bugs & Todo
64-----------
65 - Add proc info function
66 - Support SCSI-2 tagged queuing
67 - Finalize abort code
68
69
70Features
71--------
72This driver supports asynchronous and synchronous SCSI-I and SCSI-II
73devices.  It is capable of transfer rate and synchronous negotiation
74(see below).  The driver supports scatter-gather.  Transfers are DMA
75based, but do not (yet) make use of the AM53/79C974 MDL mode.
76Max. transfer rate is 10MHz (whatever this is in real life).  The
77transfer rate is negotiated with each device (see dmesg output).  The
78AM53/79C974 has a 96-byte DMA FIFO to the PCI bus and a 16-byte SCSI
79FIFO.  It provides active negation and glitch suppression functions.
80Burst DMA transfer rate is 132 MBytes/sec.
81
82
83Configuration
84-------------
85
86The following communication characteristics can be set individually
87for every SCSI device on the bus:
88
89  - enable/disable sync. negotiation
90  - transfer rate
91  - asynchronous or synchronous communication
92  - in case of sync. communication, the sync. offset
93
94The sync. offset specifies the number of bytes that can be sent or
95received from the SCSI bus without ACK resp. REQ signal.
96CAUTION: USING SYNCHRONOUS MODE ON LONG SCSI CABLES MAY CAUSE
97         COMMUNICATION PROBLEMS LEADING TO LOSS OF DATA.
98
99The default setting of the SCSI communication parameters is as follows:
100  - no negotiation
101  - 5.0 MHz transfer rate
102  - asynchronous mode
103  - zero offset
104
105The parameters can be modified by passing a string with the following
106syntax to the kernel:
107
108	AM53C974=host-scsi-id,target-scsi-id,max-rate,max-offset
109
110The parameters will be used by the driver as negotiation basis.  The
111range of the rate parameter is 3 to 10 MHz.  The range of the
112sync. offset parameter is 0 to 15 bytes. A value of 0 denotes
113asynchronous comm. mode.  If the target cannot cope with the specified
114transfer rate, sync. mode or sync.  offset, the negotiation result
115will differ from the specified values.  The negotiation result is
116printed out at the end of the negotiation process (to read it, use the
117dmesg program or the appropriate syslog).  The parameter strings
118(blank separated) can be passed to the kernel at the LILO prompt, or
119as part of the LILO configuration file.
120
121For example, the string "AM53C974=7,2,8,15" would be interpreted as
122follows:
123
124For communication between the controller with SCSI-ID 7 and the
125device with SCSI-ID 2 a transfer rate of 8MHz in synchronous mode with
126max. 15 bytes offset should be negotiated.
127
128As an example, here my LILO configuration file:
129  boot = /dev/sda
130  compact
131  #prompt
132  delay = 50	# optional, for systems that boot very quickly
133  vga = normal	# force sane state
134  ramdisk = 0	# paranoia setting
135  root = current  # use "current" root
136  image = /usr/src/linux/arch/i386/boot/zImage
137    label = linux
138    append = "AM53C974=7,0,10,0 AM53C974=7,1,10,0 AM53C974=7,2,10,15 AM53C974=7,4,10,0 AM53C974=7,5,10,0"
139    read-only
140  other = /dev/sda4
141    label = os2
142  other = /dev/sdb3
143    loader = /boot/any_d.b
144    table = /dev/sdb
145    label = setup
146
147The same parameters at the LILO prompt:
148
149  LILO boot: linux AM53C974=7,0,10,0 AM53C974=7,1,10,0 AM53C974=7,2,10,15 AM53C974=7,4,10,0 AM53C974=7,5,10,0
150
151You can override parameters specified in the LILO configuration file
152by parameters specified on the LILO command line.
153
154
155BIOS usage
156----------
157Version 0.4 of the driver will use the BIOS, if available. Otherwise
158it will try its internal PCI scan and access routines.  The driver
159assumes that the controller's SCSI-ID (usually 7) has been correctly
160loaded by the BIOS into the controller's register during system
161boot. If the driver detects that the controller's SCSI ID is not '7'
162it will print out a warning. If this happens to you please correct
163setting of the controller's SCSI-ID. If it is wrong, then edit the
164AM53C974_SCSI_ID definition in file AM53C974.h accordingly.
165
166
167Test environment
168----------------
169This driver was tested on a Compaq XL566 with the following SCSI configuration:
1702 x HP C2247 fixed disk (internal, rate=10MHz, async.)
1711 x Micropolis 1624 fixed disk (external, rate=8MHz, sync., offset=15 bytes)
1721 x Wangtek W5525ES cartridge streamer (internal, rate=5MHz, async.)
1731 x Toshiba XM-3301B CD-ROM (external, rate=5MHz, async.)
174
175
176Known problems
177--------------
178 - Compaq/Matsushita CD-ROM:
179   Use of this device with AM53C974 driver version 0.2 caused the kernel to
180   hang during Linux boot. If you encounter the problem, don't enable sync.
181   negotiation with the CD-ROM, i.e. simply don't specify comm. parameters
182   for this device on the LILO command line or configuration file.
183   The driver will thus use its default for the CD-ROM, which is 5MHz
184   transfer rate async and no sync. negotiation.
185 - Some disks cause problems.
186
187
188What to do if there is a SCSI problem possibly related to the driver
189--------------------------------------------------------------------
190
191Read Klaus Liedl's WWW page (http://www-c724.uibk.ac.at/XL/).  In case
192this does not help: Send me a complete description of the problem,
193including your SCSI configuration plus as much debugging information
194as possible.  Don't wait until I ask you for this information. To
195enable the generation of debugging output, remove the comments from
196the following definitions in the AM53C974.h file:
197
198    AM53C974_DEBUG
199    AM53C974_DEBUG_MSG
200    AM53C974_DEBUG_KEYWAIT
201    AM53C974_DEBUG_INFO
202    AM53C974_DEBUG_INTR
203
204With these definitions enabled, the driver will enter single-step mode
205during Linux boot. Use the spacebar for stepping.  Take note of at
206least the last 10 printout sections (marked by dashes) before the
207crash/hangup or whatever happens and send me all of this information
208via email. If the system can boot, use the syslogd daemon to record
209the debugging output. Maybe you can use the ramdisk for this purpose
210too (if necessary, kindly ask K. Liedl (Klaus.Liedl@uibk.ac.at) for
211support, he knows how to do it -- I never tried). Stay in email
212contact with me. Be aware that the following weeks/months could be the
213worst of your life.  Note: If single-stepping takes up too much time,
214you can try to let the driver catch the problem by pressing the 'r'
215key. The driver will automatically enter single-step mode if it has
216detected something weird.
217
218
219Author's Contact Address
220-----------------------
221Email: fri@rsx42sun0.dofn.de
222Phone: x49-7545-2256 (office), x49-7541-42305 (home)
223Home address: D. Frieauff, Stockerholzstr. 27, 88048 Friedrichshafen, Germany
224
225
226!!!! Important Notice !!!!
227-----------------------------
228- Klaus Liedl maintains an excellent WWW page about Linux on Compaq XL.
229  It includes an FAQ, lots of tips & tricks as well as downloadable
230  boot disk images. The URL is: http://www-c724.uibk.ac.at/XL/
231- Volunteer wanted for further maintenance of this driver software. I
232  don't have the time anymore to do serious support as some of you will know.
233
234
235Literature
236----------
237 - AMD AM53C974 PC-SCSI Technical Manual, publication #18624B
238 - Amendment to the AMD AM53C974 PC-SCSI Technical Manual
239 - AMD AM79C974 PC-NET Datasheet, publication #18681
240 - Amendment to the AMD AM79C974 PC-NET Datasheet
241
242
243THANKS to
244---------
245 - Drew Eckhardt, Robin Cutshaw, K. Liedl, Robert J. Pappas, A. Grenier,
246   Mark Stockton, David C. Niemi, Ben Craft, and many others who have helped
247

README.BusLogic

1	   BusLogic MultiMaster and FlashPoint SCSI Driver for Linux
2
3			 Version 2.0.15 for Linux 2.0
4			 Version 2.1.15 for Linux 2.1
5
6			      PRODUCTION RELEASE
7
8				17 August 1998
9
10			       Leonard N. Zubkoff
11			       Dandelion Digital
12			       lnz@dandelion.com
13
14	 Copyright 1995-1998 by Leonard N. Zubkoff <lnz@dandelion.com>
15
16
17				 INTRODUCTION
18
19BusLogic, Inc. designed and manufactured a variety of high performance SCSI
20host adapters which share a common programming interface across a diverse
21collection of bus architectures by virtue of their MultiMaster ASIC technology.
22BusLogic was acquired by Mylex Corporation in February 1996, but the products
23supported by this driver originated under the BusLogic name and so that name is
24retained in the source code and documentation.
25
26This driver supports all present BusLogic MultiMaster Host Adapters, and should
27support any future MultiMaster designs with little or no modification.  More
28recently, BusLogic introduced the FlashPoint Host Adapters, which are less
29costly and rely on the host CPU, rather than including an onboard processor.
30Despite not having an onboard CPU, the FlashPoint Host Adapters perform very
31well and have very low command latency.  BusLogic has recently provided me with
32the FlashPoint Driver Developer's Kit, which comprises documentation and freely
33redistributable source code for the FlashPoint SCCB Manager.  The SCCB Manager
34is the library of code that runs on the host CPU and performs functions
35analogous to the firmware on the MultiMaster Host Adapters.  Thanks to their
36having provided the SCCB Manager, this driver now supports the FlashPoint Host
37Adapters as well.
38
39My primary goals in writing this completely new BusLogic driver for Linux are
40to achieve the full performance that BusLogic SCSI Host Adapters and modern
41SCSI peripherals are capable of, and to provide a highly robust driver that can
42be depended upon for high performance mission critical applications.  All of
43the major performance and error recovery features can be configured from the
44Linux kernel command line or at module initialization time, allowing individual
45installations to tune driver performance and error recovery to their particular
46needs.
47
48The latest information on Linux support for BusLogic SCSI Host Adapters, as
49well as the most recent release of this driver and the latest firmware for the
50BT-948/958/958D, will always be available from my Linux Home Page at URL
51"http://www.dandelion.com/Linux/".
52
53Bug reports should be sent via electronic mail to "lnz@dandelion.com".  Please
54include with the bug report the complete configuration messages reported by the
55driver and SCSI subsystem at startup, along with any subsequent system messages
56relevant to SCSI operations, and a detailed description of your system's
57hardware configuration.
58
59Mylex has been an excellent company to work with and I highly recommend their
60products to the Linux community.  In November 1995, I was offered the
61opportunity to become a beta test site for their latest MultiMaster product,
62the BT-948 PCI Ultra SCSI Host Adapter, and then again for the BT-958 PCI Wide
63Ultra SCSI Host Adapter in January 1996.  This was mutually beneficial since
64Mylex received a degree and kind of testing that their own testing group cannot
65readily achieve, and the Linux community has available high performance host
66adapters that have been well tested with Linux even before being brought to
67market.  This relationship has also given me the opportunity to interact
68directly with their technical staff, to understand more about the internal
69workings of their products, and in turn to educate them about the needs and
70potential of the Linux community.
71
72More recently, Mylex has reaffirmed the company's interest in supporting the
73Linux community, and I am now working on a Linux driver for the DAC960 PCI RAID
74Controllers.  Mylex's interest and support is greatly appreciated.
75
76Unlike some other vendors, if you contact Mylex Technical Support with a
77problem and are running Linux, they will not tell you that your use of their
78products is unsupported.  Their latest product marketing literature even states
79"Mylex SCSI host adapters are compatible with all major operating systems
80including: ... Linux ...".
81
82Mylex Corporation is located at 34551 Ardenwood Blvd., Fremont, California
8394555, USA and can be reached at 510/796-6100 or on the World Wide Web at
84http://www.mylex.com.  Mylex HBA Technical Support can be reached by electronic
85mail at techsup@mylex.com, by Voice at 510/608-2400, or by FAX at 510/745-7715.
86Contact information for offices in Europe and Japan is available on the Web
87site.
88
89
90				DRIVER FEATURES
91
92o Configuration Reporting and Testing
93
94  During system initialization, the driver reports extensively on the host
95  adapter hardware configuration, including the synchronous transfer parameters
96  requested and negotiated with each target device.  AutoSCSI settings for
97  Synchronous Negotiation, Wide Negotiation, and Disconnect/Reconnect are
98  reported for each target device, as well as the status of Tagged Queuing and
99  Error Recovery.  If the same setting is in effect for all target devices,
100  then a single word or phrase is used; otherwise, a letter is provided for
101  each target device to indicate the individual status.  The following examples
102  should clarify this reporting format:
103
104    Synchronous Negotiation: Ultra
105
106      Synchronous negotiation is enabled for all target devices and the host
107      adapter will attempt to negotiate for 20.0 mega-transfers/second.
108
109    Synchronous Negotiation: Fast
110
111      Synchronous negotiation is enabled for all target devices and the host
112      adapter will attempt to negotiate for 10.0 mega-transfers/second.
113
114    Synchronous Negotiation: Slow
115
116      Synchronous negotiation is enabled for all target devices and the host
117      adapter will attempt to negotiate for 5.0 mega-transfers/second.
118
119    Synchronous Negotiation: Disabled
120
121      Synchronous negotiation is disabled and all target devices are limited to
122      asynchronous operation.
123
124    Synchronous Negotiation: UFSNUUU#UUUUUUUU
125
126      Synchronous negotiation to Ultra speed is enabled for target devices 0
127      and 4 through 15, to Fast speed for target device 1, to Slow speed for
128      target device 2, and is not permitted to target device 3.  The host
129      adapter's SCSI ID is represented by the "#".
130
131    The status of Wide Negotiation, Disconnect/Reconnect, and Tagged Queuing
132    are reported as "Enabled", Disabled", or a sequence of "Y" and "N" letters.
133
134    The Error Recovery option is reported as "Default", "Hard Reset",
135    "Bus Device Reset", "None" or a sequence of "D", "H", "B", and "N" letters.
136
137o Performance Features
138
139  BusLogic SCSI Host Adapters directly implement SCSI-2 Tagged Queuing, and so
140  support has been included in the driver to utilize tagged queuing with any
141  target devices that report having the tagged queuing capability.  Tagged
142  queuing allows for multiple outstanding commands to be issued to each target
143  device or logical unit, and can improve I/O performance substantially.  In
144  addition, BusLogic's Strict Round Robin Mode is used to optimize host adapter
145  performance, and scatter/gather I/O can support as many segments as can be
146  effectively utilized by the Linux I/O subsystem.  Control over the use of
147  tagged queuing for each target device as well as individual selection of the
148  tagged queue depth is available through driver options provided on the kernel
149  command line or at module initialization time.  By default, the queue depth
150  is determined automatically based on the host adapter's total queue depth and
151  the number, type, speed, and capabilities of the target devices found.  In
152  addition, tagged queuing is automatically disabled whenever the host adapter
153  firmware version is known not to implement it correctly, or whenever a tagged
154  queue depth of 1 is selected.  Tagged queuing is also disabled for individual
155  target devices if disconnect/reconnect is disabled for that device.
156
157o Robustness Features
158
159  The driver implements extensive error recovery procedures.  When the higher
160  level parts of the SCSI subsystem request that a timed out command be reset,
161  a selection is made between a full host adapter hard reset and SCSI bus reset
162  versus sending a bus device reset message to the individual target device
163  based on the recommendation of the SCSI subsystem.  Error recovery strategies
164  are selectable through driver options individually for each target device,
165  and also include sending a bus device reset to the specific target device
166  associated with the command being reset, as well as suppressing error
167  recovery entirely to avoid perturbing an improperly functioning device.  If
168  the bus device reset error recovery strategy is selected and sending a bus
169  device reset does not restore correct operation, the next command that is
170  reset will force a full host adapter hard reset and SCSI bus reset.  SCSI bus
171  resets caused by other devices and detected by the host adapter are also
172  handled by issuing a soft reset to the host adapter and re-initialization.
173  Finally, if tagged queuing is active and more than one command reset occurs
174  in a 10 minute interval, or if a command reset occurs within the first 10
175  minutes of operation, then tagged queuing will be disabled for that target
176  device.  These error recovery options improve overall system robustness by
177  preventing individual errant devices from causing the system as a whole to
178  lock up or crash, and thereby allowing a clean shutdown and restart after the
179  offending component is removed.
180
181o PCI Configuration Support
182
183  On PCI systems running kernels compiled with PCI BIOS support enabled, this
184  driver will interrogate the PCI configuration space and use the I/O port
185  addresses assigned by the system BIOS, rather than the ISA compatible I/O
186  port addresses.  The ISA compatible I/O port address is then disabled by the
187  driver.  On PCI systems it is also recommended that the AutoSCSI utility be
188  used to disable the ISA compatible I/O port entirely as it is not necessary.
189  The ISA compatible I/O port is disabled by default on the BT-948/958/958D.
190
191o /proc File System Support
192
193  Copies of the host adapter configuration information together with updated
194  data transfer and error recovery statistics are available through the
195  /proc/scsi/BusLogic/<N> interface.
196
197o Shared Interrupts Support
198
199  On systems that support shared interrupts, any number of BusLogic Host
200  Adapters may share the same interrupt request channel.
201
202
203			    SUPPORTED HOST ADAPTERS
204
205The following list comprises the supported BusLogic SCSI Host Adapters as of
206the date of this document.  It is recommended that anyone purchasing a BusLogic
207Host Adapter not in the following table contact the author beforehand to verify
208that it is or will be supported.
209
210FlashPoint Series PCI Host Adapters:
211
212FlashPoint LT (BT-930)	Ultra SCSI-3
213FlashPoint LT (BT-930R)	Ultra SCSI-3 with RAIDPlus
214FlashPoint LT (BT-920)	Ultra SCSI-3 (BT-930 without BIOS)
215FlashPoint DL (BT-932)	Dual Channel Ultra SCSI-3
216FlashPoint DL (BT-932R)	Dual Channel Ultra SCSI-3 with RAIDPlus
217FlashPoint LW (BT-950)	Wide Ultra SCSI-3
218FlashPoint LW (BT-950R)	Wide Ultra SCSI-3 with RAIDPlus
219FlashPoint DW (BT-952)	Dual Channel Wide Ultra SCSI-3
220FlashPoint DW (BT-952R)	Dual Channel Wide Ultra SCSI-3 with RAIDPlus
221
222MultiMaster "W" Series Host Adapters:
223
224BT-948	    PCI		Ultra SCSI-3
225BT-958	    PCI		Wide Ultra SCSI-3
226BT-958D	    PCI		Wide Differential Ultra SCSI-3
227
228MultiMaster "C" Series Host Adapters:
229
230BT-946C	    PCI		Fast SCSI-2
231BT-956C	    PCI		Wide Fast SCSI-2
232BT-956CD    PCI		Wide Differential Fast SCSI-2
233BT-445C	    VLB		Fast SCSI-2
234BT-747C	    EISA	Fast SCSI-2
235BT-757C	    EISA	Wide Fast SCSI-2
236BT-757CD    EISA	Wide Differential Fast SCSI-2
237BT-545C	    ISA		Fast SCSI-2
238BT-540CF    ISA		Fast SCSI-2
239
240MultiMaster "S" Series Host Adapters:
241
242BT-445S	    VLB		Fast SCSI-2
243BT-747S	    EISA	Fast SCSI-2
244BT-747D	    EISA	Differential Fast SCSI-2
245BT-757S	    EISA	Wide Fast SCSI-2
246BT-757D	    EISA	Wide Differential Fast SCSI-2
247BT-545S	    ISA		Fast SCSI-2
248BT-542D	    ISA		Differential Fast SCSI-2
249BT-742A	    EISA	SCSI-2 (742A revision H)
250BT-542B	    ISA		SCSI-2 (542B revision H)
251
252MultiMaster "A" Series Host Adapters:
253
254BT-742A	    EISA	SCSI-2 (742A revisions A - G)
255BT-542B	    ISA		SCSI-2 (542B revisions A - G)
256
257AMI FastDisk Host Adapters that are true BusLogic MultiMaster clones are also
258supported by this driver.
259
260BusLogic SCSI Host Adapters are available packaged both as bare boards and as
261retail kits.  The BT- model numbers above refer to the bare board packaging.
262The retail kit model numbers are found by replacing BT- with KT- in the above
263list.  The retail kit includes the bare board and manual as well as cabling and
264driver media and documentation that are not provided with bare boards.
265
266
267			 FLASHPOINT INSTALLATION NOTES
268
269o RAIDPlus Support
270
271  FlashPoint Host Adapters now include RAIDPlus, Mylex's bootable software
272  RAID.  RAIDPlus is not supported on Linux, and there are no plans to support
273  it.  The MD driver in Linux 2.0 provides for concatenation (LINEAR) and
274  striping (RAID-0), and support for mirroring (RAID-1), fixed parity (RAID-4),
275  and distributed parity (RAID-5) is available separately.  The built-in Linux
276  RAID support is generally more flexible and is expected to perform better
277  than RAIDPlus, so there is little impetus to include RAIDPlus support in the
278  BusLogic driver.
279
280o Enabling UltraSCSI Transfers
281
282  FlashPoint Host Adapters ship with their configuration set to "Factory
283  Default" settings that are conservative and do not allow for UltraSCSI speed
284  to be negotiated.  This results in fewer problems when these host adapters
285  are installed in systems with cabling or termination that is not sufficient
286  for UltraSCSI operation, or where existing SCSI devices do not properly
287  respond to synchronous transfer negotiation for UltraSCSI speed.  AutoSCSI
288  may be used to load "Optimum Performance" settings which allow UltraSCSI
289  speed to be negotiated with all devices, or UltraSCSI speed can be enabled on
290  an individual basis.  It is recommended that SCAM be manually disabled after
291  the "Optimum Performance" settings are loaded.
292
293
294		      BT-948/958/958D INSTALLATION NOTES
295
296The BT-948/958/958D PCI Ultra SCSI Host Adapters have some features which may
297require attention in some circumstances when installing Linux.
298
299o PCI I/O Port Assignments
300
301  When configured to factory default settings, the BT-948/958/958D will only
302  recognize the PCI I/O port assignments made by the motherboard's PCI BIOS.
303  The BT-948/958/958D will not respond to any of the ISA compatible I/O ports
304  that previous BusLogic SCSI Host Adapters respond to.  This driver supports
305  the PCI I/O port assignments, so this is the preferred configuration.
306  However, if the obsolete BusLogic driver must be used for any reason, such as
307  a Linux distribution that does not yet use this driver in its boot kernel,
308  BusLogic has provided an AutoSCSI configuration option to enable a legacy ISA
309  compatible I/O port.
310
311  To enable this backward compatibility option, invoke the AutoSCSI utility via
312  Ctrl-B at system startup and select "Adapter Configuration", "View/Modify
313  Configuration", and then change the "ISA Compatible Port" setting from
314  "Disable" to "Primary" or "Alternate".  Once this driver has been installed,
315  the "ISA Compatible Port" option should be set back to "Disable" to avoid
316  possible future I/O port conflicts.  The older BT-946C/956C/956CD also have
317  this configuration option, but the factory default setting is "Primary".
318
319o PCI Slot Scanning Order
320
321  In systems with multiple BusLogic PCI Host Adapters, the order in which the
322  PCI slots are scanned may appear reversed with the BT-948/958/958D as
323  compared to the BT-946C/956C/956CD.  For booting from a SCSI disk to work
324  correctly, it is necessary that the host adapter's BIOS and the kernel agree
325  on which disk is the boot device, which requires that they recognize the PCI
326  host adapters in the same order.  The motherboard's PCI BIOS provides a
327  standard way of enumerating the PCI host adapters, which is used by the Linux
328  kernel.  Some PCI BIOS implementations enumerate the PCI slots in order of
329  increasing bus number and device number, while others do so in the opposite
330  direction.
331
332  Unfortunately, Microsoft decided that Windows 95 would always enumerate the
333  PCI slots in order of increasing bus number and device number regardless of
334  the PCI BIOS enumeration, and requires that their scheme be supported by the
335  host adapter's BIOS to receive Windows 95 certification.  Therefore, the
336  factory default settings of the BT-948/958/958D enumerate the host adapters
337  by increasing bus number and device number.  To disable this feature, invoke
338  the AutoSCSI utility via Ctrl-B at system startup and select "Adapter
339  Configuration", "View/Modify Configuration", press Ctrl-F10, and then change
340  the "Use Bus And Device # For PCI Scanning Seq." option to OFF.
341
342  This driver will interrogate the setting of the PCI Scanning Sequence option
343  so as to recognize the host adapters in the same order as they are enumerated
344  by the host adapter's BIOS.
345
346o Enabling UltraSCSI Transfers
347
348  The BT-948/958/958D ship with their configuration set to "Factory Default"
349  settings that are conservative and do not allow for UltraSCSI speed to be
350  negotiated.  This results in fewer problems when these host adapters are
351  installed in systems with cabling or termination that is not sufficient for
352  UltraSCSI operation, or where existing SCSI devices do not properly respond
353  to synchronous transfer negotiation for UltraSCSI speed.  AutoSCSI may be
354  used to load "Optimum Performance" settings which allow UltraSCSI speed to be
355  negotiated with all devices, or UltraSCSI speed can be enabled on an
356  individual basis.  It is recommended that SCAM be manually disabled after the
357  "Optimum Performance" settings are loaded.
358
359
360				DRIVER OPTIONS
361
362BusLogic Driver Options may be specified either via the Linux Kernel Command
363Line or via the Loadable Kernel Module Installation Facility.  Driver Options
364for multiple host adapters may be specified either by separating the option
365strings by a semicolon, or by specifying multiple "BusLogic=" strings on the
366command line.  Individual option specifications for a single host adapter are
367separated by commas.  The Probing and Debugging Options apply to all host
368adapters whereas the remaining options apply individually only to the
369selected host adapter.
370
371The BusLogic Driver Probing Options comprise the following:
372
373IO:<integer>
374
375  The "IO:" option specifies an ISA I/O Address to be probed for a non-PCI
376  MultiMaster Host Adapter.  If neither "IO:" nor "NoProbeISA" options are
377  specified, then the standard list of BusLogic MultiMaster ISA I/O Addresses
378  will be probed (0x330, 0x334, 0x230, 0x234, 0x130, and 0x134).  Multiple
379  "IO:" options may be specified to precisely determine the I/O Addresses to
380  be probed, but the probe order will always follow the standard list.
381
382NoProbe
383
384  The "NoProbe" option disables all probing and therefore no BusLogic Host
385  Adapters will be detected.
386
387NoProbeISA
388
389  The "NoProbeISA" option disables probing of the standard BusLogic ISA I/O
390  Addresses and therefore only PCI MultiMaster and FlashPoint Host Adapters
391  will be detected.
392
393NoProbePCI
394
395  The "NoProbePCI" options disables the interrogation of PCI Configuration
396  Space and therefore only ISA Multimaster Host Adapters will be detected, as
397  well as PCI Multimaster Host Adapters that have their ISA Compatible I/O
398  Port set to "Primary" or "Alternate".
399
400NoSortPCI
401
402  The "NoSortPCI" option forces PCI MultiMaster Host Adapters to be
403  enumerated in the order provided by the PCI BIOS, ignoring any setting of
404  the AutoSCSI "Use Bus And Device # For PCI Scanning Seq." option.
405
406MultiMasterFirst
407
408  The "MultiMasterFirst" option forces MultiMaster Host Adapters to be probed
409  before FlashPoint Host Adapters.  By default, if both FlashPoint and PCI
410  MultiMaster Host Adapters are present, this driver will probe for
411  FlashPoint Host Adapters first unless the BIOS primary disk is controlled
412  by the first PCI MultiMaster Host Adapter, in which case MultiMaster Host
413  Adapters will be probed first.
414
415FlashPointFirst
416
417  The "FlashPointFirst" option forces FlashPoint Host Adapters to be probed
418  before MultiMaster Host Adapters.
419
420The BusLogic Driver Tagged Queuing Options allow for explicitly specifying
421the Queue Depth and whether Tagged Queuing is permitted for each Target
422Device (assuming that the Target Device supports Tagged Queuing).  The Queue
423Depth is the number of SCSI Commands that are allowed to be concurrently
424presented for execution (either to the Host Adapter or Target Device).  Note
425that explicitly enabling Tagged Queuing may lead to problems; the option to
426enable or disable Tagged Queuing is provided primarily to allow disabling
427Tagged Queuing on Target Devices that do not implement it correctly.  The
428following options are available:
429
430QueueDepth:<integer>
431
432  The "QueueDepth:" or QD:" option specifies the Queue Depth to use for all
433  Target Devices that support Tagged Queuing, as well as the maximum Queue
434  Depth for devices that do not support Tagged Queuing.  If no Queue Depth
435  option is provided, the Queue Depth will be determined automatically based
436  on the Host Adapter's Total Queue Depth and the number, type, speed, and
437  capabilities of the detected Target Devices.  For Host Adapters that
438  require ISA Bounce Buffers, the Queue Depth is automatically set by default
439  to BusLogic_TaggedQueueDepthBB or BusLogic_UntaggedQueueDepthBB to avoid
440  excessive preallocation of DMA Bounce Buffer memory.  Target Devices that
441  do not support Tagged Queuing always have their Queue Depth set to
442  BusLogic_UntaggedQueueDepth or BusLogic_UntaggedQueueDepthBB, unless a
443  lower Queue Depth option is provided.  A Queue Depth of 1 automatically
444  disables Tagged Queuing.
445
446QueueDepth:[<integer>,<integer>...]
447
448  The "QueueDepth:[...]" or "QD:[...]" option specifies the Queue Depth
449  individually for each Target Device.  If an <integer> is omitted, the
450  associated Target Device will have its Queue Depth selected automatically.
451
452TaggedQueuing:Default
453
454  The "TaggedQueuing:Default" or "TQ:Default" option permits Tagged Queuing
455  based on the firmware version of the BusLogic Host Adapter and based on
456  whether the Queue Depth allows queuing multiple commands.
457
458TaggedQueuing:Enable
459
460  The "TaggedQueuing:Enable" or "TQ:Enable" option enables Tagged Queuing for
461  all Target Devices on this Host Adapter, overriding any limitation that
462  would otherwise be imposed based on the Host Adapter firmware version.
463
464TaggedQueuing:Disable
465
466  The "TaggedQueuing:Disable" or "TQ:Disable" option disables Tagged Queuing
467  for all Target Devices on this Host Adapter.
468
469TaggedQueuing:<Target-Spec>
470
471  The "TaggedQueuing:<Target-Spec>" or "TQ:<Target-Spec>" option controls
472  Tagged Queuing individually for each Target Device.  <Target-Spec> is a
473  sequence of "Y", "N", and "X" characters.  "Y" enables Tagged Queuing, "N"
474  disables Tagged Queuing, and "X" accepts the default based on the firmware
475  version.  The first character refers to Target Device 0, the second to
476  Target Device 1, and so on; if the sequence of "Y", "N", and "X" characters
477  does not cover all the Target Devices, unspecified characters are assumed
478  to be "X".
479
480The BusLogic Driver Error Recovery Option allows for explicitly specifying
481the Error Recovery action to be performed when BusLogic_ResetCommand is
482called due to a SCSI Command failing to complete successfully.  The following
483options are available:
484
485ErrorRecovery:Default
486
487  The "ErrorRecovery:Default" or "ER:Default" option selects between the Hard
488  Reset and Bus Device Reset options based on the recommendation of the SCSI
489  Subsystem.
490
491ErrorRecovery:HardReset
492
493  The "ErrorRecovery:HardReset" or "ER:HardReset" option will initiate a Host
494  Adapter Hard Reset which also causes a SCSI Bus Reset.
495
496ErrorRecovery:BusDeviceReset
497
498  The "ErrorRecovery:BusDeviceReset" or "ER:BusDeviceReset" option will send
499  a Bus Device Reset message to the individual Target Device causing the
500  error.  If Error Recovery is again initiated for this Target Device and no
501  SCSI Command to this Target Device has completed successfully since the Bus
502  Device Reset message was sent, then a Hard Reset will be attempted.
503
504ErrorRecovery:None
505
506  The "ErrorRecovery:None" or "ER:None" option suppresses Error Recovery.
507  This option should only be selected if a SCSI Bus Reset or Bus Device Reset
508  will cause the Target Device or a critical operation to suffer a complete
509  and unrecoverable failure.
510
511ErrorRecovery:<Target-Spec>
512
513  The "ErrorRecovery:<Target-Spec>" or "ER:<Target-Spec>" option controls
514  Error Recovery individually for each Target Device.  <Target-Spec> is a
515  sequence of "D", "H", "B", and "N" characters.  "D" selects Default, "H"
516  selects Hard Reset, "B" selects Bus Device Reset, and "N" selects None.
517  The first character refers to Target Device 0, the second to Target Device
518  1, and so on; if the sequence of "D", "H", "B", and "N" characters does not
519  cover all the possible Target Devices, unspecified characters are assumed
520  to be "D".
521
522The BusLogic Driver Miscellaneous Options comprise the following:
523
524BusSettleTime:<seconds>
525
526  The "BusSettleTime:" or "BST:" option specifies the Bus Settle Time in
527  seconds.  The Bus Settle Time is the amount of time to wait between a Host
528  Adapter Hard Reset which initiates a SCSI Bus Reset and issuing any SCSI
529  Commands.  If unspecified, it defaults to BusLogic_DefaultBusSettleTime.
530
531InhibitTargetInquiry
532
533  The "InhibitTargetInquiry" option inhibits the execution of an Inquire
534  Target Devices or Inquire Installed Devices command on MultiMaster Host
535  Adapters.  This may be necessary with some older Target Devices that do not
536  respond correctly when Logical Units above 0 are addressed.
537
538The BusLogic Driver Debugging Options comprise the following:
539
540TraceProbe
541
542  The "TraceProbe" option enables tracing of Host Adapter Probing.
543
544TraceHardwareReset
545
546  The "TraceHardwareReset" option enables tracing of Host Adapter Hardware
547  Reset.
548
549TraceConfiguration
550
551  The "TraceConfiguration" option enables tracing of Host Adapter
552  Configuration.
553
554TraceErrors
555
556  The "TraceErrors" option enables tracing of SCSI Commands that return an
557  error from the Target Device.  The CDB and Sense Data will be printed for
558  each SCSI Command that fails.
559
560Debug
561
562  The "Debug" option enables all debugging options.
563
564The following examples demonstrate setting the Queue Depth for Target Devices
5651 and 2 on the first host adapter to 7 and 15, the Queue Depth for all Target
566Devices on the second host adapter to 31, and the Bus Settle Time on the
567second host adapter to 30 seconds.
568
569Linux Kernel Command Line:
570
571  linux BusLogic=QueueDepth:[,7,15];QueueDepth:31,BusSettleTime:30
572
573LILO Linux Boot Loader (in /etc/lilo.conf):
574
575  append = "BusLogic=QueueDepth:[,7,15];QueueDepth:31,BusSettleTime:30"
576
577INSMOD Loadable Kernel Module Installation Facility:
578
579  insmod BusLogic.o \
580      'BusLogic_Options="QueueDepth:[,7,15];QueueDepth:31,BusSettleTime:30"'
581
582NOTE: Module Utilities 2.1.71 or later is required for correct parsing
583      of driver options containing commas.
584
585
586			      DRIVER INSTALLATION
587
588This distribution was prepared for Linux kernel version 2.0.35, but should be
589compatible with 2.0.4 or any later 2.0 series kernel.
590
591To install the new BusLogic SCSI driver, you may use the following commands,
592replacing "/usr/src" with wherever you keep your Linux kernel source tree:
593
594  cd /usr/src
595  tar -xvzf BusLogic-2.0.15.tar.gz
596  mv README.* LICENSE.* BusLogic.[ch] FlashPoint.c linux/drivers/scsi
597  patch -p0 < BusLogic.patch (only for 2.0.33 and below)
598  cd linux
599  make config
600  make depend
601  make zImage
602
603Then install "arch/i386/boot/zImage" as your standard kernel, run lilo if
604appropriate, and reboot.
605
606
607		      BUSLOGIC ANNOUNCEMENTS MAILING LIST
608
609The BusLogic Announcements Mailing List provides a forum for informing Linux
610users of new driver releases and other announcements regarding Linux support
611for BusLogic SCSI Host Adapters.  To join the mailing list, send a message to
612"buslogic-announce-request@dandelion.com" with the line "subscribe" in the
613message body.
614

README.FlashPoint

1The BusLogic FlashPoint SCSI Host Adapters are now fully supported on Linux.
2The upgrade program described below has been officially terminated effective
331 March 1997 since it is no longer needed.
4
5
6
7	  MYLEX INTRODUCES LINUX OPERATING SYSTEM SUPPORT FOR ITS
8	      BUSLOGIC FLASHPOINT LINE OF SCSI HOST ADAPTERS
9
10
11FREMONT, CA, -- October 8, 1996 -- Mylex Corporation has expanded Linux
12operating system support to its BusLogic brand of FlashPoint Ultra SCSI
13host adapters.  All of BusLogic's other SCSI host adapters, including the
14MultiMaster line, currently support the Linux operating system.  Linux
15drivers and information will be available on October 15th at
16http://www.dandelion.com/Linux/.
17
18"Mylex is committed to supporting the Linux community," says Peter Shambora,
19vice president of marketing for Mylex.  "We have supported Linux driver
20development and provided technical support for our host adapters for several
21years, and are pleased to now make our FlashPoint products available to this
22user base."
23
24The Linux Operating System
25
26Linux is a freely-distributed implementation of UNIX for Intel x86, Sun
27SPARC, SGI MIPS, Motorola 68k, Digital Alpha AXP and Motorola PowerPC
28machines.  It supports a wide range of software, including the X Window
29System, Emacs, and TCP/IP networking.  Further information is available at
30http://www.linux.org and http://www.ssc.com/linux.
31
32FlashPoint Host Adapters
33
34The FlashPoint family of Ultra SCSI host adapters, designed for workstation
35and file server environments, are available in narrow, wide, dual channel,
36and dual channel wide versions.  These adapters feature SeqEngine
37automation technology, which minimizes SCSI command overhead and reduces
38the number of interrupts generated to the CPU.
39
40About Mylex
41
42Mylex Corporation (NASDAQ/NM SYMBOL: MYLX), founded in 1983, is a leading
43producer of RAID technology and network management products.  The company
44produces high performance disk array (RAID) controllers, and complementary
45computer products for network servers, mass storage systems, workstations
46and system boards.  Through its wide range of RAID controllers and its
47BusLogic line of Ultra SCSI host adapter products, Mylex provides enabling
48intelligent I/O technologies that increase network management control,
49enhance CPU utilization, optimize I/O performance, and ensure data security
50and availability.  Products are sold globally through a network of OEMs,
51major distributors, VARs, and system integrators.  Mylex Corporation is
52headquartered at 34551 Ardenwood Blvd., Fremont, CA.
53
54				   ####
55
56Contact:
57
58Peter Shambora
59Vice President of Marketing
60Mylex Corp.
61510/796-6100
62peters@mylex.com
63
64			       ANNOUNCEMENT
65	       BusLogic FlashPoint LT/BT-948 Upgrade Program
66			      1 February 1996
67
68			  ADDITIONAL ANNOUNCEMENT
69	       BusLogic FlashPoint LW/BT-958 Upgrade Program
70			       14 June 1996
71
72Ever since its introduction last October, the BusLogic FlashPoint LT has
73been problematic for members of the Linux community, in that no Linux
74drivers have been available for this new Ultra SCSI product.  Despite it's
75officially being positioned as a desktop workstation product, and not being
76particularly well suited for a high performance multitasking operating
77system like Linux, the FlashPoint LT has been touted by computer system
78vendors as the latest thing, and has been sold even on many of their high
79end systems, to the exclusion of the older MultiMaster products.  This has
80caused grief for many people who inadvertently purchased a system expecting
81that all BusLogic SCSI Host Adapters were supported by Linux, only to
82discover that the FlashPoint was not supported and would not be for quite
83some time, if ever.
84
85After this problem was identified, BusLogic contacted its major OEM
86customers to make sure the BT-946C/956C MultiMaster cards would still be
87made available, and that Linux users who mistakenly ordered systems with
88the FlashPoint would be able to upgrade to the BT-946C.  While this helped
89many purchasers of new systems, it was only a partial solution to the
90overall problem of FlashPoint support for Linux users.  It did nothing to
91assist the people who initially purchased a FlashPoint for a supported
92operating system and then later decided to run Linux, or those who had
93ended up with a FlashPoint LT, believing it was supported, and were unable
94to return it.
95
96In the middle of December, I asked to meet with BusLogic's senior
97management to discuss the issues related to Linux and free software support
98for the FlashPoint.  Rumors of varying accuracy had been circulating
99publicly about BusLogic's attitude toward the Linux community, and I felt
100it was best that these issues be addressed directly.  I sent an email
101message after 11pm one evening, and the meeting took place the next
102afternoon.  Unfortunately, corporate wheels sometimes grind slowly,
103especially when a company is being acquired, and so it's taken until now
104before the details were completely determined and a public statement could
105be made.
106
107BusLogic is not prepared at this time to release the information necessary
108for third parties to write drivers for the FlashPoint.  The only existing
109FlashPoint drivers have been written directly by BusLogic Engineering, and
110there is no FlashPoint documentation sufficiently detailed to allow outside
111developers to write a driver without substantial assistance.  While there
112are people at BusLogic who would rather not release the details of the
113FlashPoint architecture at all, that debate has not yet been settled either
114way.  In any event, even if documentation were available today it would
115take quite a while for a usable driver to be written, especially since I'm
116not convinced that the effort required would be worthwhile.
117
118However, BusLogic does remain committed to providing a high performance
119SCSI solution for the Linux community, and does not want to see anyone left
120unable to run Linux because they have a Flashpoint LT.  Therefore, BusLogic
121has put in place a direct upgrade program to allow any Linux user worldwide
122to trade in their FlashPoint LT for the new BT-948 MultiMaster PCI Ultra
123SCSI Host Adapter.  The BT-948 is the Ultra SCSI successor to the BT-946C
124and has all the best features of both the BT-946C and FlashPoint LT,
125including smart termination and a flash PROM for easy firmware updates, and
126is of course compatible with the present Linux driver.  The price for this
127upgrade has been set at US $45 plus shipping and handling, and the upgrade
128program will be administered through BusLogic Technical Support, which can
129be reached by electronic mail at techsup@buslogic.com, by Voice at +1 408
130654-0760, or by FAX at +1 408 492-1542.
131
132As of 14 June 1996, the original BusLogic FlashPoint LT to BT-948 upgrade
133program has now been extended to encompass the FlashPoint LW Wide Ultra
134SCSI Host Adapter.  Any Linux user worldwide may trade in their FlashPoint
135LW (BT-950) for a BT-958 MultiMaster PCI Ultra SCSI Host Adapter.  The
136price for this upgrade has been set at US $65 plus shipping and handling.
137
138I was a beta test site for the BT-948/958, and versions 1.2.1 and 1.3.1 of
139my BusLogic driver already included latent support for the BT-948/958.
140Additional cosmetic support for the Ultra SCSI MultiMaster cards was added
141subsequent releases.  As a result of this cooperative testing process,
142several firmware bugs were found and corrected.  My heavily loaded Linux
143test system provided an ideal environment for testing error recovery
144processes that are much more rarely exercised in production systems, but
145are crucial to overall system stability.  It was especially convenient
146being able to work directly with their firmware engineer in demonstrating
147the problems under control of the firmware debugging environment; things
148sure have come a long way since the last time I worked on firmware for an
149embedded system.  I am presently working on some performance testing and
150expect to have some data to report in the not too distant future.
151
152BusLogic asked me to send this announcement since a large percentage of the
153questions regarding support for the FlashPoint have either been sent to me
154directly via email, or have appeared in the Linux newsgroups in which I
155participate.  To summarize, BusLogic is offering Linux users an upgrade
156from the unsupported FlashPoint LT (BT-930) to the supported BT-948 for US
157$45 plus shipping and handling, or from the unsupported FlashPoint LW
158(BT-950) to the supported BT-958 for $65 plus shipping and handling.
159Contact BusLogic Technical Support at techsup@buslogic.com or +1 408
160654-0760 to take advantage of their offer.
161
162		Leonard N. Zubkoff
163		lnz@dandelion.com
164

README.Mylex

1Please see the file README.BusLogic for information about Linux support for
2Mylex (formerly BusLogic) MultiMaster and FlashPoint SCSI Host Adapters.
3
4The Mylex DAC960 PCI RAID Controllers are now supported.  Please consult
5http://www.dandelion.com/Linux/ for further information on the DAC960 driver.
6

README.aha152x

1$Id: README.aha152x,v 1.2 1999/12/25 15:32:30 fischer Exp fischer $
2Adaptec AHA-1520/1522 SCSI driver for Linux (aha152x)
3
4Copyright 1993-1999 J�rgen Fischer <fischer@norbit.de>
5TC1550 patches by Luuk van Dijk (ldz@xs4all.nl)
6
7
8In Revision 2 the driver was modified a lot (especially the
9bottom-half handler complete()).
10
11The driver is much cleaner now, has support for the new
12error handling code in 2.3, produced less cpu load (much
13less polling loops), has slightly higher throughput (at
14least on my ancient test box; a i486/33Mhz/20MB).
15
16
17CONFIGURATION ARGUMENTS:
18
19IOPORT        base io address                           (0x340/0x140)
20IRQ           interrupt level                           (9-12; default 11)
21SCSI_ID       scsi id of controller                     (0-7; default 7)
22RECONNECT     allow targets to disconnect from the bus  (0/1; default 1 [on])
23PARITY        enable parity checking                    (0/1; default 1 [on])
24SYNCHRONOUS   enable synchronous transfers              (0/1; default 1 [on])
25DELAY:        bus reset delay                           (default 100)
26EXT_TRANS:    enable extended translation               (0/1: default 0 [off])
27              (see NOTES)
28
29COMPILE TIME CONFIGURATION (go into AHA152X in drivers/scsi/Makefile):
30
31-DAUTOCONF
32 use configuration the controller reports (AHA-152x only)
33
34-DSKIP_BIOSTEST
35 Don't test for BIOS signature (AHA-1510 or disabled BIOS)
36
37-DSETUP0="{ IOPORT, IRQ, SCSI_ID, RECONNECT, PARITY, SYNCHRONOUS, DELAY, EXT_TRANS }"
38 override for the first controller
39
40-DSETUP1="{ IOPORT, IRQ, SCSI_ID, RECONNECT, PARITY, SYNCHRONOUS, DELAY, EXT_TRANS }"
41 override for the second controller
42
43-DAHA152X_DEBUG
44 enable debugging output
45
46-DAHA152X_STAT
47 enable some statistics
48
49
50LILO COMMAND LINE OPTIONS:
51
52aha152x=<IOPORT>[,<IRQ>[,<SCSI-ID>[,<RECONNECT>[,<PARITY>[,<SYNCHRONOUS>[,<DELAY> [,<EXT_TRANS]]]]]]]
53
54 The normal configuration can be overridden by specifying a command line.
55 When you do this, the BIOS test is skipped. Entered values have to be
56 valid (known).  Don't use values that aren't supported under normal
57 operation.  If you think that you need other values: contact me.
58 For two controllers use the aha152x statement twice.
59
60
61SYMBOLS FOR MODULE CONFIGURATION:
62
63Choose from 2 alternatives:
64
651. specify everything (old)
66
67aha152x=IOPORT,IRQ,SCSI_ID,RECONNECT,PARITY,SYNCHRONOUS,DELAY,EXT_TRANS
68  configuration override for first controller
69
70
71aha152x1=IOPORT,IRQ,SCSI_ID,RECONNECT,PARITY,SYNCHRONOUS,DELAY,EXT_TRANS
72  configuration override for second controller
73
742. specify only what you need to (irq or io is required; new)
75
76io=IOPORT0[,IOPORT1]
77  IOPORT for first and second controller
78
79irq=IRQ0[,IRQ1]
80  IRQ for first and second controller
81
82scsiid=SCSIID0[,SCSIID1]
83  SCSIID for first and second controller
84
85reconnect=RECONNECT0[,RECONNECT1]
86  allow targets to disconnect for first and second controller
87
88parity=PAR0[PAR1]
89  use parity for first and second controller
90
91sync=SYNCHRONOUS0[,SYNCHRONOUS1]
92  enable synchronous transfers for first and second controller
93
94delay=DELAY0[,DELAY1]
95  reset DELAY for first and second controller
96
97exttrans=EXTTRANS0[,EXTTRANS1]
98  enable extended translation for first and second controller
99
100
101If you use both alternatives the first will be taken.
102
103
104NOTES ON EXT_TRANS:
105
106SCSI uses block numbers to address blocks/sectors on a device.
107The BIOS uses a cylinder/head/sector addressing scheme (C/H/S)
108scheme instead.  DOS expects a BIOS or driver that understands this
109C/H/S addressing.
110
111The number of cylinders/heads/sectors is called geometry and is required
112as base for requests in C/H/S addressing.  SCSI only knows about the
113total capacity of disks in blocks (sectors).
114
115Therefore the SCSI BIOS/DOS driver has to calculate a logical/virtual
116geometry just to be able to support that addressing scheme.  The geometry
117returned by the SCSI BIOS is a pure calculation and has nothing to
118do with the real/physical geometry of the disk (which is usually
119irrelevant anyway).
120
121Basically this has no impact at all on Linux, because it also uses block
122instead of C/H/S addressing.  Unfortunately C/H/S addressing is also used
123in the partition table and therefore every operating system has to know
124the right geometry to be able to interpret it.
125
126Moreover there are certain limitations to the C/H/S addressing scheme,
127namely the address space is limited to upto 255 heads, upto 63 sectors
128and a maximum of 1023 cylinders.
129
130The AHA-1522 BIOS calculates the geometry by fixing the number of heads
131to 64, the number of sectors to 32 and by calculating the number of
132cylinders by dividing the capacity reported by the disk by 64*32 (1 MB).
133This is considered to be the default translation.
134
135With respect to the limit of 1023 cylinders using C/H/S you can only
136address the first GB of your disk in the partition table.  Therefore
137BIOSes of some newer controllers based on the AIC-6260/6360 support
138extended translation.  This means that the BIOS uses 255 for heads,
13963 for sectors and then divides the capacity of the disk by 255*63
140(about 8 MB), as soon it sees a disk greater than 1 GB.  That results
141in a maximum of about 8 GB addressable diskspace in the partition table
142(but there are already bigger disks out there today).
143
144To make it even more complicated the translation mode might/might
145not be configurable in certain BIOS setups.
146
147This driver does some more or less failsafe guessing to get the
148geometry right in most cases:
149
150- for disks<1GB: use default translation (C/32/64)
151
152- for disks>1GB:
153  - take current geometry from the partition table
154    (using scsicam_bios_param and accept only `valid' geometries,
155    ie. either (C/32/64) or (C/63/255)).  This can be extended translation
156    even if it's not enabled in the driver.
157
158  - if that fails, take extended translation if enabled by override,
159    kernel or module parameter, otherwise take default translation and
160    ask the user for verification.  This might on not yet partitioned
161    disks.
162
163
164REFERENCES USED:
165
166 "AIC-6260 SCSI Chip Specification", Adaptec Corporation.
167
168 "SCSI COMPUTER SYSTEM INTERFACE - 2 (SCSI-2)", X3T9.2/86-109 rev. 10h
169
170 "Writing a SCSI device driver for Linux", Rik Faith (faith@cs.unc.edu)
171
172 "Kernel Hacker's Guide", Michael K. Johnson (johnsonm@sunsite.unc.edu)
173
174 "Adaptec 1520/1522 User's Guide", Adaptec Corporation.
175
176 Michael K. Johnson (johnsonm@sunsite.unc.edu)
177
178 Drew Eckhardt (drew@cs.colorado.edu)
179
180 Eric Youngdale (eric@andante.org)
181
182 special thanks to Eric Youngdale for the free(!) supplying the
183 documentation on the chip.
184

README.aic7xxx

1			    AIC7xxx Driver for Linux
2
3Introduction
4----------------------------
5The AIC7xxx SCSI driver adds support for Adaptec (http://www.adaptec.com)
6SCSI controllers and chipsets. Major portions of the driver and driver
7development are shared between both Linux and FreeBSD. Support for the
8AIC-7xxx chipsets have been in the default Linux kernel since approximately
9linux-1.1.x and fairly stable since linux-1.2.x, and are also in FreeBSD
102.1.0 or later.
11
12  Supported cards/chipsets
13  ----------------------------
14    Adaptec Cards
15    ----------------------------
16    AHA-274x
17    AHA-274xT
18    AHA-274xW
19    AHA-284x
20    AHA-284xW
21    All PCI based cards using any of the chipsets listed under motherboard
22    chipsets.  In general, this means *all* of the Adaptec SCSI controllers
23    except the ones specifically excluded later on in this document.
24
25    Motherboard Chipsets
26    ----------------------------
27    AIC-777x
28    AIC-785x
29    AIC-786x
30    AIC-787x
31    AIC-788x
32    AIC-789x
33    AIC-3860
34
35    Bus Types
36    ----------------------------
37    W - Wide SCSI, SCSI-3, 16bit bus, 68pin connector, will also support
38        SCSI-1/SCSI-2 50pin devices, transfer rates up to 20MB/s.
39    U - Ultra SCSI, transfer rates up to 40MB/s.
40    U2- Ultra 2 SCSI, transfer rates up to 80MB/s.
41    U3- Ultra 3 SCSI, transfer rates up to 160MB/s.
42    D - Differential SCSI.
43    T - Twin Channel SCSI. Up to 14 SCSI devices.
44
45    AHA-274x - EISA SCSI controller
46    AHA-284x - VLB SCSI controller
47    AHA-29xx - PCI SCSI controller
48    AHA-39xx - PCI controllers with multiple separate SCSI channels on-board.
49
50  Not Supported Devices
51  ------------------------------
52    Adaptec Cards
53    ----------------------------
54    AHA-2920 (Only the cards that use the Future Domain chipset are not
55              supported, any 2920 cards based on Adaptec AIC chipsets,
56	      such as the 2920C, are supported)
57    AAA-13x Raid Adapters
58    AAA-113x Raid Port Card
59
60    Motherboard Chipsets
61    ----------------------------
62    AIC-781x
63
64    Bus Types
65    ----------------------------
66    R - Raid Port busses are not supported.
67
68    The hardware RAID devices sold by Adaptec are *NOT* supported by this
69    driver (and will people please stop emailing me about them, they are
70    a totally separate beast from the bare SCSI controllers and this driver
71    can not be retrofitted in any sane manner to support the hardware RAID
72    features on those cards - Doug Ledford).
73
74
75  People
76  ------------------------------
77    Justin T Gibbs  gibbs@plutotech.com
78      (BSD Driver Author)
79    Dan Eischen     deischen@iworks.InterWorks.org
80      (Original Linux Driver Co-maintainer)
81    Dean Gehnert    deang@teleport.com
82      (Original Linux FTP/patch maintainer)
83    Jess Johnson    jester@frenzy.com
84      (AIC7xxx FAQ author)
85    Doug Ledford    dledford@redhat.com
86      (Current Linux aic7xxx-5.x.x Driver/Patch/FTP maintainer)
87
88    Special thanks go to John Aycock (aycock@cpsc.ucalgary.ca), the original
89    author of the driver. John has since retired from the project. Thanks
90    again for all his work!
91
92  Mailing list
93  ------------------------------
94    There is a mailing list available for users who want to track development
95    and converse with other users and developers. This list is for both
96    FreeBSD and Linux support of the AIC7xxx chipsets.
97
98    To subscribe to the AIC7xxx mailing list send mail to the list server,
99    with "subscribe AIC7xxx" in the body (no Subject: required):
100        To: majordomo@FreeBSD.ORG
101        ---
102        subscribe AIC7xxx
103
104    To unsubscribe from the list, send mail to the list server with:
105        To: majordomo@FreeBSD.ORG
106        ---
107        unsubscribe AIC7xxx
108
109    Send regular messages and replies to: AIC7xxx@FreeBSD.ORG
110
111  Boot Command line options
112  ------------------------------
113    "aic7xxx=no_reset" -  Eliminate the SCSI bus reset during startup.
114        Some SCSI devices need the initial reset that this option disables
115	in order to work.  If you have problems at bootup, please make sure
116	you aren't using this option.
117
118    "aic7xxx=reverse_scan" - Certain PCI motherboards scan for devices at
119        bootup by scanning from the highest numbered PCI device to the
120	lowest numbered PCI device, others do just the opposite and scan
121	from lowest to highest numbered PCI device.  There is no reliable
122	way to autodetect this ordering.  So, we default to the most common
123	order, which is lowest to highest.  Then, in case your motherboard
124	scans from highest to lowest, we have this option.  If your BIOS
125	finds the drives on controller A before controller B but the linux
126	kernel finds your drives on controller B before A, then you should
127	use this option.
128
129    "aic7xxx=extended" - Force the driver to detect extended drive translation
130        on your controller.  This helps those people who have cards without
131        a SEEPROM make sure that linux and all other operating systems think
132        the same way about your hard drives.
133
134    "aic7xxx=scbram" - Some cards have external SCB RAM that can be used to
135        give the card more hardware SCB slots.  This allows the driver to use
136	that SCB RAM.  Without this option, the driver won't touch the SCB
137	RAM because it is known to cause problems on a few cards out there
138	(such as 3985 class cards).
139
140    "aic7xxx=irq_trigger:x" - Replace x with either 0 or 1 to force the kernel
141        to use the correct IRQ type for your card.  This only applies to EISA
142        based controllers.  On these controllers, 0 is for Edge triggered
143        interrupts, and 1 is for Level triggered interrupts.  If you aren't
144        sure or don't know which IRQ trigger type your EISA card uses, then
145        let the kernel autodetect the trigger type.
146
147    "aic7xxx=verbose" - This option can be used in one of two ways.  If you
148        simply specify aic7xxx=verbose, then the kernel will automatically
149	pick the default set of verbose messages for you to see.
150	Alternatively, you can specify the command as
151	"aic7xxx=verbose:0xXXXX" where the X entries are replaced with
152	hexadecimal digits.  This option is a bit field type option.  For
153	a full listing of the available options, search for the
154	#define VERBOSE_xxxxxx lines in the aic7xxx.c file.  If you want
155	verbose messages, then it is recommended that you simply use the
156	aic7xxx=verbose variant of this command.
157
158    "aic7xxx=pci_parity:x" - This option controls whether or not the driver
159        enables PCI parity error checking on the PCI bus.  By default, this
160        checking is disabled.  To enable the checks, simply specify pci_parity
161        with no value afterwords.  To reverse the parity from even to odd,
162        supply any number other than 0 or 255.  In short:
163          pci_parity     - Even parity checking (even is the normal PCI parity)
164          pci_parity:x   - Where x > 0, Odd parity checking
165          pci_parity:0   - No check (default)
166        NOTE: In order to get Even PCI parity checking, you must use the
167        version of the option that does not include the : and a number at
168        the end (unless you want to enter exactly 2^32 - 1 as the number).
169
170    "aic7xxx=no_probe" - This option will disable the probing for any VLB
171        based 2842 controllers and any EISA based controllers.  This is
172	needed on certain newer motherboards where the normal EISA I/O ranges
173	have been claimed by other PCI devices.  Probing on those machines
174	will often result in the machine crashing or spontaneously rebooting
175	during startup.  Examples of machines that need this are the
176	Dell PowerEdge 6300 machines.
177
178    "aic7xxx=seltime:2" - This option controls how long the card waits
179        during a device selection sequence for the device to respond.
180	The original SCSI spec says that this "should be" 256ms.  This
181	is generally not required with modern devices.  However, some
182	very old SCSI I devices need the full 256ms.  Most modern devices
183	can run fine with only 64ms.  The default for this option is
184	64ms.  If you need to change this option, then use the following
185	table to set the proper value in the example above:
186	  0  -  256ms
187	  1  -  128ms
188	  2  -   64ms
189	  3  -   32ms
190
191    "aic7xxx=panic_on_abort" - This option is for debugging and will cause
192        the driver to panic the linux kernel and freeze the system the first
193	time the drivers abort or reset routines are called.  This is most
194	helpful when some problem causes infinite reset loops that scroll too
195	fast to see.  By using this option, you can write down what the errors
196	actually are and send that information to me so it can be fixed.
197
198    "aic7xxx=dump_card" - This option will print out the *entire* set of
199        configuration registers on the card during the init sequence.  This
200	is a debugging aid used to see exactly what state the card is in
201	when we finally finish our initialization routines.  If you don't
202	have documentation on the chipsets, this will do you absolutely
203	no good unless you are simply trying to write all the information
204	down in order to send it to me.
205
206    "aic7xxx=dump_sequencer" - This is the same as the above options except
207        that instead of dumping the register contents on the card, this
208	option dumps the contents of the sequencer program RAM.  This gives
209	the ability to verify that the instructions downloaded to the
210	card's sequencer are indeed what they are suppossed to be.  Again,
211	unless you have documentation to tell you how to interpret these
212	numbers, then it is totally useless.
213
214    "aic7xxx=override_term:0xffffffff" - This option is used to force the
215    	termination on your SCSI controllers to a particular setting.  This
216	is a bit mask variable that applies for up to 8 aic7xxx SCSI channels.
217	Each channel gets 4 bits, divided as follows:
218	bit   3   2   1   0
219	      |   |   |   Enable/Disable Single Ended Low Byte Termination
220	      |   |   En/Disable Single Ended High Byte Termination
221	      |   En/Disable Low Byte LVD Termination
222	      En/Disable High Byte LVD Termination
223
224	The upper 2 bits that deal with LVD termination only apply to Ultra2
225	controllers.  Futhermore, due to the current Ultra2 controller
226	designs, these bits are tied together such that setting either bit
227	enables both low and high byte LVD termination.  It is not possible
228	to only set high or low byte LVD termination in this manner.  This is
229	an artifact of the BIOS definition on Ultra2 controllers.  For other
230	controllers, the only important bits are the two lowest bits.  Setting
231	the higher bits on non-Ultra2 controllers has no effect.  A few
232	examples of how to use this option:
233
234	Enable low and high byte termination on a non-ultra2 controller that
235	is the first aic7xxx controller (the correct bits are 0011),
236	aic7xxx=override_term:0x3
237
238	Enable all termination on the third aic7xxx controller, high byte
239	termination on the second aic7xxx controller, and low and high byte
240	SE termination on the first aic7xxx controller
241	(bits are 1111 0010 0011),
242	aic7xxx=override_term:0xf23
243
244	No attempt has been made to make this option non-cryptic.  It really
245	shouldn't be used except in dire circumstances, and if that happens,
246	I'm probably going to be telling you what to set this to anyway :)
247
248    "aic7xxx=stpwlev:0xffffffff" - This option is used to control the STPWLEV
249        bit in the DEVCONFIG PCI register.  Currently, this is one of the
250	very few registers that we have absolutely *no* way of detecting
251	what the variable should be.  It depends entirely on how the chipset
252	and external terminators were coupled by the card/motherboard maker.
253	Further, a chip reset (at power up) always sets this bit to 0.  If
254	there is no BIOS to run on the chipset/card (such as with a 2910C
255	or a motherboard controller with the BIOS totally disabled) then
256	the variable may not get set properly.  Of course, if the proper
257	setting was 0, then that's what it would be after the reset, but if
258	the proper setting is actually 1.....you get the picture.  Now, since
259	we can't detect this at all, I've added this option to force the
260	setting.  If you have a BIOS on your controller then you should never
261	need to use this option.  However, if you are having lots of SCSI
262	reset problems and can't seem to get them knocked out, this may help.
263
264	Here's a test to know for certain if you need this option.  Make
265	a boot floppy that you can use to boot your computer up and that
266	will detect the aic7xxx controller.  Next, power down your computer.
267	While it's down, unplug all SCSI cables from your Adaptec SCSI
268	controller.  Boot the system back up to the Adaptec EZ-SCSI BIOS
269	and then make sure that termination is enabled on your adapter (if
270	you have an Adaptec BIOS of course).  Next, boot up the floppy you
271	made and wait for it to detect the aic7xxx controller.  If the kernel
272	finds the controller fine, says scsi : x hosts and then tries to
273	detect your devices like normal, up to the point where it fails to
274	mount your root file system and panics, then you're fine.  If, on
275	the other hand, the system goes into an infinite reset loop, then
276	you need to use this option and/or the previous option to force the
277	proper termination settings on your controller.   If this happens,
278	then you next need to figure out what your settings should be.
279
280	To find the correct settings, power your machine back down, connect
281	back up the SCSI cables, and boot back into your machine like normal.
282	However, boot with the aic7xxx=verbose:0x39 option.  Record the
283	initial DEVCONFIG values for each of your aic7xxx controllers as
284	they are listed, and also record what the machine is detecting as
285	the proper termination on your controllers.  NOTE: the order in
286	which the initial DEVCONFIG values are printed out is not gauranteed
287	to be the same order as the SCSI controllers are registered.  The
288	above option and this option both work on the order of the SCSI
289	controllers as they are registered, so make sure you match the right
290	DEVCONFIG values with the right controllers if you have more than
291	one aic7xxx controller.
292
293	Once you have the detected termination settings and the initial
294	DEVCONFIG values for each controller, then figure out what the
295	termination on each of the controllers *should* be.  Hopefully, that
296	part is correct, but it could possibly be wrong if there is
297	bogus cable detection logic on your controller or something similar.
298	If all the controllers have the correct termination settings, then
299	don't set the aic7xxx=override_term variable at all, leave it alone.
300	Next, on any controllers that go into an infinite reset loop when
301	you unplug all the SCSI cables, get the starting DEVCONFIG value.
302	If the initial DEVCONFIG value is divisible by 2, then the correct
303	setting for that controller is 0.  If it's an odd number, then
304	the correct setting for that controller is 1.  For any other
305	controllers that didn't have an infinite reset problem, then reverse
306	the above options.  If DEVCONFIG was even, then the correct setting
307	is 1, if not then the correct setting is 0.
308
309	Now that you know what the correct setting was for each controller,
310	we need to encode that into the aic7xxx=stpwlev:0x... variable.
311	This variable is a bit field encoded variable.  Bit 0 is for the first
312	aic7xxx controller, bit 1 for the next, etc.  Put all these bits
313	together and you get a number.  For example, if the third aic7xxx
314	needed a 1, but the second and first both needed a 0, then the bits
315	would be 100 in binary.  This then translates to 0x04.  You would
316	therefore set aic7xxx=stpwlev:0x04.  This is fairly standard binary
317	to hexadecimal conversions here.  If you aren't up to speed on the
318	binary->hex conversion then send an email to the aic7xxx mailing
319	list and someone can help you out.
320
321    "aic7xxx=tag_info:{{8,8..},{8,8..},..}" - This option is used to disable
322        or enable Tagged Command Queueing (TCQ) on specific devices.  As of
323	driver version 5.1.11, TCQ is now either on or off by default
324	according to the setting you choose during the make config process.
325	In order to en/disable TCQ for certian devices at boot time, a user
326	may use this boot param.  The driver will then parse this message out
327        and en/disable the specific device entries that are present based upon
328        the value given.  The param line is parsed in the following manner:
329
330          { - first instance indicates the start of this parameter values
331              second instance is the start of entries for a particular
332              device entry
333          } - end the entries for a particular host adapter, or end the entire
334              set of parameter entries
335          , - move to next entry.  Inside of a set of device entries, this
336              moves us to the next device on the list.  Outside of device
337              entries, this moves us to the next host adapter
338          . - Same effect as , but is safe to use with insmod.
339          x - the number to enter into the array at this position.
340              0 = Enable tagged queueing on this device and use the default
341                  queue depth
342              1-254 = Enable tagged queueing on this device and use this
343                      number as the queue depth
344              255 = Disable tagged queueing on this device.
345              Note: anything above 32 for an actual queue depth is wasteful
346                    and not recommended.
347
348        A few examples of how this can be used:
349
350        tag_info:{{8,12,,0,,255,4}}
351          This line will only effect the first aic7xxx card registered.  It
352          will set scsi id 0 to a queue depth of 8, id 1 to 12, leave id 2
353          at the default, set id 3 to tagged queueing enabled and use the
354          default queue depth, id 4 default, id 5 disabled, and id 6 to 4.
355          Any not specified entries stay at the default value, repeated
356          commas with no value specified will simply increment to the next id
357          without changing anything for the missing values.
358
359        tag_info:{,,,{,,,255}}
360          First, second, and third adapters at default values.  Fourth
361          adapter, id 3 is disabled.  Notice that leading commas simply
362	  increment what the first number effects, and there are no need
363	  for trailing commas.  When you close out an adapter, or the
364	  entire entry, anything not explicitly set stays at the default
365	  value.
366
367        A final note on this option.  The scanner I used for this isn't
368        perfect or highly robust.  If you mess the line up, the worst that
369        should happen is that the line will get ignored.  If you don't
370        close out the entire entry with the final bracket, then any other
371        aic7xxx options after this will get ignored.  So, in general, be
372        sure of what you are entering, and after you have it right, just
373        add it to the lilo.conf file so there won't be any mistakes.  As
374        a means of checking this parser, the entire tag_info array for
375        each card is now printed out in the /proc/scsi/aic7xxx/x file.  You
376        can use that to verify that your options were parsed correctly.
377
378    Boot command line options may be combined to form the proper set of options
379    a user might need.  For example, the following is valid:
380
381    aic7xxx=verbose,extended,irq_trigger:1
382
383    The only requirement is that individual options be separated by a comma or
384    a period on the command line.
385
386  Module Loading command options
387  ------------------------------
388    When loading the aic7xxx driver as a module, the exact same options are
389    available to the user.  However, the syntax to specify the options changes
390    slightly.  For insmod, you need to wrap the aic7xxx= argument in quotes
391    and replace all ',' with '.'.  So, for example, a valid insmod line
392    would be:
393
394    insmod aic7xxx aic7xxx='verbose.irq_trigger:1.extended'
395
396    This line should result in the *exact* same behaviour as if you typed
397    it in at the lilo prompt and the driver was compiled into the kernel
398    instead of being a module.  The reason for the single quote is so that
399    the shell won't try to interpret anything in the line, such as {.
400    Insmod assumes any options starting with a letter instead of a number
401    is a character string (which is what we want) and by switching all of
402    the commas to periods, insmod won't interpret this as more than one
403    string and write junk into our binary image.  I consider it a bug in
404    the insmod program that even if you wrap your string in quotes (quotes
405    that pass the shell mind you and that insmod sees) it still treates
406    a comma inside of those quotes as starting a new variable, resulting
407    in memory scribbles if you don't switch the commas to periods.
408
409
410  Kernel Compile options
411  ------------------------------
412    The various kernel compile time options for this driver are now fairly
413    well documented in the file Documentation/Configure.help.  In order to
414    see this documentation, you need to use one of the advanced configuration
415    programs (menuconfig and xconfig).  If you are using the "make menuconfig"
416    method of configuring your kernel, then you would simply highlight the
417    option in question and hit the ? key.  If you are using the "make xconfig"
418    method of configuring your kernel, then simply click on the help button
419    next to the option you have questions about.  The help information from
420    the Configure.help file will then get automatically displayed.
421
422  /proc support
423  ------------------------------
424    The /proc support for the AIC7xxx can be found in the /proc/scsi/aic7xxx/
425    directory. That directory contains a file for each SCSI controller in
426    the system. Each file presents the current configuration and transfer
427    statistics (enabled with #define in aic7xxx.c) for each controller.
428
429    Thanks to Michael Neuffer for his upper-level SCSI help, and
430    Matthew Jacob for statistics support.
431
432  Debugging the driver
433  ------------------------------
434    Should you have problems with this driver, and would like some help in
435    getting them solved, there are a couple debugging items built into
436    the driver to facilitate getting the needed information from the system.
437    In general, I need a complete description of the problem, with as many
438    logs as possible concerning what happens.  To help with this, there is
439    a command option aic7xxx=panic_on_abort.  This option, when set, forces
440    the driver to panic the kernel on the first SCSI abort issued by the
441    mid level SCSI code.  If your system is going to reset loops and you
442    can't read the screen, then this is what you need.  Not only will it
443    stop the system, but it also prints out a large amount of state
444    information in the process.  Second, if you specify the option
445    "aic7xxx=verbose:0x1ffff", the system will print out *SOOOO* much
446    information as it runs that you won't be able to see anything.
447    However, this can actually be very useful if your machine simply
448    locks up when trying to boot, since it will pin-point what was last
449    happening (in regards to the aic7xxx driver) immediately prior to
450    the lockup.  This is really only useful if your machine simply can
451    not boot up successfully.  If you can get your machine to run, then
452    this will produce far too much information.
453
454  FTP sites
455  ------------------------------
456    ftp://ftp.redhat.com/pub/aic/
457      - Out of date.  I used to keep stuff here, but too many people
458        complained about having a hard time getting into Red Hat's ftp
459	server.  So use the web site below instead.
460    ftp://ftp.pcnet.com/users/eischen/Linux/
461      - Dan Eischen's driver distribution area
462    ftp://ekf2.vsb.cz/pub/linux/kernel/aic7xxx/ftp.teleport.com/
463      - European Linux mirror of Teleport site
464
465  Web sites
466  ------------------------------
467    http://people.redhat.com/dledford/
468      - My web site, also the primary aic7xxx site with several related
469        pages.
470
471Dean W. Gehnert
472deang@teleport.com
473
474$Revision: 3.0 $
475
476Modified by Doug Ledford 1998-2000
477
478

README.dpti

1 /* TERMS AND CONDITIONS OF USE
2 *
3 * Redistribution and use in source form, with or without modification, are
4 * permitted provided that redistributions of source code must retain the
5 * above copyright notice, this list of conditions and the following disclaimer.
6 *
7 * This software is provided `as is' by Adaptec and
8 * any express or implied warranties, including, but not limited to, the
9 * implied warranties of merchantability and fitness for a particular purpose,
10 * are disclaimed. In no event shall Adaptec be
11 * liable for any direct, indirect, incidental, special, exemplary or
12 * consequential damages (including, but not limited to, procurement of
13 * substitute goods or services; loss of use, data, or profits; or business
14 * interruptions) however caused and on any theory of liability, whether in
15 * contract, strict liability, or tort (including negligence or otherwise)
16 * arising in any way out of the use of this driver software, even if advised
17 * of the possibility of such damage.
18 *
19 ****************************************************************
20 * This driver supports the Adaptec I2O RAID and DPT SmartRAID V I2O boards.
21 *
22 * CREDITS:
23 * The original linux driver was ported to Linux by Karen White while at
24 * Dell Computer.  It was ported from Bob Pasteur's (of DPT) original
25 * non-Linux driver.  Mark Salyzyn and Bob Pasteur consulted on the original
26 * driver.
27 *
28 * 2.0 version of the driver by Deanna Bonds and Mark Salyzyn.
29 *
30 * HISTORY:
31 * The driver was originally ported to linux version 2.0.34
32 *
33 * V2.0 Rewrite of driver.  Re-architectured based on i2o subsystem.
34 *   This was the first full GPL version since the last version used
35 *   i2osig headers which were not GPL.  Developer Testing version.
36 * V2.1 Internal testing
37 * V2.2 First released version
38 *
39 * V2.3
40 *   Changes:
41 *      Added Raptor Support
42 *      Fixed bug causing system to hang under extreme load with
43 *         management utilities running (removed GFP_DMA from kmalloc flags)
44 *
45 *
46 * V2.4 First version ready to be submitted to be embedded in the kernel
47 *   Changes:
48 *      Implemented suggestions from Alan Cox
49 *      Added calculation of resid for sg layer
50 *      Better error handling
51 *         Added checking underflow condtions
52 *         Added DATAPROTECT checking
53 *         Changed error return codes
54 *         Fixed pointer bug in bus reset routine
55 *      Enabled hba reset from ioctls (allows a FW flash to reboot and use the new
56 *         FW without having to reboot)
57 *      Changed proc output
58 *
59 * TODO:
60 *      Add 64 bit Scatter Gather when compiled on 64 bit architectures
61 *      Add sparse lun scanning
62 *      Add code that checks if a device that had been taken offline is
63 *         now online (at the FW level) when test unit ready or inquiry
64 *         command from scsi-core
65 *      Add proc read interface
66 *         busrescan command
67 *         rescan command
68 *      Add code to rescan routine that notifies scsi-core about new devices
69 *      Add support for C-PCI (hotplug stuff)
70 *      Add ioctl passthru error recovery
71 *
72 * NOTES:
73 * The DPT card optimizes the order of processing commands.  Consequently,
74 * a command may take up to 6 minutes to complete after it has been sent
75 * to the board.
76 *
77 * The files dpti_ioctl.h dptsig.h osd_defs.h osd_util.h sys_info.h are part of the
78 * interface files for Adaptecs managment routines.  These define the structures used
79 * in the ioctls.  They are written to be portable.  They are hard to read, but I need
80 * to use them 'as is' or I can miss changes in the interface.
81 *
82 */
83
84

README.dtc3x80

1README file for the Linux DTC3180/3280 scsi driver.
2by Ray Van Tassle (rayvt@comm.mot.com)  March 1996
3Based on the generic & core NCR5380 code by Drew Eckhard
4
5SCSI device driver for the DTC 3180/3280.
6Data Technology Corp---a division of Qume.
7
8The 3280 has a standard floppy interface.
9
10The 3180 does not.  Otherwise, they are identical.
11
12The DTC3x80 does not support DMA but it does have Pseudo-DMA which is
13supported by the driver.
14
15It's DTC406 scsi chip is supposedly compatible with the NCR 53C400.
16It is memory mapped, uses an IRQ, but no dma or io-port.  There is
17internal DMA, between SCSI bus and an on-chip 128-byte buffer.  Double
18buffering is done automagically by the chip.  Data is transferred
19between the on-chip buffer and CPU/RAM via memory moves.
20
21The driver detects the possible memory addresses (jumper selectable):
22	CC00, DC00, C800, and D800
23The possible IRQ's (jumper selectable) are:
24	IRQ 10, 11, 12, 15
25Parity is supported by the chip, but not by this driver.
26Information can be obtained from /proc/scsi/dtc3c80/N.
27
28Note on interrupts:
29
30The documentation says that it can be set to interrupt whenever the
31on-chip buffer needs CPU attention.  I couldn't get this to work.  So
32the driver polls for data-ready in the pseudo-DMA transfer routine.
33The interrupt support routines in the NCR3280.c core modules handle
34scsi disconnect/reconnect, and this (mostly) works.  However.....  I
35have tested it with 4 totally different hard drives (both SCSI-1 and
36SCSI-2), and one CDROM drive.  Interrupts works great for all but one
37specific hard drive.  For this one, the driver will eventually hang in
38the transfer state.  I have tested with: "dd bs=4k count=2k
39of=/dev/null if=/dev/sdb".  It reads ok for a while, then hangs.
40After beating my head against this for a couple of weeks, getting
41nowhere, I give up.  So.....This driver does NOT use interrupts, even
42if you have the card jumpered to an IRQ.  Probably nobody will ever
43care.
44
45
46

README.g_NCR5380

1README file for the Linux g_NCR5380 driver.
2
3(c) 1993 Drew Eckhard
4NCR53c400 extensions (c) 1994,1995,1996 Kevin Lentin
5
6This file documents the NCR53c400 extensions by Kevin Lentin and some
7enhancements to the NCR5380 core.
8
9This driver supports both NCR5380 and NCR53c400 cards in port or memory
10mapped modes. Currently this driver can only support one of those mapping
11modes at a time but it does support both of these chips at the same time.
12The next release of this driver will support port & memory mapped cards at
13the same time. It should be able to handle multiple different cards in the
14same machine.
15
16The drivers/scsi/Makefile has an override in it for the most common
17NCR53c400 card, the Trantor T130B in its default configuration:
18	Port: 0x350
19	IRQ : 5
20
21The NCR53c400 does not support DMA but it does have Pseudo-DMA which is
22supported by the driver.
23
24If the default configuration does not work for you, you can use the kernel
25command lines (eg using the lilo append command):
26	ncr5380=port,irq,dma
27	ncr53c400=port,irq
28or
29	ncr5380=base,irq,dma
30	ncr53c400=base,irq
31
32The driver does not probe for any addresses or ports other than those in
33the OVERRIDE or given to the kernel as above.
34
35This driver provides some information on what it has detected in
36/proc/scsi/g_NCR5380/x where x is the scsi card number as detected at boot
37time. More info to come in the future.
38
39When NCR53c400 support is compiled in, BIOS parameters will be returned by
40the driver (the raw 5380 driver does not and I don't plan to fiddle with
41it!).
42
43This driver works as a module.
44When included as a module, parameters can be passed on the insmod/modprobe
45command line:
46  ncr_irq=xx   the interrupt
47  ncr_addr=xx  the port or base address (for port or memory
48               mapped, resp.)
49  ncr_dma=xx   the DMA
50  ncr_5380=1   to set up for a NCR5380 board
51  ncr_53c400=1 to set up for a NCR53C400 board
52e.g.
53modprobe g_NCR5380 ncr_irq=5 ncr_addr=0x350 ncr_5380=1
54  for a port mapped NCR5380 board or
55modprobe g_NCR5380 ncr_irq=255 ncr_addr=0xc8000 ncr_53c400=1
56  for a memory mapped NCR53C400 board with interrupts disabled.
57
58(255 should be specified for no or DMA interrupt, 254 to autoprobe for an
59     IRQ line if overridden on the command line.)
60
61
62Kevin Lentin
63K.Lentin@cs.monash.edu.au
64

README.ibmmca

1
2               -=< The IBM Microchannel SCSI-Subsystem >=-
3
4	                 for the IBM PS/2 series
5
6	  	   Low Level Software-Driver for Linux
7
8     Copyright (c) 1995 Strom Systems, Inc. under the terms of the GNU
9  General Public License. Originally written by Martin Kolinek, December 1995.
10   Officially modified and maintained by Michael Lang since January 1999.
11
12 	                       Version 4.0a
13
14   Last update: January 3, 2001
15
16   Before you Start
17   ----------------
18   This is the common README.ibmmca file for all driver releases of the
19   IBM MCA SCSI driver for Linux. Please note, that driver releases 4.0
20   or newer do not work with kernel versions older than 2.4.0, while driver
21   versions older than 4.0 do not work with kernels 2.4.0 or later! If you
22   try to compile your kernel with the wrong driver source, the
23   compilation is aborted and you get a corresponding error message. This is
24   no bug in the driver. It prevents you from using the wrong sourcecode
25   with the wrong kernel version.
26
27   Authors of this Driver
28   ----------------------
29    - Chris Beauregard (improvement of the SCSI-device mapping by the driver)
30    - Martin Kolinek (origin, first release of this driver)
31    - Klaus Kudielka (multiple SCSI-host management/detection, adaption to
32                      Linux Kernel 2.1.x, module support)
33    - Michael Lang (assigning original pun/lun mapping, dynamical ldn
34                    assignment, rewritten adapter detection, this file,
35		    patches, official driver maintenance and subsequent
36		    debugging, related with the driver)
37
38   Table of Contents
39   -----------------
40   1 Abstract
41   2 Driver Description
42     2.1  IBM SCSI-Subsystem Detection
43     2.2  Physical Units, Logical Units, and Logical Devices
44     2.3  SCSI-Device Recognition and dynamical ldn Assignment
45     2.4  SCSI-Device Order
46     2.5  Regular SCSI-Command-Processing
47     2.6  Abort & Reset Commands
48     2.7  Disk Geometry
49     2.8  Kernel Boot Option
50     2.9  Driver Module Support
51     2.10 Multiple Hostadapter Support
52     2.11 /proc/scsi-Filesystem Information
53     2.12 /proc/mca-Filesystem Information
54     2.13 Supported IBM SCSI-Subsystems
55     2.14 Linux Kernel Versions
56   3 Code History
57   4 To do
58   5 Users' Manual
59     5.1 Commandline Parameters
60     5.2 Troubleshooting
61     5.3 Bugreports
62     5.4 Support WWW-page
63   6 References
64   7 Credits to
65     7.1 People
66     7.2 Sponsors & Supporters
67   8 Trademarks
68   9 Disclaimer
69
70                              * * *
71
72   1 Abstract
73   ----------
74   This README-file describes the IBM SCSI-subsystem low level driver for
75   Linux. The descriptions which were formerly kept in the source-code have
76   been taken out to this file to easify the codes' readability. The driver
77   description has been updated, as most of the former description was already
78   quite outdated. The history of the driver development is also kept inside
79   here. Multiple historical developments have been summarized to shorten the
80   textsize a bit. At the end of this file you can find a small manual for
81   this driver and hints to get it running on your machine.
82
83   2 Driver Description
84   --------------------
85   2.1 IBM SCSI-Subsystem Detection
86   --------------------------------
87   This is done in the ibmmca_detect() function. It first checks, if the
88   Microchannel-bus support is enabled, as the IBM SCSI-subsystem needs the
89   Microchannel. In a next step, a free interrupt is chosen and the main
90   interrupt handler is connected to it to handle answers of the SCSI-
91   subsystem(s). If the F/W SCSI-adapter is forced by the BIOS to use IRQ11
92   instead of IRQ14, IRQ11 is used for the IBM SCSI-2 F/W adapter. In a
93   further step it is checked, if the adapter gets detected by force from
94   the kernel commandline, where the I/O port and the SCSI-subsystem id can
95   be specified. The next step checks if there is an integrated SCSI-subsystem
96   installed. This register area is fixed through all IBM PS/2 MCA-machines
97   and appears as something like a virtual slot 10 of the MCA-bus. On most
98   PS/2 machines, the POS registers of slot 10 are set to 0xff or 0x00 if not
99   integrated SCSI-controller is available. But on certain PS/2s, like model
100   9595, this slot 10 is used to store other information which at earlier
101   stage confused the driver and resulted in the detection of some ghost-SCSI.
102   If POS-register 2 and 3 are not 0x00 and not 0xff, but all other POS
103   registers are either 0xff or 0x00, there must be an integrated SCSI-
104   subsystem present and it will be registered as IBM Integrated SCSI-
105   Subsystem. The next step checks, if there is a slot-adapter installed on
106   the MCA-bus. To get this, the first two POS-registers, that represent the
107   adapter ID are checked. If they fit to one of the ids, stored in the
108   adapter list, a SCSI-subsystem is assumed to be found in a slot and will be
109   registered. This check is done through all possible MCA-bus slots to allow
110   more than one SCSI-adapter to be present in the PS/2-system and this is
111   already the first point of problems. Looking into the technical reference
112   manual for the IBM PS/2 common interfaces, the POS2 register must have
113   different interpretation of its single bits to avoid overlapping I/O
114   regions. While one can assume, that the integrated subsystem has a fix
115   I/O-address at 0x3540 - 0x3547, further installed IBM SCSI-adapters must
116   use a different I/O-address. This is expressed by bit 1 to 3 of POS2
117   (multiplied by 8 + 0x3540). Bits 2 and 3 are reserved for the integrated
118   subsystem, but not for the adapters! The following list shows, how the
119   bits of POS2 and POS3 should be interpreted.
120
121   The POS2-register of all PS/2 models' integrated SCSI-subsystems has the
122   following interpretation of bits:
123                           Bit 7 - 4 : Chip Revision ID (Release)
124                           Bit 3 - 2 : Reserved
125                           Bit 1     : 8k NVRAM Disabled
126                           Bit 0     : Chip Enable (EN-Signal)
127   The POS3-register is interpreted as follows (for most IBM SCSI-subsys.):
128                           Bit 7 - 5 : SCSI ID
129                           Bit 4 - 0 : Reserved = 0
130   The slot-adapters have different interpretation of these bits. The IBM SCSI
131   adapter (w/Cache) and the IBM SCSI-2 F/W adapter use the following
132   interpretation of the POS2 register:
133                           Bit 7 - 4 : ROM Segment Address Select
134			   Bit 3 - 1 : Adapter I/O Address Select (*8+0x3540)
135			   Bit 0     : Adapter Enable (EN-Signal)
136   and for the POS3 register:
137                           Bit 7 - 5 : SCSI ID
138			   Bit 4     : Fairness Enable (SCSI ID3 f. F/W)
139			   Bit 3 - 0 : Arbitration Level
140   The most modern product of the series is the IBM SCSI-2 F/W adapter, it
141   allows dual-bus SCSI and SCSI-wide addressing, which means, PUNs may be
142   between 0 and 15. Here, Bit 4 is the high-order bit of the 4-bit wide
143   adapter PUN expression. In short words, this means, that IBM PS/2 machines
144   can only support 1 single integrated subsystem by default. Additional
145   slot-adapters get ports assigned by the automatic configuration tool.
146
147   One day I found a patch in ibmmca_detect(), forcing the I/O-address to be
148   0x3540 for integrated SCSI-subsystems, there was a remark placed, that on
149   integrated IBM SCSI-subsystems of model 56, the POS2 register was showing 5.
150   This means, that really for these models, POS2 has to be interpreted
151   sticking to the technical reference guide. In this case, the bit 2 (4) is
152   a reserved bit and may not be interpreted. These differences between the
153   adapters and the integrated controllers are taken into account by the
154   detection routine of the driver on from version >3.0g.
155
156   Every time, a SCSI-subsystem is discovered, the ibmmca_register() function
157   is called. This function checks first, if the requested area for the I/O-
158   address of this SCSI-subsystem is still available and assigns this I/O-
159   area to the SCSI-subsystem. There are always 8 sequential I/O-addresses
160   taken for each individual SCSI-subsystem found, which are:
161
162     Offset            Type                  Permissions
163       0     Command Interface Register 1    Read/Write
164       1     Command Interface Register 2    Read/Write
165       2     Command Interface Register 3    Read/Write
166       3     Command Interface Register 4    Read/Write
167       4     Attention Register              Read/Write
168       5     Basic Control Register          Read/Write
169       6     Interrupt Status Register       Read
170       7     Basic Status Register           Read
171
172   After the I/O-address range is assigned, the host-adapter is assigned
173   to a local structure which keeps all adapter information needed for the
174   driver itself and the mid- and higher-level SCSI-drivers. The SCSI pun/lun
175   and the adapters' ldn tables are initialized and get probed afterwards by
176   the check_devices() function. If no further adapters are found,
177   ibmmca_detect() quits.
178
179   2.2 Physical Units, Logical Units, and Logical Devices
180   ------------------------------------------------------
181   There can be up to 56 devices on the SCSI bus (besides the adapter):
182   there are up to 7 "physical units" (each identified by physical unit
183   number or pun, also called the scsi id, this is the number you select
184   with hardware jumpers), and each physical unit can have up to 8
185   "logical units" (each identified by logical unit number, or lun,
186   between 0 and 7). The IBM SCSI-2 F/W adapter offers this on up to two
187   busses and provides support for 30 logical devices at the same time, where
188   in wide-addressing mode you can have 16 puns with 32 luns on each device.
189   This section dexribes you the handling of devices on non-F/W adapters.
190   Just imagine, that you can have 16 * 32 = 512 devices on a F/W adapter
191   which means a lot of possible devices for such a small machine.
192
193   Typically the adapter has pun=7, so puns of other physical units
194   are between 0 and 6(15). On a wide-adapter a pun higher than 7 is
195   possible, but is normally not used. Almost all physical units have only
196   one logical unit, with lun=0. A CD-ROM jukebox would be an example of a
197   physical unit with more than one logical unit.
198
199   The embedded microprocessor of the IBM SCSI-subsystem hides the complex
200   two-dimensional (pun,lun) organization from the operating system.
201   When the machine is powered-up (or rebooted), the embedded microprocessor
202   checks, on its own, all 56 possible (pun,lun) combinations, and the first
203   15 devices found are assigned into a one-dimensional array of so-called
204   "logical devices", identified by "logical device numbers" or ldn. The last
205   ldn=15 is reserved for the subsystem itself. Wide adapters may have
206   to check up to 15 * 8 = 120 pun/lun combinations.
207
208   2.3 SCSI-Device Recognition and Dynamical ldn Assignment
209   --------------------------------------------------------
210   One consequence of information hiding is that the real (pun,lun)
211   numbers are also hidden. The two possibilities to get around this problem
212   is to offer fake pun/lun combinations to the operating system or to
213   delete the whole mapping of the adapter and to reassign the ldns, using
214   the immediate assign command of the SCSI-subsystem for probing through
215   all possible pun/lun combinations. a ldn is a "logical device number"
216   which is used by IBM SCSI-subsystems to access some valid SCSI-device.
217   At the beginning of the development of this driver, the following approach
218   was used:
219
220   First, the driver checked the ldn's (0 to 6) to find out which ldn's
221   have devices assigned. This was done by the functions check_devices() and
222   device_exists(). The interrupt handler has a special paragraph of code
223   (see local_checking_phase_flag) to assist in the checking. Assume, for
224   example, that three logical devices were found assigned at ldn 0, 1, 2.
225   These are presented to the upper layer of Linux SCSI driver
226   as devices with bogus (pun, lun) equal to (0,0), (1,0), (2,0).
227   On the other hand, if the upper layer issues a command to device
228   say (4,0), this driver returns DID_NO_CONNECT error.
229
230   In a second step of the driver development, the following improvement has
231   been applied: The first approach limited the number of devices to 7, far
232   fewer than the 15 that it could usem then it just maped ldn ->
233   (ldn/8,ldn%8) for pun,lun.  We ended up with a real mishmash of puns
234   and luns, but it all seemed to work.
235
236   The latest development, which is implemented from the driver version 3.0
237   and later, realizes the device recognition in the following way:
238   The physical SCSI-devices on the SCSI-bus are probed via immediate_assign-
239   and device_inquiry-commands, that is all implemented in a completely new
240   made check_devices() subroutine. This delivers an exact map of the physical
241   SCSI-world that is now stored in the get_scsi[][]-array. This means,
242   that the once hidden pun,lun assignment is now known to this driver.
243   It no longer believes in default-settings of the subsystem and maps all
244   ldns to existing pun,lun "by foot". This assures full control of the ldn
245   mapping and allows dynamical remapping of ldns to different pun,lun, if
246   there are more SCSI-devices installed than ldns available (n>15). The
247   ldns from 0 to 6 get 'hardwired' by this driver to puns 0 to 7 at lun=0,
248   excluding the pun of the subsystem. This assures, that at least simple
249   SCSI-installations have optimum access-speed and are not touched by
250   dynamical remapping. The ldns 7 to 14 are put to existing devices with
251   lun>0 or to non-existing devices, in order to satisfy the subsystem, if
252   there are less than 15 SCSI-devices connected. In the case of more than 15
253   devices, the dynamical mapping goes active. If the get_scsi[][] reports a
254   device to be existant, but it has no ldn assigned, it gets a ldn out of 7
255   to 14. The numbers are assigned in cyclic order. Therefore it takes 8
256   dynamical reassignments on the SCSI-devices, until a certain device
257   looses its ldn again. This assures, that dynamical remapping is avoided
258   during intense I/O between up to 15 SCSI-devices (means pun,lun
259   combinations). A further advantage of this method is, that people who
260   build their kernel without probing on all luns will get what they expect,
261   because the driver just won't assign everything with lun>0 when
262   multpile lun probing is inactive.
263
264   2.4 SCSI-Device Order
265   ---------------------
266   Because of the now correct recognition of physical pun,lun, and
267   their report to mid-level- and higher-level-drivers, the new reported puns
268   can be different from the old, faked puns. Therefore, Linux will eventually
269   change /dev/sdXXX assignments and prompt you for corrupted superblock
270   repair on boottime. In this case DO NOT PANIC, YOUR DISKS ARE STILL OK!!!
271   You have to reboot (CTRL-D) with an old kernel and set the /etc/fstab-file
272   entries right. After that, the system should come up as errorfree as before.
273   If your boot-partition is not coming up, also edit the /etc/lilo.conf-file
274   in a Linux session booted on old kernel and run lilo before reboot. Check
275   lilo.conf anyway to get boot on other partitions with foreign OSes right
276   again. But there exists a feature of this driver that allows you to change
277   the assignment order of the SCSI-devices by flipping the PUN-assignment.
278   See the next paragraph for a description.
279
280   The problem for this is, that Linux does not assign the SCSI-devices in the
281   way as described in the ANSI-SCSI-standard. Linux assigns /dev/sda to
282   the device with at minimum id 0. But the first drive should be at id 6,
283   because for historical reasons, drive at id 6 has, by hardware, the highest
284   priority and a drive at id 0 the lowest. IBM was one of the rare producers,
285   where the BIOS assigns drives belonging to the ANSI-SCSI-standard. Most
286   other producers' BIOS does not (I think even Adaptec-BIOS). The
287   IBMMCA_SCSI_ORDER_STANDARD flag, which you set while configuring the
288   kernel enables to choose the preferred way of SCSI-device-assignment.
289   Defining this flag would result in Linux determining the devices in the
290   same order as DOS and OS/2 does on your MCA-machine. This is also standard
291   on most industrial computers and OSes, like e.g. OS-9. Leaving this flag
292   undefined will get your devices ordered in the default way of Linux. See
293   also the remarks of Chris Beauregard from Dec 15, 1997 and the followups
294   in section 3.
295
296   2.5 Regular SCSI-Command-Processing
297   -----------------------------------
298   Only three functions get involved: ibmmca_queuecommand(), issue_cmd(),
299   and interrupt_handler().
300
301   The upper layer issues a scsi command by calling function
302   ibmmca_queuecommand(). This function fills a "subsystem control block"
303   (scb) and calls a local function issue_cmd(), which writes a scb
304   command into subsystem I/O ports. Once the scb command is carried out,
305   the interrupt_handler() is invoked. If a device is determined to be
306   existant and it has not assigned any ldn, it gets one dynamically.
307   For this, the whole stuff is done in ibmmca_queuecommand().
308
309   2.6 Abort & Reset Commands
310   --------------------------
311   These are implemented with busy waiting for interrupt to arrive.
312   ibmmca_reset() and ibmmca_abort() do not work sufficently well
313   up to now and need still a lot of development work. But, this seems
314   to be even a problem with other SCSI-low level drivers, too. However,
315   this should be no excuse.
316
317   2.7 Disk Geometry
318   -----------------
319   The ibmmca_biosparams() function should return the same disk geometry
320   as the bios. This is needed for fdisk, etc. The returned geometry is
321   certainly correct for disks smaller than 1 gigabyte. In the meantime,
322   it has been proved, that this works fine even with disks larger than
323   1 gigabyte.
324
325   2.8 Kernel Boot Option
326   ----------------------
327   The function ibmmca_scsi_setup() is called if option ibmmcascsi=n
328   is passed to the kernel. See file linux/init/main.c for details.
329
330   2.9 Driver Module Support
331   -------------------------
332   Is implemented and tested by K. Kudielka. This could probably not work
333   on kernels <2.1.0.
334
335   2.10 Multiple Hostadapter Support
336   ---------------------------------
337   This driver supports up to eight interfaces of type IBM-SCSI-Subsystem.
338   Integrated-, and MCA-adapters are automatically recognized. Unrecognizable
339   IBM-SCSI-Subsystem interfaces can be specified as kernel-parameters.
340
341   2.11 /proc/scsi-Filesystem Information
342   --------------------------------------
343   Information about the driver condition is given in
344   /proc/scsi/ibmmca/<host_no>. ibmmca_proc_info() provides this information.
345
346   This table is quite informative for interested users. It shows the load
347   of commands on the subsystem and wether you are running the bypassed
348   (software) or integrated (hardware) SCSI-command set (see below). The
349   amount of accesses is shown. Read, write, modeselect is shown seperately
350   in order to help debugging problems with CD-ROMs or tapedrives.
351
352   The following table shows the list of 15 logical device numbers, that are
353   used by the SCSI-subsystem. The load on each ldn is shown in the table,
354   again, read and write commands are split. The last column shows the amount
355   of reassignments, that have been applied to the ldns, if you have more than
356   15 pun/lun combinations available on the SCSI-bus.
357
358   The last two tables show the pun/lun map and the positions of the ldns
359   on this pun/lun map. This may change during operation, when a ldn is
360   reassigned to another pun/lun combination. If the necessity for dynamical
361   assignments is set to 'no', the ldn structure keeps static.
362
363   2.12 /proc/mca-Filesystem Information
364   -------------------------------------
365   The slot-file contains all default entries and in addition chip and I/O-
366   address information of the SCSI-subsystem. This information is provided
367   by ibmmca_getinfo().
368
369   2.13 Supported IBM SCSI-Subsystems
370   ----------------------------------
371   The following IBM SCSI-subsystems are supported by this driver:
372
373     - IBM Fast/Wide SCSI-2 Adapter
374     - IBM 7568 Industrial Computer SCSI Adapter w/Cache
375     - IBM Expansion Unit SCSI Controller
376     - IBM SCSI Adapter w/Cache
377     - IBM SCSI Adapter
378     - IBM Integrated SCSI Controller
379     - All clones, 100% compatible with the chipset and subsystem command
380       system of IBM SCSI-adapters (forced detection)
381
382   2.14 Linux Kernel Versions
383   --------------------------
384   The IBM SCSI-subsystem low level driver is prepared to be used with
385   all versions of Linux between 2.0.x and 2.4.x. The compatibility checks
386   are fully implemented up from version 3.1e of the driver. This means, that
387   you just need the latest ibmmca.h and ibmmca.c file and copy it in the
388   linux/drivers/scsi directory. The code is automatically adapted during
389   kernel compilation. This is different from kernel 2.4.0! Here version
390   4.0 or later of the driver must be used for kernel 2.4.0 or later. Version
391   4.0 or later does not work together with older kernels! Driver versions
392   older than 4.0 do not work together with kernel 2.4.0 or later. They work
393   on all older kernels.
394
395   3 Code History
396   --------------
397   Jan 15 1996:  First public release.
398   - Martin Kolinek
399
400   Jan 23 1996:  Scrapped code which reassigned scsi devices to logical
401   device numbers. Instead, the existing assignment (created
402   when the machine is powered-up or rebooted) is used.
403   A side effect is that the upper layer of Linux SCSI
404   device driver gets bogus scsi ids (this is benign),
405   and also the hard disks are ordered under Linux the
406   same way as they are under dos (i.e., C: disk is sda,
407   D: disk is sdb, etc.).
408   - Martin Kolinek
409
410   I think that the CD-ROM is now detected only if a CD is
411   inside CD_ROM while Linux boots. This can be fixed later,
412   once the driver works on all types of PS/2's.
413   - Martin Kolinek
414
415   Feb 7 1996:   Modified biosparam function. Fixed the CD-ROM detection.
416   For now, devices other than harddisk and CD_ROM are
417   ignored. Temporarily modified abort() function
418   to behave like reset().
419   - Martin Kolinek
420
421   Mar 31 1996:  The integrated scsi subsystem is correctly found
422   in PS/2 models 56,57, but not in model 76. Therefore
423   the ibmmca_scsi_setup() function has been added today.
424   This function allows the user to force detection of
425   scsi subsystem. The kernel option has format
426   ibmmcascsi=n
427   where n is the scsi_id (pun) of the subsystem. Most likely, n is 7.
428   - Martin Kolinek
429
430   Aug 21 1996:  Modified the code which maps ldns to (pun,0).  It was
431   insufficient for those of us with CD-ROM changers.
432   - Chris Beauregard
433
434   Dec 14 1996: More improvements to the ldn mapping.  See check_devices
435   for details.  Did more fiddling with the integrated SCSI detection,
436   but I think it's ultimately hopeless without actually testing the
437   model of the machine.  The 56, 57, 76 and 95 (ultimedia) all have
438   different integrated SCSI register configurations.  However, the 56
439   and 57 are the only ones that have problems with forced detection.
440   - Chris Beauregard
441
442   Mar 8-16 1997: Modified driver to run as a module and to support
443   multiple adapters. A structure, called ibmmca_hostdata, is now
444   present, containing all the variables, that were once only
445   available for one single adapter. The find_subsystem-routine has vanished.
446   The hardware recognition is now done in ibmmca_detect directly.
447   This routine checks for presence of MCA-bus, checks the interrupt
448   level and continues with checking the installed hardware.
449   Certain PS/2-models do not recognize a SCSI-subsystem automatically.
450   Hence, the setup defined by command-line-parameters is checked first.
451   Thereafter, the routine probes for an integrated SCSI-subsystem.
452   Finally, adapters are checked. This method has the advantage to cover all
453   possible combinations of multiple SCSI-subsystems on one MCA-board. Up to
454   eight SCSI-subsystems can be recognized and announced to the upper-level
455   drivers with this improvement. A set of defines made changes to other
456   routines as small as possible.
457   - Klaus Kudielka
458
459   May 30 1997: (v1.5b)
460   1) SCSI-command capability enlarged by the recognition of MODE_SELECT.
461      This needs the RD-Bit to be disabled on IM_OTHER_SCSI_CMD_CMD which
462      allows data to be written from the system to the device. It is a
463      necessary step to be allowed to set blocksize of SCSI-tape-drives and
464      the tape-speed, whithout confusing the SCSI-Subsystem.
465   2) The recognition of a tape is included in the check_devices routine.
466      This is done by checking for TYPE_TAPE, that is already defined in
467      the kernel-scsi-environment. The markup of a tape is done in the
468      global ldn_is_tape[] array. If the entry on index ldn
469      is 1, there is a tapedrive connected.
470   3) The ldn_is_tape[] array is necessary to distinguish between tape- and
471      other devices. Fixed blocklength devices should not cause a problem
472      with the SCB-command for read and write in the ibmmca_queuecommand
473      subroutine. Therefore, I only derivate the READ_XX, WRITE_XX for
474      the tape-devices, as recommended by IBM in this Technical Reference,
475      mentioned below. (IBM recommends to avoid using the read/write of the
476      subsystem, but the fact was, that read/write causes a command error from
477      the subsystem and this causes kernel-panic.)
478   4) In addition, I propose to use the ldn instead of a fix char for the
479      display of PS2_DISK_LED_ON(). On 95, one can distinguish between the
480      devices that are accessed. It shows activity and easyfies debugging.
481   The tape-support has been tested with a SONY SDT-5200 and a HP DDS-2
482   (I do not know yet the type). Optimization and CD-ROM audio-support,
483   I am working on ...
484   - Michael Lang
485
486   June 19 1997: (v1.6b)
487   1) Submitting the extra-array ldn_is_tape[] -> to the local ld[]
488      device-array.
489   2) CD-ROM Audio-Play seems to work now.
490   3) When using DDS-2 (120M) DAT-Tapes, mtst shows still density-code
491      0x13 for ordinary DDS (61000 BPM) instead 0x24 for DDS-2. This appears
492      also on Adaptec 2940 adaptor in a PCI-System. Therefore, I assume that
493      the problem is independent of the low-level-driver/bus-architecture.
494   4) Hexadecimal ldn on PS/2-95 LED-display.
495   5) Fixing of the PS/2-LED on/off that it works right with tapedrives and
496      does not confuse the disk_rw_in_progress counter.
497   - Michael Lang
498
499   June 21 1997: (v1.7b)
500   1) Adding of a proc_info routine to inform in /proc/scsi/ibmmca/<host> the
501      outer-world about operational load statistics on the different ldns,
502      seen by the driver. Everybody that has more than one IBM-SCSI should
503      test this, because I only have one and cannot see what happens with more
504      than one IBM-SCSI hosts.
505   2) Definition of a driver version-number to have a better recognition of
506      the source when there are existing too much releases that may confuse
507      the user, when reading about release-specific problems. Up to know,
508      I calculated the version-number to be 1.7. Because we are in BETA-test
509      yet, it is today 1.7b.
510   3) Sorry for the heavy bug I programmed on June 19 1997! After that, the
511      CD-ROM did not work any more! The C7-command was a fake impression
512      I got while programming. Now, the READ and WRITE commands for CD-ROM are
513      no longer running over the subsystem, but just over
514      IM_OTHER_SCSI_CMD_CMD. On my observations (PS/2-95), now CD-ROM mounts
515      much faster(!) and hopefully all fancy multimedia-functions, like direct
516      digital recording from audio-CDs also work. (I tried it with cdda2wav
517      from the cdwtools-package and it filled up the harddisk immediately :-).)
518      To easify boolean logics, a further local device-type in ld[], called
519      is_cdrom has been included.
520   4) If one uses a SCSI-device of unsupported type/commands, one
521      immediately runs into a kernel-panic caused by Command Error. To better
522      understand which SCSI-command caused the problem, I extended this
523      specific panic-message slightly.
524   - Michael Lang
525
526   June 25 1997: (v1.8b)
527   1) Some cosmetical changes for the handling of SCSI-device-types.
528      Now, also CD-Burners / WORMs and SCSI-scanners should work. For
529      MO-drives I have no experience, therefore not yet supported.
530      In logical_devices I changed from different type-variables to one
531      called 'device_type' where the values, corresponding to scsi.h,
532      of a SCSI-device are stored.
533   2) There existed a small bug, that maps a device, coming after a SCSI-tape
534      wrong. Therefore, e.g. a CD-ROM changer would have been mapped wrong
535      -> problem removed.
536   3) Extension of the logical_device structure. Now it contains also device,
537      vendor and revision-level of a SCSI-device for internal usage.
538   - Michael Lang
539
540   June 26-29 1997: (v2.0b)
541   1) The release number 2.0b is necessary because of the completely new done
542      recognition and handling of SCSI-devices with the adapter. As I got
543      from Chris the hint, that the subsystem can reassign ldns dynamically,
544      I remembered this immediate_assign-command, I found once in the handbook.
545      Now, the driver first kills all ldn assignments that are set by default
546      on the SCSI-subsystem. After that, it probes on all puns and luns for
547      devices by going through all combinations with immediate_assign and
548      probing for devices, using device_inquiry. The found physical(!) pun,lun
549      structure is stored in get_scsi[][] as device types. This is followed
550      by the assignment of all ldns to existing SCSI-devices. If more ldns
551      than devices are available, they are assigned to non existing pun,lun
552      combinations to satisfy the adapter. With this, the dynamical mapping
553      was possible to implement. (For further info see the text in the
554      source-code and in the description below. Read the description
555      below BEFORE installing this driver on your system!)
556   2) Changed the name IBMMCA_DRIVER_VERSION to IBMMCA_SCSI_DRIVER_VERSION.
557   3) The LED-display shows on PS/2-95 no longer the ldn, but the SCSI-ID
558      (pun) of the accessed SCSI-device. This is now senseful, because the
559      pun known within the driver is exactly the pun of the physical device
560      and no longer a fake one.
561   4) The /proc/scsi/ibmmca/<host_no> consists now of the first part, where
562      hit-statistics of ldns is shown and a second part, where the maps of
563      physical and logical SCSI-devices are displayed. This could be very
564      interesting, when one is using more than 15 SCSI-devices in order to
565      follow the dynamical remapping of ldns.
566   - Michael Lang
567
568   June 26-29 1997: (v2.0b-1)
569   1) I forgot to switch the local_checking_phase_flag to 1 and back to 0
570      in the dynamical remapping part in ibmmca_queuecommand for the
571      device_exist routine. Sorry.
572   - Michael Lang
573
574   July 1-13 1997: (v3.0b,c)
575   1) Merging of the driver-developments of Klaus Kudielka and Michael Lang
576      in order to get a optimum and unified driver-release for the
577      IBM-SCSI-Subsystem-Adapter(s).
578         For people, using the Kernel-release >=2.1.0, module-support should
579      be no problem. For users, running under <2.1.0, module-support may not
580      work, because the methods have changed between 2.0.x and 2.1.x.
581   2) Added some more effective statistics for /proc-output.
582   3) Change typecasting at necessary points from (unsigned long) to
583      virt_to_bus().
584   4) Included #if... at special points to have specific adaption of the
585      driver to kernel 2.0.x and 2.1.x. It should therefore also run with
586      later releases.
587   5) Magneto-Optical drives and medium-changers are also recognized, now.
588      Therefore, we have a completely gapfree recognition of all SCSI-
589      device-types, that are known by Linux up to kernel 2.1.31.
590   6) The flag SCSI_IBMMCA_DEV_RESET has been inserted. If it is set within
591      the configuration, each connected SCSI-device will get a reset command
592      during boottime. This can be necessary for some special SCSI-devices.
593      This flag should be included in Config.in.
594      (See also the new Config.in file.)
595   Probable next improvement: bad disk handler.
596   - Michael Lang
597
598   Sept 14 1997: (v3.0c)
599   1) Some debugging and speed optimization applied.
600   - Michael Lang
601
602   Dec 15, 1997
603    - chrisb@truespectra.com
604    - made the front panel display thingy optional, specified from the
605    command-line via ibmmcascsi=display.  Along the lines of the /LED
606    option for the OS/2 driver.
607    - fixed small bug in the LED display that would hang some machines.
608    - reversed ordering of the drives (using the
609    IBMMCA_SCSI_ORDER_STANDARD define).  This is necessary for two main
610    reasons:
611	- users who've already installed Linux won't be screwed.  Keep
612	in mind that not everyone is a kernel hacker.
613	- be consistent with the BIOS ordering of the drives.  In the
614	BIOS, id 6 is C:, id 0 might be D:.  With this scheme, they'd be
615	backwards.  This confuses the crap out of those heathens who've
616	got a impure Linux installation (which, <wince>, I'm one of).
617    This whole problem arises because IBM is actually non-standard with
618    the id to BIOS mappings.  You'll find, in fdomain.c, a similar
619    comment about a few FD BIOS revisions.  The Linux (and apparently
620    industry) standard is that C: maps to scsi id (0,0).  Let's stick
621    with that standard.
622    - Since this is technically a branch of my own, I changed the
623    version number to 3.0e-cpb.
624
625   Jan 17, 1998: (v3.0f)
626   1) Addition of some statistical info for /proc in proc_info.
627   2) Taking care of the SCSI-assignment problem, dealed by Chris at Dec 15
628      1997. In fact, IBM is right, concerning the assignment of SCSI-devices
629      to driveletters. It is conform to the ANSI-definition of the SCSI-
630      standard to assign drive C: to SCSI-id 6, because it is the highest
631      hardware priority after the hostadapter (that has still today by
632      default everywhere id 7). Also realtime-operating systems that I use,
633      like LynxOS and OS9, which are quite industrial systems use top-down
634      numbering of the harddisks, that is also starting at id 6. Now, one
635      sits a bit between two chairs. On one hand side, using the define
636      IBMMCA_SCSI_ORDER_STANDARD makes Linux assigning disks conform to
637      the IBM- and ANSI-SCSI-standard and keeps this driver downward
638      compatible to older releases, on the other hand side, people is quite
639      habituated in believing that C: is assigned to (0,0) and much other
640      SCSI-BIOS do so. Therefore, I moved the IBMMCA_SCSI_ORDER_STANDARD
641      define out of the driver and put it into Config.in as subitem of
642      'IBM SCSI support'. A help, added to Documentation/Configure.help
643      explains the differences between saying 'y' or 'n' to the user, when
644      IBMMCA_SCSI_ORDER_STANDARD prompts, so the ordinary user is enabled to
645      choose the way of assignment, depending on his own situation and gusto.
646   3) Adapted SCSI_IBMMCA_DEV_RESET to the local naming convention, so it is
647      now called IBMMCA_SCSI_DEV_RESET.
648   4) Optimization of proc_info and its subroutines.
649   5) Added more in-source-comments and extended the driver description by
650      some explanation about the SCSI-device-assignment problem.
651   - Michael Lang
652
653   Jan 18, 1998: (v3.0g)
654   1) Correcting names to be absolutely conform to the later 2.1.x releases.
655      This is necessary for
656            IBMMCA_SCSI_DEV_RESET -> CONFIG_IBMMCA_SCSI_DEV_RESET
657            IBMMCA_SCSI_ORDER_STANDARD -> CONFIG_IBMMCA_SCSI_ORDER_STANDARD
658   - Michael Lang
659
660   Jan 18, 1999: (v3.1 MCA-team internal)
661   1) The multiple hosts structure is accessed from every subroutine, so there
662      is no longer the address of the device structure passed from function
663      to function, but only the hostindex. A call by value, nothing more. This
664      should really be understood by the compiler and the subsystem should get
665      the right values and addresses.
666   2) The SCSI-subsystem detection was not complete and quite hugely buggy up
667      to now, compared to the technical manual. The interpretation of the pos2
668      register is not as assumed by people before, therefore, I dropped a note
669      in the ibmmca_detect function to show the registers' interpretation.
670      The pos-registers of integrated SCSI-subsystems do not contain any
671      information concerning the IO-port offset, really. Instead, they contain
672      some info about the adapter, the chip, the NVRAM .... The I/O-port is
673      fixed to 0x3540 - 0x3547. There can be more than one adapters in the
674      slots and they get an offset for the I/O area in order to get their own
675      I/O-address area. See chapter 2 for detailed description. At least, the
676      detection should now work right, even on models other than 95. The 95ers
677      came happily around the bug, as their pos2 register contains always 0
678      in the critical area. Reserved bits are not allowed to be interpreted,
679      therefore, IBM is allowed to set those bits as they like and they may
680      really vary between different PS/2 models. So, now, no interpretation
681      of reserved bits - hopefully no trouble here anymore.
682   3) The command error, which you may get on models 55, 56, 57, 70, 77 and
683      P70 may have been caused by the fact, that adapters of older design do
684      not like sending commands to non-existing SCSI-devices and will react
685      with a command error as a sign of protest. While this error is not
686      present on IBM SCSI Adapter w/cache, it appears on IBM Integrated SCSI
687      Adapters. Therefore, I implemented a workarround to forgive those
688      adapters their protests, but it is marked up in the statisctis, so
689      after a successful boot, you can see in /proc/scsi/ibmmca/<host_number>
690      how often the command errors have been forgiven to the SCSI-subsystem.
691      If the number is bigger than 0, you have a SCSI subsystem of older
692      design, what should no longer matter.
693   4) ibmmca_getinfo() has been adapted very carefully, so it shows in the
694      slotn file really, what is senseful to be presented.
695   5) ibmmca_register() has been extended in its parameter list in order to
696      pass the right name of the SCSI-adapter to Linux.
697   - Michael Lang
698
699   Feb 6, 1999: (v3.1)
700   1) Finally, after some 3.1Beta-releases, the 3.1 release. Sorry, for
701      the delayed release, but it was not finished with the release of
702      Kernel 2.2.0.
703   - Michael Lang
704
705   Feb 10, 1999 (v3.1)
706   1) Added a new commandline parameter called 'bypass' in order to bypass
707      every integrated subsystem SCSI-command consequently in case of
708      troubles.
709   2) Concatenated read_capacity requests to the harddisks. It gave a lot
710      of troubles with some controllers and after I wanted to apply some
711      extensions, it jumped out in the same situation, on my w/cache, as like
712      on D. Weinehalls' Model 56, having integrated SCSI. This gave me the
713      descissive hint to move the code-part out and declare it global. Now,
714      it seems to work by far much better an more stable. Let us see, what
715      the world thinks of it...
716   3) By the way, only Sony DAT-drives seem to show density code 0x13. A
717      test with a HP drive gave right results, so the problem is vendor-
718      specific and not a problem of the OS or the driver.
719   - Michael Lang
720
721   Feb 18, 1999 (v3.1d)
722   1) The abort command and the reset function have been checked for
723      inconsistencies. From the logical point of thinking, they work
724      at their optimum, now, but as the subsystem does not answer with an
725      interrupt, abort never finishes, sigh...
726   2) Everything, that is accessed by a busmaster request from the adapter
727      is now declared as global variable, even the return-buffer in the
728      local checking phase. This assures, that no accesses to undefined memory
729      areas are performed.
730   3) In ibmmca.h, the line unchecked_isa_dma is added with 1 in order to
731      avoid memory-pointers for the areas higher than 16MByte in order to
732      be sure, it also works on 16-Bit Microchannel bus systems.
733   4) A lot of small things have been found, but nothing that endangered the
734      driver operations. Just it should be more stable, now.
735   - Michael Lang
736
737   Feb 20, 1999 (v3.1e)
738   1) I took the warning from the Linux Kernel Hackers Guide serious and
739      checked the cmd->result return value to the done-function very carefully.
740      It is obvious, that the IBM SCSI only delivers the tsb.dev_status, if
741      some error appeared, else it is undefined. Now, this is fixed. Before
742      any SCB command gets queued, the tsb.dev_status is set to 0, so the
743      cmd->result won't screw up Linux higher level drivers.
744   2) The reset-function has slightly improved. This is still planed for
745      abort. During the abort and the reset function, no interrupts are
746      allowed. This is however quite hard to cope with, so the INT-status
747      register is read. When the interrupt gets queued, one can find its
748      status immediately on that register and is enabled to continue in the
749      reset function. I had no chance to test this really, only in a bogus
750      situation, I got this function running, but the situation was too much
751      worse for Linux :-(, so tests will continue.
752   3) Buffers got now consistent. No open address mapping, as before and
753      therefore no further troubles with the unassigned memory segmentation
754      faults that scrambled probes on 95XX series and even on 85XX series,
755      when the kernel is done in a not so perfectly fitting way.
756   4) Spontaneous interrupts from the subsystem, appearing without any
757      command previously queued are answered with a DID_BAD_INTR result.
758   5) Taken into account ZP Gus' proposals to reverse the SCSI-device
759      scan order. As it does not work on Kernel 2.1.x or 2.2.x, as proposed
760      by him, I implemented it in a slightly derived way, which offers in
761      addition more flexibility.
762   - Michael Lang
763
764   Apr 23, 2000 (v3.2pre1)
765   1) During a very long time, I collected a huge amount of bugreports from
766      various people, trying really quite different things on their SCSI-
767      PS/2s. Today, all these bugreports are taken into account and should be
768      mostly solved. The major topics were:
769      - Driver crashes during boottime by no obvious reason.
770      - Driver panics while the midlevel-SCSI-driver is trying to inquire
771        the SCSI-device properties, even though hardware is in perfect state.
772      - Displayed info for the various slot-cards is interpreted wrong.
773      The main reasons for the crashes were two:
774      1) The commands to check for device information like INQUIRY,
775         TEST_UNIT_READY, REQUEST_SENSE and MODE_SENSE cause the devices
776	 to deliver information of up to 255 bytes. Midlevel drivers offer
777	 1024 bytes of space for the answer, but the IBM-SCSI-adapters do
778	 not accept this, as they stick quite near to ANSI-SCSI and report
779	 a COMMAND_ERROR message which causes the driver to panic. The main
780	 problem was located around the INQUIRY command. Now, for all the
781	 mentioned commands, the buffersize, sent to the adapter is at
782	 maximum 255 which seems to be a quite reasonable solution.
783	 TEST_UNIT_READY gets a buffersize of 0 to make sure, that no
784	 data is transferred in order to avoid any possible command failure.
785      2) On unsuccessful TEST_UNIT_READY, the midlevel-driver has to send
786         a REQUEST_SENSE in order to see, where the problem is located. This
787	 REQUEST_SENSE may have various length in its answer-buffer. IBM
788	 SCSI-subsystems report a command failure, if the returned buffersize
789	 is different from the sent buffersize, but this can be supressed by
790	 a special bit, which is now done and problems seem to be solved.
791   2) Code adaption to all kernel-releases. Now, the 3.2 code compiles on
792      2.0.x, 2.1.x, 2.2.x and 2.3.x kernel releases without any code-changes.
793   3) Commandline-parameters are recognized again, even under Kernel 2.3.x or
794      higher.
795   - Michael Lang
796
797   April 27, 2000 (v3.2pre2)
798   1) Bypassed commands get read by the adapter by one cycle instead of two.
799      This increases SCSI-performance.
800   2) Synchronous datatransfer is provided for sure to be 5 MHz on older
801      SCSI and 10 MHz on internal F/W SCSI-adapter.
802   3) New commandline parameters allow to force the adapter to slow down while
803      in synchronous transfer. Could be helpful for very old devices.
804   - Michael Lang
805
806   June 2, 2000 (v3.2pre5)
807   1) Added Jim Shorney's contribution to make the activity indicator
808      flashing in addition to the LED-alphanumeric display-panel on
809      models 95A. To be enabled to choose this feature freely, a new
810      commandline parameter is added, called 'activity'.
811   2) Added the READ_CONTROL bit for test_unit_ready SCSI-command.
812   3) Added some suppress_exception bits to read_device_capacity and
813      all device_inquiry occurences in the driver code.
814   4) Complaints about the various KERNEL_VERSION implementations are
815      taken into account. Every local_LinuxKernelVersion occurence is
816      now replaced by KERNEL_VERSION, defined in linux/version.h.
817      Corresponding changes were applied to ibmmca.h, too. This was a
818      contribution to all kernel-parts by Philipp Hahn.
819   - Michael Lang
820
821   July 17, 2000 (v3.2pre8)
822   A long period of collecting bugreports from all corners of the world
823   now lead to the following corrections to the code:
824   1) SCSI-2 F/W support crashed with a COMMAND ERROR. The reason for this
825      was, that it is possible to disbale Fast-SCSI for the external bus.
826      The feature-control command, where this crash appeared regularly tried
827      to set the maximum speed of 10MHz synchronous transfer speed and that
828      reports a COMMAND ERROR, if external bus Fast-SCSI is disabled. Now,
829      the feature-command probes down from maximum speed until the adapter
830      stops to complain, which is at the same time the maximum possible
831      speed selected in the reference program. So, F/W external can run at
832      5 MHz (slow-) or 10 MHz (fast-SCSI). During feature probing, the
833      COMMAND ERROR message is used to detect if the adapter does not complain.
834   2) Up to now, only combined busmode is supported, if you use external
835      SCSI-devices, attached to the F/W-controller. If dual bus is selected,
836      only the internal SCSI-devices get accessed by Linux. For most
837      applications, this should do fine.
838   3) Wide-SCSI-addressing (16-Bit) is now possible for the internal F/W
839      bus on the F/W adapter. If F/W adapter is detected, the driver
840      automatically uses the extended PUN/LUN <-> LDN mapping tables, which
841      are now new from 3.2pre8. This allows PUNs between 0 and 15 and should
842      provide more fun with the F/W adapter.
843   4) Several machines use the SCSI: POS registers for internal/undocumented
844      storage of system relevant info. This confused the driver, mainly on
845      models 9595, as it expected no onboard SCSI only, if all POS in
846      the integrated SCSI-area are set to 0x00 or 0xff. Now, the mechanism
847      to check for integrated SCSI is much more restrictive and these problems
848      should be history.
849   - Michael Lang
850
851   July 18, 2000 (v3.2pre9)
852   This develop rather quickly at the moment. Two major things were still
853   missing in 3.2pre8:
854   1) The adapter PUN for F/W adapters has 4-bits, while all other adapters
855      have 3-bits. This is now taken into account for F/W.
856   2) When you select CONFIG_IBMMCA_SCSI_ORDER_STANDARD, you should
857      normally get the inverse probing order of your devices on the SCSI-bus.
858      The ANSI device order gets scrambled in version 3.2pre8!! Now, a new
859      and tested algorithm inverts the device-order on the SCSI-bus and
860      automatically avoids accidental access to whatever SCSI PUN the adapter
861      is set and works with SCSI- and Wide-SCSI-addressing.
862   - Michael Lang
863
864   July 23, 2000 (v3.2pre10 unpublished)
865   1) LED panel display supports wide-addressing in ibmmca=display mode.
866   2) Adapter-information and autoadaption to address-space is done.
867   3) Auto-probing for maximum synchronous SCSI transfer rate is working.
868   4) Optimization to some embedded function calls is applied.
869   5) Added some comment for the user to wait for SCSI-devices beeing probed.
870   6) Finished version 3.2 for Kernel 2.4.0. It least, I thought it is but...
871   - Michael Lang
872
873   July 26, 2000 (v3.2pre11)
874   1) I passed a horrible weekend getting mad with NMIs on kernel 2.2.14 and
875      a model 9595. Asking around in the community, nobody except of me has
876      seen such errors. Weired, but I am trying to recompile everything on
877      the model 9595. Maybe, as I use a specially modified gcc, that could
878      cause problems. But, it was not the reason. The true background was,
879      that the kernel was compiled for i386 and the 9595 has a 486DX-2.
880      Normally, no troubles should appear, but for this special machine,
881      only the right processor support is working fine!
882   2) Previous problems with synchronous speed, slowing down from one adapter
883      to the next during probing are corrected. Now, local variables store
884      the synchronous bitmask for every single adapter found on the MCA bus.
885   3) LED alphanumeric panel support for XX95 systems is now showing some
886      alive rotator during boottime. This makes sense, when no monitor is
887      connected to the system. You can get rid of all display activity, if
888      you do not use any parameter or just ibmmcascsi=activity, for the
889      harddrive activity LED, existant on all PS/2, except models 8595-XXX.
890      If no monitor is available, please use ibmmcascsi=display, which works
891      fine together with the linuxinfo utility for the LED-panel.
892   - Michael Lang
893
894   July 29, 2000 (v3.2)
895   1) Submission of this driver for kernel 2.4test-XX and 2.2.17.
896   - Michael Lang
897
898   December 28, 2000 (v3.2d / v4.0)
899   1) The interrupt handler had some wrong statement to wait for. This
900      was done due to experimental reasons during 3.2 development but it
901      has shown that this is not stable enough. Going back to wait for the
902      adapter to be not busy is best.
903   2) Inquiry requests can be shorter than 255 bytes of return buffer. Due
904      to a bug in the ibmmca_queuecommand routine, this buffer was forced
905      to 255 at minimum. If the memory address, this return buffer is pointing
906      to does not offer more space, invalid memory accesses destabilized the
907      kernel.
908   3) version 4.0 is only valid for kernel 2.4.0 or later. This is necessary
909      to remove old kernel version dependant waste from the driver. 3.2d is
910      only distributed with older kernels but keeps compatibility with older
911      kernel versions. 4.0 and higher versions cannot be used with older
912      kernels anymore!! You must have at least kernel 2.4.0!!
913   4) The commandline argument 'bypass' and all its functionality got removed
914      in version 4.0. This was never really necessary, as all troubles were
915      based on non-command related reasons up to now, so bypassing commands
916      did not help to avoid any bugs. It is kept in 3.2X for debugging reasons.
917   5) Dynamical reassignment of ldns was again verified and analyzed to be
918      completely inoperational. This is corrected and should work now.
919   6) All commands that get sent to the SCSI adapter were verified and
920      completed in such a way, that they are now completely conform to the
921      demands in the technical description of IBM. Main candidates were the
922      DEVICE_INQUIRY, REQUEST_SENSE and DEVICE_CAPACITY commands. They must
923      be tranferred by bypassing the internal command buffer of the adapter
924      or else the response can be a random result. GET_POS_INFO would be more
925      safe in usage, if one could use the SUPRESS_EXCEPTION_SHORT, but this
926      is not allowed by the technical references of IBM. (Sorry, folks, the
927      model 80 problem is still a task to be solved in a different way.)
928   7) v3.2d is still hold back for some days for testing, while 4.0 is
929      released.
930   - Michael Lang
931
932   January 3, 2001 (v4.0a)
933   1) A lot of complains after the 2.4.0-prerelease kernel came in about
934      the impossibility to compile the driver as a module. This problem is
935      solved. In combination with that problem, some unprecise declaration
936      of the function option_setup() gave some warnings during compilation.
937      This is solved, too by a forward declaration in ibmmca.c.
938   2) #ifdef argument concerning CONFIG_SCSI_IBMMCA is no longer needed and
939      was entirely removed.
940   3) Some switch statements got optimized in code, as some minor variables
941      in internal SCSI-command handlers.
942   - Michael Lang
943
944   4 To do
945   -------
946        - IBM SCSI-2 F/W external SCSI bus support in seperate mode!
947	- It seems that the handling of bad disks is really bad -
948	  non-existent, in fact. However, a low-level driver cannot help
949	  much, if such things happen.
950
951   5 Users' Manual
952   ---------------
953   5.1 Commandline Parameters
954   --------------------------
955   There exist several features for the IBM SCSI-subsystem driver.
956   The commandline parameter format is:
957
958         ibmmcascsi=<command1>,<command2>,<command3>,...
959
960   where commandN can be one of the following:
961
962         display    Owners of a model 95 or other PS/2 systems with an
963	            alphanumeric LED display may set this to have their
964		    display showing the following output of the 8 digits:
965
966		                ------DA
967
968		    where '-' stays dark, 'D' shows the SCSI-device id
969		    and 'A' shows the SCSI hostindex, beeing currently
970		    accessed. During boottime, this will give the message
971
972		                SCSIini*
973
974                    on the LED-panel, where the * represents a rotator,
975		    showing the activity during the probing phase of the
976		    driver which can take up to two minutes per SCSI-adapter.
977	 adisplay   This works like display, but gives more optical overview
978	            of the activities on the SCSI-bus. The display will have
979		    the following output:
980
981		                6543210A
982
983		    where the numbers 0 to 6 light up at the shown position,
984		    when the SCSI-device is accessed. 'A' shows again the SCSI
985		    hostindex. If display nor adisplay is set, the internal
986		    PS/2 harddisk LED is used for media-activities. So, if
987		    you really do not have a system with a LED-display, you
988		    should not set display or adisplay. Keep in mind, that
989		    display and adisplay can only be used alternatively. It
990		    is not recommended to use this option, if you have some
991		    wide-addressed devices e.g. at the SCSI-2 F/W adapter in
992		    your system. In addition, the usage of the display for
993		    other tasks in parallel, like the linuxinfo-utility makes
994		    no sense with this option.
995	 activity   This enables the PS/2 harddisk LED activity indicator.
996	            Most PS/2 have no alphanumeric LED display, but some
997		    indicator. So you should use this parameter to activate it.
998		    If you own model 9595 (Server95), you can have both, the
999		    LED panel and the activity indicator in parallel. However,
1000		    some PS/2s, like the 8595 do not have any harddisk LED
1001		    activity indicator, which means, that you must use the
1002		    alphanumeric LED display if you want to monitor SCSI-
1003		    activity.
1004	 bypass     This is obsolete from driver version 4.0, as the adapters
1005	            got that far understood, that the selection between
1006		    integrated and bypassed commands should now work completely
1007		    correct! For historical reasons, the old description is
1008		    kept here:
1009	            This commandline parameter forces the driver never to use
1010	            SCSI-subsystems' integrated SCSI-command set. Except of
1011		    the immediate assign, which is of vital importance for
1012		    every IBM SCSI-subsystem to set its ldns right. Instead,
1013		    the ordinary ANSI-SCSI-commands are used and passed by the
1014		    controller to the SCSI-devices, therefore 'bypass'. The
1015		    effort, done by the subsystem is quite bogus and at a
1016		    minimum and therefore it should work everywhere. This
1017		    could maybe solve troubles with old or integrated SCSI-
1018		    controllers and nasty harddisks. Keep in mind, that using
1019		    this flag will slow-down SCSI-accesses slightly, as the
1020		    software generated commands are always slower than the
1021		    hardware. Non-harddisk devices always get read/write-
1022		    commands in bypass mode. On the most recent releases of
1023		    the Linux IBM-SCSI-driver, the bypass command should be
1024		    no longer a necessary thing, if you are sure about your
1025		    SCSI-hardware!
1026	 normal     This is the parameter, introduced on the 2.0.x development
1027	            rail by ZP Gu. This parameter defines the SCSI-device
1028		    scan order in the new industry standard. This means, that
1029		    the first SCSI-device is the one with the lowest pun.
1030		    E.g. harddisk at pun=0 is scanned before harddisk at
1031		    pun=6, which means, that harddisk at pun=0 gets sda
1032		    and the one at pun=6 gets sdb.
1033	 ansi       The ANSI-standard for the right scan order, as done by
1034	            IBM, Microware and Microsoft, scans SCSI-devices starting
1035		    at the highest pun, which means, that e.g. harddisk at
1036		    pun=6 gets sda and a harddisk at pun=0 gets sdb. If you
1037		    like to have the same SCSI-device order, as in DOS, OS-9
1038		    or OS/2, just use this parameter.
1039         fast       SCSI-I/O in synchronous mode is done at 5 MHz for IBM-
1040                    SCSI-devices. SCSI-2 Fast/Wide Adapter/A external bus
1041                    should then run at 10 MHz if Fast-SCSI is enabled,
1042                    and at 5 MHz if Fast-SCSI is disabled on the external
1043                    bus. This is the default setting when nothing is
1044                    specified here.
1045         medium     Synchronous rate is at 50% approximately, which means
1046                    2.5 MHz for IBM SCSI-adapters and 5.0 MHz for F/W ext.
1047                    SCSI-bus (when Fast-SCSI speed enabled on external bus).
1048         slow       The slowest possible synchronous transfer rate is set.
1049                    This means 1.82 MHz for IBM SCSI-adapters and 2.0 MHz
1050                    for F/W external bus at Fast-SCSI speed on the external
1051		    bus.
1052
1053   A further option is that you can force the SCSI-driver to accept a SCSI-
1054   subsystem at a certain I/O-address with a predefined adapter PUN. This
1055   is done by entering
1056
1057                  commandN   = I/O-base
1058		  commandN+1 = adapter PUN
1059
1060   e.g. ibmmcascsi=0x3540,7 will force the driver to detect a SCSI-subsystem
1061   at I/O-address 0x3540 with adapter PUN 7. Please only use this method, if
1062   the driver does really not recognize your SCSI-adapter! With driver version
1063   3.2, this recognition of various adapters was hugely improved and you
1064   should try first to remove your commandline arguments of such type with a
1065   newer driver. I bet, it will be recognized correctly. Even multiple and
1066   different types of IBM SCSI-adapters should be recognized correctly, too.
1067   Use the forced detection method only as last solution!
1068
1069   Examples:
1070
1071        ibmmcascsi=adisplay
1072
1073   This will use the advanced display mode for the model 95 LED alphanumeric
1074   display.
1075
1076        ibmmcascsi=display,0x3558,7
1077
1078   This will activate the default display mode for the model 95 LED display
1079   and will force the driver to accept a SCSI-subsystem at I/O-base 0x3558
1080   with adapter PUN 7.
1081
1082   5.2 Troubleshooting
1083   -------------------
1084   The following FAQs should help you to solve some major problems with this
1085   driver.
1086
1087     Q: "Reset SCSI-devices at boottime" halts the system at boottime, why?
1088     A: This is only tested with the IBM SCSI Adapter w/cache. It is not
1089        yet prooved to run on other adapters, however you may be lucky.
1090	In version 3.1d this has been hugely improved and should work better,
1091	now. Normally you really won't need to activate this flag in the
1092	kernel configuration, as all post 1989 SCSI-devices should accept
1093	the reset-signal, when the computer is switched on. The SCSI-
1094	subsystem generates this reset while beeing initialized. This flag
1095	is really reserved for users with very old, very strange or self-made
1096	SCSI-devices.
1097     Q: Why is the SCSI-order of my drives mirrored to the device-order
1098        seen from OS/2 or DOS ?
1099     A: It depends on the operating system, if it looks at the devices in
1100        ANSI-SCSI-standard (starting from pun 6 and going down to pun 0) or
1101	if it just starts at pun 0 and counts up. If you want to be conform
1102	with OS/2 and DOS, you have to activate this flag in the kernel
1103	configuration or you should set 'ansi' as parameter for the kernel.
1104	The parameter 'normal' sets the new industry standard, starting
1105	from pun 0, scanning up to pun 6. This allows you to change your
1106	opinion still after having already compiled the kernel.
1107     Q: Why I cannot find the IBM MCA SCSI support in the config menue?
1108     A: You have to activate MCA bus support, first.
1109     Q: Where can I find the latest info about this driver?
1110     A: See the file MAINTAINERS for the current WWW-address, which offers
1111        updates, info and Q/A lists. At this files' origin, the webaddress
1112	was: http://www.uni-mainz.de/~langm000/linux.html
1113     Q: My SCSI-adapter is not recognized by the driver, what can I do?
1114     A: Just force it to be recognized by kernel parameters. See section 5.1.
1115        If this really happens, do also send e-mail to the maintainer, as
1116	forced detection should be never necessary. Forced detection is in
1117	principal some flaw of the driver adapter detection and goes into
1118	bugreports.
1119     Q: The driver screws up, if it starts to probe SCSI-devices, is there
1120        some way out of it?
1121     A: Yes, that was some recognition problem of the correct SCSI-adapter
1122        and its I/O base addresses. Upgrade your driver to the latest release
1123	and it should be fine again.
1124     Q: I get a message: panic IBM MCA SCSI: command error .... , what can
1125        I do against this?
1126     A: Previously, I followed the way by ignoring command errors by using
1127        ibmmcascsi=forgiveall, but this command no longer exists and is
1128	obsolete. If such a problem appears, it is caused by some segmentation
1129	fault of the driver, which maps to some unallowed area. The latest
1130	version of the driver should be ok, as most bugs have been solved.
1131     Q: There are still kernel panics, even after having set
1132        ibmmcascsi=forgiveall. Are there other possibilities to prevent
1133	such panics?
1134     A: No, get just the latest release of the driver and it should work
1135        better and better with increasing version number. Forget about this
1136	ibmmcascsi=forgiveall, as also ignorecmd are obsolete.!
1137     Q: Linux panics or stops without any comment, but it is probable, that my
1138        harddisk(s) have bad blocks.
1139     A: Sorry, the bad-block handling is still a feeble point of this driver,
1140        but is on the schedule for development in the near future.
1141     Q: Linux panics while dynamically assigning SCSI-ids or ldns.
1142     A: If you disconnect a SCSI-device from the machine, while Linux is up
1143        and the driver uses dynamical reassignment of logical device numbers
1144	(ldn), it really gets "angry" if it won't find devices, that were still
1145	present at boottime and stops Linux.
1146     Q: The system does not recover after an abort-command has been generated.
1147     A: This is regrettably true, as it is not yet understood, why the
1148        SCSI-adapter does really NOT generate any interrupt at the end of
1149	the abort-command. As no interrupt is generated, the abort command
1150	cannot get finished and the system hangs, sorry, but checks are
1151	running to hunt down this problem. If there is a real pending command,
1152	the interrupt MUST get generated after abort. In this case, it
1153	should finish well.
1154     Q: The system gets in bad shape after a SCSI-reset, is this known?
1155     A: Yes, as there are a lot of prescriptions (see the Linux Hackers'
1156        Guide) what has to be done for reset, we still share the bad shape of
1157	the reset functions with all other low level SCSI-drivers.
1158	Astonishingly, reset works in most cases quite ok, but the harddisks
1159	won't run in synchonous mode anymore after a reset, until you reboot.
1160     Q: Why does my XXX w/Cache adapter not use read-prefetch?
1161     A: Ok, that is not completely possible. If a cache is present, the
1162        adapter tries to use it internally. Explicitly, one can use the cache
1163	with a read prefetch command, maybe in future, but this requires
1164	some major overhead of SCSI-commands that risks the performance to
1165	go down more than it gets improved. Tests with that are running.
1166     Q: I have a IBM SCSI-2 Fast/Wide adapter, it boots in some way and hangs.
1167     A: Yes, that is understood, as for sure, your SCSI-2 Fast/Wide adapter
1168        was in such a case recognized as integrated SCSI-adapter or something
1169	else, but not as the correct adapter. As the I/O-ports get assigned
1170	wrongly by that reason, the system should crash in most cases. You
1171	should upgrade to the latest release of the SCSI-driver. The
1172	recommended version is 3.2 or later. Here, the F/W support is in
1173	a stable and reliable condition. Wide-addressing is in addition
1174	supported.
1175     Q: I get a Ooops message and something like "killing interrupt".
1176     A: The reason for this is that the IBM SCSI-subsystem only sends a
1177        termination status back, if some error appeared. In former releases
1178	of the driver, it was not checked, if the termination status block
1179	is NULL. From version 3.2, it is taken care of this.
1180     Q: I have a F/W adapter and the driver sees my internal SCSI-devices,
1181        but ignores the external ones.
1182     A: Select combined busmode in the IBM config-program and check for that
1183        no SCSI-id on the external devices appears on internal devices.
1184        Reboot afterwards. Dual busmode is supported, but works only for the
1185	internal bus, yet. External bus is still ignored. Take care for your
1186	SCSI-ids. If combined bus-mode is activated, on some adapters,
1187	the wide-addressing is not possible, so devices with ids between 8
1188	and 15 get ignored by the driver & adapter!
1189     Q: I have a 9595 and I get a NMI during heavy SCSI I/O e.g. during fsck.
1190        A COMMAND ERROR is reported and characters on the screen are missing.
1191	Warm reboot is not possible. Things look like quite weired.
1192     A: Check the processor type of your 9595. If you have an 80486 or 486DX-2
1193        processor complex on your mainboard and you compiled a kernel that
1194	supports 80386 processors, it is possible, that the kernel cannot
1195	keep track of the PS/2 interrupt handling and stops on an NMI. Just
1196	compile a kernel for the correct processor type of your PS/2 and
1197	everything should be fine. This is necessary even if one assumes,
1198	that some 80486 system should be downward compatible to 80386
1199	software.
1200     Q: Some commands hang and interrupts block the machine. After some
1201        timeout, the syslog reports that it tries to call abort, but the
1202	machine is frozen.
1203     A: This can be a busy wait bug in the interrupt handler of driver
1204        version 3.2. You should at least upgrade to 3.2c if you use
1205	kernel < 2.4.0 and driver version 4.0 if you use kernel 2.4.0 or
1206	later (including all test releases).
1207     Q: I have a PS/2 model 80 and more than 16 MBytes of RAM. The driver
1208        completely refuses to work, reports NMIs, COMMAND ERRORs or other
1209	ambiguous stuff. When reducing the RAM size down below 16 MB,
1210	everything is running smoothly.
1211     A: No real answer, yet. In any case, one should force the kernel to
1212        present SCBs only below the 16 MBytes barrier. Maybe this solves the
1213	problem. Not yet tried, but guessing that it could work. To get this,
1214	set unchecked_isa_dma argument of ibmmca.h from 0 to 1.
1215
1216   5.3 Bugreports
1217   --------------
1218   If you really find bugs in the sourcecode or the driver will successfully
1219   refuse to work on your machine, you should send a bug report to me. The
1220   best for this is to follow the instructions on the WWW-page for this
1221   driver. Fill out the bug-report form, placed on the WWW-page and ship it,
1222   so the bugs can be taken into account with maximum efforts. But, please
1223   do not send bug reports about this driver to Linus Torvalds or Leonard
1224   Zubkoff, as Linus is burried in E-Mail and Leonard is supervising all
1225   SCSI-drivers and won't have the time left to look inside every single
1226   driver to fix a bug and especially DO NOT send modified code to Linus
1227   Torvalds or Alan J. Cox which has not been checked here!!! They are both
1228   quite burried in E-mail (as me, sometimes, too) and one should first check
1229   for problems on my local teststand. Recently, I got a lot of
1230   bugreports for errors in the ibmmca.c code, which I could not imagine, but
1231   a look inside some Linux-distribution showed me quite often some modified
1232   code, which did no longer work on most other machines than the one of the
1233   modifier. Ok, so now that there is maintenance service available for this
1234   driver, please use this address first in order to keep the level of
1235   confusion low. Thank you!
1236
1237   When you get a SCSI-error message that panics your system, a list of
1238   register-entries of the SCSI-subsystem is shown (from Version 3.1d). With
1239   this list, it is very easy for the maintainer to localize the problem in
1240   the driver or in the configuration of the user. Please write down all the
1241   values from this report and send them to the maintainer. This would really
1242   help a lot and makes life easier concerning misunderstandings.
1243
1244   Use the bug-report form (see 5.4 for its address) to send all the bug-
1245   stuff to the maintainer or write e-mail with the values from the table.
1246
1247   5.4 Support WWW-page
1248   --------------------
1249   The address of the IBM SCSI-subsystem supporting WWW-page is:
1250
1251        http://www.uni-mainz.de/~langm000/linux.html
1252
1253   Here you can find info about the background of this driver, patches,
1254   troubleshooting support, news and a bugreport form. Please check that
1255   WWW-page regularly for latest hints. If ever this URL changes, please
1256   refer to the MAINTAINERS file in order to get the latest address.
1257
1258   For the bugreport, please fill out the formular on the corresponding
1259   WWW-page. Read the dedicated instructions and write as much as you
1260   know about your problem. If you do not like such formulars, please send
1261   some e-mail directly, but at least with the same information as required by
1262   the formular.
1263
1264   If you have extensive bugreports, including Ooops messages and
1265   screen-shots, please feel free to send it directly to the address
1266   of the maintainer, too. The current address of the maintainer is:
1267
1268            Michael Lang <langa2@kph.uni-mainz.de>
1269
1270   6 References
1271   ------------
1272   IBM Corp., "Update for the PS/2 Hardware Interface Technical Reference,
1273   Common Interfaces", Armonk, September 1991, PN 04G3281,
1274   (available in the U.S. for $21.75 at 1-800-IBM-PCTB or in Germany for
1275   around 40,-DM at "Hallo IBM").
1276
1277   IBM Corp., "Personal System/2 Micro Channel SCSI
1278   Adapter with Cache Technical Reference", Armonk, March 1990, PN 68X2365.
1279
1280   IBM Corp., "Personal System/2 Micro Channel SCSI
1281   Adapter Technical Reference", Armonk, March 1990, PN 68X2397.
1282
1283   IBM Corp., "SCSI-2 Fast/Wide Adapter/A Technical Reference - Dual Bus",
1284   Armonk, March 1994, PN 83G7545.
1285
1286   Friedhelm Schmidt, "SCSI-Bus und IDE-Schnittstelle - Moderne Peripherie-
1287   Schnittstellen: Hardware, Protokollbeschreibung und Anwendung", 2. Aufl.
1288   Addison Wesley, 1996.
1289
1290   Michael K. Johnson, "The Linux Kernel Hackers' Guide", Version 0.6, Chapel
1291   Hill - North Carolina, 1995
1292
1293   Andreas Kaiser, "SCSI TAPE BACKUP for OS/2 2.0", Version 2.12, Stuttgart
1294   1993
1295
1296   Helmut Rompel, "IBM Computerwelt GUIDE", What is what bei IBM., Systeme *
1297   Programme * Begriffe, IWT-Verlag GmbH - Muenchen, 1988
1298
1299   7 Credits to
1300   ------------
1301   7.1 People
1302   ----------
1303   Klaus Grimm
1304                who already a long time ago gave me the old code from the
1305		SCSI-driver in order to get it running for some old machine
1306		in our institute.
1307   Martin Kolinek
1308                who wrote the first release of the IBM SCSI-subsystem driver.
1309   Chris Beauregard
1310                who for a long time maintained MCA-Linux and the SCSI-driver
1311		in the beginning. Chris, wherever you are: Cheers to you!
1312   Klaus Kudielka
1313                with whom in the 2.1.x times, I had a quite fruitful
1314                cooperation to get the driver running as a module and to get
1315		it running with multiple SCSI-adapters.
1316   David Weinehall
1317                for his excellent maintenance of the MCA-stuff and the quite
1318		detailed bug reports and ideas for this driver (and his
1319		patience ;-)).
1320   Alan J. Cox
1321                for his bugreports and his bold activities in cross-checking
1322		the driver-code with his teststand.
1323
1324   7.2 Sponsors & Supporters
1325   -------------------------
1326   "Hallo IBM",
1327   IBM-Deutschland GmbH
1328                the service of IBM-Deutschland for customers. Their E-Mail
1329		service is unbeatable. Whatever old stuff I asked for, I
1330		always got some helpful answers.
1331   Karl-Otto Reimers,
1332   IBM Klub - Sparte IBM Geschichte, Sindelfingen
1333                for sending me a copy of the w/Cache manual from the
1334		IBM-Deutschland archives.
1335   Harald Staiger
1336                for his extensive hardware donations which allows me today
1337		still to test the driver in various constellations.
1338   Erich Fritscher
1339                for his very kind sponsoring.
1340   Louis Ohland,
1341   Charles Lasitter
1342                for support by shipping me an IBM SCSI-2 Fast/Wide manual.
1343                In addition, the contribution of various hardware is quite
1344                decessive and will make it possible to add FWSR (RAID)
1345                adapter support to the driver in the near future! So,
1346                complaints about no RAID support won't remain forever.
1347                Yes, folks, that is no joke, RAID support is going to rise!
1348   Erik Weber
1349                for the great deal we made about a model 9595 and the nice
1350                surrounding equipment and the cool trip to Mannheim
1351                second-hand computer market. In addition, I would like
1352		to thank him for his exhaustive SCSI-driver testing on his
1353		95er PS/2 park.
1354   Anthony Hogbin
1355                for his direct shipment of a SCSI F/W adapter, which allowed
1356                me immediately on the first stage to try it on model 8557
1357                together with onboard SCSI adapter and some SCSI w/Cache.
1358   Andreas Hotz
1359                for his support by memory and an IBM SCSI-adapter. Collecting
1360                all this together now allows me to try really things with
1361                the driver at maximum load and variety on various models in
1362                a very quick and efficient way.
1363   Peter Jennewein
1364                for his model 30, which serves me as part of my teststand
1365		and his cool remark about how you make an ordinary diskette
1366		drive working and how to connect it to an IBM-diskette port.
1367   Johannes Gutenberg-Universitaet, Mainz &
1368   Institut fuer Kernphysik, Mainz Microtron (MAMI)
1369                for the offered space, the link, placed on the central
1370                homepage and the space to store and offer the driver and
1371		related material and the free working times, which allow
1372                me to answer all your e-mail.
1373
1374   8 Trademarks
1375   ------------
1376   IBM, PS/2, OS/2, Microchannel are registered trademarks of International
1377   Business Machines Corporation
1378
1379   MS-DOS is a registered trademark of Microsoft Corporation
1380
1381   Microware, OS-9 are registered trademarks of Microware Systems
1382
1383   9 Disclaimer
1384   ------------
1385   Beside the GNU General Public License and the dependant disclaimers and disclaimers
1386   concerning the Linux-kernel in special, this SCSI-driver comes without any
1387   warranty. Its functionality is tested as good as possible on certain
1388   machines and combinations of computer hardware, which does not exclude,
1389   that dataloss or severe damage of hardware is possible while using this
1390   part of software on some arbitrary computer hardware or in combination
1391   with other software packages. It is highly recommended to make backup
1392   copies of your data before using this software. Furthermore, personal
1393   injuries by hardware defects, that could be caused by this SCSI-driver are
1394   not excluded and it is highly recommended to handle this driver with a
1395   maximum of carefulness.
1396
1397   This driver supports hardware, produced by International Business Machines
1398   Corporation (IBM).
1399
1400------
1401Michael Lang
1402(langa2@kph.uni-mainz.de)
1403

README.in2000

1
2UPDATE NEWS: version 1.33 - 26 Aug 98
3
4   Interrupt management in this driver has become, over
5   time, increasingly odd and difficult to explain - this
6   has been mostly due to my own mental inadequacies. In
7   recent kernels, it has failed to function at all when
8   compiled for SMP. I've fixed that problem, and after
9   taking a fresh look at interrupts in general, greatly
10   reduced the number of places where they're fiddled
11   with. Done some heavy testing and it looks very good.
12   The driver now makes use of the __initfunc() and
13   __initdata macros to save about 4k of kernel memory.
14   Once again, the same code works for both 2.0.xx and
15   2.1.xx kernels.
16
17UPDATE NEWS: version 1.32 - 28 Mar 98
18
19   Removed the check for legal IN2000 hardware versions:
20   It appears that the driver works fine with serial
21   EPROMs (the 8-pin chip that defines hardware rev) as
22   old as 2.1, so we'll assume that all cards are OK.
23
24UPDATE NEWS: version 1.31 - 6 Jul 97
25
26   Fixed a bug that caused incorrect SCSI status bytes to be
27   returned from commands sent to LUN's greater than 0. This
28   means that CDROM changers work now! Fixed a bug in the
29   handling of command-line arguments when loaded as a module.
30   Also put all the header data in in2000.h where it belongs.
31   There are no longer any differences between this driver in
32   the 2.1.xx source tree and the 2.0.xx tree, as of 2.0.31
33   and 2.1.45 (or is it .46?) - this makes things much easier
34   for me...
35
36UPDATE NEWS: version 1.30 - 14 Oct 96
37
38   Fixed a bug in the code that sets the transfer direction
39   bit (DESTID_DPD in the WD_DESTINATION_ID register). There
40   are quite a few SCSI commands that do a write-to-device;
41   now we deal with all of them correctly. Thanks to Joerg
42   Dorchain for catching this one.
43
44UPDATE NEWS: version 1.29 - 24 Sep 96
45
46   The memory-mapped hardware on the card is now accessed via
47   the 'readb()' and 'readl()' macros - required by the new
48   memory management scheme in the 2.1.x kernel series.
49   As suggested by Andries Brouwer, 'bios_param()' no longer
50   forces an artificial 1023 track limit on drives. Also
51   removed some kludge-code left over from struggles with
52   older (buggy) compilers.
53
54UPDATE NEWS: version 1.28 - 07 May 96
55
56   Tightened up the "interrupts enabled/disabled" discipline
57   in 'in2000_queuecommand()' and maybe 1 or 2 other places.
58   I _think_ it may have been a little too lax, causing an
59   occasional crash during full moon. A fully functional
60   /proc interface is now in place - if you want to play
61   with it, start by doing 'cat /proc/scsi/in2000/0'. You
62   can also use it to change a few run-time parameters on
63   the fly, but it's mostly for debugging. The curious
64   should take a good look at 'in2000_proc_info()' in the
65   in2000.c file to get an understanding of what it's all
66   about; I figure that people who are really into it will
67   want to add features suited to their own needs...
68   Also, sync is now DISABLED by default.
69
70UPDATE NEWS: version 1.27 - 10 Apr 96
71
72   Fixed a well-hidden bug in the adaptive-disconnect code
73   that would show up every now and then during extreme
74   heavy loads involving 2 or more simultaneously active
75   devices. Thanks to Joe Mack for keeping my nose to the
76   grindstone on this one.
77
78UPDATE NEWS: version 1.26 - 07 Mar 96
79
80   1.25 had a nasty bug that bit people with swap partitions
81   and tape drives. Also, in my attempt to guess my way
82   through Intel assembly language, I made an error in the
83   inline code for IO writes. Made a few other changes and
84   repairs - this version (fingers crossed) should work well.
85
86UPDATE NEWS: version 1.25 - 05 Mar 96
87
88   Kernel 1.3.70 interrupt mods added; old kernels still OK.
89   Big help from Bill Earnest and David Willmore on speed
90   testing and optimizing: I think there's a real improvement
91   in this area.
92   New! User-friendly command-line interface for LILO and
93   module loading - the old method is gone, so you'll need
94   to read the comments for 'setup_strings' near the top
95   of in2000.c. For people with CDROM's or other devices
96   that have a tough time with sync negotiation, you can
97   now selectively disable sync on individual devices -
98   search for the 'nosync' keyword in the command-line
99   comments. Some of you disable the BIOS on the card, which
100   caused the auto-detect function to fail; there is now a
101   command-line option to force detection of a ROM-less card.
102
103UPDATE NEWS: version 1.24a - 24 Feb 96
104
105   There was a bug in the synchronous transfer code. Only
106   a few people downloaded before I caught it - could have
107   been worse.
108
109UPDATE NEWS: version 1.24 - 23 Feb 96
110
111   Lots of good changes. Advice from Bill Earnest resulted
112   in much better detection of cards, more efficient usage
113   of the fifo, and (hopefully) faster data transfers. The
114   jury is still out on speed - I hope it's improved some.
115   One nifty new feature is a cool way of doing disconnect/
116   reselect. The driver defaults to what I'm calling
117   'adaptive disconnect' - meaning that each command is
118   evaluated individually as to whether or not it should be
119   run with the option to disconnect/reselect (if the device
120   chooses), or as a "SCSI-bus-hog". When several devices
121   are operating simultaneously, disconnects are usually an
122   advantage. In a single device system, or if only 1 device
123   is being accessed, transfers usually go faster if disconnects
124   are not allowed.
125
126
127
128The default arguments (you get these when you don't give an 'in2000'
129command-line argument, or you give a blank argument) will cause
130the driver to do adaptive disconnect, synchronous transfers, and a
131minimum of debug messages. If you want to fool with the options,
132search for 'setup_strings' near the top of the in2000.c file and
133check the 'hostdata->args' section in in2000.h - but be warned! Not
134everything is working yet (some things will never work, probably).
135I believe that disabling disconnects (DIS_NEVER) will allow you
136to choose a LEVEL2 value higher than 'L2_BASIC', but I haven't
137spent a lot of time testing this. You might try 'ENABLE_CLUSTERING'
138to see what happens: my tests showed little difference either way.
139There's also a define called 'DEFAULT_SX_PER'; this sets the data
140transfer speed for the asynchronous mode. I've put it at 500 ns
141despite the fact that the card could handle settings of 376 or
142252, because higher speeds may be a problem with poor quality
143cables or improper termination; 500 ns is a compromise. You can
144choose your own default through the command-line with the
145'period' keyword.
146
147
148------------------------------------------------
149***********  DIP switch settings  **************
150------------------------------------------------
151
152   sw1-1 sw1-2    BIOS address (hex)
153   -----------------------------------------
154    off   off     C8000 - CBFF0
155    on    off     D8000 - DBFF0
156    off   on      D0000 - D3FF0
157    on    on      BIOS disabled
158
159   sw1-3 sw1-4    IO port address (hex)
160   ------------------------------------
161    off   off     220 - 22F
162    on    off     200 - 20F
163    off   on      110 - 11F
164    on    on      100 - 10F
165
166   sw1-5 sw1-6 sw1-7    Interrupt
167   ------------------------------
168    off   off   off     15
169    off   on    off     14
170    off   off   on      11
171    off   on    on      10
172    on    -     -       disabled
173
174   sw1-8 function depends on BIOS version. In earlier versions this
175   controlled synchronous data transfer support for MSDOS:
176      off = disabled
177      on  = enabled
178   In later ROMs (starting with 01.3 in April 1994) sw1-8 controls
179   the "greater than 2 disk drive" feature that first appeared in
180   MSDOS 5.0 (ignored by Linux):
181      off = 2 drives maximum
182      on  = 7 drives maximum
183
184   sw1-9    Floppy controller
185   --------------------------
186    off     disabled
187    on      enabled
188
189------------------------------------------------
190
191   I should mention that Drew Eckhardt's 'Generic NCR5380' sources
192   were my main inspiration, with lots of reference to the IN2000
193   driver currently distributed in the kernel source. I also owe
194   much to a driver written by Hamish Macdonald for Linux-m68k(!).
195   And to Eric Wright for being an ALPHA guinea pig. And to Bill
196   Earnest for 2 tons of great input and information. And to David
197   Willmore for extensive 'bonnie' testing. And to Joe Mack for
198   continual testing and feedback.
199
200
201            John Shifflett    jshiffle@netcom.com
202
203

README.ncr53c7xx

1README for WarpEngine/A4000T/A4091 SCSI kernels.
2
3Use the following options to disable options in the SCSI driver.
4
5Using amiboot for example.....
6
7To disable Synchronous Negotiation....
8
9	amiboot -k kernel 53c7xx=nosync:0
10
11To disable Disconnection....
12
13	amiboot -k kernel 53c7xx=nodisconnect:0
14
15To disable certain SCSI devices...
16
17	amiboot -k kernel 53c7xx=validids:0x3F
18
19	this allows only device ID's 0,1,2,3,4 and 5 for linux to handle.
20	(this is a bitmasked field - i.e. each bit represents a SCSI ID)
21
22These commands work on a per controller basis and use the option 'next' to
23move to the next controller in the system.
24
25e.g.
26	amiboot -k kernel 53c7xx=nodisconnect:0,next,nosync:0
27
28	this uses No Disconnection on the first controller and Asynchronous
29	SCSI on the second controller.
30
31Known Issues:
32
33Two devices are known not to function with the default settings of using
34synchronous SCSI. These are the Archive Viper 150 Tape Drive and the
35SyQuest SQ555 removeable hard drive. When using these devices on a controller
36use the 'nosync:0' option.
37
38Please try these options and post any problems/successes to me.
39
40Alan Hourihane <alanh@fairlite.demon.co.uk>
41

README.ncr53c8xx

1The Linux NCR53C8XX/SYM53C8XX drivers README file
2
3Written by Gerard Roudier <groudier@free.fr>
421 Rue Carnot
595170 DEUIL LA BARRE - FRANCE
6
729 May 1999
8===============================================================================
9
101.  Introduction
112.  Supported chips and SCSI features
123.  Advantages of the enhanced 896 driver
13      3.1 Optimized SCSI SCRIPTS
14      3.2 New features of the SYM53C896 (64 bit PCI dual LVD SCSI controller)
154.  Memory mapped I/O versus normal I/O
165.  Tagged command queueing
176.  Parity checking
187.  Profiling information
198.  Control commands
20      8.1  Set minimum synchronous period
21      8.2  Set wide size
22      8.3  Set maximum number of concurrent tagged commands
23      8.4  Set order type for tagged command
24      8.5  Set debug mode
25      8.6  Clear profile counters
26      8.7  Set flag (no_disc)
27      8.8  Set verbose level
28      8.9  Reset all logical units of a target
29      8.10 Abort all tasks of all logical units of a target
309.  Configuration parameters
3110. Boot setup commands
32      10.1 Syntax
33      10.2 Available arguments
34             10.2.1  Master parity checking
35             10.2.2  Scsi parity checking
36             10.2.3  Scsi disconnections
37             10.2.4  Special features
38             10.2.5  Ultra SCSI support
39             10.2.6  Default number of tagged commands
40             10.2.7  Default synchronous period factor
41             10.2.8  Negotiate synchronous with all devices
42             10.2.9  Verbosity level
43             10.2.10 Debug mode
44             10.2.11 Burst max
45             10.2.12 LED support
46             10.2.13 Max wide
47             10.2.14 Differential mode
48             10.2.15 IRQ mode
49             10.2.16 Reverse probe
50             10.2.17 Fix up PCI configuration space
51             10.2.18 Serial NVRAM
52             10.2.19 Check SCSI BUS
53             10.2.20 Exclude a host from being attached
54             10.2.21 Suggest a default SCSI id for hosts
55             10.2.22 Enable use of IMMEDIATE ARBITRATION
56      10.3 Advised boot setup commands
57      10.4 PCI configuration fix-up boot option
58      10.5 Serial NVRAM support boot option
59      10.6 SCSI BUS checking boot option
60      10.7 IMMEDIATE ARBITRATION boot option
6111. Some constants and flags of the ncr53c8xx.h header file
6212. Installation
6313. Architecture dependent features
6414. Known problems
65      14.1 Tagged commands with Iomega Jaz device
66      14.2 Device names change when another controller is added
67      14.3 Using only 8 bit devices with a WIDE SCSI controller.
68      14.4 Possible data corruption during a Memory Write and Invalidate
69      14.5 IRQ sharing problems
7015. SCSI problem troubleshooting
71      15.1 Problem tracking
72      15.2 Understanding hardware error reports
7316. Synchonous transfer negotiation tables
74      16.1 Synchronous timings for 53C875 and 53C860 Ultra-SCSI controllers
75      16.2 Synchronous timings for fast SCSI-2 53C8XX controllers
7617. Serial NVRAM support (by Richard Waltham)
77      17.1 Features
78      17.2 Symbios NVRAM layout
79      17.3 Tekram  NVRAM layout
8018. Support for Big Endian
81      18.1 Big Endian CPU
82      18.2 NCR chip in Big Endian mode of operations
83
84===============================================================================
85
861. Introduction
87
88The initial Linux ncr53c8xx driver has been a port of the ncr driver from
89FreeBSD that has been achieved in November 1995 by:
90          Gerard Roudier              <groudier@free.fr>
91
92The original driver has been written for 386bsd and FreeBSD by:
93          Wolfgang Stanglmeier        <wolf@cologne.de>
94          Stefan Esser                <se@mi.Uni-Koeln.de>
95
96It is now available as a bundle of 2 drivers:
97
98- ncr53c8xx generic driver that supports all the SYM53C8XX family including
99  the ealiest 810 rev. 1, the latest 896 (2 channel LVD SCSI controller) and
100  the new 895A (1 channel LVD SCSI controller).
101- sym53c8xx enhanced driver (a.k.a. 896 drivers) that drops support of oldest
102  chips in order to gain advantage of new features, as LOAD/STORE intructions
103  available since the 810A and hardware phase mismatch available with the
104  896 and the 895A.
105
106You can find technical information about the NCR 8xx family in the
107PCI-HOWTO written by Michael Will and in the SCSI-HOWTO written by
108Drew Eckhardt.
109
110Information about new chips is available at LSILOGIC web server:
111
112          http://www.lsilogic.com/
113
114SCSI standard documentations are available at SYMBIOS ftp server:
115
116          ftp://ftp.symbios.com/
117
118Usefull SCSI tools written by Eric Youngdale are available at tsx-11:
119
120          ftp://tsx-11.mit.edu/pub/linux/ALPHA/scsi/scsiinfo-X.Y.tar.gz
121          ftp://tsx-11.mit.edu/pub/linux/ALPHA/scsi/scsidev-X.Y.tar.gz
122
123These tools are not ALPHA but quite clean and work quite well.
124It is essential you have the 'scsiinfo' package.
125
126This short documentation describes the features of the generic and enhanced
127drivers, configuration parameters and control commands available through
128the proc SCSI file system read / write operations.
129
130This driver has been tested OK with linux/i386, Linux/Alpha and Linux/PPC.
131
132Latest driver version and patches are available at:
133
134          ftp://ftp.tux.org/pub/people/gerard-roudier
135or
136          ftp://ftp.symbios.com/mirror/ftp.tux.org/pub/tux/roudier/drivers
137
138I am not a native speaker of English and there are probably lots of
139mistakes in this README file. Any help will be welcome.
140
141
1422. Supported chips and SCSI features
143
144The following features are supported for all chips:
145
146	Synchronous negotiation
147	Disconnection
148	Tagged command queuing
149	SCSI parity checking
150	Master parity checking
151
152"Wide negotiation" is supported for chips that allow it.  The
153following table shows some characteristics of NCR 8xx family chips
154and what drivers support them.
155
156                                                  Supported by   Supported by
157       On board                                   the generic    the enhanced
158Chip   SDMS BIOS   Wide   SCSI std.   Max. sync   driver         driver
159----   ---------   ----   ---------   ----------  ------------   -------------
160810        N         N      FAST10    10 MB/s        Y             N
161810A       N         N      FAST10    10 MB/s        Y             Y
162815        Y         N      FAST10    10 MB/s        Y             N
163825        Y         Y      FAST10    20 MB/s        Y             N
164825A       Y         Y      FAST10    20 MB/s        Y             Y
165860        N         N      FAST20    20 MB/s        Y             Y
166875        Y         Y      FAST20    40 MB/s        Y             Y
167876        Y         Y      FAST20    40 MB/s        Y             Y
168895        Y         Y      FAST40    80 MB/s        Y             Y
169895A       Y         Y      FAST40    80 MB/s        Y             Y
170896        Y         Y      FAST40    80 MB/s        Y             Y
171897        Y         Y      FAST40    80 MB/s        Y             Y
1721510D      Y         Y      FAST40    80 MB/s        Y             Y
1731010       Y         Y      FAST80   160 MB/s        N             Y
1741010_66*   Y         Y      FAST80   160 MB/s        N             Y
175
176* Chip supports 33MHz and 66MHz PCI buses.
177
178
179Summary of other supported features:
180
181Module:                allow to load the driver
182Memory mapped I/O:     increases performance
183Profiling information: read operations from the proc SCSI file system
184Control commands:      write operations to the proc SCSI file system
185Debugging information: written to syslog (expert only)
186Scatter / gather
187Shared interrupt
188Boot setup commands
189Serial NVRAM:          Symbios and Tekram formats
190
191
1923. Advantages of the enhanced 896 driver
193
1943.1 Optimized SCSI SCRIPTS.
195
196The 810A, 825A, 875, 895, 896 and 895A support new SCSI SCRIPTS instructions
197named LOAD and STORE that allow to move up to 1 DWORD from/to an IO register
198to/from memory much faster that the MOVE MEMORY instruction that is supported
199by the 53c7xx and 53c8xx family.
200The LOAD/STORE instructions support absolute and DSA relative addressing
201modes.  The SCSI SCRIPTS had been entirely rewritten using LOAD/STORE instead
202of MOVE MEMORY instructions.
203
2043.2 New features of the SYM53C896 (64 bit PCI dual LVD SCSI controller)
205
206The 896 and the 895A allows handling of the phase mismatch context from
207SCRIPTS (avoids the phase mismatch interrupt that stops the SCSI processor
208until the C code has saved the context of the transfer).
209Implementing this without using LOAD/STORE instructions would be painfull
210and I did'nt even want to try it.
211
212The 896 chip supports 64 bit PCI transactions and addressing, while the
213895A supports 32 bit PCI transactions and 64 bit addressing.
214The SCRIPTS processor of these chips is not true 64 bit, but uses segment
215registers for bit 32-63. Another interesting feature is that LOAD/STORE
216instructions that address the on-chip RAM (8k) remain internal to the chip.
217
218Due to the use of LOAD/STORE SCRIPTS instructions, this driver does not
219support the following chips:
220- SYM53C810 revision < 0x10 (16)
221- SYM53C815 all revisions
222- SYM53C825 revision < 0x10 (16)
223
2244. Memory mapped I/O versus normal I/O
225
226Memory mapped I/O has less latency than normal I/O.  Since
227linux-1.3.x, memory mapped I/O is used rather than normal I/O.  Memory
228mapped I/O seems to work fine on most hardware configurations, but
229some poorly designed motherboards may break this feature.
230
231The configuration option CONFIG_SCSI_NCR53C8XX_IOMAPPED forces the
232driver to use normal I/O in all cases.
233
234
2355. Tagged command queueing
236
237Queuing more than 1 command at a time to a device allows it to perform
238optimizations based on actual head positions and its mechanical
239characteristics. This feature may also reduce average command latency.
240In order to really gain advantage of this feature, devices must have
241a reasonnable cache size (No miracle is to be expected for a low-end
242hard disk with 128 KB or less).
243Some kown SCSI devices do not properly support tagged command queuing.
244Generally, firmware revisions that fix this kind of problems are available
245at respective vendor web/ftp sites.
246All I can say is that the hard disks I use on my machines behave well with
247this driver with tagged command queuing enabled:
248
249- IBM S12 0662
250- Conner 1080S
251- Quantum Atlas I
252- Quantum Atlas II
253
254If your controller has NVRAM, you can configure this feature per target
255from the user setup tool. The Tekram Setup program allows to tune the
256maximum number of queued commands up to 32. The Symbios Setup only allows
257to enable or disable this feature.
258
259The maximum number of simultaneous tagged commands queued to a device
260is currently set to 8 by default.  This value is suitable for most SCSI
261disks.  With large SCSI disks (>= 2GB, cache >= 512KB, average seek time
262<= 10 ms), using a larger value may give better performances.
263
264The sym53c8xx driver supports up to 255 commands per device, and the
265generic ncr53c8xx driver supports up to 64, but using more than 32 is
266generally not worth-while, unless you are using a very large disk or disk
267array. It is noticeable that most of recent hard disks seem not to accept
268more than 64 simultaneous commands. So, using more than 64 queued commands
269is probably just resource wasting.
270
271If your controller does not have NVRAM or if it is managed by the SDMS
272BIOS/SETUP, you can configure tagged queueing feature and device queue
273depths from the boot command-line. For example:
274
275  ncr53c8xx=tags:4/t2t3q15-t4q7/t1u0q32
276
277will set tagged commands queue depths as follow:
278
279- target 2  all luns  on controller 0 --> 15
280- target 3  all luns  on controller 0 --> 15
281- target 4  all luns  on controller 0 -->  7
282- target 1  lun 0     on controller 1 --> 32
283- all other target/lun                -->  4
284
285In some special conditions, some SCSI disk firmwares may return a
286QUEUE FULL status for a SCSI command. This behaviour is managed by the
287driver using the following heuristic:
288
289- Each time a QUEUE FULL status is returned, tagged queue depth is reduced
290  to the actual number of disconnected commands.
291
292- Every 1000 successfully completed SCSI commands, if allowed by the
293  current limit, the maximum number of queueable commands is incremented.
294
295Since QUEUE FULL status reception and handling is resource wasting, the
296driver notifies by default this problem to user by indicating the actual
297number of commands used and their status, as well as its decision on the
298device queue depth change.
299The heuristic used by the driver in handling QUEUE FULL ensures that the
300impact on performances is not too bad. You can get rid of the messages by
301setting verbose level to zero, as follow:
302
3031st method: boot your system using 'ncr53c8xx=verb:0' option.
3042nd method: apply "setverbose 0" control command to the proc fs entry
305            corresponding to your controller after boot-up.
306
3076. Parity checking
308
309The driver supports SCSI parity checking and PCI bus master parity
310checking.  These features must be enabled in order to ensure safe data
311transfers.  However, some flawed devices or mother boards will have
312problems with parity. You can disable either PCI parity or SCSI parity
313checking by entering appropriate options from the boot command line.
314(See 10: Boot setup commands).
315
3167. Profiling information
317
318Profiling information is available through the proc SCSI file system.
319Since gathering profiling information may impact performances, this
320feature is disabled by default and requires a compilation configuration
321option to be set to Y.
322
323The device associated with a host has the following pathname:
324
325          /proc/scsi/ncr53c8xx/N     (N=0,1,2 ....)
326
327Generally, only 1 board is used on hardware configuration, and that device is:
328          /proc/scsi/ncr53c8xx/0
329
330However, if the driver has been made as module, the number of the
331hosts is incremented each time the driver is loaded.
332
333In order to display profiling information, just enter:
334
335         cat /proc/scsi/ncr53c8xx/0
336
337and you will get something like the following text:
338
339-------------------------------------------------------
340General information:
341  Chip NCR53C810, device id 0x1, revision id 0x2
342  IO port address 0x6000, IRQ number 10
343  Using memory mapped IO at virtual address 0x282c000
344  Synchronous transfer period 25, max commands per lun 4
345Profiling information:
346  num_trans    = 18014
347  num_kbytes   = 671314
348  num_disc     = 25763
349  num_break    = 1673
350  num_int      = 1685
351  num_fly      = 18038
352  ms_setup     = 4940
353  ms_data      = 369940
354  ms_disc      = 183090
355  ms_post      = 1320
356-------------------------------------------------------
357
358General information is easy to understand. The device ID and the
359revision ID identify the SCSI chip as follows:
360
361Chip    Device id     Revision Id
362----    ---------     -----------
363810       0x1            <  0x10
364810A      0x1            >= 0x10
365815       0x4
366825       0x3            <  0x10
367860       0x6
368825A      0x3            >= 0x10
369875       0xf
370895       0xc
371
372The profiling information is updated upon completion of SCSI commands.
373A data structure is allocated and zeroed when the host adapter is
374attached. So, if the driver is a module, the profile counters are
375cleared each time the driver is loaded.  The "clearprof" command
376allows you to clear these counters at any time.
377
378The following counters are available:
379
380("num" prefix means "number of",
381"ms" means milli-seconds)
382
383num_trans
384	Number of completed commands
385	Example above: 18014 completed commands
386
387num_kbytes
388	Number of kbytes transferred
389	Example above: 671 MB transferred
390
391num_disc
392	Number of SCSI disconnections
393	Example above: 25763 SCSI disconnections
394
395num_break
396	number of script interruptions (phase mismatch)
397	Example above: 1673 script interruptions
398
399num_int
400	Number of interrupts other than "on the fly"
401	Example above: 1685 interruptions not "on the fly"
402
403num_fly
404	Number of interrupts "on the fly"
405	Example above: 18038 interruptions "on the fly"
406
407ms_setup
408	Elapsed time for SCSI commands setups
409	Example above: 4.94 seconds
410
411ms_data
412	Elapsed time for data transfers
413	Example above: 369.94 seconds spent for data transfer
414
415ms_disc
416	Elapsed time for SCSI disconnections
417	Example above: 183.09 seconds spent disconnected
418
419ms_post
420	Elapsed time for command post processing
421	(time from SCSI status get to command completion call)
422	Example above: 1.32 seconds spent for post processing
423
424Due to the 1/100 second tick of the system clock, "ms_post" time may
425be wrong.
426
427In the example above, we got 18038 interrupts "on the fly" and only
4281673 script breaks generally due to disconnections inside a segment
429of the scatter list.
430
431
4328. Control commands
433
434Control commands can be sent to the driver with write operations to
435the proc SCSI file system. The generic command syntax is the
436following:
437
438      echo "<verb> <parameters>" >/proc/scsi/ncr53c8xx/0
439      (assumes controller number is 0)
440
441Using "all" for "<target>" parameter with the commands below will
442apply to all targets of the SCSI chain (except the controller).
443
444Available commands:
445
4468.1 Set minimum synchronous period factor
447
448    setsync <target> <period factor>
449
450    target:    target number
451    period:    minimum synchronous period.
452               Maximum speed = 1000/(4*period factor) except for special
453               cases below.
454
455    Specify a period of 255, to force asynchronous transfer mode.
456
457      10 means 25 nano-seconds synchronous period
458      11 means 30 nano-seconds synchronous period
459      12 means 50 nano-seconds synchronous period
460
4618.2 Set wide size
462
463    setwide <target> <size>
464
465    target:    target number
466    size:      0=8 bits, 1=16bits
467
4688.3 Set maximum number of concurrent tagged commands
469
470    settags <target> <tags>
471
472    target:    target number
473    tags:      number of concurrent tagged commands
474               must not be greater than SCSI_NCR_MAX_TAGS (default: 8)
475
4768.4 Set order type for tagged command
477
478    setorder <order>
479
480    order:     3 possible values:
481               simple: use SIMPLE TAG for all operations (read and write)
482               ordered: use ORDERED TAG for all operations
483               default: use default tag type,
484                        SIMPLE  TAG for read  operations
485                        ORDERED TAG for write operations
486
487
4888.5 Set debug mode
489
490    setdebug <list of debug flags>
491
492    Available debug flags:
493        alloc:   print info about memory allocations (ccb, lcb)
494        queue:   print info about insertions into the command start queue
495        result:  print sense data on CHECK CONDITION status
496        scatter: print info about the scatter process
497        scripts: print info about the script binding process
498	tiny:    print minimal debugging information
499	timing:  print timing information of the NCR chip
500	nego:    print information about SCSI negotiations
501	phase:   print information on script interruptions
502
503    Use "setdebug" with no argument to reset debug flags.
504
505
5068.6 Clear profile counters
507
508    clearprof
509
510    The profile counters are automatically cleared when the amount of
511    data transferred reaches 1000 GB in order to avoid overflow.
512    The "clearprof" command allows you to clear these counters at any time.
513
514
5158.7 Set flag (no_disc)
516
517    setflag <target> <flag>
518
519    target:    target number
520
521    For the moment, only one flag is available:
522
523        no_disc:   not allow target to disconnect.
524
525    Do not specify any flag in order to reset the flag. For example:
526    - setflag 4
527      will reset no_disc flag for target 4, so will allow it disconnections.
528    - setflag all
529      will allow disconnection for all devices on the SCSI bus.
530
531
5328.8 Set verbose level
533
534    setverbose #level
535
536    The driver default verbose level is 1. This command allows to change
537    th driver verbose level after boot-up.
538
5398.9 Reset all logical units of a target
540
541    resetdev <target>
542
543    target:    target number
544    The driver will try to send a BUS DEVICE RESET message to the target.
545    (Only supported by the SYM53C8XX driver and provided for test purpose)
546
5478.10 Abort all tasks of all logical units of a target
548
549    cleardev <target>
550
551    target:    target number
552    The driver will try to send a ABORT message to all the logical units
553    of the target.
554    (Only supported by the SYM53C8XX driver and provided for test purpose)
555
556
5579. Configuration parameters
558
559If the firmware of all your devices is perfect enough, all the
560features supported by the driver can be enabled at start-up.  However,
561if only one has a flaw for some SCSI feature, you can disable the
562support by the driver of this feature at linux start-up and enable
563this feature after boot-up only for devices that support it safely.
564
565CONFIG_SCSI_NCR53C8XX_PROFILE_SUPPORT  (default answer: n)
566    This option must be set for profiling information to be gathered
567    and printed out through the proc file system. This features may
568    impact performances.
569
570CONFIG_SCSI_NCR53C8XX_IOMAPPED       (default answer: n)
571    Answer "y" if you suspect your mother board to not allow memory mapped I/O.
572    May slow down performance a little.  This option is required by
573    Linux/PPC and is used no matter what you select here.  Linux/PPC
574    suffers no performance loss with this option since all IO is memory
575    mapped anyway.
576
577CONFIG_SCSI_NCR53C8XX_DEFAULT_TAGS    (default answer: 8)
578    Default tagged command queue depth.
579
580CONFIG_SCSI_NCR53C8XX_MAX_TAGS         (default answer: 8)
581    This option allows you to specify the maximum number of tagged commands
582    that can be queued to a device. The maximum supported value is 32.
583
584CONFIG_SCSI_NCR53C8XX_SYNC            (default answer: 5)
585    This option allows you to specify the frequency in MHz the driver
586    will use at boot time for synchronous data transfer negotiations.
587    This frequency can be changed later with the "setsync" control command.
588    0 means "asynchronous data transfers".
589
590CONFIG_SCSI_NCR53C8XX_FORCE_SYNC_NEGO (default answer: n)
591    Force synchronous negotiation for all SCSI-2 devices.
592    Some SCSI-2 devices do not report this feature in byte 7 of inquiry
593    response but do support it properly (TAMARACK scanners for example).
594
595CONFIG_SCSI_NCR53C8XX_NO_DISCONNECT   (default and only reasonnable answer: n)
596    If you suspect a device of yours does not properly support disconnections,
597    you can answer "y". Then, all SCSI devices will never disconnect the bus
598    even while performing long SCSI operations.
599
600CONFIG_SCSI_NCR53C8XX_SYMBIOS_COMPAT
601    Genuine SYMBIOS boards use GPIO0 in output for controller LED and GPIO3
602    bit as a flag indicating singled-ended/differential interface.
603    If all the boards of your system are genuine SYMBIOS boards or use
604    BIOS and drivers from SYMBIOS, you would want to enable this option.
605    This option must NOT be enabled if your system has at least one 53C8XX
606    based scsi board with a vendor-specific BIOS.
607    For example, Tekram DC-390/U, DC-390/W and DC-390/F scsi controllers
608    use a vendor-specific BIOS and are known to not use SYMBIOS compatible
609    GPIO wiring. So, this option must not be enabled if your system has
610    such a board installed.
611
612CONFIG_SCSI_NCR53C8XX_NVRAM_DETECT
613    Enable support for reading the serial NVRAM data on Symbios and
614    some Symbios compatible cards, and Tekram DC390W/U/F cards. Useful for
615    systems with more than one Symbios compatible controller where at least
616    one has a serial NVRAM, or for a system with a mixture of Symbios and
617    Tekram cards. Enables setting the boot order of host adaptors
618    to something other than the default order or "reverse probe" order.
619    Also enables Symbios and Tekram cards to be distinguished so
620    CONFIG_SCSI_NCR53C8XX_SYMBIOS_COMPAT may be set in a system with a
621    mixture of Symbios and Tekram cards so the Symbios cards can make use of
622    the full range of Symbios features, differential, led pin, without
623    causing problems for the Tekram card(s).
624
62510. Boot setup commands
626
62710.1 Syntax
628
629Setup commands can be passed to the driver either at boot time or as a
630string variable using 'insmod'.
631
632A boot setup command for the ncr53c8xx (sym53c8xx) driver begins with the
633driver name "ncr53c8xx="(sym53c8xx). The kernel syntax parser then expects
634an optionnal list of integers separated with comma followed by an optional
635list of  comma-separated strings. Example of boot setup command under lilo
636prompt:
637
638lilo: linux root=/dev/hda2 ncr53c8xx=tags:4,sync:10,debug:0x200
639
640- enable tagged commands, up to 4 tagged commands queued.
641- set synchronous negotiation speed to 10 Mega-transfers / second.
642- set DEBUG_NEGO flag.
643
644Since comma seems not to be allowed when defining a string variable using
645'insmod', the driver also accepts <space> as option separator.
646The following command will install driver module with the same options as
647above.
648
649    insmod ncr53c8xx.o ncr53c8xx="tags:4 sync:10 debug:0x200"
650
651For the moment, the integer list of arguments is discarded by the driver.
652It will be used in the future in order to allow a per controller setup.
653
654Each string argument must be specified as "keyword:value". Only lower-case
655characters and digits are allowed.
656
657In a system that contains multiple 53C8xx adapters insmod will install the
658specified driver on each adapter. To exclude a chip use the 'excl' keyword.
659
660The sequence of commands,
661
662    insmod sym53c8xx sym53c8xx=excl:0x1400
663    insmod ncr53c8xx
664
665installs the sym53c8xx driver on all adapters except the one at IO port
666address 0x1400 and then installs the ncr53c8xx driver to the adapter at IO
667port address 0x1400.
668
669
67010.2 Available arguments
671
67210.2.1  Master parity checking
673        mpar:y     enabled
674        mpar:n     disabled
675
67610.2.2  Scsi parity checking
677        spar:y     enabled
678        spar:n     disabled
679
68010.2.3  Scsi disconnections
681        disc:y     enabled
682        disc:n     disabled
683
68410.2.4  Special features
685   Only apply to 810A, 825A, 860, 875 and 895 controllers.
686   Have no effect with other ones.
687        specf:y    (or 1) enabled
688        specf:n    (or 0) disabled
689        specf:3           enabled except Memory Write And Invalidate
690   The default driver setup is 'specf:3'. As a consequence, option 'specf:y'
691   must be specified in the boot setup command to enable Memory Write And
692   Invalidate.
693
69410.2.5  Ultra SCSI support
695   Only apply to 860, 875, 895, 895a, 896, 1010 and 1010_66 controllers.
696   Have no effect with other ones.
697        ultra:n    All ultra speeds enabled
698        ultra:2    Ultra2 enabled
699        ultra:1    Ultra enabled
700        ultra:0    Ultra speeds disabled
701
70210.2.6  Default number of tagged commands
703        tags:0     (or tags:1 ) tagged command queuing disabled
704        tags:#tags (#tags  > 1) tagged command queuing enabled
705  #tags will be truncated to the max queued commands configuration parameter.
706  This option also allows to specify a command queue depth for each device
707  that support tagged command queueing.
708  Example:
709      ncr53c8xx=tags:10/t2t3q16-t5q24/t1u2q32
710               will set devices queue depth as follow:
711      - controller #0 target #2 and target #3                  -> 16 commands,
712      - controller #0 target #5                                -> 24 commands,
713      - controller #1 target #1 logical unit #2                -> 32 commands,
714      - all other logical units (all targets, all controllers) -> 10 commands.
715
71610.2.7  Default synchronous period factor
717        sync:255     disabled (asynchronous transfer mode)
718        sync:#factor
719  #factor = 10     Ultra-2 SCSI 40 Mega-transfers / second
720  #factor = 11     Ultra-2 SCSI 33 Mega-transfers / second
721  #factor < 25     Ultra   SCSI 20 Mega-transfers / second
722  #factor < 50     Fast    SCSI-2
723
724  In all cases, the driver will use the minimum transfer period supported by
725  controllers according to NCR53C8XX chip type.
726
72710.2.8  Negotiate synchronous with all devices
728        (force sync nego)
729        fsn:y      enabled
730        fsn:n      disabled
731
73210.2.9  Verbosity level
733        verb:0     minimal
734        verb:1     normal
735        verb:2     too much
736
73710.2.10 Debug mode
738        debug:0	 clear debug flags
739        debug:#x   set debug flags
740  #x is an integer value combining the following power-of-2 values:
741  DEBUG_ALLOC       0x1
742  DEBUG_PHASE       0x2
743  DEBUG_POLL        0x4
744  DEBUG_QUEUE       0x8
745  DEBUG_RESULT     0x10
746  DEBUG_SCATTER    0x20
747  DEBUG_SCRIPT     0x40
748  DEBUG_TINY       0x80
749  DEBUG_TIMING    0x100
750  DEBUG_NEGO      0x200
751  DEBUG_TAGS      0x400
752  DEBUG_FREEZE    0x800
753  DEBUG_RESTART  0x1000
754
755  You can play safely with DEBUG_NEGO. However, some of these flags may
756  generate bunches of syslog messages.
757
75810.2.11 Burst max
759        burst:0    burst disabled
760        burst:255  get burst length from initial IO register settings.
761        burst:#x   burst enabled (1<<#x burst transfers max)
762  #x is an integer value which is log base 2 of the burst transfers max.
763  The NCR53C875 and NCR53C825A support up to 128 burst transfers (#x = 7).
764  Other chips only support up to 16 (#x = 4).
765  This is a maximum value. The driver set the burst length according to chip
766  and revision ids. By default the driver uses the maximum value supported
767  by the chip.
768
76910.2.12 LED support
770        led:1      enable  LED support
771        led:0      disable LED support
772  Donnot enable LED support if your scsi board does not use SDMS BIOS.
773  (See 'Configuration parameters')
774
77510.2.13 Max wide
776        wide:1      wide scsi enabled
777        wide:0      wide scsi disabled
778  Some scsi boards use a 875 (ultra wide) and only supply narrow connectors.
779  If you have connected a wide device with a 50 pins to 68 pins cable
780  converter, any accepted wide negotiation will break further data transfers.
781  In such a case, using "wide:0" in the bootup command will be helpfull.
782
78310.2.14 Differential mode
784        diff:0	never set up diff mode
785        diff:1	set up diff mode if BIOS set it
786        diff:2	always set up diff mode
787        diff:3	set diff mode if GPIO3 is not set
788
78910.2.15 IRQ mode
790        irqm:0     always open drain
791        irqm:1     same as initial settings (assumed BIOS settings)
792        irqm:2     always totem pole
793        irqm:0x10  driver will not use SA_SHIRQ flag when requesting irq
794        irqm:0x20  driver will not use SA_INTERRUPT flag when requesting irq
795
796    (Bits 0x10 and 0x20 can be combined with hardware irq mode option)
797
79810.2.16 Reverse probe
799        revprob:n   probe chip ids from the PCI configuration in this order:
800                    810, 815, 820, 860, 875, 885, 895, 896
801        revprob:y   probe chip ids in the reverse order.
802
80310.2.17 Fix up PCI configuration space
804        pcifix:<option bits>
805
806    Available option bits:
807        0x0:   No attempt to fix PCI configuration space registers values.
808        0x1:   Set PCI cache-line size register if not set.
809        0x2:   Set write and invalidate bit in PCI command register.
810        0x4:   Increase if necessary PCI latency timer according to burst max.
811
812    Use 'pcifix:7' in order to allow the driver to fix up all PCI features.
813
81410.2.18 Serial NVRAM
815        nvram:n     do not look for serial NVRAM
816        nvram:y     test controllers for onboard serial NVRAM
817        (alternate binary form)
818        mvram=<bits options>
819        0x01   look for NVRAM  (equivalent to nvram=y)
820        0x02   ignore NVRAM "Synchronous negotiation" parameters for all devices
821        0x04   ignore NVRAM "Wide negotiation"  parameter for all devices
822        0x08   ignore NVRAM "Scan at boot time" parameter for all devices
823        0x80   also attach controllers set to OFF in the NVRAM (sym53c8xx only)
824
82510.2.19 Check SCSI BUS
826        buschk:<option bits>
827
828    Available option bits:
829        0x0:   No check.
830        0x1:   Check and donnot attach the controller on error.
831        0x2:   Check and just warn on error.
832        0x4:   Disable SCSI bus integrity checking.
833
83410.2.20 Exclude a host from being attached
835        excl=<io_address>
836
837    Prevent host at a given io address from being attached.
838    For example 'ncr53c8xx=excl:0xb400,excl:0xc000' indicate to the
839    ncr53c8xx driver not to attach hosts at address 0xb400 and 0xc000.
840
84110.2.21 Suggest a default SCSI id for hosts
842        hostid:255	no id suggested.
843        hostid:#x   (0 < x < 7) x suggested for hosts SCSI id.
844
845    If a host SCSI id is available from the NVRAM, the driver will ignore
846    any value suggested as boot option. Otherwise, if a suggested value
847    different from 255 has been supplied, it will use it. Otherwise, it will
848    try to deduce the value previously set in the hardware and use value
849    7 if the hardware value is zero.
850
85110.2.22 Enable use of IMMEDIATE ARBITRATION
852        (only supported by the sym53c8xx driver. See 10.7 for more details)
853        iarb:0    donnot use this feature.
854        iarb:#x   use this feature according to bit fields as follow:
855
856    bit 0 (1) : enable IARB each time the initiator has been reselected
857                when it arbitrated for the SCSI BUS.
858    (#x >> 4) : maximum number of successive settings of IARB if the initiator
859                win arbitration and it has other commands to send to a device.
860
861Boot fail safe
862    safe:y	load the following assumed fail safe initial setup
863
864  master parity			disabled		mpar:n
865  scsi parity			enabled			spar:y
866  disconnections		not allowed		disc:n
867  special features		disabled		specf:n
868  ultra scsi			disabled		ultra:n
869  force sync negotiation	disabled		fsn:n
870  reverse probe			disabled		revprob:n
871  PCI fix up                    disabled                pcifix:0
872  serial NVRAM                  enabled                 nvram:y
873  verbosity level		2			verb:2
874  tagged command queuing	disabled		tags:0
875  synchronous negotiation	disabled		sync:255
876  debug flags			none			debug:0
877  burst length			from BIOS settings	burst:255
878  LED support			disabled		led:0
879  wide support			disabled		wide:0
880  settle time			10 seconds		settle:10
881  differential support		from BIOS settings	diff:1
882  irq mode			from BIOS settings	irqm:1
883  SCSI BUS check		donnot attach on error	buschk:1
884  immediate arbitration		disabled		iarb:0
885
88610.3 Advised boot setup commands
887
888If the driver has been configured with default options, the equivalent
889boot setup is:
890
891   ncr53c8xx=mpar:y,spar:y,disc:y,specf:3,fsn:n,ultra:2,fsn:n,revprob:n,verb:1\
892             tags:0,sync:50,debug:0,burst:7,led:0,wide:1,settle:2,diff:0,irqm:0
893
894For an installation diskette or a safe but not fast system,
895boot setup can be:
896
897    ncr53c8xx=safe:y,mpar:y,disc:y
898    ncr53c8xx=safe:y,disc:y
899    ncr53c8xx=safe:y,mpar:y
900    ncr53c8xx=safe:y
901
902My personnal system works flawlessly with the following equivalent setup:
903
904   ncr53c8xx=mpar:y,spar:y,disc:y,specf:1,fsn:n,ultra:2,fsn:n,revprob:n,verb:1\
905             tags:32,sync:12,debug:0,burst:7,led:1,wide:1,settle:2,diff:0,irqm:0
906
907The driver prints its actual setup when verbosity level is 2. You can try
908"ncr53c8xx=verb:2" to get the "static" setup of the driver, or add "verb:2"
909to your boot setup command in order to check the actual setup the driver is
910using.
911
91210.4 PCI configuration fix-up boot option
913
914pcifix:<option bits>
915
916Available option bits:
917    0x1:     Set PCI cache-line size register if not set.
918    0x2:     Set write and invalidate bit in PCI command register.
919
920Use 'pcifix:3' in order to allow the driver to fix both PCI features.
921
922These options only apply to new SYMBIOS chips 810A, 825A, 860, 875
923and 895 and are only supported for Pentium and 486 class processors.
924Recent SYMBIOS 53C8XX scsi processors are able to use PCI read multiple
925and PCI write and invalidate commands. These features require the
926cache line size register to be properly set in the PCI configuration
927space of the chips. On the other hand, chips will use PCI write and
928invalidate commands only if the corresponding bit is set to 1 in the
929PCI command register.
930
931Not all PCI bioses set the PCI cache line register and the PCI write and
932invalidate bit in the PCI configuration space of 53C8XX chips.
933Optimized PCI accesses may be broken for some PCI/memory controllers or
934make problems with some PCI boards.
935
936This fix-up worked flawlessly on my previous system.
937(MB Triton HX / 53C875 / 53C810A)
938I use these options at my own risks as you will do if you decide to
939use them too.
940
941
94210.5 Serial NVRAM support boot option
943
944nvram:n     do not look for serial NVRAM
945nvram:y     test controllers for onboard serial NVRAM
946
947This option can also been entered as an hexadecimal value that allows
948to control what information the driver will get from the NVRAM and what
949information it will ignore.
950For details see '17. Serial NVRAM support'.
951
952When this option is enabled, the driver tries to detect all boards using
953a Serial NVRAM. This memory is used to hold user set up parameters.
954
955The parameters the driver is able to get from the NVRAM depend on the
956data format used, as follow:
957
958                                 Tekram format      Symbios format
959General and host parameters
960    Boot order                         N                   Y
961    Host SCSI ID                       Y                   Y
962    SCSI parity checking               Y                   Y
963    Verbose boot messages              N                   Y
964SCSI devices parameters
965    Synchronous transfer speed         Y                   Y
966    Wide 16 / Narrow                   Y                   Y
967    Tagged Command Queuing enabled     Y                   Y
968    Disconnections enabled             Y                   Y
969    Scan at boot time                  N                   Y
970
971In order to speed up the system boot, for each device configured without
972the "scan at boot time" option, the driver forces an error on the
973first TEST UNIT READY command received for this device.
974
975Some SDMS BIOS revisions seem to be unable to boot cleanly with very fast
976hard disks. In such a situation you cannot configure the NVRAM with
977optimized parameters value.
978
979The 'nvram' boot option can be entered in hexadecimal form in order
980to ignore some options configured in the NVRAM, as follow:
981
982mvram=<bits options>
983      0x01   look for NVRAM  (equivalent to nvram=y)
984      0x02   ignore NVRAM "Synchronous negotiation" parameters for all devices
985      0x04   ignore NVRAM "Wide negotiation"  parameter for all devices
986      0x08   ignore NVRAM "Scan at boot time" parameter for all devices
987      0x80   also attach controllers set to OFF in the NVRAM (sym53c8xx only)
988
989Option 0x80 is only supported by the sym53c8xx driver and is disabled by
990default. Result is that, by default (option not set), the sym53c8xx driver
991will not attach controllers set to OFF in the NVRAM.
992
993The ncr53c8xx always tries to attach all the controllers. Option 0x80 has
994not been added to the ncr53c8xx driver, since it has been reported to
995confuse users who use this driver since a long time. If you desire a
996controller not to be attached by the ncr53c8xx driver at Linux boot, you
997must use the 'excl' driver boot option.
998
99910.6 SCSI BUS checking boot option.
1000
1001When this option is set to a non-zero value, the driver checks SCSI lines
1002logic state, 100 micro-seconds after having asserted the SCSI RESET line.
1003The driver just reads SCSI lines and checks all lines read FALSE except RESET.
1004Since SCSI devices shall release the BUS at most 800 nano-seconds after SCSI
1005RESET has been asserted, any signal to TRUE may indicate a SCSI BUS problem.
1006Unfortunately, the following common SCSI BUS problems are not detected:
1007- Only 1 terminator installed.
1008- Misplaced terminators.
1009- Bad quality terminators.
1010On the other hand, either bad cabling, broken devices, not conformant
1011devices, ... may cause a SCSI signal to be wrong when te driver reads it.
1012
101310.7 IMMEDIATE ARBITRATION boot option
1014
1015This option is only supported by the SYM53C8XX driver (not by the NCR53C8XX).
1016
1017SYMBIOS 53C8XX chips are able to arbitrate for the SCSI BUS as soon as they
1018have detected an expected disconnection (BUS FREE PHASE). For this process
1019to be started, bit 1 of SCNTL1 IO register must be set when the chip is
1020connected to the SCSI BUS.
1021
1022When this feature has been enabled for the current connection, the chip has
1023every chance to win arbitration if only devices with lower priority are
1024competing for the SCSI BUS. By the way, when the chip is using SCSI id 7,
1025then it will for sure win the next SCSI BUS arbitration.
1026
1027Since, there is no way to know what devices are trying to arbitrate for the
1028BUS, using this feature can be extremally unfair. So, you are not advised
1029to enable it, or at most enable this feature for the case the chip lost
1030the previous arbitration (boot option 'iarb:1').
1031
1032This feature has the following advantages:
1033
1034a) Allow the initiator with ID 7 to win arbitration when it wants so.
1035b) Overlap at least 4 micro-seconds of arbitration time with the execution
1036   of SCRIPTS that deal with the end of the current connection and that
1037   starts the next job.
1038
1039Hmmm... But (a) may just prevent other devices from reselecting the initiator,
1040and delay data transfers or status/completions, and (b) may just waste
1041SCSI BUS bandwidth if the SCRIPTS execution lasts more than 4 micro-seconds.
1042
1043The use of IARB needs the SCSI_NCR_IARB_SUPPORT option to have been defined
1044at compile time and the 'iarb' boot option to have been set to a non zero
1045value at boot time. It is not that useful for real work, but can be used
1046to stress SCSI devices or for some applications that can gain advantage of
1047it. By the way, if you experience badnesses like 'unexpected disconnections',
1048'bad reselections', etc... when using IARB on heavy IO load, you should not
1049be surprised, because force-feeding anything and blocking its arse at the
1050same time cannot work for a long time. :-))
1051
1052
105311. Some constants and flags of the ncr53c8xx.h header file
1054
1055Some of these are defined from the configuration parameters.  To
1056change other "defines", you must edit the header file.  Do that only
1057if you know what you are doing.
1058
1059SCSI_NCR_SETUP_SPECIAL_FEATURES	(default: defined)
1060	If defined, the driver will enable some special features according
1061	to chip and revision id.
1062        For 810A, 860, 825A, 875 and 895 scsi chips, this option enables
1063	support of features that reduce load of PCI bus and memory accesses
1064	during  scsi transfer processing: burst op-code fetch, read multiple,
1065        read line, prefetch, cache line, write and invalidate,
1066        burst 128 (875 only), large dma fifo (875 only), offset 16 (875 only).
1067	Can be changed by the following boot setup command:
1068		ncr53c8xx=specf:n
1069
1070SCSI_NCR_IOMAPPED		(default: not defined)
1071	If defined, normal I/O is forced.
1072
1073SCSI_NCR_SHARE_IRQ		(default: defined)
1074	If defined, request shared IRQ.
1075
1076SCSI_NCR_MAX_TAGS		(default: 8)
1077	Maximum number of simultaneous tagged commands to a device.
1078	Can be changed by "settags <target> <maxtags>"
1079
1080SCSI_NCR_SETUP_DEFAULT_SYNC     (default: 50)
1081	Transfer period factor the driver will use at boot time for synchronous
1082	negotiation. 0 means asynchronous.
1083	Can be changed by "setsync <target> <period factor>"
1084
1085SCSI_NCR_SETUP_DEFAULT_TAGS     (default: 8)
1086	Default number of simultaneous tagged commands to a device.
1087	< 1 means tagged command queuing disabled at start-up.
1088
1089SCSI_NCR_ALWAYS_SIMPLE_TAG	(default: defined)
1090	Use SIMPLE TAG for read and write commands.
1091	Can be changed by "setorder <ordered|simple|default>"
1092
1093SCSI_NCR_SETUP_DISCONNECTION	(default: defined)
1094	If defined, targets are allowed to disconnect.
1095
1096SCSI_NCR_SETUP_FORCE_SYNC_NEGO	(default: not defined)
1097	If defined, synchronous negotiation is tried for all SCSI-2 devices.
1098	Can be changed by "setsync <target> <period>"
1099
1100SCSI_NCR_SETUP_MASTER_PARITY	(default: defined)
1101	If defined, master parity checking is enabled.
1102
1103SCSI_NCR_SETUP_MASTER_PARITY	(default: defined)
1104	If defined, SCSI parity checking is enabled.
1105
1106SCSI_NCR_PROFILE_SUPPORT	(default: not defined)
1107	If defined, profiling information is gathered.
1108
1109SCSI_NCR_MAX_SCATTER		(default: 128)
1110	Scatter list size of the driver ccb.
1111
1112SCSI_NCR_MAX_TARGET		(default: 16)
1113	Max number of targets per host.
1114
1115SCSI_NCR_MAX_HOST		(default: 2)
1116	Max number of host controllers.
1117
1118SCSI_NCR_SETTLE_TIME		(default: 2)
1119	Number of seconds the driver will wait after reset.
1120
1121SCSI_NCR_TIMEOUT_ALERT		(default: 3)
1122	If a pending command will time out after this amount of seconds,
1123	an ordered tag is used for the next command.
1124	Avoids timeouts for unordered tagged commands.
1125
1126SCSI_NCR_CAN_QUEUE		(default: 7*SCSI_NCR_MAX_TAGS)
1127	Max number of commands that can be queued to a host.
1128
1129SCSI_NCR_CMD_PER_LUN		(default: SCSI_NCR_MAX_TAGS)
1130	Max number of commands queued to a host for a device.
1131
1132SCSI_NCR_SG_TABLESIZE		(default: SCSI_NCR_MAX_SCATTER-1)
1133	Max size of the Linux scatter/gather list.
1134
1135SCSI_NCR_MAX_LUN	(default: 8)
1136	Max number of LUNs per target.
1137
1138
113912. Installation
1140
1141This driver is part of the linux kernel distribution.
1142Driver files are located in the sub-directory "drivers/scsi" of the
1143kernel source tree.
1144
1145Driver files:
1146
1147	README.ncr53c8xx	: this file
1148	ChangeLog.ncr53c8xx	: change log
1149	ncr53c8xx.h		: definitions
1150	ncr53c8xx.c		: the driver code
1151
1152New driver versions are made available separately in order to allow testing
1153changes and new features prior to including them into the linux kernel
1154distribution. The following URL provides informations on latest avalaible
1155patches:
1156
1157      ftp://ftp.tux.org/pub/people/gerard-roudier/README
1158
1159
116013. Architecture dependent features.
1161
1162<Not yet written>
1163
1164
116514. Known problems
1166
116714.1 Tagged commands with Iomega Jaz device
1168
1169I have not tried this device, however it has been reported to me the
1170following: This device is capable of Tagged command queuing. However
1171while spinning up, it rejects Tagged commands. This behaviour is
1172conforms to 6.8.2 of SCSI-2 specifications. The current behaviour of
1173the driver in that situation is not satisfying. So do not enable
1174Tagged command queuing for devices that are able to spin down.  The
1175other problem that may appear is timeouts. The only way to avoid
1176timeouts seems to edit linux/drivers/scsi/sd.c and to increase the
1177current timeout values.
1178
117914.2 Device names change when another controller is added.
1180
1181When you add a new NCR53C8XX chip based controller to a system that already
1182has one or more controllers of this family, it may happen that the order
1183the driver registers them to the kernel causes problems due to device
1184name changes.
1185When at least one controller uses NvRAM, SDMS BIOS version 4 allows you to
1186define the order the BIOS will scan the scsi boards. The driver attaches
1187controllers according to BIOS information if NvRAM detect option is set.
1188
1189If your controllers do not have NvRAM, you can:
1190
1191- Ask the driver to probe chip ids in reverse order from the boot command
1192  line: ncr53c8xx=revprob:y
1193- Make appropriate changes in the fstab.
1194- Use the 'scsidev' tool from Eric Youngdale.
1195
119614.3 Using only 8 bit devices with a WIDE SCSI controller.
1197
1198When only 8 bit NARROW devices are connected to a 16 bit WIDE SCSI controller,
1199you must ensure that lines of the wide part of the SCSI BUS are pulled-up.
1200This can be achieved by ENABLING the WIDE TERMINATOR portion of the SCSI
1201controller card.
1202The TYAN 1365 documentation revision 1.2 is not correct about such settings.
1203(page 10, figure 3.3).
1204
120514.4 Possible data corruption during a Memory Write and Invalidate
1206
1207This problem is described in SYMBIOS DEL 397, Part Number 69-039241, ITEM 4.
1208
1209In some complex situations, 53C875 chips revision <= 3 may start a PCI
1210Write and Invalidate Command at a not cache-line-aligned 4 DWORDS boundary.
1211This is only possible when Cache Line Size is 8 DWORDS or greater.
1212Pentium systems use a 8 DWORDS cache line size and so are concerned by
1213this chip bug, unlike i486 systems that use a 4 DWORDS cache line size.
1214
1215When this situation occurs, the chip may complete the Write and Invalidate
1216command after having only filled part of the last cache line involved in
1217the transfer, leaving to data corruption the remainder of this cache line.
1218
1219Not using Write And Invalidate obviously gets rid of this chip bug, and so
1220it is now the default setting of the driver.
1221However, for people like me who want to enable this feature, I have added
1222part of a work-around suggested by SYMBIOS. This work-around resets the
1223addressing logic when the DATA IN phase is entered and so prevents the bug
1224from being triggered for the first SCSI MOVE of the phase. This work-around
1225should be enough according to the following:
1226
1227The only driver internal data structure that is greater than 8 DWORDS  and
1228that is moved by the SCRIPTS processor is the 'CCB header' that contains
1229the context of the SCSI transfer. This data structure is aligned on 8 DWORDS
1230boundary (Pentium Cache Line Size), and so is immune to this chip bug, at
1231least on Pentium systems.
1232But the conditions of this bug can be met when a SCSI read command is
1233performed using a buffer that is 4 DWORDS but not cache-line aligned.
1234This cannot happen under Linux when scatter/gather lists are used since
1235they only refer to system buffers that are well aligned. So, a work around
1236may only be needed under Linux when a scatter/gather list is not used and
1237when the SCSI DATA IN phase is reentered after a phase mismatch.
1238
123914.5 IRQ sharing problems
1240
1241When an IRQ is shared by devices that are handled by different drivers, it
1242may happen that one driver complains about the request of the IRQ having
1243failed. Inder Linux-2.0, this may be due to one driver having requested the
1244IRQ using the SA_INTERRUPT flag but some other having requested the same IRQ
1245without this flag. Under both Linux-2.0 and linux-2.2, this may be caused by
1246one driver not having requested the IRQ with the SA_SHIRQ flag.
1247
1248By default, the ncr53c8xx and sym53c8xx drivers request IRQs with both the
1249SA_INTERRUPT and the SA_SHIRQ flag under Linux-2.0 and with only the SA_SHIRQ
1250flag under Linux-2.2.
1251
1252Under Linux-2.0, you can disable use of SA_INTERRUPT flag from the boot
1253command line by using the following option:
1254
1255     ncr53c8xx=irqm:0x20   (for the generic ncr53c8xx driver)
1256     sym53c8xx=irqm:0x20   (for the sym53c8xx driver)
1257
1258If this does not fix the problem, then you may want to check how all other
1259drivers are requesting the IRQ and report the problem. Note that if at least
1260a single driver does not request the IRQ with the SA_SHIRQ flag (share IRQ),
1261then the request of the IRQ obviously will not succeed for all the drivers.
1262
126315. SCSI problem troubleshooting
1264
126515.1 Problem tracking
1266
1267Most SCSI problems are due to a non conformant SCSI bus or to buggy
1268devices.  If infortunately you have SCSI problems, you can check the
1269following things:
1270
1271- SCSI bus cables
1272- terminations at both end of the SCSI chain
1273- linux syslog messages (some of them may help you)
1274
1275If you donnot find the source of problems, you can configure the
1276driver with no features enabled.
1277
1278- only asynchronous data transfers
1279- tagged commands disabled
1280- disconnections not allowed
1281
1282Now, if your SCSI bus is ok, your system have every chance to work
1283with this safe configuration but performances will not be optimal.
1284
1285If it still fails, then you can send your problem description to
1286appropriate mailing lists or news-groups.  Send me a copy in order to
1287be sure I will receive it.  Obviously, a bug in the driver code is
1288possible.
1289
1290     My email address: Gerard Roudier <groudier@free.fr>
1291
1292Allowing disconnections is important if you use several devices on
1293your SCSI bus but often causes problems with buggy devices.
1294Synchronous data transfers increases throughput of fast devices like
1295hard disks.  Good SCSI hard disks with a large cache gain advantage of
1296tagged commands queuing.
1297
1298Try to enable one feature at a time with control commands.  For example:
1299
1300- echo "setsync all 25" >/proc/scsi/ncr53c8xx/0
1301  Will enable fast synchronous data transfer negotiation for all targets.
1302
1303- echo "setflag 3" >/proc/scsi/ncr53c8xx/0
1304  Will reset flags (no_disc) for target 3, and so will allow it to disconnect
1305  the SCSI Bus.
1306
1307- echo "settags 3 8" >/proc/scsi/ncr53c8xx/0
1308  Will enable tagged command queuing for target 3 if that device supports it.
1309
1310Once you have found the device and the feature that cause problems, just
1311disable that feature for that device.
1312
131315.2 Understanding hardware error reports
1314
1315When the driver detects an unexpected error condition, it may display a
1316message of the following pattern.
1317
1318sym53c876-0:1: ERROR (0:48) (1-21-65) (f/95) @ (script 7c0:19000000).
1319sym53c876-0: script cmd = 19000000
1320sym53c876-0: regdump: da 10 80 95 47 0f 01 07 75 01 81 21 80 01 09 00.
1321
1322Some fields in such a message may help you understand the cause of the
1323problem, as follows:
1324
1325sym53c876-0:1: ERROR (0:48) (1-21-65) (f/95) @ (script 7c0:19000000).
1326............A.........B.C....D.E..F....G.H.......I.....J...K.......
1327
1328Field A : target number.
1329  SCSI ID of the device the controller was talking with at the moment the
1330  error occurs.
1331
1332Field B : DSTAT io register (DMA STATUS)
1333  Bit 0x40 : MDPE Master Data Parity Error
1334             Data parity error detected on the PCI BUS.
1335  Bit 0x20 : BF   Bus Fault
1336             PCI bus fault condition detected
1337  Bit 0x01 : IID  Illegal Instruction Detected
1338             Set by the chip when it detects an Illegal Instruction format
1339             on some condition that makes an instruction illegal.
1340  Bit 0x80 : DFE Dma Fifo Empty
1341             Pure status bit that does not indicate an error.
1342  If the reported DSTAT value contains a combination of MDPE (0x40),
1343  BF (0x20), then the cause may be likely due to a PCI BUS problem.
1344
1345Field C : SIST io register (SCSI Interrupt Status)
1346  Bit 0x08 : SGE  SCSI GROSS ERROR
1347             Indicates that the chip detected a severe error condition
1348             on the SCSI BUS that prevents the SCSI protocol from functionning
1349             properly.
1350  Bit 0x04 : UDC  Undexpected Disconnection
1351             Indicates that the device released the SCSI BUS when the chip
1352             was not expecting this to happen. A device may behave so to
1353             indicate the SCSI initiator that an error condition not reportable              using the SCSI protocol has occurred.
1354  Bit 0x02 : RST  SCSI BUS Reset
1355             Generally SCSI targets donnot reset the SCSI BUS, although any
1356             device on the BUS can reset it at any time.
1357  Bit 0x01 : PAR  Parity
1358             SCSI parity error detected.
1359  On a faulty SCSI BUS, any error condition among SGE (0x08), UDC (0x04) and
1360  PAR (0x01) may be detected by the chip. If your SCSI system sometimes
1361  encounters such error conditions, especially SCSI GROSS ERROR, then a SCSI
1362  BUS problem is likely the cause of these errors.
1363
1364For fields D,E,F,G and H, you may look into the sym53c8xx_defs.h file
1365that contains some minimal comments on IO register bits.
1366Field D : SOCL  Scsi Output Control Latch
1367          This register reflects the state of the SCSI control lines the
1368          chip want to drive or compare against.
1369Field E : SBCL  Scsi Bus Control Lines
1370          Actual value of control lines on the SCSI BUS.
1371Field F : SBDL  Scsi Bus Data Lines
1372          Actual value of data lines on the SCSI BUS.
1373Field G : SXFER  SCSI Transfer
1374          Contains the setting of the Synchronous Period for output and
1375          the current Synchronous offset (offset 0 means asynchronous).
1376Field H : SCNTL3 Scsi Control Register 3
1377          Contains the setting of timing values for both asynchronous and
1378          synchronous data transfers.
1379
1380Understanding Fields I, J, K and dumps requires to have good knowledge of
1381SCSI standards, chip cores functionnals and internal driver data structures.
1382You are not required to decode and understand them, unless you want to help
1383maintain the driver code.
1384
138516. Synchonous transfer negotiation tables
1386
1387Tables below have been created by calling the routine the driver uses
1388for synchronisation negotiation timing calculation and chip setting.
1389The first table corresponds to Ultra chips 53875 and 53C860 with 80 MHz
1390clock and 5 clock divisors.
1391The second one has been calculated by setting the scsi clock to 40 Mhz
1392and using 4 clock divisors and so applies to all NCR53C8XX chips in fast
1393SCSI-2 mode.
1394
1395Periods are in nano-seconds and speeds are in Mega-transfers per second.
13961 Mega-transfers/second means 1 MB/s with 8 bits SCSI and 2 MB/s with
1397Wide16 SCSI.
1398
139916.1 Synchronous timings for 53C895, 53C875 and 53C860 SCSI controllers
1400
1401 ----------------------------------------------
1402 Negotiated                     NCR settings
1403 Factor   Period   Speed        Period   Speed
1404 ------   ------   ------       ------   ------
1405 10       25       40.000       25       40.000   (53C895 only)
1406 11       30.2     33.112       31.25    32.000   (53C895 only)
1407 12       50       20.000       50       20.000
1408 13       52       19.230       62       16.000
1409 14       56       17.857       62       16.000
1410 15       60       16.666       62       16.000
1411 16       64       15.625       75       13.333
1412 17       68       14.705       75       13.333
1413 18       72       13.888       75       13.333
1414 19       76       13.157       87       11.428
1415 20       80       12.500       87       11.428
1416 21       84       11.904       87       11.428
1417 22       88       11.363       93       10.666
1418 23       92       10.869       93       10.666
1419 24       96       10.416      100       10.000
1420 25      100       10.000      100       10.000
1421 26      104        9.615      112        8.888
1422 27      108        9.259      112        8.888
1423 28      112        8.928      112        8.888
1424 29      116        8.620      125        8.000
1425 30      120        8.333      125        8.000
1426 31      124        8.064      125        8.000
1427 32      128        7.812      131        7.619
1428 33      132        7.575      150        6.666
1429 34      136        7.352      150        6.666
1430 35      140        7.142      150        6.666
1431 36      144        6.944      150        6.666
1432 37      148        6.756      150        6.666
1433 38      152        6.578      175        5.714
1434 39      156        6.410      175        5.714
1435 40      160        6.250      175        5.714
1436 41      164        6.097      175        5.714
1437 42      168        5.952      175        5.714
1438 43      172        5.813      175        5.714
1439 44      176        5.681      187        5.333
1440 45      180        5.555      187        5.333
1441 46      184        5.434      187        5.333
1442 47      188        5.319      200        5.000
1443 48      192        5.208      200        5.000
1444 49      196        5.102      200        5.000
1445
1446
144716.2 Synchronous timings for fast SCSI-2 53C8XX controllers
1448
1449 ----------------------------------------------
1450 Negotiated                     NCR settings
1451 Factor   Period   Speed        Period   Speed
1452 ------   ------   ------       ------   ------
1453 25      100       10.000      100       10.000
1454 26      104        9.615      125        8.000
1455 27      108        9.259      125        8.000
1456 28      112        8.928      125        8.000
1457 29      116        8.620      125        8.000
1458 30      120        8.333      125        8.000
1459 31      124        8.064      125        8.000
1460 32      128        7.812      131        7.619
1461 33      132        7.575      150        6.666
1462 34      136        7.352      150        6.666
1463 35      140        7.142      150        6.666
1464 36      144        6.944      150        6.666
1465 37      148        6.756      150        6.666
1466 38      152        6.578      175        5.714
1467 39      156        6.410      175        5.714
1468 40      160        6.250      175        5.714
1469 41      164        6.097      175        5.714
1470 42      168        5.952      175        5.714
1471 43      172        5.813      175        5.714
1472 44      176        5.681      187        5.333
1473 45      180        5.555      187        5.333
1474 46      184        5.434      187        5.333
1475 47      188        5.319      200        5.000
1476 48      192        5.208      200        5.000
1477 49      196        5.102      200        5.000
1478
1479
148017. Serial NVRAM (added by Richard Waltham: dormouse@farsrobt.demon.co.uk)
1481
148217.1 Features
1483
1484Enabling serial NVRAM support enables detection of the serial NVRAM included
1485on Symbios and some Symbios compatible host adaptors, and Tekram boards. The
1486serial NVRAM is used by Symbios and Tekram to hold set up parameters for the
1487host adaptor and it's attached drives.
1488
1489The Symbios NVRAM also holds data on the boot order of host adaptors in a
1490system with more than one host adaptor. This enables the order of scanning
1491the cards for drives to be changed from the default used during host adaptor
1492detection.
1493
1494This can be done to a limited extent at the moment using "reverse probe" but
1495this only changes the order of detection of different types of cards. The
1496NVRAM boot order settings can do this as well as change the order the same
1497types of cards are scanned in, something "reverse probe" cannot do.
1498
1499Tekram boards using Symbios chips, DC390W/F/U, which have NVRAM are detected
1500and this is used to distinguish between Symbios compatible and Tekram host
1501adaptors. This is used to disable the Symbios compatible "diff" setting
1502incorrectly set on Tekram boards if the CONFIG_SCSI_53C8XX_SYMBIOS_COMPAT
1503configuration parameter is set enabling both Symbios and Tekram boards to be
1504used together with the Symbios cards using all their features, including
1505"diff" support. ("led pin" support for Symbios compatible cards can remain
1506enabled when using Tekram cards. It does nothing useful for Tekram host
1507adaptors but does not cause problems either.)
1508
1509
151017.2 Symbios NVRAM layout
1511
1512typical data at NVRAM address 0x100 (53c810a NVRAM)
1513-----------------------------------------------------------
151400 00
151564 01
15168e 0b
1517
151800 30 00 00 00 00 07 00 00 00 00 00 00 00 07 04 10 04 00 00
1519
152004 00 0f 00 00 10 00 50 00 00 01 00 00 62
152104 00 03 00 00 10 00 58 00 00 01 00 00 63
152204 00 01 00 00 10 00 48 00 00 01 00 00 61
152300 00 00 00 00 00 00 00 00 00 00 00 00 00
1524
15250f 00 08 08 64 00 0a 00
15260f 00 08 08 64 00 0a 00
15270f 00 08 08 64 00 0a 00
15280f 00 08 08 64 00 0a 00
15290f 00 08 08 64 00 0a 00
15300f 00 08 08 64 00 0a 00
15310f 00 08 08 64 00 0a 00
15320f 00 08 08 64 00 0a 00
1533
15340f 00 08 08 64 00 0a 00
15350f 00 08 08 64 00 0a 00
15360f 00 08 08 64 00 0a 00
15370f 00 08 08 64 00 0a 00
15380f 00 08 08 64 00 0a 00
15390f 00 08 08 64 00 0a 00
15400f 00 08 08 64 00 0a 00
15410f 00 08 08 64 00 0a 00
1542
154300 00 00 00 00 00 00 00
154400 00 00 00 00 00 00 00
154500 00 00 00 00 00 00 00
154600 00 00 00 00 00 00 00
154700 00 00 00 00 00 00 00
154800 00 00 00 00 00 00 00
154900 00 00 00 00 00 00 00
155000 00 00 00 00 00 00 00
1551
155200 00 00 00 00 00 00 00
155300 00 00 00 00 00 00 00
155400 00 00 00 00 00 00 00
155500 00 00 00 00 00 00 00
155600 00 00 00 00 00 00 00
155700 00 00 00 00 00 00 00
155800 00 00 00 00 00 00 00
155900 00 00 00 00 00 00 00
1560
156100 00 00 00 00 00 00 00
156200 00 00 00 00 00 00 00
156300 00 00 00 00 00 00 00
1564
1565fe fe
156600 00
156700 00
1568-----------------------------------------------------------
1569NVRAM layout details
1570
1571NVRAM Address 0x000-0x0ff not used
1572              0x100-0x26f initialised data
1573              0x270-0x7ff not used
1574
1575general layout
1576
1577        header  -   6 bytes,
1578        data    - 356 bytes (checksum is byte sum of this data)
1579        trailer -   6 bytes
1580                  ---
1581        total     368 bytes
1582
1583data area layout
1584
1585        controller set up  -  20 bytes
1586        boot configuration -  56 bytes (4x14 bytes)
1587        device set up      - 128 bytes (16x8 bytes)
1588        unused (spare?)    - 152 bytes (19x8 bytes)
1589                             ---
1590        total                356 bytes
1591
1592-----------------------------------------------------------
1593header
1594
159500 00   - ?? start marker
159664 01   - byte count (lsb/msb excludes header/trailer)
15978e 0b   - checksum (lsb/msb excludes header/trailer)
1598-----------------------------------------------------------
1599controller set up
1600
160100 30 00 00 00 00 07 00 00 00 00 00 00 00 07 04 10 04 00 00
1602                   |     |           |     |
1603                   |     |           |      -- host ID
1604                   |     |           |
1605                   |     |            --Removable Media Support
1606                   |     |               0x00 = none
1607                   |     |               0x01 = Bootable Device
1608                   |     |               0x02 = All with Media
1609                   |     |
1610                   |      --flag bits 2
1611                   |        0x00000001= scan order hi->low
1612                   |            (default 0x00 - scan low->hi)
1613                    --flag bits 1
1614                       0x00000001 scam enable
1615                       0x00000010 parity enable
1616                       0x00000100 verbose boot msgs
1617
1618remaining bytes unknown - they do not appear to change in my
1619current set up for any of the controllers.
1620
1621default set up is identical for 53c810a and 53c875 NVRAM
1622(Removable Media added Symbios BIOS version 4.09)
1623-----------------------------------------------------------
1624boot configuration
1625
1626boot order set by order of the devices in this table
1627
162804 00 0f 00 00 10 00 50 00 00 01 00 00 62 -- 1st controller
162904 00 03 00 00 10 00 58 00 00 01 00 00 63    2nd controller
163004 00 01 00 00 10 00 48 00 00 01 00 00 61    3rd controller
163100 00 00 00 00 00 00 00 00 00 00 00 00 00    4th controller
1632       |  |  |  |     |        |     |  |
1633       |  |  |  |     |        |      ---- PCI io port adr
1634       |  |  |  |     |         --0x01 init/scan at boot time
1635       |  |  |  |      --PCI device/function number (0xdddddfff)
1636       |  |   ----- ?? PCI vendor ID (lsb/msb)
1637        ----PCI device ID (lsb/msb)
1638
1639?? use of this data is a guess but seems reasonable
1640
1641remaining bytes unknown - they do not appear to change in my
1642current set up
1643
1644default set up is identical for 53c810a and 53c875 NVRAM
1645-----------------------------------------------------------
1646device set up (up to 16 devices - includes controller)
1647
16480f 00 08 08 64 00 0a 00 - id 0
16490f 00 08 08 64 00 0a 00
16500f 00 08 08 64 00 0a 00
16510f 00 08 08 64 00 0a 00
16520f 00 08 08 64 00 0a 00
16530f 00 08 08 64 00 0a 00
16540f 00 08 08 64 00 0a 00
16550f 00 08 08 64 00 0a 00
1656
16570f 00 08 08 64 00 0a 00
16580f 00 08 08 64 00 0a 00
16590f 00 08 08 64 00 0a 00
16600f 00 08 08 64 00 0a 00
16610f 00 08 08 64 00 0a 00
16620f 00 08 08 64 00 0a 00
16630f 00 08 08 64 00 0a 00
16640f 00 08 08 64 00 0a 00 - id 15
1665 |     |  |  |     |  |
1666 |     |  |  |      ----timeout (lsb/msb)
1667 |     |  |   --synch period (0x?? 40 Mtrans/sec- fast 40) (probably 0x28)
1668 |     |  |                  (0x30 20 Mtrans/sec- fast 20)
1669 |     |  |                  (0x64 10 Mtrans/sec- fast )
1670 |     |  |                  (0xc8  5 Mtrans/sec)
1671 |     |  |                  (0x00  asynchronous)
1672 |     |   -- ?? max sync offset (0x08 in NVRAM on 53c810a)
1673 |     |                         (0x10 in NVRAM on 53c875)
1674 |      --device bus width (0x08 narrow)
1675 |                         (0x10 16 bit wide)
1676  --flag bits
1677    0x00000001 - disconnect enabled
1678    0x00000010 - scan at boot time
1679    0x00000100 - scan luns
1680    0x00001000 - queue tags enabled
1681
1682remaining bytes unknown - they do not appear to change in my
1683current set up
1684
1685?? use of this data is a guess but seems reasonable
1686(but it could be max bus width)
1687
1688default set up for 53c810a NVRAM
1689default set up for 53c875 NVRAM - bus width     - 0x10
1690                                - sync offset ? - 0x10
1691                                - sync period   - 0x30
1692-----------------------------------------------------------
1693?? spare device space (32 bit bus ??)
1694
169500 00 00 00 00 00 00 00  (19x8bytes)
1696.
1697.
169800 00 00 00 00 00 00 00
1699
1700default set up is identical for 53c810a and 53c875 NVRAM
1701-----------------------------------------------------------
1702trailer
1703
1704fe fe   - ? end marker ?
170500 00
170600 00
1707
1708default set up is identical for 53c810a and 53c875 NVRAM
1709-----------------------------------------------------------
1710
1711
1712
171317.3 Tekram NVRAM layout
1714
1715nvram 64x16 (1024 bit)
1716
1717Drive settings
1718
1719Drive ID 0-15 (addr 0x0yyyy0 = device setup, yyyy = ID)
1720              (addr 0x0yyyy1 = 0x0000)
1721
1722    x x x x  x x x x  x x x x  x x x x
1723               | | |      | |  | | | |
1724               | | |      | |  | | |  ----- parity check   0 - off
1725               | | |      | |  | | |                       1 - on
1726               | | |      | |  | | |
1727               | | |      | |  | |  ------- sync neg       0 - off
1728               | | |      | |  | |                         1 - on
1729               | | |      | |  | |
1730               | | |      | |  |  --------- disconnect     0 - off
1731               | | |      | |  |                           1 - on
1732               | | |      | |  |
1733               | | |      | |   ----------- start cmd      0 - off
1734               | | |      | |                              1 - on
1735               | | |      | |
1736               | | |      |  -------------- tagged cmds    0 - off
1737               | | |      |                                1 - on
1738               | | |      |
1739               | | |       ---------------- wide neg       0 - off
1740               | | |                                       1 - on
1741               | | |
1742                --------------------------- sync rate      0 - 10.0 Mtrans/sec
1743                                                           1 -  8.0
1744                                                           2 -  6.6
1745                                                           3 -  5.7
1746                                                           4 -  5.0
1747                                                           5 -  4.0
1748                                                           6 -  3.0
1749                                                           7 -  2.0
1750                                                           7 -  2.0
1751                                                           8 - 20.0
1752                                                           9 - 16.7
1753                                                           a - 13.9
1754                                                           b - 11.9
1755
1756Global settings
1757
1758Host flags 0 (addr 0x100000, 32)
1759
1760    x x x x  x x x x  x x x x  x x x x
1761    | | | |  | | | |           | | | |
1762    | | | |  | | | |            ----------- host ID    0x00 - 0x0f
1763    | | | |  | | | |
1764    | | | |  | | |  ----------------------- support for    0 - off
1765    | | | |  | | |                          > 2 drives     1 - on
1766    | | | |  | | |
1767    | | | |  | |  ------------------------- support drives 0 - off
1768    | | | |  | |                            > 1Gbytes      1 - on
1769    | | | |  | |
1770    | | | |  |  --------------------------- bus reset on   0 - off
1771    | | | |  |                                power on     1 - on
1772    | | | |  |
1773    | | | |   ----------------------------- active neg     0 - off
1774    | | | |                                                1 - on
1775    | | | |
1776    | | |  -------------------------------- imm seek       0 - off
1777    | | |                                                  1 - on
1778    | | |
1779    | |  ---------------------------------- scan luns      0 - off
1780    | |                                                    1 - on
1781    | |
1782     -------------------------------------- removable      0 - disable
1783                                            as BIOS dev    1 - boot device
1784                                                           2 - all
1785
1786Host flags 1 (addr 0x100001, 33)
1787
1788    x x x x  x x x x  x x x x  x x x x
1789               | | |             | | |
1790               | | |              --------- boot delay     0 -   3 sec
1791               | | |                                       1 -   5
1792               | | |                                       2 -  10
1793               | | |                                       3 -  20
1794               | | |                                       4 -  30
1795               | | |                                       5 -  60
1796               | | |                                       6 - 120
1797               | | |
1798                --------------------------- max tag cmds   0 -  2
1799                                                           1 -  4
1800                                                           2 -  8
1801                                                           3 - 16
1802                                                           4 - 32
1803
1804Host flags 2 (addr 0x100010, 34)
1805
1806    x x x x  x x x x  x x x x  x x x x
1807                                     |
1808                                      ----- F2/F6 enable   0 - off ???
1809                                                           1 - on  ???
1810
1811checksum (addr 0x111111)
1812
1813checksum = 0x1234 - (sum addr 0-63)
1814
1815----------------------------------------------------------------------------
1816
1817default nvram data:
1818
18190x0037 0x0000 0x0037 0x0000 0x0037 0x0000 0x0037 0x0000
18200x0037 0x0000 0x0037 0x0000 0x0037 0x0000 0x0037 0x0000
18210x0037 0x0000 0x0037 0x0000 0x0037 0x0000 0x0037 0x0000
18220x0037 0x0000 0x0037 0x0000 0x0037 0x0000 0x0037 0x0000
1823
18240x0f07 0x0400 0x0001 0x0000 0x0000 0x0000 0x0000 0x0000
18250x0000 0x0000 0x0000 0x0000 0x0000 0x0000 0x0000 0x0000
18260x0000 0x0000 0x0000 0x0000 0x0000 0x0000 0x0000 0x0000
18270x0000 0x0000 0x0000 0x0000 0x0000 0x0000 0x0000 0xfbbc
1828
1829
183018. Support for Big Endian
1831
1832The PCI local bus has been primarily designed for x86 architecture.
1833As a consequence, PCI devices generally expect DWORDS using little endian
1834byte ordering.
1835
183618.1 Big Endian CPU
1837
1838In order to support NCR chips on a Big Endian architecture the driver has to
1839perform byte reordering each time it is needed. This feature has been
1840added to the driver by Cort <cort@cs.nmt.edu> and is available in driver
1841version 2.5 and later ones. For the moment Big Endian support has only
1842been tested on Linux/PPC (PowerPC).
1843
184418.2 NCR chip in Big Endian mode of operations
1845
1846It can be read in SYMBIOS documentation that some chips support a special
1847Big Endian mode, on paper: 53C815, 53C825A, 53C875, 53C875N, 53C895.
1848This mode of operations is not software-selectable, but needs pin named
1849BigLit to be pulled-up. Using this mode, most of byte reorderings should
1850be avoided when the driver is running on a Big Endian CPU.
1851Driver version 2.5 is also, in theory, ready for this feature.
1852
1853===============================================================================
1854End of NCR53C8XX driver README file
1855

README.osst

1README file for the osst driver
2===============================
3(w) Kurt Garloff <garloff@suse.de> 12/2000
4
5This file describes the osst driver as of version 0.8.x/0.9.x, the released
6version of the osst driver.
7It is intended to help advanced users to understand the role of osst and to
8get them started using (and maybe debugging) it.
9It won't address issues like "How do I compile a kernel?" or "How do I load
10a module?", as these are too basic.
11Once the OnStream got merged into the official kernel, the distro makers
12will provide the OnStream support for those who are not familiar with
13hacking their kernels.
14
15
16Purpose
17-------
18The osst driver was developed, because the standard SCSI tape driver in
19Linux, st, does not support the OnStream SC-x0 SCSI tape. The st is not to
20blame for that, as the OnStream tape drives do not support the standard SCSI
21command set for Serial Access Storage Devices (SASDs), which basically
22corresponds to the QIC-157 spec.
23Nevertheless, the OnStream tapes are nice pieces of hardware and therefore
24the osst driver has been written to make these tape devs supported by Linux.
25The driver is free software. It's released under the GNU GPL and planned to
26be integrated into the mainstream kernel.
27
28
29Implementation
30--------------
31The osst is a new high-level SCSI driver, just like st, sr, sd and sg. It
32can be compiled into the kernel or loaded as a module.
33As it represents a new device, it got assigned a new device node: /dev/osstX
34are character devices with major no 206 and minor numbers like the /dev/stX
35devices. If those are not present, you may create them by calling
36Makedevs.sh as root (see below).
37The driver started being a copy of st and as such, the osst devices'
38behavior looks very much the same as st to the userspace applications.
39
40
41History
42-------
43In the first place, osst shared it's identity very much with st. That meant
44that it used the same kernel structures and the same device node as st.
45So you could only have either of them being present in the kernel. This has
46been fixed by registering an own device, now.
47st and osst can coexist, each only accessing the devices it can support by
48themselves.
49
50
51Installation
52------------
53osst got integrated into the linux kernel. Select it during kernel
54configuration as module or compile statically into the kernel.
55Compile your kernel and install the modules.
56
57Now, your osst driver is inside the kernel or available as a module,
58depending on your choice during kernel config. You may still need to create
59the device nodes by calling the Makedevs.sh script (see below) manually,
60unless you use a devfs kernel, where this won't be needed.
61
62To load your module, you may use the command
63modprobe osst
64as root. dmesg should show you, whether your OnStream tapes have been
65recognized.
66
67If you want to have the module autoloaded on access to /dev/osst, you may
68add something like
69alias char-major-206 osst
70to your /etc/modules.conf (old name: conf.modules).
71
72You may find it convenient to create a symbolic link
73ln -s nosst0 /dev/tape
74to make programs assuming a default name of /dev/tape more convenient to
75use.
76
77The device nodes for osst have to be created. Use the Makedevs.sh script
78attached to this file.
79
80
81Using it
82--------
83You may use the OnStream tape driver with your standard backup software,
84which may be tar, cpio, amanda, arkeia, BRU, Lone Tar, ...
85by specifying /dev/(n)osst0 as the tape device to use or using the above
86symlink trick. The IOCTLs to control tape operation are also mostly
87supported and you may try the mt (or mt_st) program to jump between
88filemarks, eject the tape, ...
89
90There's one limitation: You need to use a block size of 32kB.
91
92(This limitation is worked on and will be fixed in version 0.8.8 of
93 this driver.)
94
95If you just want to get started with standard software, here is an example
96for creating and restoring a full backup:
97# Backup
98tar cvf - / --exclude /proc | buffer -s 32k -m 24M -B -t -o /dev/nosst0
99# Restore
100buffer -s 32k -m 8M -B -t -i /dev/osst0 | tar xvf - -C /
101
102The buffer command has been used to buffer the data before it goes to the
103tape (or the file system) in order to smooth out the data stream and prevent
104the tape from needing to stop and rewind. The OnStream does have an internal
105buffer and a variable speed which help this, but especially on writing, the
106buffering still proves useful in most cases. It also pads the data to
107guarantees the block size of 32k. (Otherwise you may pass the -b64 option to
108tar.)
109Expect something like 1.8MB/s for the SC-x0 drives and 0.9MB/s for the DI-30.
110The USB drive will give you about 0.7MB/s.
111On a fast machine, you may profit from software data compression (z flag for
112tar).
113
114
115USB and IDE
116-----------
117Via the SCSI emulation layers usb-storage and ide-scsi, you can also use the
118osst driver to drive the USB-30 and the DI-30 drives. (Unfortunately, there
119is no such layer for the parallel port, otherwise the DP-30 would work as
120well.) For the USB support, you need the latest 2.4.0-test kernels and the
121latest usb-storage driver from
122http://www.linux-usb.org/
123http://sourceforge.net/cvs/?group_id=3581
124
125Note that the ide-tape driver as of 1.16f uses a slightly outdated on-tape
126format and therefore is not completely interoperable with osst tapes.
127
128The ADR-x0 line is fully SCSI-2 compliant and is supported by st, not osst.
129The on-tape format is supposed to be compatible with the one used by osst.
130
131
132Feedback and updates
133--------------------
134The driver development is coordinated through a mailing list
135<osst@linux1.onstream.nl>
136a CVS repository and some web pages.
137The tester's pages which contain recent news and updated drivers to download
138can be found on
139http://linux1.onstream.nl/test/
140
141If you find any problems, please have a look at the tester's page in order
142to see whether the problem is already known and solved. Otherwise, please
143report it to the mailing list. Your feedback is welcome. (This holds also
144for reports of successful usage, of course.)
145In case of trouble, please do always provide the following info:
146* driver and kernel version used (see syslog)
147* driver messages (syslog)
148* SCSI config and OnStream Firmware (/proc/scsi/scsi)
149* description of error. Is it reproducible?
150* software and commands used
151
152You may subscribe to the mailing list, BTW, it's a majordomo list.
153
154
155Status
156------
1570.8.0 was the first widespread BETA release. Since then a lot of reports
158have been sent, but mostly reported success or only minor trouble.
159All the issues have been addressed.
160Check the web pages for more info about the current developments.
1610.9.x is the tree for the 2.3/2.4 kernel.
162
163
164Acknowledgments
165----------------
166The driver has been started by making a copy of Kai Makisara's st driver.
167Most of the development has been done by Willem Riede. The presence of the
168userspace program osg (onstreamsg) from Terry Hardie has been rather
169helpful. The same holds for Gadi Oxman's ide-tape support for the DI-30.
170I did add some patches to those drivers as well and coordinated things a
171little bit.
172Note that most of them did mostly spend their spare time for the creation of
173this driver.
174The people from OnStream, especially Jack Bombeeck did support this project
175and always tried to answer HW or FW related questions. Furthermore, he
176pushed the FW developers to do the right things.
177SuSE did support this project by allowing me to work on it during my working
178time for them and by integrating the driver into their distro.
179
180More people did help by sending useful comments. Sorry to those who have
181been forgotten. Thanks to all the GNU/FSF and Linux developers who made this
182platform such an interesting, nice and stable platform.
183Thanks go to those who tested the drivers and did send useful reports. Your
184help is needed!
185
186
187Makedevs.sh
188-----------
189#!/bin/sh
190# Script to create OnStream SC-x0 device nodes (major 206)
191# Usage: Makedevs.sh [nos [path to dev]]
192# $Id: README.osst.kernel,v 1.4 2000/12/20 14:13:15 garloff Exp $
193major=206
194nrs=4
195dir=/dev
196test -z "$1" || nrs=$1
197test -z "$2" || dir=$2
198declare -i nr
199nr=0
200test -d $dir || mkdir -p $dir
201while test $nr -lt $nrs; do
202  mknod $dir/osst$nr c $major $nr
203  chown 0.disk $dir/osst$nr; chmod 660 $dir/osst$nr;
204  mknod $dir/nosst$nr c $major $[nr+128]
205  chown 0.disk $dir/nosst$nr; chmod 660 $dir/nosst$nr;
206  mknod $dir/osst${nr}l c $major $[nr+32]
207  chown 0.disk $dir/osst${nr}l; chmod 660 $dir/osst${nr}l;
208  mknod $dir/nosst${nr}l c $major $[nr+160]
209  chown 0.disk $dir/nosst${nr}l; chmod 660 $dir/nosst${nr}l;
210  mknod $dir/osst${nr}m c $major $[nr+64]
211  chown 0.disk $dir/osst${nr}m; chmod 660 $dir/osst${nr}m;
212  mknod $dir/nosst${nr}m c $major $[nr+192]
213  chown 0.disk $dir/nosst${nr}m; chmod 660 $dir/nosst${nr}m;
214  mknod $dir/osst${nr}a c $major $[nr+96]
215  chown 0.disk $dir/osst${nr}a; chmod 660 $dir/osst${nr}a;
216  mknod $dir/nosst${nr}a c $major $[nr+224]
217  chown 0.disk $dir/nosst${nr}a; chmod 660 $dir/nosst${nr}a;
218  let nr+=1
219done
220

README.ppa

1-------- Terse where to get ZIP Drive help info --------
2
3General Iomega ZIP drive page for Linux:
4http://www.torque.net/~campbell/
5
6Driver achive for old drivers:
7http://www.torque.net/~campbell/ppa/
8
9Linux Parport page (parallel port)
10http://www.torque.net/parport/
11
12Email list for Linux Parport
13linux-parport@torque.net
14
15Email for problems with ZIP or ZIP Plus drivers
16campbell@torque.net
17

README.qlogicfas

1
2This driver supports the Qlogic FASXXX family of chips.  This driver
3only works with the ISA, VLB, and PCMCIA versions of the Qlogic
4FastSCSI!  cards as well as any other card based on the FASXX chip
5(including the Control Concepts SCSI/IDE/SIO/PIO/FDC cards).
6
7This driver does NOT support the PCI version.  Support for these PCI
8Qlogic boards:
9
10	* IQ-PCI
11	* IQ-PCI-10
12	* IQ-PCI-D
13
14is provided by the qlogicisp.c driver.  Check README.qlogicisp for
15details.
16
17Nor does it support the PCI-Basic, which is supported by the
18'am53c974' driver.
19
20PCMCIA SUPPORT
21
22This currently only works if the card is enabled first from DOS.  This
23means you will have to load your socket and card services, and
24QL41DOS.SYS and QL40ENBL.SYS.  These are a minimum, but loading the
25rest of the modules won't interfere with the operation.  The next
26thing to do is load the kernel without resetting the hardware, which
27can be a simple ctrl-alt-delete with a boot floppy, or by using
28loadlin with the kernel image accessible from DOS.  If you are using
29the Linux PCMCIA driver, you will have to adjust it or otherwise stop
30it from configuring the card.
31
32I am working with the PCMCIA group to make it more flexible, but that
33may take a while.
34
35ALL CARDS
36
37The top of the qlogic.c file has a number of defines that controls
38configuration.  As shipped, it provides a balance between speed and
39function.  If there are any problems, try setting SLOW_CABLE to 1, and
40then try changing USE_IRQ and TURBO_PDMA to zero.  If you are familiar
41with SCSI, there are other settings which can tune the bus.
42
43It may be a good idea to enable RESET_AT_START, especially if the
44devices may not have been just powered up, or if you are restarting
45after a crash, since they may be busy trying to complete the last
46command or something.  It comes up faster if this is set to zero, and
47if you have reliable hardware and connections it may be more useful to
48not reset things.
49
50SOME TROUBLESHOOTING TIPS
51
52Make sure it works properly under DOS.  You should also do an initial FDISK
53on a new drive if you want partitions.
54
55Don't enable all the speedups first.  If anything is wrong, they will make
56any problem worse.
57
58IMPORTANT
59
60The best way to test if your cables, termination, etc. are good is to
61copy a very big file (e.g. a doublespace container file, or a very
62large executable or archive).  It should be at least 5 megabytes, but
63you can do multiple tests on smaller files.  Then do a COMP to verify
64that the file copied properly.  (Turn off all caching when doing these
65tests, otherwise you will test your RAM and not the files).  Then do
6610 COMPs, comparing the same file on the SCSI hard drive, i.e. "COMP
67realbig.doc realbig.doc".  Then do it after the computer gets warm.
68
69I noticed my system which seems to work 100% would fail this test if
70the computer was left on for a few hours.  It was worse with longer
71cables, and more devices on the SCSI bus.  What seems to happen is
72that it gets a false ACK causing an extra byte to be inserted into the
73stream (and this is not detected).  This can be caused by bad
74termination (the ACK can be reflected), or by noise when the chips
75work less well because of the heat, or when cables get too long for
76the speed.
77
78Remember, if it doesn't work under DOS, it probably won't work under
79Linux.
80

README.qlogicisp

1Notes for the QLogic ISP1020 PCI SCSI Driver:
2
3This driver works well in practice, but does not support disconnect/
4reconnect, which makes using it with tape drives impractical.
5
6It should work for most host adaptors with the ISP1020 chip.  The
7QLogic Corporation produces several PCI SCSI adapters which should
8work:
9
10	* IQ-PCI
11	* IQ-PCI-10
12	* IQ-PCI-D
13
14This driver may work with boards containing the ISP1020A or ISP1040A
15chips, but that has not been tested.
16
17This driver will NOT work with:
18
19	* ISA or VL Bus Qlogic cards (they use the 'qlogicfas' driver)
20	* PCI-basic (it uses the 'am53c974' driver)
21
22Much thanks to QLogic's tech support for providing the latest ISP1020
23firmware, and for taking the time to review my code.
24
25Erik Moe
26ehm@cris.com
27
28Revised:
29Michael A. Griffith
30grif@cs.ucr.edu
31
32
33
34
35

README.st

1This file contains brief information about the SCSI tape driver.
2The driver is currently maintained by Kai M�kisara (email
3Kai.Makisara@kolumbus.fi)
4
5Last modified: Sun Apr  6 22:44:55 2003 by makisara
6
7
8BASICS
9
10The driver is generic, i.e., it does not contain any code tailored
11to any specific tape drive. The tape parameters can be specified with
12one of the following three methods:
13
141. Each user can specify the tape parameters he/she wants to use
15directly with ioctls. This is administratively a very simple and
16flexible method and applicable to single-user workstations. However,
17in a multiuser environment the next user finds the tape parameters in
18state the previous user left them.
19
202. The system manager (root) can define default values for some tape
21parameters, like block size and density using the MTSETDRVBUFFER ioctl.
22These parameters can be programmed to come into effect either when a
23new tape is loaded into the drive or if writing begins at the
24beginning of the tape. The second method is applicable if the tape
25drive performs auto-detection of the tape format well (like some
26QIC-drives). The result is that any tape can be read, writing can be
27continued using existing format, and the default format is used if
28the tape is rewritten from the beginning (or a new tape is written
29for the first time). The first method is applicable if the drive
30does not perform auto-detection well enough and there is a single
31"sensible" mode for the device. An example is a DAT drive that is
32used only in variable block mode (I don't know if this is sensible
33or not :-).
34
35The user can override the parameters defined by the system
36manager. The changes persist until the defaults again come into
37effect.
38
393. Up to four modes can be defined and selected using the minor number
40(bits 5 and 6). Mode 0 corresponds to the defaults discussed
41above. Additional modes are dormant until they are defined by the
42system manager (root). When specification of a new mode is started,
43the configuration of mode 0 is used to provide a starting point for
44definition of the new mode.
45
46Using the modes allows the system manager to give the users choices
47over some of the buffering parameters not directly accessible to the
48users (buffered and asynchronous writes). The modes also allow choices
49between formats in multi-tape operations (the explicitly overridden
50parameters are reset when a new tape is loaded).
51
52If more than one mode is used, all modes should contain definitions
53for the same set of parameters.
54
55Many Unices contain internal tables that associate different modes to
56supported devices. The Linux SCSI tape driver does not contain such
57tables (and will not do that in future). Instead of that, a utility
58program can be made that fetches the inquiry data sent by the device,
59scans its database, and sets up the modes using the ioctls. Another
60alternative is to make a small script that uses mt to set the defaults
61tailored to the system.
62
63The driver supports fixed and variable block size (within buffer
64limits). Both the auto-rewind (minor equals device number) and
65non-rewind devices (minor is 128 + device number) are implemented.
66
67In variable block mode, the byte count in write() determines the size
68of the physical block on tape. When reading, the drive reads the next
69tape block and returns to the user the data if the read() byte count
70is at least the block size. Otherwise, error ENOMEM is returned.
71
72In fixed block mode, the data transfer between the drive and the
73driver is in multiples of the block size. The write() byte count must
74be a multiple of the block size. This is not required when reading but
75may be advisable for portability.
76
77Support is provided for changing the tape partition and partitioning
78of the tape with one or two partitions. By default support for
79partitioned tape is disabled for each driver and it can be enabled
80with the ioctl MTSETDRVBUFFER.
81
82By default the driver writes one filemark when the device is closed after
83writing and the last operation has been a write. Two filemarks can be
84optionally written. In both cases end of data is signified by
85returning zero bytes for two consecutive reads.
86
87The compile options are defined in the file linux/drivers/scsi/st_options.h.
88
89
90BSD AND SYS V SEMANTICS
91
92The user can choose between these two behaviours of the tape driver by
93defining the value of the symbol ST_SYSV. The semantics differ when a
94file being read is closed. The BSD semantics leaves the tape where it
95currently is whereas the SYS V semantics moves the tape past the next
96filemark unless the filemark has just been crossed.
97
98The default is BSD semantics.
99
100
101BUFFERING
102
103The driver uses tape buffers allocated either at system initialization
104or at run-time when needed. One buffer is used for each open tape
105device. The size of the buffers is selectable at compile and/or boot
106time. The buffers are used to store the data being transferred to/from
107the SCSI adapter. The following buffering options are selectable at
108compile time and/or at run time (via ioctl):
109
110Buffering of data across write calls in fixed block mode (define
111ST_BUFFER_WRITES).
112
113Asynchronous writing. Writing the buffer contents to the tape is
114started and the write call returns immediately. The status is checked
115at the next tape operation. Applies only to variable block mode.
116
117Buffered writes and asynchronous writes may in some rare cases cause
118problems in multivolume operations if there is not enough space on the
119tape after the early-warning mark to flush the driver buffer.
120
121Read ahead for fixed block mode (ST_READ_AHEAD). Filling the buffer is
122attempted even if the user does not want to get all of the data at
123this read command. Should be disabled for those drives that don't like
124a filemark to truncate a read request or that don't like backspacing.
125
126The buffer size is defined (in 1024 byte units) by ST_BUFFER_BLOCKS or
127at boot time. If this size is not large enough, the driver tries to
128temporarily enlarge the buffer. Buffer allocation uses chunks of
129memory having sizes 2^n * (page size). Because of this the actual
130buffer size may be larger than the buffer size specified with
131ST_BUFFER_BLOCKS.
132
133A small number of buffers are allocated at driver initialisation. The
134maximum number of these buffers is defined by ST_MAX_BUFFERS. The
135maximum can be changed with kernel or module startup options. One
136buffer is allocated for each drive detected when the driver is
137initialized up to the maximum.
138
139The driver tries to allocate new buffers at run-time if
140necessary. These buffers are freed after use. If the maximum number of
141initial buffers is set to zero, all buffer allocation is done at
142run-time. The advantage of run-time allocation is that memory is not
143wasted for buffers not being used. The disadvantage is that there may
144not be memory available at the time when a buffer is needed for the
145first time (once a buffer is allocated, it is not released). This risk
146should not be big if the tape drive is connected to a PCI adapter that
147supports scatter/gather (the allocation is not limited to "DMA memory"
148and the buffer can be composed of several fragments).
149
150Scatter/gather buffers (buffers that consist of chunks non-contiguous
151in the physical memory) are used if contiguous buffers can't be
152allocated. To support all SCSI adapters (including those not
153supporting scatter/gather), buffer allocation is using the following
154three kinds of chunks:
1551. The initial segment that is used for all SCSI adapters including
156those not supporting scatter/gather. The size of this buffer will be
157(PAGE_SIZE << ST_FIRST_ORDER) bytes if the system can give a chunk of
158this size (and it is not larger than the buffer size specified by
159ST_BUFFER_BLOCKS). If this size is not available, the driver halves
160the size and tries again until the size of one page. The default
161settings in st_options.h make the driver to try to allocate all of the
162buffer as one chunk.
1632. The scatter/gather segments to fill the specified buffer size are
164allocated so that as many segments as possible are used but the number
165of segments does not exceed ST_FIRST_SG.
1663. The remaining segments between ST_MAX_SG (or the module parameter
167max_sg_segs) and the number of segments used in phases 1 and 2
168are used to extend the buffer at run-time if this is necessary. The
169number of scatter/gather segments allowed for the SCSI adapter is not
170exceeded if it is smaller than the maximum number of scatter/gather
171segments specified. If the maximum number allowed for the SCSI adapter
172is smaller than the number of segments used in phases 1 and 2,
173extending the buffer will always fail.
174
175
176MODULE PARAMETERS
177
178The buffer size, write threshold, and the maximum number of allocated buffers
179are configurable when the driver is loaded as a module. The keywords are:
180
181buffer_kbs=xxx             the buffer size in kilobytes is set to xxx
182max_buffers=xxx            the maximum number of tape buffer set to xxx
183max_sg_segs=xxx		   the maximum number of scatter/gather
184			   segments
185blocking_open=xxx	   block in open() if drive not ready, O_NONBLOCK
186			   not used, and blocking_open non-zero
187
188Note that if the buffer size is changed but the write threshold is not
189set, the write threshold is set to the new buffer size - 2 kB.
190
191
192BOOT TIME CONFIGURATION
193
194If the driver is compiled into the kernel, the same parameters can be
195also set using, e.g., the LILO command line. The preferred syntax is
196to use the same keywords as when loading the driver as module. If
197several parameters are set, the keyword-value pairs are separated with
198a comma (no spaces allowed). A colon can be used instead of the equal
199mark. The definition is prepended by the string st=. Here is an
200example:
201
202	st=buffer_kbs:64,max_buffers:2
203
204The following syntax used by the old kernel versions is also supported:
205
206           st=aa[,bb[,cc[,dd]]]
207
208where
209  aa is the buffer size in 1024 byte units
210  bb is the write threshold in 1024 byte units (not used any more)
211  cc is the maximum number of tape buffers to allocate (the number of
212        buffers is bounded also by the number of drives detected)
213  dd is the maximum number of scatter/gather segments
214
215
216IOCTLS
217
218The tape is positioned and the drive parameters are set with ioctls
219defined in mtio.h The tape control program 'mt' uses these ioctls. Try
220to find an mt that supports all of the Linux SCSI tape ioctls and
221opens the device for writing if the tape contents will be modified
222(look for a package mt-st* from the Linux ftp sites; the GNU mt does
223not open for writing for, e.g., erase).
224
225The supported ioctls are:
226
227The following use the structure mtop:
228
229MTFSF   Space forward over count filemarks. Tape positioned after filemark.
230MTFSFM  As above but tape positioned before filemark.
231MTBSF	Space backward over count filemarks. Tape positioned before
232        filemark.
233MTBSFM  As above but ape positioned after filemark.
234MTFSR   Space forward over count records.
235MTBSR   Space backward over count records.
236MTFSS   Space forward over count setmarks.
237MTBSS   Space backward over count setmarks.
238MTWEOF  Write count filemarks.
239MTWSM   Write count setmarks.
240MTREW   Rewind tape.
241MTOFFL  Set device off line (often rewind plus eject).
242MTNOP   Do nothing except flush the buffers.
243MTRETEN Re-tension tape.
244MTEOM   Space to end of recorded data.
245MTERASE Erase tape.
246MTSEEK	Seek to tape block count. Uses Tandberg-compatible seek (QFA)
247        for SCSI-1 drives and SCSI-2 seek for SCSI-2 drives. The file and
248	block numbers in the status are not valid after a seek.
249MTSETBLK Set the drive block size. Setting to zero sets the drive into
250        variable block mode (if applicable).
251MTSETDENSITY Sets the drive density code to arg. See drive
252        documentation for available codes.
253MTLOCK and MTUNLOCK Explicitly lock/unlock the tape drive door.
254MTLOAD and MTUNLOAD Explicitly load and unload the tape. If the
255	command argument x is between MT_ST_HPLOADER_OFFSET + 1 and
256	MT_ST_HPLOADER_OFFSET + 6, the number x is used sent to the
257	drive with the command and it selects the tape slot to use of
258	HP C1553A changer.
259MTCOMPRESSION Sets compressing or uncompressing drive mode using the
260	SCSI mode page 15. Note that some drives other methods for
261	control of compression. Some drives (like the Exabytes) use
262	density codes for compression control. Some drives use another
263	mode page but this page has not been implemented in the
264	driver. Some drives without compression capability will accept
265	any compression mode without error.
266MTSETPART Moves the tape to the partition given by the argument at the
267	next tape operation. The block at which the tape is positioned
268	is the block where the tape was previously positioned in the
269	new active partition unless the next tape operation is
270	MTSEEK. In this case the tape is moved directly to the block
271	specified by MTSEEK. MTSETPART is inactive unless
272	MT_ST_CAN_PARTITIONS set.
273MTMKPART Formats the tape with one partition (argument zero) or two
274	partitions (the argument gives in megabytes the size of
275	partition 1 that is physically the first partition of the
276	tape). The drive has to support partitions with size specified
277	by the initiator. Inactive unless MT_ST_CAN_PARTITIONS set.
278MTSETDRVBUFFER
279	Is used for several purposes. The command is obtained from count
280        with mask MT_SET_OPTIONS, the low order bits are used as argument.
281	This command is only allowed for the superuser (root). The
282	subcommands are:
283	0
284           The drive buffer option is set to the argument. Zero means
285           no buffering.
286        MT_ST_BOOLEANS
287           Sets the buffering options. The bits are the new states
288           (enabled/disabled) the following options (in the
289	   parenthesis is specified whether the option is global or
290	   can be specified differently for each mode):
291	     MT_ST_BUFFER_WRITES write buffering (mode)
292	     MT_ST_ASYNC_WRITES asynchronous writes (mode)
293             MT_ST_READ_AHEAD  read ahead (mode)
294             MT_ST_TWO_FM writing of two filemarks (global)
295	     MT_ST_FAST_EOM using the SCSI spacing to EOD (global)
296	     MT_ST_AUTO_LOCK automatic locking of the drive door (global)
297             MT_ST_DEF_WRITES the defaults are meant only for writes (mode)
298	     MT_ST_CAN_BSR backspacing over more than one records can
299		be used for repositioning the tape (global)
300	     MT_ST_NO_BLKLIMS the driver does not ask the block limits
301		from the drive (block size can be changed only to
302		variable) (global)
303	     MT_ST_CAN_PARTITIONS enables support for partitioned
304		tapes (global)
305	     MT_ST_SCSI2LOGICAL the logical block number is used in
306		the MTSEEK and MTIOCPOS for SCSI-2 drives instead of
307		the device dependent address. It is recommended to set
308		this flag unless there are tapes using the device
309		dependent (from the old times) (global)
310	     MT_ST_SYSV sets the SYSV sematics (mode)
311	     MT_ST_NOWAIT enables immediate mode (i.e., don't wait for
312	        the command to finish) for some commands (e.g., rewind)
313	     MT_ST_DEBUGGING debugging (global; debugging must be
314		compiled into the driver)
315	MT_ST_SETBOOLEANS
316	MT_ST_CLEARBOOLEANS
317	   Sets or clears the option bits.
318	MT_ST_DEF_BLKSIZE
319	   Defines the default block size set automatically. Value
320	   0xffffff means that the default is not used any more.
321	MT_ST_DEF_DENSITY
322	MT_ST_DEF_DRVBUFFER
323	   Used to set or clear the density (8 bits), and drive buffer
324	   state (3 bits). If the value is MT_ST_CLEAR_DEFAULT
325	   (0xfffff) the default will not be used any more. Otherwise
326	   the lowermost bits of the value contain the new value of
327	   the parameter.
328	MT_ST_DEF_COMPRESSION
329	   The compression default will not be used if the value of
330	   the lowermost byte is 0xff. Otherwise the lowermost bit
331	   contains the new default. If the bits 8-15 are set to a
332	   non-zero number, and this number is not 0xff, the number is
333	   used as the compression algorithm. The value
334	   MT_ST_CLEAR_DEFAULT can be used to clear the compression
335	   default.
336	MT_ST_SET_TIMEOUT
337	   Set the normal timeout in seconds for this device. The
338	   default is 900 seconds (15 minutes). The timeout should be
339	   long enough for the retries done by the device while
340	   reading/writing.
341	MT_ST_SET_LONG_TIMEOUT
342	   Set the long timeout that is used for operations that are
343	   known to take a long time. The default is 14000 seconds
344	   (3.9 hours). For erase this value is further multiplied by
345	   eight.
346	MT_ST_SET_CLN
347	   Set the cleaning request interpretation parameters using
348	   the lowest 24 bits of the argument. The driver can set the
349	   generic status bit GMT_CLN if a cleaning request bit pattern
350	   is found from the extended sense data. Many drives set one or
351	   more bits in the extended sense data when the drive needs
352	   cleaning. The bits are device-dependent. The driver is
353	   given the number of the sense data byte (the lowest eight
354	   bits of the argument; must be >= 18 (values 1 - 17
355	   reserved) and <= the maximum requested sense data sixe),
356	   a mask to select the relevant bits (the bits 9-16), and the
357	   bit pattern (bits 17-23). If the bit pattern is zero, one
358	   or more bits under the mask indicate cleaning request. If
359	   the pattern is non-zero, the pattern must match the masked
360	   sense data byte.
361
362	   (The cleaning bit is set if the additional sense code and
363	   qualifier 00h 17h are seen regardless of the setting of
364	   MT_ST_SET_CLN.)
365
366The following ioctl uses the structure mtpos:
367MTIOCPOS Reads the current position from the drive. Uses
368        Tandberg-compatible QFA for SCSI-1 drives and the SCSI-2
369        command for the SCSI-2 drives.
370
371The following ioctl uses the structure mtget to return the status:
372MTIOCGET Returns some status information.
373        The file number and block number within file are returned. The
374        block is -1 when it can't be determined (e.g., after MTBSF).
375        The drive type is either MTISSCSI1 or MTISSCSI2.
376        The number of recovered errors since the previous status call
377        is stored in the lower word of the field mt_erreg.
378        The current block size and the density code are stored in the field
379        mt_dsreg (shifts for the subfields are MT_ST_BLKSIZE_SHIFT and
380        MT_ST_DENSITY_SHIFT).
381	The GMT_xxx status bits reflect the drive status. GMT_DR_OPEN
382	is set if there is no tape in the drive. GMT_EOD means either
383	end of recorded data or end of tape. GMT_EOT means end of tape.
384
385
386MISCELLANEOUS COMPILE OPTIONS
387
388The recovered write errors are considered fatal if ST_RECOVERED_WRITE_FATAL
389is defined.
390
391By default, open() does not block if the drive is not ready. The
392behaviour can be changed by setting ST_BLOCKING_OPEN to one. The
393behaviour can be changed also with the boot/module option
394blocking_open. The blocking open times out after ST_BLOCK_SECONDS.
395
396The maximum number of tape devices is determined by the define
397ST_MAX_TAPES. If more tapes are detected at driver initialization, the
398maximum is adjusted accordingly.
399
400Immediate return from tape positioning SCSI commands can be enabled by
401defining ST_NOWAIT. If this is defined, the user should take care that
402the next tape operation is not started before the previous one has
403finished. The drives and SCSI adapters should handle this condition
404gracefully, but some drive/adapter combinations are known to hang the
405SCSI bus in this case.
406
407The MTEOM command is by default implemented as spacing over 32767
408filemarks. With this method the file number in the status is
409correct. The user can request using direct spacing to EOD by setting
410ST_FAST_EOM 1 (or using the MT_ST_OPTIONS ioctl). In this case the file
411number will be invalid.
412
413When using read ahead or buffered writes the position within the file
414may not be correct after the file is closed (correct position may
415require backspacing over more than one record). The correct position
416within file can be obtained if ST_IN_FILE_POS is defined at compile
417time or the MT_ST_CAN_BSR bit is set for the drive with an ioctl.
418(The driver always backs over a filemark crossed by read ahead if the
419user does not request data that far.)
420
421
422DEBUGGING HINTS
423
424To enable debugging messages, edit st.c and #define DEBUG 1. As seen
425above, debugging can be switched off with an ioctl if debugging is
426compiled into the driver. The debugging output is not voluminuous.
427
428If the tape seems to hang, I would be very interested to hear where
429the driver is waiting. With the command 'ps -l' you can see the state
430of the process using the tape. If the state is D, the process is
431waiting for something. The field WCHAN tells where the driver is
432waiting. If you have the current System.map in the correct place (in
433/boot for the procps I use) or have updated /etc/psdatabase (for kmem
434ps), ps writes the function name in the WCHAN field. If not, you have
435to look up the function from System.map.
436
437Note also that the timeouts are very long compared to most other
438drivers. This means that the Linux driver may appear hung although the
439real reason is that the tape firmware has got confused.
440

README.tmscsim

1The tmscsim driver
2==================
3
41. Purpose and history
52. Installation
63. Features
74. Configuration via /proc/scsi/tmscsim/?
85. Configuration via boot/module params
96. Potential improvements
107. Bug reports, debugging and updates
118. Acknowledgements
129. Copyright
13
14
151. Purpose and history
16----------------------
17The tmscsim driver supports PCI SCSI Host Adapters based on the AM53C974
18chip. AM53C974 based SCSI adapters include:
19 Tekram DC390, DC390T
20 Dawicontrol 2974
21 QLogic Fast! PCI Basic
22 some on-board adapters
23(This is most probably not a complete list)
24
25It has originally written by C.L. Huang from the Tekram corp. to support the
26Tekram DC390(T) adapter. This is where the name comes from: tm = Tekram
27scsi = SCSI driver, m = AMD (?) as opposed to w for the DC390W/U/F
28(NCR53c8X5, X=2/7) driver. Yes, there was also a driver for the latter,
29tmscsiw, which supported DC390W/U/F adapters. It's not maintained any more,
30as the ncr53c8xx is perfectly supporting these adpaters since some time.
31
32The driver first appeared in April 1996, exclusively supported the DC390
33and has been enhanced since then in various steps. In May 1998 support for
34general AM53C974 based adapters and some possibilities to configure it were
35added. The non-DC390 support works by assuming some values for the data
36normally taken from the DC390 EEPROM. See below (chapter 5) for details.
37
38When using the DC390, the configuration is still be done using the DC390
39BIOS setup. The DC390 EEPROM is read and used by the driver, any boot or
40module parameters (chapter 5) are ignored! However, you can change settings
41dynamically, as described in chapter 4.
42
43For a more detailed description of the driver's history, see the first lines
44of tmscsim.c.
45The numbering scheme isn't consistent. The first versions went from 1.00 to
461.12, then 1.20a to 1.20t. Finally I decided to use the ncr53c8xx scheme. So
47the next revisions will be 2.0a to 2.0X (stable), 2.1a to 2.1X (experimental),
482.2a to 2.2X (stable, again) etc. (X = anything between a and z.) If I send
49fixes to people for testing, I create intermediate versions with a digit
50appended, e.g. 2.0c3.
51
52
532. Installation
54---------------
55If you got any recent kernel with this driver and document included in
56linux/drivers/scsi, you basically have to do nothing special to use this
57driver. Of course you have to choose to compile SCSI support and DC390(T)
58support into your kernel or as module when configuring your kernel for
59compiling.
60NEW: You may as well compile this module outside your kernel, using the
61supplied Makefile.
62
63 If you got an old kernel (pre 2.1.127, pre 2.0.37p1) with an old version of
64 this driver: Get dc390-21125-20b.diff.gz or dc390-2036p21-20b1.diff.gz from
65 my web page and apply the patch. Apply further patches to upgrade to the
66 latest version of the driver.
67
68 If you want to do it manually, you should copy the files (dc390.h,
69 tmscsim.h, tmscsim.c, scsiiom.c and README.tmscsim) from this directory to
70 linux/drivers/scsi. You have to recompile your kernel/module of course.
71
72 You should apply the three patches included in dc390-120-kernel.diff
73 (Applying them: cd /usr/src; patch -p0 <~/dc390-120-kernel.diff)
74 The patches are against 2.1.125, so you might have to manually resolve
75 rejections when applying to another kernel version.
76
77 The patches will update the kernel startup code to allow boot parameters to
78 be passed to the driver, update the Documentation and finally offer you the
79 possibility to omit the non-DC390 parts of the driver.
80 (By selecting "Omit support for non DC390" you basically disable the
81 emulation of a DC390 EEPROM for non DC390 adapters. This saves a few bytes
82 of memory.)
83
84If you got a very old kernel without the tmscsim driver (pre 2.0.31)
85I recommend upgrading your kernel. However, if you don't want to, please
86contact me to get the appropriate patches.
87
88
89Upgrading a SCSI driver is always a delicate thing to do. The 2.0 driver has
90proven stable on many systems, but it's still a good idea to take some
91precautions. In an ideal world you would have a full backup of your disks.
92The world isn't ideal and most people don't have full backups (me neither).
93So take at least the following measures:
94* make your kernel remount the FS read-only on detecting an error:
95  tune2fs -e remount-ro /dev/sd??
96* have copies of your SCSI disk's partition tables on some safe location:
97  dd if=/dev/sda of=/mnt/floppy/sda bs=512 count=1
98  or just print it with:
99  fdisk -l | lpr
100* make sure you are able to boot Linux (e.g. from floppy disk using InitRD)
101  if your SCSI disk gets corrupted. You can use
102  ftp://student.physik.uni-dortmund.de/pub/linux/kernel/bootdisk.gz
103
104One more warning: I used to overclock my PCI bus to 41.67 MHz. My Tekram
105DC390F (Sym53c875) accepted this as well as my Millenium. But the Am53C974
106produced errors and started to corrupt my disks. So don't do that! A 37.50
107MHz PCI bus works for me, though, but I don't recommend using higher clocks
108than the 33.33 MHz being in the PCI spec.
109
110If you want to share the IRQ with another device and the driver refuses to
111do so, you might succeed with changing the DC390_IRQ type in tmscsim.c to
112SA_SHIRQ | SA_INTERRUPT.
113
114
1153.Features
116----------
117- SCSI
118 * Tagged command queueing
119 * Sync speed up to 10 MHz
120 * Disconnection
121 * Multiple LUNs
122
123- General / Linux interface
124 * Support for up to 4 AM53C974 adapters.
125 * DC390 EEPROM usage or boot/module params
126 * Information via cat /proc/scsi/tmscsim/?
127 * Dynamically configurable by writing to /proc/scsi/tmscsim/?
128 * Dynamic allocation of resources
129 * SMP support: Locking on io_request lock (Linux 2.1/2.2) or adapter
130    specific locks (Linux 2.5?)
131 * Uniform source code for Linux-2.x.y
132 * Support for dyn. addition/removal of devices via add/remove-single-device
133   (Try: echo "scsi add-single-device C B T U" >/proc/scsi/scsi
134    C = Controller, B = Bus, T = Target SCSI ID, U = Unit SCSI LUN.)
135    Use with care!
136 * Try to use the partition table for the determination of the mapping
137
138
1394. Configuration via /proc/scsi/tmscsim/?
140-----------------------------------------
141First of all look at the output of /proc/scsi/tmscsim/? by typing
142 cat /proc/scsi/tmscsim/?
143The "?" should be replaced by the SCSI host number. (The shell might do this
144for you.)
145You will see some info regarding the adapter and, at the end, a listing of
146the attached devices and their settings.
147
148Here's an example:
149garloff@kurt:/home/garloff > cat /proc/scsi/tmscsim/0
150Tekram DC390/AM53C974 PCI SCSI Host Adapter, Driver Version 2.0e7 2000-11-28
151SCSI Host Nr 1, AM53C974 Adapter Nr 0
152IOPortBase 0xb000, IRQ 10
153MaxID 8, MaxLUN 8, AdapterID 6, SelTimeout 250 ms, DelayReset 1 s
154TagMaxNum 16, Status 0x00, ACBFlag 0x00, GlitchEater 24 ns
155Statistics: Cmnds 1470165, Cmnds not sent directly 0, Out of SRB conds 0
156            Lost arbitrations 587,  Sel. connected 0, Connected: No
157Nr of attached devices: 4, Nr of DCBs: 4
158Map of attached LUNs: 01 00 00 03 01 00 00 00
159Idx ID LUN Prty Sync DsCn SndS TagQ NegoPeriod SyncSpeed SyncOffs MaxCmd
16000  00  00  Yes  Yes  Yes  Yes  Yes   100 ns    10.0 M      15      16
16101  03  00  Yes  Yes  Yes  Yes  No    100 ns    10.0 M      15      01
16202  03  01  Yes  Yes  Yes  Yes  No    100 ns    10.0 M      15      01
16303  04  00  Yes  Yes  Yes  Yes  No    100 ns    10.0 M      15      01
164
165Note that the settings MaxID and MaxLUN are not zero- but one-based, which
166means that a setting MaxLUN=4, will result in the support of LUNs 0..3. This
167is somehow inconvenient, but the way the mid-level SCSI code expects it to be.
168
169ACB and DCB are acronyms for Adapter Control Block and Device Control Block.
170These are data structures of the driver containing information about the
171adapter and the connected SCSI devices respectively.
172
173Idx is the device index (just a consecutive number for the driver), ID and
174LUN are the SCSI ID and LUN, Prty means Parity checking, Sync synchronous
175negotiation, DsCn Disconnection, SndS Send Start command on startup (not
176used by the driver) and TagQ Tagged Command Queueing. NegoPeriod and
177SyncSpeed are somehow redundant, because they are reciprocal values
178(1 / 112 ns = 8.9 MHz). At least in theory. The driver is able to adjust the
179NegoPeriod more accurate (4ns) than the SyncSpeed (1 / 25ns). I don't know
180if certain devices will have problems with this discrepancy. Max. speed is
18110 MHz corresp. to a min. NegoPeriod of 100 ns.
182(The driver allows slightly higher speeds if the devices (Ultra SCSI) accept
183it, but that's out of adapter spec, on your own risk and unlikely to improve
184performance. You're likely to crash your disks.)
185SyncOffs is the offset used for synchronous negotiations; max. is 15.
186The last values are only shown, if Sync is enabled. (NegoPeriod is still
187displayed in brackets to show the values which will be used after enabling
188Sync.)
189MaxCmd ist the number of commands (=tags) which can be processed at the same
190time by the device.
191
192If you want to change a setting, you can do that by writing to
193/proc/scsi/tmscsim/?. Basically you have to imitate the output of driver.
194(Don't use the brackets for NegoPeriod on Sync disabled devices.)
195You don't have to care about capitalisation. The driver will accept space,
196tab, comma, = and : as separators.
197
198There are three kinds of changes:
199
200(1) Change driver settings:
201    You type the names of the parameters and the params following it.
202    Example:
203     echo "MaxLUN=8 seltimeout 200" >/proc/scsi/tmscsim/0
204
205    Note that you can only change MaxID, MaxLUN, AdapterID, SelTimeOut,
206    TagMaxNum, ACBFlag, GlitchEater and DelayReset. Don't change ACBFlag
207    unless you want to see what happens, if the driver hangs.
208
209(2) Change device settings: You write a config line to the driver. The Nr
210    must match the ID and LUN given. If you give "-" as parameter, it is
211    ignored and the corresponding setting won't be changed.
212    You can use "y" or "n" instead of "Yes" and "No" if you want to.
213    You don't need to specify a full line. The driver automatically performs
214    an INQUIRY on the device if necessary to check if it is capable to operate
215    with the given settings (Sync, TagQ).
216    Examples:
217     echo "0 0 0 y y y - y - 10 " >/proc/scsi/tmscsim/0
218     echo "3 5 0 y n y " >/proc/scsi/tmscsim/0
219
220    To give a short explanation of the first example:
221    The first three numbers, "0 0 0" (Device index 0, SCSI ID 0, SCSI LUN 0),
222    select the device to which the following parameters apply. Note that it
223    would be sufficient to use the index or both SCSI ID and LUN, but I chose
224    to require all three to have a syntax similar to the output.
225    The following "y y y - y" enables Parity checking, enables Synchronous
226    transfers, Disconnection, leaves Send Start (not used) untouched and
227    enables Tagged Command Queueing for the selected device. The "-" skips
228    the Negotiation Period setting but the "10" sets the max sync. speed to
229    10 MHz. It's useless to specify both NegoPeriod and SyncSpeed as
230    discussed above. The values used in this example will result in maximum
231    performance.
232
233(3) Special commands: You can force a SCSI bus reset, an INQUIRY command, the
234    removal or the addition of a device's DCB and a SCSI register dump.
235    This is only used for debugging when you meet problems. The parameter of
236    the INQUIRY and REMOVE commands is the device index as shown by the
237    output of /proc/scsi/tmscsim/? in the device listing in the first column
238    (Idx). ADD takes the SCSI ID and LUN.
239    Examples:
240     echo "reset" >/proc/scsi/tmscsim/0
241     echo "inquiry 1" >/proc/scsi/tmscsim/0
242     echo "remove 2" >/proc/scsi/tmscsim/1
243     echo "add 2 3" >/proc/scsi/tmscsim/?
244     echo "dump" >/proc/scsi/tmscsim/0
245
246    Note that you will meet problems when you REMOVE a device's DCB with the
247    remove command if it contains partitions which are mounted. Only use it
248    after unmounting its partitions, telling the SCSI mid-level code to
249    remove it (scsi remove-single-device) and you really need a few bytes of
250    memory.
251    The ADD command allows you to configure a device before you tell the
252    mid-level code to try detection.
253
254
255I'd suggest reviewing the output of /proc/scsi/tmscsim/? after changing
256settings to see if everything changed as requested.
257
258
2595. Configuration via boot/module parameters
260-------------------------------------------
261With the DC390, the driver reads its EEPROM settings and tries to use them.
262But you may want to override the settings prior to being able to change the
263driver configuration via /proc/scsi/tmscsim/?.
264If you do have another AM53C974 based adapter, that's even the only
265possibility to adjust settings before you are able to write to the
266/proc/scsi/tmscsim/? pseudo-file, e.g. if you want to use another
267adapter ID than 7.
268(BTW, the log message "DC390: No EEPROM found!" is normal without a DC390.)
269For this purpose, you can pass options to the driver before it is initialised
270by using kernel or module parameters. See lilo(8) or modprobe(1) manual
271pages on how to pass params to the kernel or a module.
272[NOTE: Formerly, it was not possible to override the EEPROM supplied
273 settings of the DC390 with cmd line parameters. This has changed since
274 2.0e7]
275
276The syntax of the params is much shorter than the syntax of the /proc/...
277interface. This makes it a little bit more difficult to use. However, long
278parameter lines have the risk to be misinterpreted and the length of kernel
279parameters is limited.
280
281As the support for non-DC390 adapters works by simulating the values of the
282DC390 EEPROM, the settings are given in a DC390 BIOS' way.
283
284Here's the syntax:
285tmscsim=AdaptID,SpdIdx,DevMode,AdaptMode,TaggedCmnds,DelayReset
286
287Each of the parameters is a number, containing the described information:
288
289* AdaptID: The SCSI ID of the host adapter. Must be in the range 0..7
290  Default is 7.
291
292* SpdIdx: The index of the maximum speed as in the DC390 BIOS. The values
293  0..7 mean 10, 8.0, 6.7, 5.7, 5.0, 4.0, 3.1 and 2 MHz resp. Default is
294  0 (10.0 MHz).
295
296* DevMode is a bit mapped value describing the per-device features. It
297  applies to all devices. (Sync, Disc and TagQ will only apply, if the
298  device supports it.) The meaning of the bits (* = default):
299
300   Bit Val(hex) Val(dec)  Meaning
301   *0	 0x01	    1	  Parity check
302   *1	 0x02	    2	  Synchronous Negotiation
303   *2	 0x04	    4	  Disconnection
304   *3	 0x08	    8	  Send Start command on startup. (Not used)
305   *4	 0x10	   16	  Tagged Command Queueing
306
307  As usual, the desired value is obtained by adding the wanted values. If
308  you want to enable all values, e.g., you would use 31(0x1f). Default is 31.
309
310* AdaptMode is a bit mapped value describing the enabled adapter features.
311
312   Bit Val(hex) Val(dec)  Meaning
313   *0	 0x01	    1	  Support more than two drives. (Not used)
314   *1	 0x02	    2	  Use DOS compatible mapping for HDs greater than 1GB.
315   *2	 0x04	    4	  Reset SCSI Bus on startup.
316   *3	 0x08	    8	  Active Negation: Improves SCSI Bus noise immunity.
317    4	 0x10	   16	  Immediate return on BIOS seek command. (Not used)
318 (*)5	 0x20	   32	  Check for LUNs >= 1.
319
320  The default for LUN Check depends on CONFIG_SCSI_MULTI_LUN.
321
322* TaggedCmnds is a number indicating the maximum number of Tagged Commands.
323  It is the binary logarithm - 1 of the actual number. Max is 4 (32).
324   Value  Number of Tagged Commands
325     0		 2
326     1		 4
327     2		 8
328    *3		16
329     4		32
330
331* DelayReset is the time in seconds (minus 0.5s), the adapter waits, after a
332  bus reset. Default is 1 (corresp. to 1.5s).
333
334Example:
335 modprobe tmscsim tmscsim=6,2,31
336would set the adapter ID to 6, max. speed to 6.7 MHz, enable all device
337features and leave the adapter features, the number of Tagged Commands
338and the Delay after a reset to the defaults.
339
340As you can see, you don't need to specify all of the six params.
341If you want values to be ignored (i.e. the EEprom settings or the defaults
342will be used), you may pass -2 (not 0!) at the corresponding position.
343
344The defaults (7,0,31,15,3,1) are aggressive to allow good performance. You
345can use tmscsim=7,0,31,63,4,0 for maximum performance, if your SCSI chain
346allows it. If you meet problems, you can use tmscsim=-1 which is a shortcut
347for tmscsim=7,4,9,15,2,10.
348
349
3506. Potential improvements
351-------------------------
352Most of the intended work on the driver has been done. Here are a few ideas
353to further improve its usability:
354
355* Cleanly separate per-Target and per-LUN properties (DCB)
356* More intelligent abort() routine
357* Use new_eh code (Linux-2.1+)
358* Have the mid-level (ML) code (and not the driver) handle more of the
359  various conditions.
360* Command queueing in the driver: Eliminate Query list and use ML instead.
361* More user friendly boot/module param syntax
362
363Further investigation on these problems:
364
365* Driver hangs with sync readcdda (xcdroast) (most probably VIA PCI error)
366
367Known problems:
368Please see http://www.garloff.de/kurt/linux/dc390/problems.html
369
370* Changing the parameters of multi-lun by the tmscsim/? interface will
371  cause problems, cause these settings are mostly per Target and not per LUN
372  and should be updated accordingly. To be fixed for 2.0d24.
373* CDRs (eg Yam CRW4416) not recognized, because some buggy devices don't
374  recover from a SCSI reset in time. Use a higher delay or don't issue
375  a SCSI bus reset on driver initialization. See problems page.
376  For the CRW4416S, this seems to be solved with firmware 1.0g (reported by
377  Jean-Yves Barbier).
378* TEAC CD-532S not being recognized. (Works with 1.11).
379* Scanners (eg. Astra UMAX 1220S) don't work: Disable Sync Negotiation.
380  If this does not help, try echo "INQUIRY t" >/proc/scsi/tmscsim/? (t
381  replaced by the dev index of your scanner). You may try to reset your SCSI
382  bus afterwards (echo "RESET" >/proc/scsi/tmscsim/?).
383  The problem seems to be solved as of 2.0d18, thanks to Andreas Rick.
384* If there is a valid partition table, the driver will use it for determing
385  the mapping. If there's none, a reasonable mapping (Symbios-like) will be
386  assumed. Other operating systems may not like this mapping, though
387  it's consistent with the BIOS' behaviour. Old DC390 drivers ignored the
388  partition table and used a H/S = 64/32 or 255/63 translation. So if you
389  want to be compatible to those, use this old mapping when creating
390  partition tables. Even worse, on bootup the DC390 might complain if other
391  mappings are found, so auto rebooting may fail.
392* In some situations, the driver will get stuck in an abort loop. This is a
393  bad interaction between the Mid-Layer of Linux' SCSI code and the driver.
394  Try to disable DsCn, if you meet this problem. Please contact me for
395  further debugging.
396
397
3987. Bug reports, debugging and updates
399-------------------------------------
400Whenever you have problems with the driver, you are invited to ask the
401author for help. However, I'd suggest reading the docs and trying to solve
402the problem yourself, first.
403If you find something, which you believe to be a bug, please report it to me.
404Please append the output of /proc/scsi/scsi, /proc/scsi/tmscsim/? and
405maybe the DC390 log messages to the report.
406
407Bug reports should be send to me (Kurt Garloff <dc390@garloff.de>) as well
408as to the linux-scsi list (<linux-scsi@vger.kernel.org>), as sometimes bugs
409are caused by the SCSI mid-level code.
410
411I will ask you for some more details and probably I will also ask you to
412enable some of the DEBUG options in the driver (tmscsim.c:DC390_DEBUGXXX
413defines). The driver will produce some data for the syslog facility then.
414Beware: If your syslog gets written to a SCSI disk connected to your
415AM53C974, the logging might produce log output again, and you might end
416having your box spending most of its time doing the logging.
417
418The latest version of the driver can be found at:
419 http://www.garloff.de/kurt/linux/dc390/
420 ftp://ftp.suse.com/pub/people/garloff/linux/dc390/
421
422
4238. Acknowledgements
424-------------------
425Thanks to Linus Torvalds, Alan Cox, the FSF people, the XFree86 team and
426all the others for the wonderful OS and software.
427Thanks to C.L. Huang and Philip Giang (Tekram) for the initial driver
428release and support.
429Thanks to Doug Ledford, G�rard Roudier for support with SCSI coding.
430Thanks to a lot of people (espec. Chiaki Ishikawa, Andreas Haumer, Hubert
431Tonneau) for intensively testing the driver (and even risking data loss
432doing this during early revisions).
433Recently, SuSE GmbH, Nuernberg, FRG, has been paying me for the driver
434development and maintenance. Special thanks!
435
436
4379. Copyright
438------------
439 This driver is free software; you can redistribute it and/or modify
440 it under the terms of the GNU General Public License as published by
441 the Free Software Foundation; version 2 of the License.
442 If you want to use any later version of the GNU GPL, you will probably
443 be allowed to, but you have to ask me and Tekram <erich@tekram.com.tw>
444 before.
445
446-------------------------------------------------------------------------
447Written by Kurt Garloff <kurt@garloff.de> 1998/06/11
448Last updated 2000/11/28, driver revision 2.0e7
449$Id: README.tmscsim,v 2.25.2.7 2000/12/20 01:07:12 garloff Exp $
450

cpqfc.Readme

1Notes for CPQFCTS driver for Compaq Tachyon TS
2Fibre Channel Host Bus Adapter, PCI 64-bit, 66MHz
3for Linux (RH 6.1, 6.2 kernel 2.2.12-32, 2.2.14-5)
4SMP tested
5Tested in single and dual HBA configuration, 32 and 64bit busses,
633 and 66MHz.  Only supports FC-AL.
7SEST size 512 Exchanges (simultaneous I/Os) limited by module kmalloc()
8	max of 128k bytes contiguous.
9
10Ver 2.1.1  Oct 18, 2001
11   * reinitialize Cmnd->SCp.sent_command (used to identify commands as
12     passthrus) on calling scsi_done, since the scsi mid layer does not
13     use (or reinitialize) this field to prevent subsequent comands from
14     having it set incorrectly.
15
16Ver 2.1.0  Aug 27, 2001
17   * Revise driver to use new kernel 2.4.x PCI DMA API, instead of
18     virt_to_bus().  (enables driver to work w/ ia64 systems with >2Gb RAM.)
19     Rework main scatter-gather code to handle cases where SG element
20     lengths are larger than 0x7FFFF bytes and use as many scatter
21     gather pages as necessary. (Steve Cameron)
22   * Makefile changes to bring cpqfc into line w/ rest of SCSI drivers
23     (thanks to Keith Owens)
24
25Ver 2.1.2  Jul 22, 2002
26   * initialize DumCmnd.lun (used as LUN index in fcFindLoggedInPort())
27
28Ver 2.0.5  Aug 06, 2001
29   * Reject non-existent luns in the driver rather than letting the
30     hardware do it.  (some HW behaves differently than others in this area.)
31   * Changed Makefile to rely on "make dep" instead of explicit dependencies
32   * ifdef'ed out fibre channel analyzer triggering debug code
33   * fixed a jiffies wrapping issue
34
35Ver 2.0.4  Aug 01, 2001
36   * Incorporated fix for target device reset from Steeleye
37   * Fixed passthrough ioctl so it doesn't hang.
38   * Fixed hang in launch_FCworker_thread() that occurred on some machines.
39   * Avoid problem when number of volumes in a single cabinet > 8
40
41Ver 2.0.2  July 23, 2001
42   Changed the semiphore changes so the driver would compile in 2.4.7.
43   This version is for 2.4.7 and beyond.
44
45Ver 2.0.1  May 	7, 2001
46   Merged version 1.3.6 fixes into version 2.0.0.
47
48Ver 2.0.0  May   7, 2001
49  Fixed problem so spinlock is being initialized to UNLOCKED.
50  Fixed updated driver so it compiles in the 2.4 tree.
51
52 Ver 1.3.6  Feb  27, 2001
53   Added Target_Device_Reset function for SCSI error handling
54   Fixed problem with not reseting addressing mode after implicit logout
55
56
57Ver 1.3.4  Sep   7, 2000
58  Added Modinfo information
59  Fixed problem with statically linking the driver
60
61Ver 1.3.3, Aug  23, 2000
62  Fixed device/function number in ioctl
63
64Ver 1.3.2, July 27, 2000
65  Add include for Alpha compile on 2.2.14 kernel (cpq*i2c.c)
66  Change logic for different FCP-RSP sense_buffer location for HSG80 target
67  And search for Agilent Tachyon XL2 HBAs (not finished! - in test)
68
69Tested with
70(storage):
71           Compaq RA-4x000, RAID firmware ver 2.40 - 2.54
72           Seagate FC drives model ST39102FC, rev 0006
73           Hitachi DK31CJ-72FC rev J8A8
74           IBM DDYF-T18350R rev F60K
75           Compaq FC-SCSI bridge w/ DLT 35/70 Gb DLT (tape)
76(servers):
77           Compaq PL-1850R
78           Compaq PL-6500 Xeon (400MHz)
79	   Compaq PL-8500 (500MHz, 66MHz, 64bit PCI)
80           Compaq Alpha DS20 (RH 6.1)
81(hubs):
82           Vixel Rapport 1000 (7-port "dumb")
83	   Gadzoox Gibralter (12-port "dumb")
84	   Gadzoox Capellix 2000, 3000
85(switches):
86           Brocade 2010, 2400, 2800, rev 2.0.3a (& later)
87           Gadzoox 3210 (Fabric blade beta)
88           Vixel 7100 (Fabric beta firmare - known hot plug issues)
89using "qa_test" (esp. io_test script) suite modified from Unix tests.
90
91Installation:
92copy file cpqfcTS.patch to /usr/src/linux
93patch -p1 < cpqfcTS.patch
94make menuconfig
95  (select SCSI low-level, Compaq FC HBA)
96make dep
97make modules
98make modules_install
99
100e.g. insmod -f cpqfc
101
102Due to Fabric/switch delays, driver requires 4 seconds
103to initialize.  If adapters are found, there will be a entries at
104/proc/scsi/cpqfcTS/*
105
106sample contents of startup messages
107
108*************************
109 scsi_register allocating 3596 bytes for CPQFCHBA
110 ioremap'd Membase: c887e600
111  HBA Tachyon RevId 1.2
112Allocating 119808 for 576 Exchanges @ c0dc0000
113Allocating 112904 for LinkQ @ c0c20000 (576 elements)
114Allocating 110600 for TachSEST for 512 Exchanges
115  cpqfcTS: writing IMQ BASE 7C0000h    PI 7C4000h
116  cpqfcTS: SEST c0e40000(virt): Wrote base E40000h @ c887e740
117cpqfcTS: New FC port 0000E8h WWN: 500507650642499D SCSI Chan/Trgt 0/0
118cpqfcTS: New FC port 0000EFh WWN: 50000E100000D5A6 SCSI Chan/Trgt 0/1
119cpqfcTS: New FC port 0000E4h WWN: 21000020370097BB SCSI Chan/Trgt 0/2
120cpqfcTS: New FC port 0000E2h WWN: 2100002037009946 SCSI Chan/Trgt 0/3
121cpqfcTS: New FC port 0000E1h WWN: 21000020370098FE SCSI Chan/Trgt 0/4
122cpqfcTS: New FC port 0000E0h WWN: 21000020370097B2 SCSI Chan/Trgt 0/5
123cpqfcTS: New FC port 0000DCh WWN: 2100002037006CC1 SCSI Chan/Trgt 0/6
124cpqfcTS: New FC port 0000DAh WWN: 21000020370059F6 SCSI Chan/Trgt 0/7
125cpqfcTS: New FC port 00000Fh WWN: 500805F1FADB0E20 SCSI Chan/Trgt 0/8
126cpqfcTS: New FC port 000008h WWN: 500805F1FADB0EBA SCSI Chan/Trgt 0/9
127cpqfcTS: New FC port 000004h WWN: 500805F1FADB1EB9 SCSI Chan/Trgt 0/10
128cpqfcTS: New FC port 000002h WWN: 500805F1FADB1ADE SCSI Chan/Trgt 0/11
129cpqfcTS: New FC port 000001h WWN: 500805F1FADBA2CA SCSI Chan/Trgt 0/12
130scsi4 : Compaq FibreChannel HBA Tachyon TS HPFC-5166A/1.2: WWN 500508B200193F50
131 on PCI bus 0 device 0xa0fc irq 5 IObaseL 0x3400, MEMBASE 0xc6ef8600
132PCI bus width 32 bits, bus speed 33 MHz
133FCP-SCSI Driver v1.3.0
134GBIC detected: Short-wave.  LPSM 0h Monitor
135scsi : 5 hosts.
136  Vendor: IBM       Model: DDYF-T18350R      Rev: F60K
137  Type:   Direct-Access                      ANSI SCSI revision: 03
138Detected scsi disk sdb at scsi4, channel 0, id 0, lun 0
139  Vendor: HITACHI   Model: DK31CJ-72FC       Rev: J8A8
140  Type:   Direct-Access                      ANSI SCSI revision: 02
141Detected scsi disk sdc at scsi4, channel 0, id 1, lun 0
142  Vendor: SEAGATE   Model: ST39102FC         Rev: 0006
143  Type:   Direct-Access                      ANSI SCSI revision: 02
144Detected scsi disk sdd at scsi4, channel 0, id 2, lun 0
145  Vendor: SEAGATE   Model: ST39102FC         Rev: 0006
146  Type:   Direct-Access                      ANSI SCSI revision: 02
147Detected scsi disk sde at scsi4, channel 0, id 3, lun 0
148  Vendor: SEAGATE   Model: ST39102FC         Rev: 0006
149  Type:   Direct-Access                      ANSI SCSI revision: 02
150Detected scsi disk sdf at scsi4, channel 0, id 4, lun 0
151  Vendor: SEAGATE   Model: ST39102FC         Rev: 0006
152  Type:   Direct-Access                      ANSI SCSI revision: 02
153Detected scsi disk sdg at scsi4, channel 0, id 5, lun 0
154  Vendor: SEAGATE   Model: ST39102FC         Rev: 0006
155  Type:   Direct-Access                      ANSI SCSI revision: 02
156Detected scsi disk sdh at scsi4, channel 0, id 6, lun 0
157  Vendor: SEAGATE   Model: ST39102FC         Rev: 0006
158  Type:   Direct-Access                      ANSI SCSI revision: 02
159Detected scsi disk sdi at scsi4, channel 0, id 7, lun 0
160  Vendor: COMPAQ    Model: LOGICAL VOLUME    Rev: 2.48
161  Type:   Direct-Access                      ANSI SCSI revision: 02
162Detected scsi disk sdj at scsi4, channel 0, id 8, lun 0
163  Vendor: COMPAQ    Model: LOGICAL VOLUME    Rev: 2.48
164  Type:   Direct-Access                      ANSI SCSI revision: 02
165Detected scsi disk sdk at scsi4, channel 0, id 8, lun 1
166  Vendor: COMPAQ    Model: LOGICAL VOLUME    Rev: 2.40
167  Type:   Direct-Access                      ANSI SCSI revision: 02
168Detected scsi disk sdl at scsi4, channel 0, id 9, lun 0
169  Vendor: COMPAQ    Model: LOGICAL VOLUME    Rev: 2.40
170  Type:   Direct-Access                      ANSI SCSI revision: 02
171Detected scsi disk sdm at scsi4, channel 0, id 9, lun 1
172  Vendor: COMPAQ    Model: LOGICAL VOLUME    Rev: 2.54
173  Type:   Direct-Access                      ANSI SCSI revision: 02
174Detected scsi disk sdn at scsi4, channel 0, id 10, lun 0
175  Vendor: COMPAQ    Model: LOGICAL VOLUME    Rev: 2.54
176  Type:   Direct-Access                      ANSI SCSI revision: 02
177Detected scsi disk sdo at scsi4, channel 0, id 11, lun 0
178  Vendor: COMPAQ    Model: LOGICAL VOLUME    Rev: 2.54
179  Type:   Direct-Access                      ANSI SCSI revision: 02
180Detected scsi disk sdp at scsi4, channel 0, id 11, lun 1
181  Vendor: COMPAQ    Model: LOGICAL VOLUME    Rev: 2.54
182  Type:   Direct-Access                      ANSI SCSI revision: 02
183Detected scsi disk sdq at scsi4, channel 0, id 12, lun 0
184  Vendor: COMPAQ    Model: LOGICAL VOLUME    Rev: 2.54
185  Type:   Direct-Access                      ANSI SCSI revision: 02
186Detected scsi disk sdr at scsi4, channel 0, id 12, lun 1
187resize_dma_pool: unknown device type 12
188resize_dma_pool: unknown device type 12
189SCSI device sdb: hdwr sector= 512 bytes. Sectors= 35843670 [17501 MB] [17.5 GB]
190 sdb: sdb1
191SCSI device sdc: hdwr sector= 512 bytes. Sectors= 144410880 [70513 MB] [70.5 GB]
192 sdc: sdc1
193SCSI device sdd: hdwr sector= 512 bytes. Sectors= 17783240 [8683 MB] [8.7 GB]
194 sdd: sdd1
195SCSI device sde: hdwr sector= 512 bytes. Sectors= 17783240 [8683 MB] [8.7 GB]
196 sde: sde1
197SCSI device sdf: hdwr sector= 512 bytes. Sectors= 17783240 [8683 MB] [8.7 GB]
198 sdf: sdf1
199SCSI device sdg: hdwr sector= 512 bytes. Sectors= 17783240 [8683 MB] [8.7 GB]
200 sdg: sdg1
201SCSI device sdh: hdwr sector= 512 bytes. Sectors= 17783240 [8683 MB] [8.7 GB]
202 sdh: sdh1
203SCSI device sdi: hdwr sector= 512 bytes. Sectors= 17783240 [8683 MB] [8.7 GB]
204 sdi: sdi1
205SCSI device sdj: hdwr sector= 512 bytes. Sectors= 2056160 [1003 MB] [1.0 GB]
206 sdj: sdj1
207SCSI device sdk: hdwr sector= 512 bytes. Sectors= 2052736 [1002 MB] [1.0 GB]
208 sdk: sdk1
209SCSI device sdl: hdwr sector= 512 bytes. Sectors= 17764320 [8673 MB] [8.7 GB]
210 sdl: sdl1
211SCSI device sdm: hdwr sector= 512 bytes. Sectors= 8380320 [4091 MB] [4.1 GB]
212 sdm: sdm1
213SCSI device sdn: hdwr sector= 512 bytes. Sectors= 17764320 [8673 MB] [8.7 GB]
214 sdn: sdn1
215SCSI device sdo: hdwr sector= 512 bytes. Sectors= 17764320 [8673 MB] [8.7 GB]
216 sdo: sdo1
217SCSI device sdp: hdwr sector= 512 bytes. Sectors= 17764320 [8673 MB] [8.7 GB]
218 sdp: sdp1
219SCSI device sdq: hdwr sector= 512 bytes. Sectors= 2056160 [1003 MB] [1.0 GB]
220 sdq: sdq1
221SCSI device sdr: hdwr sector= 512 bytes. Sectors= 2052736 [1002 MB] [1.0 GB]
222 sdr: sdr1
223
224*************************
225
226If a GBIC of type Short-wave, Long-wave, or Copper is detected, it will
227print out; otherwise, "none" is displayed.  If the cabling is correct
228and a loop circuit is completed, you should see "Monitor"; otherwise,
229"LoopFail" (on open circuit) or some LPSM number/state with bit 3 set.
230
231
232ERRATA:
2331. Normally, Linux Scsi queries FC devices with INQUIRY strings.  All LUNs
234found according to INQUIRY should get READ commands at sector 0 to find
235partition table, etc.  Older kernels only query the first 4 devices.  Some
236Linux kernels only look for one LUN per target (i.e. FC device).
237
2382. Physically removing a device, or a malfunctioning system which hides a
239device, leads to a 30-second timeout and subsequent _abort call.
240In some process contexts, this will hang the kernel (crashing the system).
241Single bit errors in frames and virtually all hot plugging events are
242gracefully handled with internal driver timer and Abort processing.
243
2443. Some SCSI drives with error conditions will not handle the 7 second timeout
245in this software driver, leading to infinite retries on timed out SCSI commands.
246The 7 secs balances the need to quickly recover from lost frames (esp. on sequence
247initiatives) and time needed by older/slower/error-state drives in responding.
248This can be easily changed in "Exchanges[].timeOut".
249
2504. Due to the nature of FC soft addressing, there is no assurance that the
251same LUNs (drives) will have the same path (e.g. /dev/sdb1) from one boot to
252next.  Dynamic soft address changes (i.e. 24-bit FC port_id) are
253supported during run time (e.g. due to hot plug event) by the use of WWN to
254SCSI Nexus (channel/target/LUN) mapping.
255
2565. Compaq RA4x00 firmware version 2.54 and later supports SSP (Selective
257Storage Presentation), which maps LUNs to a WWN.  If RA4x00 firmware prior
2582.54 (e.g. older controller) is used, or the FC HBA is replaced (another WWN
259is used), logical volumes on the RA4x00 will no longer be visible.
260
261
262Send questions/comments to:
263Amy Vanzant-Hodge (fibrechannel@compaq.com)
264
265