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

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