aha152x.rst 6.8 KB

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