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 up to 255 heads, up to 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