aha152x.txt 6.4 KB

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