README.aic7xxx
上传用户:jlfgdled
上传日期:2013-04-10
资源大小:33168k
文件大小:23k
源码类别:

Linux/Unix编程

开发平台:

Unix_Linux

  1.     AIC7xxx Driver for Linux
  2. Introduction
  3. ----------------------------
  4. The AIC7xxx SCSI driver adds support for Adaptec (http://www.adaptec.com)
  5. SCSI controllers and chipsets. Major portions of the driver and driver
  6. development are shared between both Linux and FreeBSD. Support for the
  7. AIC-7xxx chipsets have been in the default Linux kernel since approximately
  8. linux-1.1.x and fairly stable since linux-1.2.x, and are also in FreeBSD
  9. 2.1.0 or later.
  10.   Supported cards/chipsets
  11.   ----------------------------
  12.     Adaptec Cards
  13.     ----------------------------
  14.     AHA-274x
  15.     AHA-274xT
  16.     AHA-274xW
  17.     AHA-284x
  18.     AHA-284xW
  19.     All PCI based cards using any of the chipsets listed under motherboard
  20.     chipsets.  In general, this means *all* of the Adaptec SCSI controllers
  21.     except the ones specifically excluded later on in this document.
  22.     Motherboard Chipsets
  23.     ----------------------------
  24.     AIC-777x
  25.     AIC-785x
  26.     AIC-786x
  27.     AIC-787x
  28.     AIC-788x
  29.     AIC-789x
  30.     AIC-3860
  31.     Bus Types
  32.     ----------------------------
  33.     W - Wide SCSI, SCSI-3, 16bit bus, 68pin connector, will also support
  34.         SCSI-1/SCSI-2 50pin devices, transfer rates up to 20MB/s.
  35.     U - Ultra SCSI, transfer rates up to 40MB/s.
  36.     U2- Ultra 2 SCSI, transfer rates up to 80MB/s.
  37.     U3- Ultra 3 SCSI, transfer rates up to 160MB/s.
  38.     D - Differential SCSI.
  39.     T - Twin Channel SCSI. Up to 14 SCSI devices.
  40.     AHA-274x - EISA SCSI controller
  41.     AHA-284x - VLB SCSI controller
  42.     AHA-29xx - PCI SCSI controller
  43.     AHA-39xx - PCI controllers with multiple separate SCSI channels on-board.
  44.   Not Supported Devices
  45.   ------------------------------
  46.     Adaptec Cards
  47.     ----------------------------
  48.     AHA-2920 (Only the cards that use the Future Domain chipset are not
  49.               supported, any 2920 cards based on Adaptec AIC chipsets,
  50.       such as the 2920C, are supported)
  51.     AAA-13x Raid Adapters
  52.     AAA-113x Raid Port Card
  53.     Motherboard Chipsets
  54.     ----------------------------
  55.     AIC-781x
  56.     Bus Types
  57.     ----------------------------
  58.     R - Raid Port busses are not supported.
  59.     The hardware RAID devices sold by Adaptec are *NOT* supported by this
  60.     driver (and will people please stop emailing me about them, they are
  61.     a totally separate beast from the bare SCSI controllers and this driver
  62.     can not be retrofitted in any sane manner to support the hardware RAID
  63.     features on those cards - Doug Ledford).
  64.     
  65.   People
  66.   ------------------------------
  67.     Justin T Gibbs  gibbs@plutotech.com
  68.       (BSD Driver Author)
  69.     Dan Eischen     deischen@iworks.InterWorks.org
  70.       (Original Linux Driver Co-maintainer)
  71.     Dean Gehnert    deang@teleport.com
  72.       (Original Linux FTP/patch maintainer)
  73.     Jess Johnson    jester@frenzy.com
  74.       (AIC7xxx FAQ author)
  75.     Doug Ledford    dledford@redhat.com
  76.       (Current Linux aic7xxx-5.x.x Driver/Patch/FTP maintainer)
  77.     
  78.     Special thanks go to John Aycock (aycock@cpsc.ucalgary.ca), the original
  79.     author of the driver. John has since retired from the project. Thanks
  80.     again for all his work!
  81.     
  82.   Mailing list
  83.   ------------------------------
  84.     There is a mailing list available for users who want to track development
  85.     and converse with other users and developers. This list is for both
  86.     FreeBSD and Linux support of the AIC7xxx chipsets.
  87.     To subscribe to the AIC7xxx mailing list send mail to the list server,
  88.     with "subscribe AIC7xxx" in the body (no Subject: required):
  89.         To: majordomo@FreeBSD.ORG
  90.         ---
  91.         subscribe AIC7xxx
  92.     To unsubscribe from the list, send mail to the list server with:
  93.         To: majordomo@FreeBSD.ORG
  94.         ---
  95.         unsubscribe AIC7xxx
  96.     Send regular messages and replies to: AIC7xxx@FreeBSD.ORG
  97.     
  98.   Boot Command line options
  99.   ------------------------------
  100.     "aic7xxx=no_reset" -  Eliminate the SCSI bus reset during startup.
  101.         Some SCSI devices need the initial reset that this option disables
  102. in order to work.  If you have problems at bootup, please make sure
  103. you aren't using this option.
  104.     "aic7xxx=reverse_scan" - Certain PCI motherboards scan for devices at
  105.         bootup by scanning from the highest numbered PCI device to the
  106. lowest numbered PCI device, others do just the opposite and scan
  107. from lowest to highest numbered PCI device.  There is no reliable
  108. way to autodetect this ordering.  So, we default to the most common
  109. order, which is lowest to highest.  Then, in case your motherboard
  110. scans from highest to lowest, we have this option.  If your BIOS
  111. finds the drives on controller A before controller B but the linux
  112. kernel finds your drives on controller B before A, then you should
  113. use this option.
  114.     "aic7xxx=extended" - Force the driver to detect extended drive translation
  115.         on your controller.  This helps those people who have cards without
  116.         a SEEPROM make sure that linux and all other operating systems think
  117.         the same way about your hard drives.
  118.     "aic7xxx=scbram" - Some cards have external SCB RAM that can be used to
  119.         give the card more hardware SCB slots.  This allows the driver to use
  120. that SCB RAM.  Without this option, the driver won't touch the SCB
  121. RAM because it is known to cause problems on a few cards out there
  122. (such as 3985 class cards).
  123.     "aic7xxx=irq_trigger:x" - Replace x with either 0 or 1 to force the kernel
  124.         to use the correct IRQ type for your card.  This only applies to EISA
  125.         based controllers.  On these controllers, 0 is for Edge triggered
  126.         interrupts, and 1 is for Level triggered interrupts.  If you aren't
  127.         sure or don't know which IRQ trigger type your EISA card uses, then
  128.         let the kernel autodetect the trigger type.
  129.     "aic7xxx=verbose" - This option can be used in one of two ways.  If you
  130.         simply specify aic7xxx=verbose, then the kernel will automatically
  131. pick the default set of verbose messages for you to see.
  132. Alternatively, you can specify the command as 
  133. "aic7xxx=verbose:0xXXXX" where the X entries are replaced with
  134. hexadecimal digits.  This option is a bit field type option.  For
  135. a full listing of the available options, search for the 
  136. #define VERBOSE_xxxxxx lines in the aic7xxx.c file.  If you want
  137. verbose messages, then it is recommended that you simply use the
  138. aic7xxx=verbose variant of this command.
  139.     "aic7xxx=pci_parity:x" - This option controls whether or not the driver
  140.         enables PCI parity error checking on the PCI bus.  By default, this
  141.         checking is disabled.  To enable the checks, simply specify pci_parity
  142.         with no value afterwords.  To reverse the parity from even to odd,
  143.         supply any number other than 0 or 255.  In short:
  144.           pci_parity     - Even parity checking (even is the normal PCI parity)
  145.           pci_parity:x   - Where x > 0, Odd parity checking
  146.           pci_parity:0   - No check (default)
  147.         NOTE: In order to get Even PCI parity checking, you must use the
  148.         version of the option that does not include the : and a number at
  149.         the end (unless you want to enter exactly 2^32 - 1 as the number).
  150.     "aic7xxx=no_probe" - This option will disable the probing for any VLB
  151.         based 2842 controllers and any EISA based controllers.  This is
  152. needed on certain newer motherboards where the normal EISA I/O ranges
  153. have been claimed by other PCI devices.  Probing on those machines
  154. will often result in the machine crashing or spontaneously rebooting
  155. during startup.  Examples of machines that need this are the
  156. Dell PowerEdge 6300 machines.
  157.     "aic7xxx=seltime:2" - This option controls how long the card waits
  158.         during a device selection sequence for the device to respond.
  159. The original SCSI spec says that this "should be" 256ms.  This
  160. is generally not required with modern devices.  However, some
  161. very old SCSI I devices need the full 256ms.  Most modern devices
  162. can run fine with only 64ms.  The default for this option is
  163. 64ms.  If you need to change this option, then use the following
  164. table to set the proper value in the example above:
  165.   0  -  256ms
  166.   1  -  128ms
  167.   2  -   64ms
  168.   3  -   32ms
  169.     "aic7xxx=panic_on_abort" - This option is for debugging and will cause
  170.         the driver to panic the linux kernel and freeze the system the first
  171. time the drivers abort or reset routines are called.  This is most
  172. helpful when some problem causes infinite reset loops that scroll too
  173. fast to see.  By using this option, you can write down what the errors
  174. actually are and send that information to me so it can be fixed.
  175.     "aic7xxx=dump_card" - This option will print out the *entire* set of
  176.         configuration registers on the card during the init sequence.  This
  177. is a debugging aid used to see exactly what state the card is in
  178. when we finally finish our initialization routines.  If you don't
  179. have documentation on the chipsets, this will do you absolutely
  180. no good unless you are simply trying to write all the information
  181. down in order to send it to me.
  182.     "aic7xxx=dump_sequencer" - This is the same as the above options except
  183.         that instead of dumping the register contents on the card, this
  184. option dumps the contents of the sequencer program RAM.  This gives
  185. the ability to verify that the instructions downloaded to the
  186. card's sequencer are indeed what they are suppossed to be.  Again,
  187. unless you have documentation to tell you how to interpret these
  188. numbers, then it is totally useless.
  189.     "aic7xxx=override_term:0xffffffff" - This option is used to force the
  190.      termination on your SCSI controllers to a particular setting.  This
  191. is a bit mask variable that applies for up to 8 aic7xxx SCSI channels.
  192. Each channel gets 4 bits, divided as follows:
  193. bit   3   2   1   0
  194.       |   |   |   Enable/Disable Single Ended Low Byte Termination
  195.       |   |   En/Disable Single Ended High Byte Termination
  196.       |   En/Disable Low Byte LVD Termination
  197.       En/Disable High Byte LVD Termination
  198. The upper 2 bits that deal with LVD termination only apply to Ultra2
  199. controllers.  Futhermore, due to the current Ultra2 controller
  200. designs, these bits are tied together such that setting either bit
  201. enables both low and high byte LVD termination.  It is not possible
  202. to only set high or low byte LVD termination in this manner.  This is
  203. an artifact of the BIOS definition on Ultra2 controllers.  For other
  204. controllers, the only important bits are the two lowest bits.  Setting
  205. the higher bits on non-Ultra2 controllers has no effect.  A few
  206. examples of how to use this option:
  207. Enable low and high byte termination on a non-ultra2 controller that
  208. is the first aic7xxx controller (the correct bits are 0011), 
  209. aic7xxx=override_term:0x3
  210. Enable all termination on the third aic7xxx controller, high byte
  211. termination on the second aic7xxx controller, and low and high byte
  212. SE termination on the first aic7xxx controller 
  213. (bits are 1111 0010 0011), 
  214. aic7xxx=override_term:0xf23
  215. No attempt has been made to make this option non-cryptic.  It really
  216. shouldn't be used except in dire circumstances, and if that happens,
  217. I'm probably going to be telling you what to set this to anyway :)
  218.     "aic7xxx=stpwlev:0xffffffff" - This option is used to control the STPWLEV
  219.         bit in the DEVCONFIG PCI register.  Currently, this is one of the
  220. very few registers that we have absolutely *no* way of detecting
  221. what the variable should be.  It depends entirely on how the chipset
  222. and external terminators were coupled by the card/motherboard maker.
  223. Further, a chip reset (at power up) always sets this bit to 0.  If
  224. there is no BIOS to run on the chipset/card (such as with a 2910C
  225. or a motherboard controller with the BIOS totally disabled) then
  226. the variable may not get set properly.  Of course, if the proper
  227. setting was 0, then that's what it would be after the reset, but if
  228. the proper setting is actually 1.....you get the picture.  Now, since
  229. we can't detect this at all, I've added this option to force the
  230. setting.  If you have a BIOS on your controller then you should never
  231. need to use this option.  However, if you are having lots of SCSI
  232. reset problems and can't seem to get them knocked out, this may help.
  233. Here's a test to know for certain if you need this option.  Make
  234. a boot floppy that you can use to boot your computer up and that
  235. will detect the aic7xxx controller.  Next, power down your computer.
  236. While it's down, unplug all SCSI cables from your Adaptec SCSI
  237. controller.  Boot the system back up to the Adaptec EZ-SCSI BIOS
  238. and then make sure that termination is enabled on your adapter (if
  239. you have an Adaptec BIOS of course).  Next, boot up the floppy you
  240. made and wait for it to detect the aic7xxx controller.  If the kernel
  241. finds the controller fine, says scsi : x hosts and then tries to
  242. detect your devices like normal, up to the point where it fails to
  243. mount your root file system and panics, then you're fine.  If, on
  244. the other hand, the system goes into an infinite reset loop, then
  245. you need to use this option and/or the previous option to force the
  246. proper termination settings on your controller.   If this happens,
  247. then you next need to figure out what your settings should be.
  248. To find the correct settings, power your machine back down, connect
  249. back up the SCSI cables, and boot back into your machine like normal.
  250. However, boot with the aic7xxx=verbose:0x39 option.  Record the
  251. initial DEVCONFIG values for each of your aic7xxx controllers as
  252. they are listed, and also record what the machine is detecting as
  253. the proper termination on your controllers.  NOTE: the order in
  254. which the initial DEVCONFIG values are printed out is not gauranteed
  255. to be the same order as the SCSI controllers are registered.  The
  256. above option and this option both work on the order of the SCSI
  257. controllers as they are registered, so make sure you match the right
  258. DEVCONFIG values with the right controllers if you have more than
  259. one aic7xxx controller.
  260. Once you have the detected termination settings and the initial
  261. DEVCONFIG values for each controller, then figure out what the
  262. termination on each of the controllers *should* be.  Hopefully, that
  263. part is correct, but it could possibly be wrong if there is
  264. bogus cable detection logic on your controller or something similar.
  265. If all the controllers have the correct termination settings, then
  266. don't set the aic7xxx=override_term variable at all, leave it alone.
  267. Next, on any controllers that go into an infinite reset loop when
  268. you unplug all the SCSI cables, get the starting DEVCONFIG value.
  269. If the initial DEVCONFIG value is divisible by 2, then the correct
  270. setting for that controller is 0.  If it's an odd number, then
  271. the correct setting for that controller is 1.  For any other
  272. controllers that didn't have an infinite reset problem, then reverse
  273. the above options.  If DEVCONFIG was even, then the correct setting
  274. is 1, if not then the correct setting is 0.
  275. Now that you know what the correct setting was for each controller,
  276. we need to encode that into the aic7xxx=stpwlev:0x... variable.
  277. This variable is a bit field encoded variable.  Bit 0 is for the first
  278. aic7xxx controller, bit 1 for the next, etc.  Put all these bits
  279. together and you get a number.  For example, if the third aic7xxx
  280. needed a 1, but the second and first both needed a 0, then the bits
  281. would be 100 in binary.  This then translates to 0x04.  You would
  282. therefore set aic7xxx=stpwlev:0x04.  This is fairly standard binary
  283. to hexadecimal conversions here.  If you aren't up to speed on the
  284. binary->hex conversion then send an email to the aic7xxx mailing
  285. list and someone can help you out.
  286.     "aic7xxx=tag_info:{{8,8..},{8,8..},..}" - This option is used to disable
  287.         or enable Tagged Command Queueing (TCQ) on specific devices.  As of
  288. driver version 5.1.11, TCQ is now either on or off by default
  289. according to the setting you choose during the make config process.
  290. In order to en/disable TCQ for certian devices at boot time, a user
  291. may use this boot param.  The driver will then parse this message out
  292.         and en/disable the specific device entries that are present based upon
  293.         the value given.  The param line is parsed in the following manner:
  294.           { - first instance indicates the start of this parameter values
  295.               second instance is the start of entries for a particular
  296.               device entry
  297.           } - end the entries for a particular host adapter, or end the entire
  298.               set of parameter entries
  299.           , - move to next entry.  Inside of a set of device entries, this
  300.               moves us to the next device on the list.  Outside of device
  301.               entries, this moves us to the next host adapter
  302.           . - Same effect as , but is safe to use with insmod.
  303.           x - the number to enter into the array at this position.  
  304.               0 = Enable tagged queueing on this device and use the default
  305.                   queue depth
  306.               1-254 = Enable tagged queueing on this device and use this
  307.                       number as the queue depth
  308.               255 = Disable tagged queueing on this device.
  309.               Note: anything above 32 for an actual queue depth is wasteful
  310.                     and not recommended.
  311.         A few examples of how this can be used:
  312.         tag_info:{{8,12,,0,,255,4}}
  313.           This line will only effect the first aic7xxx card registered.  It
  314.           will set scsi id 0 to a queue depth of 8, id 1 to 12, leave id 2
  315.           at the default, set id 3 to tagged queueing enabled and use the
  316.           default queue depth, id 4 default, id 5 disabled, and id 6 to 4.
  317.           Any not specified entries stay at the default value, repeated
  318.           commas with no value specified will simply increment to the next id
  319.           without changing anything for the missing values.
  320.         tag_info:{,,,{,,,255}}
  321.           First, second, and third adapters at default values.  Fourth
  322.           adapter, id 3 is disabled.  Notice that leading commas simply
  323.   increment what the first number effects, and there are no need
  324.   for trailing commas.  When you close out an adapter, or the
  325.   entire entry, anything not explicitly set stays at the default
  326.   value.
  327.         A final note on this option.  The scanner I used for this isn't
  328.         perfect or highly robust.  If you mess the line up, the worst that
  329.         should happen is that the line will get ignored.  If you don't
  330.         close out the entire entry with the final bracket, then any other
  331.         aic7xxx options after this will get ignored.  So, in general, be
  332.         sure of what you are entering, and after you have it right, just
  333.         add it to the lilo.conf file so there won't be any mistakes.  As
  334.         a means of checking this parser, the entire tag_info array for
  335.         each card is now printed out in the /proc/scsi/aic7xxx/x file.  You
  336.         can use that to verify that your options were parsed correctly. 
  337.         
  338.     Boot command line options may be combined to form the proper set of options
  339.     a user might need.  For example, the following is valid:
  340.     
  341.     aic7xxx=verbose,extended,irq_trigger:1
  342.     
  343.     The only requirement is that individual options be separated by a comma or
  344.     a period on the command line.
  345.         
  346.   Module Loading command options
  347.   ------------------------------
  348.     When loading the aic7xxx driver as a module, the exact same options are
  349.     available to the user.  However, the syntax to specify the options changes
  350.     slightly.  For insmod, you need to wrap the aic7xxx= argument in quotes
  351.     and replace all ',' with '.'.  So, for example, a valid insmod line
  352.     would be:
  353.     insmod aic7xxx aic7xxx='verbose.irq_trigger:1.extended'
  354.     This line should result in the *exact* same behaviour as if you typed
  355.     it in at the lilo prompt and the driver was compiled into the kernel
  356.     instead of being a module.  The reason for the single quote is so that
  357.     the shell won't try to interpret anything in the line, such as {. 
  358.     Insmod assumes any options starting with a letter instead of a number
  359.     is a character string (which is what we want) and by switching all of
  360.     the commas to periods, insmod won't interpret this as more than one
  361.     string and write junk into our binary image.  I consider it a bug in
  362.     the insmod program that even if you wrap your string in quotes (quotes
  363.     that pass the shell mind you and that insmod sees) it still treates
  364.     a comma inside of those quotes as starting a new variable, resulting
  365.     in memory scribbles if you don't switch the commas to periods.
  366.   Kernel Compile options
  367.   ------------------------------
  368.     The various kernel compile time options for this driver are now fairly
  369.     well documented in the file Documentation/Configure.help.  In order to
  370.     see this documentation, you need to use one of the advanced configuration
  371.     programs (menuconfig and xconfig).  If you are using the "make menuconfig"
  372.     method of configuring your kernel, then you would simply highlight the
  373.     option in question and hit the ? key.  If you are using the "make xconfig"
  374.     method of configuring your kernel, then simply click on the help button
  375.     next to the option you have questions about.  The help information from
  376.     the Configure.help file will then get automatically displayed.
  377.   /proc support
  378.   ------------------------------
  379.     The /proc support for the AIC7xxx can be found in the /proc/scsi/aic7xxx/
  380.     directory. That directory contains a file for each SCSI controller in
  381.     the system. Each file presents the current configuration and transfer
  382.     statistics (enabled with #define in aic7xxx.c) for each controller.
  383.     Thanks to Michael Neuffer for his upper-level SCSI help, and
  384.     Matthew Jacob for statistics support.
  385.   Debugging the driver
  386.   ------------------------------
  387.     Should you have problems with this driver, and would like some help in
  388.     getting them solved, there are a couple debugging items built into
  389.     the driver to facilitate getting the needed information from the system.
  390.     In general, I need a complete description of the problem, with as many
  391.     logs as possible concerning what happens.  To help with this, there is
  392.     a command option aic7xxx=panic_on_abort.  This option, when set, forces
  393.     the driver to panic the kernel on the first SCSI abort issued by the
  394.     mid level SCSI code.  If your system is going to reset loops and you
  395.     can't read the screen, then this is what you need.  Not only will it
  396.     stop the system, but it also prints out a large amount of state
  397.     information in the process.  Second, if you specify the option
  398.     "aic7xxx=verbose:0x1ffff", the system will print out *SOOOO* much
  399.     information as it runs that you won't be able to see anything.
  400.     However, this can actually be very useful if your machine simply
  401.     locks up when trying to boot, since it will pin-point what was last
  402.     happening (in regards to the aic7xxx driver) immediately prior to
  403.     the lockup.  This is really only useful if your machine simply can
  404.     not boot up successfully.  If you can get your machine to run, then
  405.     this will produce far too much information.
  406.   FTP sites
  407.   ------------------------------
  408.     ftp://ftp.redhat.com/pub/aic/
  409.       - Out of date.  I used to keep stuff here, but too many people
  410.         complained about having a hard time getting into Red Hat's ftp
  411. server.  So use the web site below instead.
  412.     ftp://ftp.pcnet.com/users/eischen/Linux/
  413.       - Dan Eischen's driver distribution area
  414.     ftp://ekf2.vsb.cz/pub/linux/kernel/aic7xxx/ftp.teleport.com/
  415.       - European Linux mirror of Teleport site
  416.   Web sites
  417.   ------------------------------
  418.     http://people.redhat.com/dledford/
  419.       - My web site, also the primary aic7xxx site with several related
  420.         pages.
  421. Dean W. Gehnert
  422. deang@teleport.com
  423. $Revision: 3.0 $
  424. Modified by Doug Ledford 1998-2000