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