Back to home page

OSCL-LXR

 
 

    


0001 .. SPDX-License-Identifier: GPL-2.0
0002 .. include:: <isonum.txt>
0003 
0004 =====================================================
0005 Adaptec AHA-1520/1522 SCSI driver for Linux (aha152x)
0006 =====================================================
0007 
0008 Copyright |copy| 1993-1999 Jürgen Fischer <fischer@norbit.de>
0009 
0010 TC1550 patches by Luuk van Dijk (ldz@xs4all.nl)
0011 
0012 
0013 In Revision 2 the driver was modified a lot (especially the
0014 bottom-half handler complete()).
0015 
0016 The driver is much cleaner now, has support for the new
0017 error handling code in 2.3, produced less cpu load (much
0018 less polling loops), has slightly higher throughput (at
0019 least on my ancient test box; a i486/33Mhz/20MB).
0020 
0021 
0022 Configuration Arguments
0023 =======================
0024 
0025 ============  ========================================  ======================
0026 IOPORT        base io address                           (0x340/0x140)
0027 IRQ           interrupt level                           (9-12; default 11)
0028 SCSI_ID       scsi id of controller                     (0-7; default 7)
0029 RECONNECT     allow targets to disconnect from the bus  (0/1; default 1 [on])
0030 PARITY        enable parity checking                    (0/1; default 1 [on])
0031 SYNCHRONOUS   enable synchronous transfers              (0/1; default 1 [on])
0032 DELAY:        bus reset delay                           (default 100)
0033 EXT_TRANS:    enable extended translation               (0/1: default 0 [off])
0034               (see NOTES)
0035 ============  ========================================  ======================
0036 
0037 Compile Time Configuration
0038 ==========================
0039 
0040 (go into AHA152X in drivers/scsi/Makefile):
0041 
0042 - DAUTOCONF
0043     use configuration the controller reports (AHA-152x only)
0044 
0045 - DSKIP_BIOSTEST
0046     Don't test for BIOS signature (AHA-1510 or disabled BIOS)
0047 
0048 - DSETUP0="{ IOPORT, IRQ, SCSI_ID, RECONNECT, PARITY, SYNCHRONOUS, DELAY, EXT_TRANS }"
0049     override for the first controller
0050 
0051 - DSETUP1="{ IOPORT, IRQ, SCSI_ID, RECONNECT, PARITY, SYNCHRONOUS, DELAY, EXT_TRANS }"
0052     override for the second controller
0053 
0054 - DAHA152X_DEBUG
0055     enable debugging output
0056 
0057 - DAHA152X_STAT
0058     enable some statistics
0059 
0060 
0061 LILO Command Line Options
0062 =========================
0063 
0064  ::
0065 
0066     aha152x=<IOPORT>[,<IRQ>[,<SCSI-ID>[,<RECONNECT>[,<PARITY>[,<SYNCHRONOUS>[,<DELAY> [,<EXT_TRANS]]]]]]]
0067 
0068  The normal configuration can be overridden by specifying a command line.
0069  When you do this, the BIOS test is skipped. Entered values have to be
0070  valid (known).  Don't use values that aren't supported under normal
0071  operation.  If you think that you need other values: contact me.
0072  For two controllers use the aha152x statement twice.
0073 
0074 
0075 Symbols for Module Configuration
0076 ================================
0077 
0078 Choose from 2 alternatives:
0079 
0080 1. specify everything (old)::
0081 
0082     aha152x=IOPORT,IRQ,SCSI_ID,RECONNECT,PARITY,SYNCHRONOUS,DELAY,EXT_TRANS
0083 
0084   configuration override for first controller
0085 
0086   ::
0087 
0088     aha152x1=IOPORT,IRQ,SCSI_ID,RECONNECT,PARITY,SYNCHRONOUS,DELAY,EXT_TRANS
0089 
0090   configuration override for second controller
0091 
0092 2. specify only what you need to (irq or io is required; new)
0093 
0094 io=IOPORT0[,IOPORT1]
0095   IOPORT for first and second controller
0096 
0097 irq=IRQ0[,IRQ1]
0098   IRQ for first and second controller
0099 
0100 scsiid=SCSIID0[,SCSIID1]
0101   SCSIID for first and second controller
0102 
0103 reconnect=RECONNECT0[,RECONNECT1]
0104   allow targets to disconnect for first and second controller
0105 
0106 parity=PAR0[PAR1]
0107   use parity for first and second controller
0108 
0109 sync=SYNCHRONOUS0[,SYNCHRONOUS1]
0110   enable synchronous transfers for first and second controller
0111 
0112 delay=DELAY0[,DELAY1]
0113   reset DELAY for first and second controller
0114 
0115 exttrans=EXTTRANS0[,EXTTRANS1]
0116   enable extended translation for first and second controller
0117 
0118 
0119 If you use both alternatives the first will be taken.
0120 
0121 
0122 Notes on EXT_TRANS
0123 ==================
0124 
0125 SCSI uses block numbers to address blocks/sectors on a device.
0126 The BIOS uses a cylinder/head/sector addressing scheme (C/H/S)
0127 scheme instead.  DOS expects a BIOS or driver that understands this
0128 C/H/S addressing.
0129 
0130 The number of cylinders/heads/sectors is called geometry and is required
0131 as base for requests in C/H/S addressing.  SCSI only knows about the
0132 total capacity of disks in blocks (sectors).
0133 
0134 Therefore the SCSI BIOS/DOS driver has to calculate a logical/virtual
0135 geometry just to be able to support that addressing scheme.  The geometry
0136 returned by the SCSI BIOS is a pure calculation and has nothing to
0137 do with the real/physical geometry of the disk (which is usually
0138 irrelevant anyway).
0139 
0140 Basically this has no impact at all on Linux, because it also uses block
0141 instead of C/H/S addressing.  Unfortunately C/H/S addressing is also used
0142 in the partition table and therefore every operating system has to know
0143 the right geometry to be able to interpret it.
0144 
0145 Moreover there are certain limitations to the C/H/S addressing scheme,
0146 namely the address space is limited to up to 255 heads, up to 63 sectors
0147 and a maximum of 1023 cylinders.
0148 
0149 The AHA-1522 BIOS calculates the geometry by fixing the number of heads
0150 to 64, the number of sectors to 32 and by calculating the number of
0151 cylinders by dividing the capacity reported by the disk by 64*32 (1 MB).
0152 This is considered to be the default translation.
0153 
0154 With respect to the limit of 1023 cylinders using C/H/S you can only
0155 address the first GB of your disk in the partition table.  Therefore
0156 BIOSes of some newer controllers based on the AIC-6260/6360 support
0157 extended translation.  This means that the BIOS uses 255 for heads,
0158 63 for sectors and then divides the capacity of the disk by 255*63
0159 (about 8 MB), as soon it sees a disk greater than 1 GB.  That results
0160 in a maximum of about 8 GB addressable diskspace in the partition table
0161 (but there are already bigger disks out there today).
0162 
0163 To make it even more complicated the translation mode might/might
0164 not be configurable in certain BIOS setups.
0165 
0166 This driver does some more or less failsafe guessing to get the
0167 geometry right in most cases:
0168 
0169 - for disks<1GB: use default translation (C/32/64)
0170 
0171 - for disks>1GB:
0172 
0173   - take current geometry from the partition table
0174     (using scsicam_bios_param and accept only 'valid' geometries,
0175     ie. either (C/32/64) or (C/63/255)).  This can be extended translation
0176     even if it's not enabled in the driver.
0177 
0178   - if that fails, take extended translation if enabled by override,
0179     kernel or module parameter, otherwise take default translation and
0180     ask the user for verification.  This might on not yet partitioned
0181     disks.
0182 
0183 
0184 References Used
0185 ===============
0186 
0187  "AIC-6260 SCSI Chip Specification", Adaptec Corporation.
0188 
0189  "SCSI COMPUTER SYSTEM INTERFACE - 2 (SCSI-2)", X3T9.2/86-109 rev. 10h
0190 
0191  "Writing a SCSI device driver for Linux", Rik Faith (faith@cs.unc.edu)
0192 
0193  "Kernel Hacker's Guide", Michael K. Johnson (johnsonm@sunsite.unc.edu)
0194 
0195  "Adaptec 1520/1522 User's Guide", Adaptec Corporation.
0196 
0197  Michael K. Johnson (johnsonm@sunsite.unc.edu)
0198 
0199  Drew Eckhardt (drew@cs.colorado.edu)
0200 
0201  Eric Youngdale (eric@andante.org)
0202 
0203  special thanks to Eric Youngdale for the free(!) supplying the
0204  documentation on the chip.