home *** CD-ROM | disk | FTP | other *** search
/ CD Actual 8 / CDACTUAL8.iso / docs / scsi-how < prev    next >
Encoding:
Text File  |  1996-07-11  |  132.8 KB  |  3,659 lines

  1. Archive-name: linux/howto/scsi
  2. Last-modified: 28 April 1996
  3. Version: 2.27
  4.  
  5. Copyright 1994, 1995, 1996, Drew Eckhardt
  6.  
  7.     This documentation is free documentation; you can redistribute it and/or 
  8.     modify it under the terms of the GNU General Public License as published by
  9.     the Free Software Foundation; either version 2 of the License, or
  10.     (at your option) any later version.
  11.  
  12.     This documentation is distributed in the hope that it will be useful,
  13.     but WITHOUT ANY WARRANTY; without even the implied warranty of
  14.     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  15.     GNU General Public License for more details.
  16.  
  17.     You should have received a copy of the GNU General Public License
  18.     along with this documentation; if not, write to the Free Software
  19.     Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  20.  
  21. That said, I'd appreciate it if people would ask me <drew@PoohSticks.ORG>
  22. if there's a newer version available before they publish it.  When people
  23. publish outdated versions, I get questions from users that are answered 
  24. in newer versions, and it reflects poorly on the publisher.  I'd also prefer 
  25. that all references to free distribution sites, and possibly competing
  26. distributions/products be left intact.  
  27.  
  28. IMPORTANT :
  29.  
  30. BUG REPORTS OR OTHER REQUESTS FOR HELP WHICH FAIL TO FOLLOW THE PROCEDURES 
  31. OUTLINED IN SECTION 2 WILL BE IGNORED.  
  32.  
  33. This HOWTO covers the Linux SCSI subsystem, as implemented in Linux
  34. kernel revision 1.2.10 and newer alpha code.  Earlier revisions of the 
  35. SCSI code are _unsupported_, and may differ significantly in terms of the 
  36. drivers implemented, performance, and options available.
  37.  
  38. For additional information, you may wish to join the linux-scsi mailing list
  39. by mailing majordomo@vger.rutgers.edu with the line 
  40.  
  41.     subscribe linux-scsi
  42.  
  43. in the text.  You can unsubscribe by sending mail to the same address and 
  44. including
  45.     
  46.     unsubscribe linux-scsi 
  47.  
  48. in the text.
  49.  
  50. Once you're subscribed, you can send mail to the list at 
  51.  
  52.     linux-scsi@vger.rutgers.edu
  53.  
  54. I'm aware that this document isn't the most user-friendly, 
  55. and that there may be inaccuracies and oversights.  If 
  56. you have constructive comments on how to rectify the situation
  57. you're free to mail me about it.
  58.  
  59. Table of contents 
  60. Section 1             Common Problems 
  61.     Section 1.1            General Flakiness
  62.     Section 1.2         The kernel command line
  63.     Section 1.3           A SCSI device shows up at all possible IDs 
  64.     Section 1.4         A SCSI device shows up at all possible LUNs
  65.     Section 1.5            You get sense errors when you know the 
  66.                     devices are error free
  67.     Section 1.6            A kernel configured with networking does 
  68.                     not work.
  69.     Section 1.7              Device detected, but unable to access.
  70.     Section 1.8            Sometimes the scsi subsystem locks up 
  71.                     completely.
  72.     Section 1.9         Configuring and building the kernel
  73.     Section 1.10        LUNS other than 0 don't work
  74.     
  75. Section 2            Reporting Bugs
  76.     Section 2.1            Capturing messages 
  77.     Section 2.2            Locating the source of a panic()
  78.  
  79. Section 3            Modules
  80.     Section 3.1            General information.
  81.     Section 3.2            Status of modules under 1.2 kernels.
  82.     Section 3.3            Status of modules under 1.3 kernels.
  83.  
  84. Section 4            Hosts
  85.     Section 4.1            Supported and Unsupported Hardware
  86.     Section 4.1.1        Multiple host adapters
  87.     Section 4.2            Common Problems
  88.     Section 4.3            Adaptec 152x, 151x, 1505, 282x, 
  89.                     Sound Blaster 16 SCSI,
  90.                     SCSI Pro, Gigabyte, and other AIC 
  91.                     6260/6360 based products (Standard)
  92.     Section 4.4            Adaptec 154x, Adaptec 1640, AMI FastDisk VLB,
  93.                     (DTC 329x may also work), (Standard)  
  94.     Section 4.5            Adaptec 174x (Standard)
  95.     Section 4.6            Adaptec 274x, 284x (Standard), 294x (ALPHA)
  96.     Section 4.7            Allways IN2000 (ALPHA)
  97.     Section 4.8            BusLogic MultiMaster Host Adapters
  98.     Section 4.9            BusLogic FlashPoint Host Adapters
  99.     Section 4.10        EATA: DPT Smartcache, Smartcache Plus,
  100.                     Smartcache III (Standard)
  101.     Section 4.11        Future Domain 16x0 with TMC-1800, TMC-18C30,
  102.                     TMC-18C50, or TMC-36C70 chip (Standard)
  103.     Section 4.12        Generic NCR5380 / T130B (Standard)
  104.     Section 4.13        NCR53c8xx rel5 (Standard), rel10+ (ALPHA)
  105.     Section 4.14        Seagate ST0x/Future Domain TMC-8xx/TMC-9xx 
  106.                     (Standard)
  107.     Section 4.15         PAS16 (Standard)
  108.     Section 4.16        Trantor T128/T128F/T228 (Standard)
  109.     Section 4.17        Ultrastor 14f, 24f,  34f (Standard)
  110.     Section 4.18        Western Digital 7000 (Standard)
  111.     Section 4.19        AM53/79C974 (ALPHA)
  112.     Section 4.20        qlogic (STANDARD)
  113.  
  114. Section 5            Disks
  115.     Section 5.1         Supported and Unsupported Hardware 
  116.     Section 5.2         Common Problems 
  117.     Section 5.3            Device Files
  118.     Section 5.4            Partitioning 
  119.     Section 5.5            Disk Geometry
  120.  
  121. Section 6             CD ROMs
  122.     Section 6.1            Supported and Unsupported Hardware 
  123.     Section 6.2            Common Problems
  124.     Section 6.3            Device Files 
  125.  
  126. Section 7            Tapes
  127.     Section 7.1            Supported and Unsupported Hardware 
  128.     Section 7.2            Common Problems
  129.     Section 7.3            Device Files 
  130.  
  131. Section 8            Generic 
  132.     Section 8.1            Supported and Unsupported Hardware 
  133.     Section 8.2            Common Problems
  134.     Section 8.3            Device Files 
  135.  
  136. Section 9            Buyers' Guide
  137.     Section 9.1         Transfer types
  138.     Section 9.2         Scatter/gather
  139.     Section 9.3         Mailbox vs. non-mailbox
  140.     Section 9.4            Bus types
  141.     Section 9.5            Multiple devices
  142.     Section 9.6            SCSI-I, SCSI-II, FAST and WIDE options, etc.
  143.     Section 9.7            Driver feature comparison
  144.     Section 9.8              Board comparison 
  145.     Section 9.9            Summary
  146.     
  147. Section 10
  148.     Section 10.1        Assignment of minor numbers.
  149.  
  150. Section 1 : Common Problems 
  151.  
  152. This section lists some of the common problems that people
  153. have.  If there is not anything here that answers your questions, you
  154. should also consult the sections for your host adapter and the devices
  155. in that are giving you problems.
  156.  
  157. Section 1.1 : General Flakiness
  158.     If you experience random errors, the most likely causes are
  159.     cabling and termination problems.
  160.  
  161.     Some products, such as those built arround the newer NCR
  162.     chips, feature digital filtering and active signal negation,
  163.     and aren't very sensitive to cabling problems.
  164.  
  165.     Others, such as the Adaptec 154xC, 154xCF, and 274x, are _extremely_
  166.     sensitive and may fail with cables that work with other systems.
  167.  
  168.     I reiterate : some host adapters are _extremely_ sensitive to 
  169.     cabling and termination problems and therefore, cabling and
  170.     termination should be the first things checked when there are
  171.     problems.
  172.  
  173.     To minimize your problems, you should use cables which
  174.  
  175.         1.  Claim SCSI-II compliance
  176.     2.  Have a characteristic impedance of 132 ohms
  177.     3.  All come from the same source to avoid impedance mismatches
  178.     4.  Come from a reputable vendor such as Amphenol
  179.  
  180.     Termination power should be provided by _all_ devices on 
  181.     the SCSI bus, through a diode to prevent current backflow,
  182.     so that sufficient power is available at the ends of the cable 
  183.     where it is needed.  To prevent damage if the bus is shorted,
  184.     TERMPWR should be driven through a fuse or other current
  185.     limiting device.
  186.  
  187.     If multiple devices, external cables, or FAST SCSI 2 are used, 
  188.     active or forced perfect termination should be used on both ends 
  189.     of the SCSI bus.
  190.  
  191.     See the Comp.Periphs.Scsi FAQ (available on tsx-11 in 
  192.     pub/linux/ALPHA/scsi) for more information about active
  193.     termination.
  194.  
  195. Section 1.2 : The kernel command line
  196.  
  197.     Other parts of the documentation refer to a "kernel command line".  
  198.  
  199.     The kernel command line is a set of options you may specify 
  200.     from either the LILO : prompt after an immage name, or in the 
  201.     append field in your LILO configuration file (LILO .14 
  202.     and newer use /etc/lilo.conf, older versions use /etc/lilo/config).
  203.  
  204.     Boot your system with LILO, and hit one of the alt, control, or 
  205.     shift keys when it first comes up to get a prompt.  LILO 
  206.     should respond with 
  207.  
  208.         :
  209.  
  210.     At this prompt, you can select a kernel image to boot, or list
  211.     them with ?.  Ie
  212.  
  213.         :?
  214.  
  215.         ramdisk floppy harddisk
  216.  
  217.     To boot that kernel with the command line options you have 
  218.     selected, simply enter the name followed by a white space delimited
  219.     list of options, terminating with a return.  
  220.  
  221.     Options take the form of 
  222.  
  223.         variable=valuelist
  224.  
  225.     Where valuelist may be a single value or comma delimited list
  226.     of values with no whitespace.  With the exception of root device,
  227.     individual values are numbers, and may be specified in either 
  228.     decimal or hexadecimal.
  229.  
  230.     Ie, to boot linux with an Adaptec 1520 clone not recognized 
  231.     at bootup, you might type 
  232.  
  233.         :floppy aha152x=0x340,11,7,1
  234.  
  235.     If you don't care to type all of this at boot time, it is also
  236.     possible to use the LILO configuration file "append" option 
  237.     with LILO .13 and newer.
  238.  
  239.     Ie, 
  240.         append="aha152x=0x340,11,7,1"
  241.  
  242.  
  243. Section 1.3 :  A SCSI device shows up at all possible IDs 
  244.  
  245.     If this is the case, you have strapped the device at the same 
  246.     address as the controller (typically 7, although some boards
  247.     use other addresses, with 6 being used by some Future Domain 
  248.         boards).
  249.  
  250.     Please change the jumper settings.
  251.  
  252. Section 1.4 :  A SCSI device shows up at all possible LUNs
  253.  
  254.     The device has buggy firmware.  
  255.  
  256.     As an interim sollution, you should try using the kernel 
  257.     command line option
  258.  
  259.         max_scsi_luns=1
  260.  
  261.     If that works, there is a list of buggy devices
  262.     in the kernel sources in drivers/scsi/scsi.c in the variable
  263.     blacklist.  Add your device to this list and mail the patch
  264.     to Linus Torvalds <Linus.Torvalds@cs.Helsinki.FI>.
  265.  
  266. Section 1.5 :  You get sense errors when you know the devices are error free
  267.  
  268.     Sometimes this is caused by bad cables or impropper termination.
  269.  
  270.     See Section 1.1 : General Flakiness
  271.  
  272. Section 1.6 :  A kernel configured with networking does not work.
  273.  
  274.     The auto-probe routines for many of the network drivers 
  275.     are not passive, and will interfere with operation with some
  276.     of the SCSI drivers.
  277.  
  278. Section 1.7 :  Device detected, but unable to access.
  279.  
  280.     A SCSI device is detected by the kernel, but you are unable to
  281.     access it - ie mkfs /dev/sdc, tar xvf /dev/rst2, etc fails.
  282.  
  283.     You don't have a special file in /dev for the device.
  284.  
  285.     Unix devices are identified as either block or character (block 
  286.     devices go through the buffer cache, character devices do not) devices,
  287.     a major number (ie which driver is used - block major 8 corresponds
  288.     to SCSI disks) and a minor number (ie which unit is being accessed 
  289.     through a given driver - ie character major 4, minor 0 is the first 
  290.     virtual console, minor 1 the next, etc).  However, accessing devices 
  291.     through this separate namespace would break the unix/Linux metaphor of 
  292.     "everything is a file," so character and block device special files 
  293.     are created under /dev.  This lets you access the raw third SCSI disk
  294.     device as /dev/sdc, the first serial port as /dev/ttyS0, etc.  
  295.  
  296.     The preferred method for creating a file is using the MAKEDEV script -
  297.     cd /dev
  298.  
  299.     and run MAKEDEV (as root) for the devices you want to create - ie
  300.  
  301.     ./MAKEDEV sdc
  302.  
  303.     wildcards "should" work - ie
  304.  
  305.     ./MAKEDEV sd\*
  306.  
  307.     "should" create entries for all SCSI disk devices (doing this should 
  308.     create /dev/sda through /dev/sdp, with fifteen partition entries for 
  309.     each)
  310.  
  311.     ./MAKEDEV sdc\*
  312.  
  313.     "should" create entries for /dev/sdc and all fifteen permissible 
  314.     partitions on /dev/sdc, etc.
  315.  
  316.     I say "should" because this is the standard unix behavior - the MAKEDEV
  317.     script in your installation may not conform to this behavior, or may 
  318.     have restricted the number of devices it will create.
  319.  
  320.     If MAKEDEV won't do the right magic for you, you'll have to create the
  321.     device entries by hand with the mknod command.
  322.  
  323.     The block/character type, major, and minor numbers are specified for the
  324.     various SCSI devices in Subsection 4 : Device Files in the appropriate 
  325.     section.  
  326.  
  327.     Take those numbers, and use (as root)
  328.  
  329.     mknod /dev/device b|c major minor
  330.  
  331.     ie - 
  332.  
  333.     mknod /dev/sdc b 8 32
  334.     mknod /dev/rst0 c 9 0
  335.  
  336. Section 1.8 :   SCSI System Lockups
  337.  
  338.     This could be one of a number of things.  Also see the section for
  339.     your specific host adapter for possible further solutions.
  340.  
  341.     There are cases where the lockups seem to occur when multiple devices
  342.     are in use at the same time.  In this case, you can try contacting
  343.     the manufacturer of the devices and see if firmware upgrades are
  344.     available which would correct the problem.  If possible, try a
  345.     different scsi cable, or try on another system.  This can also
  346.     be caused by bad blocks on disks, or by bad handling of DMA by the
  347.     motherboard (for host adapters that do DMA).  There are probably
  348.     many other possible conditions that could lead to this type of event.
  349.  
  350.     Sometimes these problems occur when there are multiple devices in
  351.     use on the bus at the same time.  In this case, if your host
  352.     adapter driver supports more than one outstanding command on the bus
  353.     at one time, try reducing this to 1 and see if this helps. If you
  354.     have tape drives or slow cdrom drives on the bus, this might not be
  355.     a practical solution.
  356.  
  357. Section 1.9 : Configuring and building the kernel
  358.  
  359.     Unused SCSI drivers eat up valuable memory, aggravating 
  360.     memory shortage problems on small systems because kernel
  361.     memory is unpagable.
  362.  
  363.     So, you will want to build a kernel tuned for your
  364.     system, with only the drivers you need installed.
  365.  
  366.     cd to /usr/src/linux
  367.  
  368.     If you are using a root device other than the current
  369.     one, or something other than 80x25 VGA, and you are 
  370.     writing a boot floppy, you should edit the makefile, 
  371.     and make sure the 
  372.  
  373.         ROOT_DEV = 
  374.  
  375.     and 
  376.  
  377.         SVGA_MODE = 
  378.  
  379.     lines are the way you want them.
  380.  
  381.     If you've installed any patches, you may wish to guarantee that all
  382.     files are rebuilt.  If this is the case, you should type 
  383.  
  384.         make mrproper
  385.  
  386.     Irregardless of weather you ran make mrproper, type
  387.  
  388.         make config
  389.  
  390.     and answer the configuration questions.  Then run
  391.  
  392.         make depend
  393.  
  394.     and finally  
  395.  
  396.         make
  397.  
  398.     Once the build completes, you may wish to update the 
  399.     lilo configuration, or write a boot floppy.  A boot floppy
  400.     may be made by running
  401.  
  402.         make zdisk
  403.  
  404. Section 1.10 : LUNS other than 0 don't work
  405.  
  406.     Many SCSI devices are horrendously broken, lock the SCSI 
  407.     bus up solid, and do other bad things when you attempt to 
  408.     talk to them at a logical unit someplace other than zero.
  409.  
  410.     So, by default recent versions of the Linux kernel will not 
  411.     probe luns other than 0.  To work arround this, you need to 
  412.     the max_scsi_luns command line option, or recompile the kernel
  413.     wiuth the CONFIG_SCSI_MULTI_LUN option.
  414.  
  415.     Usually, you'll put 
  416.  
  417.         max_scsi_luns=8
  418.  
  419.     on your LILO command line.
  420.  
  421.     If your multi-LUN devices still aren't detected correctly after
  422.     trying one of these fixes (as the case will be with many old 
  423.     SCSI->MFM, RLL, ESDI, SMD, and similar bridge boards),  you'll
  424.     be thwarted by this piece of code 
  425.     
  426.                   /* Some scsi-1 peripherals do not handle lun != 0.
  427.                      I am assuming that scsi-2 peripherals do better */
  428.                   if((scsi_result[2] & 0x07) == 1 && 
  429.                      (scsi_result[3] & 0x0f) == 0) break;
  430.  
  431.     in scan_scsis() in drivers/scsi/scsi.c.  Delete this code, 
  432.     and you should be fine.
  433.  
  434. Section 2 : Reporting Bugs
  435.  
  436. The Linux SCSI developers don't necessarily maintain old revisions
  437. of the code due to space constraints.  So, if you are not running the
  438. latest publically released Linux kernel (note that many of the Linux
  439. distributions, such as MCC, SLS, Yggdrasil, etc. often lag one or even
  440. twenty patches behind this) chances are we will be unable to solve your 
  441. problem.  So, before reporting a bug, please check to see if it exists
  442. with the latest publically available kernel.
  443.  
  444. If after upgrading, and reading this document thoroughly, you still
  445. believe that you have a bug, please mail a bug report to the SCSI channel
  446. of the mailing list where it will be seen by many of the people who've 
  447. contributed to the Linux SCSI drivers.
  448.  
  449. In your bug report, please provide as much information as possible
  450. regarding your hardware configuration, the exact text of 
  451. all of the messages that Linux prints when it boots, when the 
  452. error condition occurs, and where in the source code the error
  453. is.  Use the procedures outlined in Section 2.1 : Capturing 
  454. messages and Section 2.2 : Locating the source of a panic().
  455.  
  456. Failure to provide the maximum possible amount of information 
  457. may result in misdiagnosis of your problem, or developers 
  458. deciding that there are other more interesting problems to 
  459. fix.
  460.  
  461. The bottom line is that if we can't reproduce your bug, and you can't 
  462. point at us what's broken, it won't get fixed.
  463.  
  464. Section 2.1 : Capturing messages
  465.  
  466. If you are not running a kernel message logging system :
  467.  
  468. Insure that the /proc filesystem is mounted.
  469.  
  470.     grep proc /etc/mtab
  471.  
  472. If the /proc filesystem is not mounted, mount it 
  473.  
  474.     mkdir /proc
  475.     chmod 755 /proc
  476.     mount -t proc /proc /proc
  477.  
  478. Copy the kernel revision and messages into a log file
  479.  
  480.     cat /proc/version > /tmp/log
  481.     cat /proc/kmsg >> /tmp/log
  482.  
  483. Type CNTRL-C after a second or two.
  484.  
  485. If you are running some logger, you'll have to poke through the 
  486. appropriate log files (/etc/syslog.conf should be of some use
  487. in locating them), or use dmesg.
  488.  
  489. If Linux is not yet bootstrapped, format a floppy diskette under DOS.  
  490. Note that if you have a distribution which mounts the root diskette off of 
  491. floppy rather than RAM drive, you'll have to format a diskette readable 
  492. in the drive not being used to mount root or use their ramdisk boot option.
  493.  
  494. Boot Linux off your distribution boot floppy, preferably in single user mode
  495. using a RAM disk as root.
  496.  
  497.     mkdir /tmp/dos
  498.  
  499. Insert the diskette in a drive not being used to mount root, and
  500. mount it.  Ie
  501.  
  502.     mount -t msdos /dev/fd0 /tmp/dos
  503.  
  504.     or 
  505.  
  506.     mount -t msdos /dev/fd1 /tmp/dos
  507.  
  508. Copy your log to it
  509.         
  510.         cp /tmp/log /tmp/dos/log
  511.  
  512. Unmount the DOS floppy
  513.  
  514.     umount /tmp/dos
  515.  
  516. And shutdown Linux
  517.  
  518.     shutdown
  519.  
  520. Reboot into DOS, and using your favorite communications software include
  521. the log file in your trouble mail.
  522.  
  523. Section 2.2 : Locating the source of a panic()
  524.  
  525. Like other unices, when a fatal error is encountered, Linux calls the 
  526. kernel panic() function.  Unlike other unices, Linux doesn't dump 
  527. core to the swap or dump device and reboot automatically.  Instead,
  528. a useful summary of state information is printed for the user to
  529. manually copy down.  Ie :
  530.  
  531.     Unable to handle kernel NULL pointer dereference at virtual address c0000004
  532.     current->tss,cr3 = 00101000, %cr3 = 00101000
  533.     *pde = 00102027
  534.     *pte = 00000027
  535.     Oops: 0000
  536.     EIP:    0010:0019c905
  537.     EFLAGS: 00010002
  538.     eax: 0000000a   ebx: 001cd0e8   ecx: 00000006   edx: 000003d5
  539.     esi: 001cd0a8   edi: 00000000   ebp: 00000000   esp: 001a18c0
  540.     ds: 0018   es: 0018   fs: 002b   gs: 002b   ss: 0018
  541.     Process swapper (pid: 0, process nr: 0, stackpage=001a09c8)
  542.     Stack: 0019c5c6 00000000 0019c5b2 00000000 0019c5a5 001cd0a8 00000002 00000000
  543.        001cd0e8 001cd0a8 00000000 001cdb38 001cdb00 00000000 001ce284 0019d001
  544.        001cd004 0000e800 fbfff000 0019d051 001cd0a8 00000000 001a29f4 00800000
  545.     Call Trace: 0019c5c6 0019c5b2 0018c5a5 0019d001 0019d051 00111508 00111502
  546.        0011e800 0011154d 00110f63 0010e2b3 0010ef55 0010ddb7
  547.     Code: 8b 57 04 52 68 d2 c5 19 00 e8 cd a0 f7 ff 83 c4 20 8b 4f 04
  548.     Aiee, killing interrupt handler
  549.     kfree of non-kmalloced memory: 001a29c0, next= 00000000, order=0
  550.     task[0] (swapper) killed: unable to recover
  551.     Kernel panic: Trying to free up swapper memory space
  552.     In swapper task - not syncing
  553.  
  554. Take the hexidecimal number on the EIP: line, in this case 19c905, and search
  555. through /usr/src/linux/zSystem.map for the highest number not larger than
  556. that address.  Ie,
  557.  
  558.     0019a000 T _fix_pointers
  559.     0019c700 t _intr_scsi
  560.     0019d000 t _NCR53c7x0_intr
  561.  
  562. That tells you what function its in.  Recompile the source file which 
  563. defines that function file with debugging enabled, or the whole kernel 
  564. if you prefer by editing /usr/src/linux/Makefile and adding a "-g" 
  565. to the CFLAGS definition.
  566.  
  567.     #
  568.     # standard CFLAGS
  569.     #
  570.  
  571. Ie, 
  572.  
  573.     CFLAGS = -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -pipe
  574.  
  575. becomes
  576.  
  577.     CFLAGS = -g -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -pipe
  578.  
  579. Rebuild the kernel, incrementally or by doing a 
  580.  
  581.     make clean
  582.     make
  583.  
  584. Make the kernel bootable by creating an entry in your /etc/lilo.conf
  585. for it
  586.  
  587.     image = /usr/src/linux/zImage
  588.     label = experimental
  589.  
  590. and re-running LILO as root, or by creating a boot floppy
  591.  
  592.     make zImage 
  593.  
  594. Reboot and record the new EIP for the error.
  595.  
  596. If you have script installed, you may want to start it, as 
  597. it will log your debugging session to the typescript file.
  598.  
  599. Now, run 
  600.  
  601.     gdb /usr/src/linux/tools/zSystem
  602.  
  603. and enter 
  604.  
  605.     info line *<your EIP>
  606.  
  607. Ie, 
  608.     info line *0x19c905
  609.  
  610. To which GDB will respond something like
  611.  
  612.     (gdb) info line *0x19c905
  613.     Line 2855 of "53c7,8xx.c" starts at address 0x19c905 <intr_scsi+641>
  614.        and ends at 0x19c913 <intr_scsi+655>.
  615.  
  616. Record this information.  Then, enter
  617.     list <line number>
  618.  
  619. Ie,
  620.  
  621.     (gdb) list 2855
  622.     2850    /*      printk("scsi%d : target %d lun %d unexpected disconnect\n",
  623.     2851                host->host_no, cmd->cmd->target, cmd->cmd->lun); */
  624.     2852            printk("host : 0x%x\n", (unsigned) host);
  625.     2853            printk("host->host_no : %d\n", host->host_no);
  626.     2854            printk("cmd : 0x%x\n", (unsigned) cmd);
  627.     2855            printk("cmd->cmd : 0x%x\n", (unsigned) cmd->cmd);
  628.     2856            printk("cmd->cmd->target : %d\n", cmd->cmd->target);
  629.     2857            if (cmd) {
  630.     2858                abnormal_finished(cmd, DID_ERROR << 16);
  631.     2859            }
  632.     2860            hostdata->dsp = hostdata->script + hostdata->E_schedule / 
  633.     2861                sizeof(long);
  634.     2862            hostdata->dsp_changed = 1;
  635.     2863        /* SCSI PARITY error */
  636.     2864        } 
  637.     2865
  638.     2866        if (sstat0_sist0 & SSTAT0_PAR) {
  639.     2867            fatal = 1;
  640.     2868            if (cmd && cmd->cmd) {
  641.     2869                printk("scsi%d : target %d lun %d parity error.\n",
  642.  
  643. Obviously, quit will take you out of GDB.
  644.  
  645. Record this information too, as it will provide a context incase the 
  646. developers' kernels differ from yours.
  647.  
  648. Section 3 : Modules
  649.  
  650. This section gives specific details regarding the support for loadable
  651. kernel modules and how it relates to SCSI.
  652.  
  653. Section 3.1 : General Information
  654.  
  655. Loadable modules are a means by which the user or system administrator
  656. can load files into the kernel's memory in such a way that the kernel's
  657. capabilities are expanded.  The most common usages of modules are for
  658. drivers to support hardware, or to load filessytems.
  659.  
  660. There are several advantages of modules for SCSI.  One is that a
  661. system administrator trying to maintain a large number of machines can
  662. use a single kernel image for all of the machines, and then load
  663. kernel modules to support hardware that is only present on some
  664. machines.
  665.  
  666. It is also possible for someone trying to create a distribution to use
  667. a script on the bootable floppy to query for which modules to be
  668. loaded.  This saves memory that would otherwise be wasted on unused
  669. drivers, and it would also reduce the possibility that a probe for a
  670. non-existant card would screw up some other card on the system.
  671.  
  672. Modules also work out nicely on laptops, which tend to have less
  673. memory than desktop machines, and people tend to want to keep the
  674. kernel image as small as possible and load modules as required.  Also,
  675. modules makes supporting PCMCIA SCSI cards on laptops somewhat easier,
  676. since you can load and unload the driver as the card is
  677. inserted/removed. [Note: currently the qlogic and 152x drivers support
  678. PCMCIA].
  679.  
  680. Finally, there is the advantage that kernel developers can more easily
  681. debug and test their drivers, since testing a new driver does not
  682. require rebooting the machine (provided of course that the machine has
  683. not completely crashed as a result of some bug in the driver).
  684.  
  685. Although modules are very nice, there is one limitation.  If your root
  686. disk partition is on a scsi device, you will not be able to use
  687. modularized versions of scsi code required to access the disk.  This
  688. is because the system must be able to mount the root partition before
  689. it can load any modules from disk.  There are people thinking about
  690. ways of fixing the loader and the kernel so that the kernel can
  691. self-load modules prior to attempting to mount the root filesystem,
  692. so at some point in the future this limitation may be lifted.
  693.  
  694. Section 3.2 : Module support in the 1.2.N kernel.
  695.  
  696. In the 1.2.N series of kernels, there is partial support for SCSI
  697. kernel modules.  While none of the high level drivers (such as disk,
  698. tape, etc) can be used as modules, most of the low level drivers
  699. (i.e. 1542, 1522) can be loaded and unloaded as required.  Each time
  700. you load a low-level driver, the driver first searches for cards that
  701. can be driven.  Next, the bus is scanned for each card that is found,
  702. and then the internal data structures are set up so as to make it
  703. possible to actually use the devices attached to the cards that the
  704. driver is managing.
  705.  
  706.     When you are through with a low-level driver, you can unload
  707. it.  You should keep in mind that usage counts are maintained based upon
  708. mounted filesystems, open files, etc, so that if you are still using a
  709. device that the driver is managing, the rmmod utillity will tell you that
  710. the device is still busy and refuse to unload the driver.  When the driver
  711. is unloaded, all of the associated data structures are also freed so that
  712. the system state should be back to where it was before the module was loaded.
  713. This means that the driver could be reloaded at a later time if required.
  714.  
  715. Section 3.3 : Module support in the 1.3.N kernel.
  716.  
  717. In the 1.3 series of kernels, the scsi code is completely modularized.
  718. This means that you can start with a kernel that has no scsi support
  719. whatsoever, and start loading modules and you will eventually end up
  720. with complete support.
  721.  
  722. If you wish, you can compile some parts of the SCSI code into the kernel
  723. and then load other parts later - it is all up to you how much gets loaded
  724. at runtime and how much is linked directly into the kernel.
  725.  
  726. If you are starting with a kernel that has no support whatsoever for
  727. SCSI, then the first thing you will need to do is to load the scsi
  728. core into the kernel - this is in a module called "scsi_mod".  You
  729. will not be able to load any other scsi modules until you have this
  730. loaded into kernel memory.  Since this does not contain any low-level
  731. drivers, the act of loading this module will not scan any busses, nor
  732. will it activate any drivers for scsi disks, tapes, etc.  If you answered
  733. 'Y' to the CONFIG_SCSI question when you built your kernel, you will not
  734. need to load this module.
  735.  
  736. At this point you can add modules in more or less any order to achieve
  737. the desired functionality.  Usage counts are interlocks are used to
  738. prevent unloading of any component which might still be in use, and
  739. you will get a message from rmmod if a module is still busy.
  740.  
  741. The high level drivers are in modules named "sd_mod", "sr_mod", "st",
  742. and "sg", for disk, cdrom, tape, and scsi generics support
  743. respectively.  When you load a high level driver, the device list for
  744. all attached hosts is examined for devices which the high level driver
  745. can drive, and these are automatically activated.
  746.  
  747. The use of modules with low level drivers were described in the
  748. Section 3.2.  When a low-level driver is loaded, the bus is scanned,
  749. and each device is examined by each of the high level drivers to see
  750. if they recognize it as something that they can drive - anything
  751. recognized is automatically attached and activated.
  752.  
  753. Section 4 : Hosts
  754.  
  755. This section gives specific information about the various host adapters that
  756. are supported in some way or another under linux.
  757.  
  758. Section 4.1 : Supported and Unsupported Hardware
  759. Drivers in the distribution kernel :
  760.  
  761. Adaptec 152x, Adaptec 154x (DTC 329x boards usually work, but are unsupported),
  762. Adaptec 174x, Adaptec 274x/284x (294x support requires a newer version of the
  763. driver), BusLogic MultiMaster Host Adapters, EATA-DMA protocol compilant boards
  764. (all DPT PMXXXXX/XX and SKXXXXX/XX except the PM2001, some boards from NEC and
  765. ATT), Future Domain 850, 885, 950, and other boards in that series (but not the
  766. 840, 841, 880, and 881 boards unless you make the appropriate patch), Future
  767. Domain 16x0 with TMC-1800, TMC-18C30, or TMC-18C50 chips, NCR53c8xx,PAS16 SCSI
  768. ports, Seagate ST0x, Trantor T128/T130/T228 boards, Ultrastor 14F, 24F, and
  769. 34F, and Western Digital 7000.
  770.  
  771. MCA : 
  772.  
  773. MCA boards which are compatable with a supported board (ie,
  774. Adaptec 1640 and BusLogic 640) will work.
  775.  
  776. Alpha drivers :
  777.  
  778. Many ALPHA drivers are available at
  779.    ftp://tsx-11.mit.edu/pub/linux/ALPHA/scsi
  780.  
  781. Drivers which will work with modifications
  782.  
  783. eata_dma:
  784.    DPT PM2001 
  785.  
  786. NCR53c8x0/7x0:
  787.  
  788.     A NCR53c8xx driver has been developed, but currently will not work
  789.     with NCR53c700, NCR53c700-66, NCR53c710, and NCR53c720 chips.  A list
  790.     of changes needed to make each of these chips work follows, as well
  791.     as a summary of the complexity.
  792.  
  793.     NCR53c720 (trivial) - detection changes, initializaion changes, change
  794.         fixup code to translate '810 register addresses to 
  795.     '7xx mapping.
  796.  
  797.     NCR53c710 (trivial) - detection changes, initialization changes, 
  798.     of assembler, change fixup code to translate '810 register 
  799.     addresses to '7xx mapping, change interrupt handlers to treat
  800.     IID interrupt from INTFLY instruction to emulate it.
  801.  
  802.     NCR53c700, NCR53c700-66 (very messy) - detection changes, 
  803.         initialization changes, modification of NCR code to not use DSA, 
  804.     modification of Linux code to handle context switches.
  805.  
  806. SCSI hosts that will not work :
  807.  
  808. All parallel->SCSI adapters, Rancho SCSI boards, and Grass Roots SCSI
  809. boards.  BusLogic FlashPoint boards, such as the BT-930/932/950, are
  810. currently unsupported.
  811.  
  812. SCSI hosts that will NEVER work :
  813.  
  814. Non Adaptec compatable, non NCR53c8xx DTC boards (including the 3270 and 3280).
  815.  
  816. CMD SCSI boards.
  817.  
  818. Aquiring programming information requires a non-disclosure agreement
  819. with DTC/CMD.  This means that it would be impossible to distribute a 
  820. Linux driver if one were written, since complying with the NDA would
  821. mean distributing no source, in violation of the GPL, and complying 
  822. with the GPL would mean distributing source, in violation of the NDA.  
  823.  
  824. If you want to run Linux on some other unsupported piece of hardware, your 
  825. options are to either write a driver yourself (Eric Youngdale and I are 
  826. usually willing to answer technical questions concerning the Linux
  827. SCSI drivers) or to commision a driver (Normal consulting rates 
  828. mean that this will not be a viable option for personal use).
  829.  
  830. Section 4.1.1 : Multiple host adapters
  831.  
  832. With some host adapters (see Section 9.7 : Buyers' Guide : 
  833. Feature Comparison), you can use multiple host adapters of the 
  834. same type in the same system.  With multiple adapters of the
  835. same type in the same system, generally the one at the lowest 
  836. address will be scsi0, the one at the next address scsi1, etc.
  837.  
  838. In all cases, it is possible to use multiple host adapters of 
  839. different types, provided that none of their addresses conflict.  
  840. SCSI controllers are scanned in the order specified in the 
  841. builtin_scsi_hosts[] array in drivers/scsi/hosts.c, with
  842. the order currently being 
  843.  
  844.     BusLogic, Ultrastor 14/34F, Ultrastor 14F,, Adaptec 151x/152x,
  845.     Adaptec 154x, Adaptec 174x, AIC7XXX, AM53C974, Future Domain 16x0,
  846.     Allways IN2000, Generic NCR5380, QLOGIC, PAS16, Seagate,
  847.     Trantor T128/T130, NCR53c8xx, EATA-DMA, WD7000, debugging driver.
  848.  
  849. In most cases (ie, you aren't trying to use both BusLogic and Adaptec drivers),
  850. this can be changed to suit your needs (ie, keeping the same devices when new
  851. SCSI devices are added to the system on a new controller) by moving the
  852. individual entries.
  853.  
  854. Section 4.2 : Common Problems 
  855. Section 4.2.1 : SCSI timeouts 
  856.     Make sure interrupts are enabled correctly, and there are no 
  857.     IRQ, DMA, or address conflicts with other boards.
  858.  
  859. Section 4.2.2 : Failure of autoprobe routines on boards that rely on 
  860.     BIOS for autoprobe.
  861.  
  862.     If your SCSI adapter is one of the following :
  863.  
  864.         Adaptec 152x, Adaptec 151x, Adaptec AIC-6260,
  865.         Adaptec AIC-6360, Future Domain 1680, Future Domain TMC-950,
  866.         Future Domain TMC-8xx, Trantor T128, Trantor T128F, 
  867.         Trantor T228F, Seagate ST01, Seagate ST02, or a 
  868.         Western Digital 7000
  869.  
  870.     and it is not detected on bootup, ie you get a 
  871.  
  872.         scsi : 0 hosts
  873.  
  874.     message or a 
  875.  
  876.         scsi%d : type
  877.  
  878.     message is not printed for each supported SCSI adapter installed
  879.     in the system, you may have a problem with the autoprobe routine
  880.     not knowing about your board.
  881.  
  882.     Autodetection will fail for drivers using the BIOS for autodetection
  883.     if the BIOS is disabled.  Double check that your BIOS is enabled,
  884.     and not conflicting with any other peripherial BIOSes.
  885.  
  886.     Autodetection will also fail if the board's "signature" and/or 
  887.     BIOS address don't match known ones.
  888.  
  889.     If the BIOS is installed, please use DOS and DEBUG to 
  890.     find a signature that will detect your board -
  891.  
  892.     Ie, if your board lives at 0xc8000, under DOS do
  893.  
  894.     debug
  895.     d c800:0
  896.     q
  897.  
  898.     and send a message to the SCSI channel of the mailing list with
  899.     the ASCII message, with the length and offset from the base 
  900.     address (ie, 0xc8000).  Note that the EXACT text is required,
  901.     and you should provide both the hex and ASCII portions of 
  902.     the text.
  903.  
  904.     If no BIOS is installed, and you are using an Adaptec 152x,
  905.     Trantor T128, or Seagate driver, you can use command line 
  906.     or compile time overrides to force detection.
  907.  
  908.     Please consult the appropriate subsection for your SCSI board 
  909.     as well as Section 1.1 : 
  910.  
  911.  
  912. Section 4.2.3 : Failure of boards using memory mapped I/O
  913.  
  914.     (This include the Trantor T128 and Seagate boards, but not the 
  915.     Adaptec, Generic NCR5380, PAS16, and Ultrastor drivers)
  916.  
  917.     This is often caused when the memory mapped I/O ports 
  918.     are incorrectly cached.  You should have the board's 
  919.     address space marked as uncachable in the XCMOS settings.
  920.  
  921.     If this is not possible, you will have to disable cache 
  922.     entirely.
  923.  
  924.         If you have manually specified the address of the board,
  925.         remember that Linux needs the actual address of the board,
  926.         and not the 16 byte segment the documentation may refer to.
  927.  
  928.         Ie, 0xc8000 would be correct, 0xc800 would not work
  929.         and could cause memory corruption.
  930.  
  931. Section 4.2.4 : "kernel panic : cannot mount root device" when booting
  932.     an ALPHA driver boot floppy
  933.  
  934.     You'll need to edit the binary image of the kernel (before
  935.     or after writing it out to disk), and modify a few two byte 
  936.     fields (little endian) to gurantee that it will work on your 
  937.     system.  
  938.  
  939.     1.  default swap device at offset 502, this should be set to 0x00 0x00
  940.  
  941.     2.  ram disk size at offset 504, this should be set to the size
  942.         of the boot floppy in K - ie, 5.25" = 1200, 3.5" = 1440.
  943.  
  944.         This means the bytes are 
  945.  
  946.         3.5" : 0xA0 0x05 
  947.         5.25" : 0xB0  0x04
  948.  
  949.     3.  root device offset at 508, this should be 0x00 0x00, ie the boot
  950.         device. 
  951.  
  952.     dd or rawrite the file to a disk.  Insert the disk in the
  953.     first floppy drive, wait until it prompts you to insert
  954.     the root disk, and insert the root floppy from your 
  955.     distribution.
  956.  
  957.  
  958. Section 4.2.5 : Installing a device driver not included with the distribution 
  959.     kernel
  960.  
  961.     You need to start with the version of the kernel used by the 
  962.     driver author.  This revision may be alluded to in the documentation
  963.     included with the driver.
  964.  
  965.     Various recent kernel revisions can be found at 
  966.         nic.funet.fi:/pub/OS/Linux/PEOPLE/Linus
  967.  
  968.     as linux-version.tar.gz
  969.  
  970.     They are also mirrored at tsx-11.mit.edu and various other sites.
  971.  
  972.     cd to /usr/src.
  973.  
  974.     Remove your old Linux sources, if you want to keep a backup copy
  975.     of them
  976.  
  977.     mv linux linux-old
  978.  
  979.     Untar the archive
  980.  
  981.     gunzip < linux-0.99.12.tar.gz | tar xvfp -
  982.  
  983.     Apply the patches.  The patches will be relative to some directory
  984.     in the filesystem.  By examining the output file lines in the patch
  985.     file (grep for ^---), you can tell where this is - ie patches with 
  986.     these lines
  987.  
  988.     --- ./kernel/blk_drv/scsi/Makefile
  989.  
  990.     --- ./config.in Wed Sep  1 16:19:33 1993
  991.  
  992.  
  993.     would have the files relative to /usr/src/linux.
  994.  
  995.     Untar the driver sources at an appropriate place - you
  996.     can type
  997.  
  998.     tar tfv patches.tar 
  999.  
  1000.     to get a listing, and move files as necessary (The SCSI driver files 
  1001.     should live in /usr/src/linux/kernel/drivers/scsi)
  1002.  
  1003.     Either cd to the directory they are relative to and type
  1004.  
  1005.     patch -p0 < patch_file
  1006.  
  1007.     or tell patch to strip off leading path components.  Ie,
  1008.     if the files started with
  1009.  
  1010.     --- linux-new/kernel/blk_drv/scsi/Makefile 
  1011.  
  1012.     and you wanted to apply them while in /usr/src/linux, you 
  1013.     could cd to /usr/src/linux and type
  1014.  
  1015.     patch -p1 <  patches 
  1016.  
  1017.     to strip off the "linux-new" component.
  1018.  
  1019.     After you have applied the patches, look for any patch rejects,
  1020.     which will be the name of the rejected file with a # suffix appended.
  1021.  
  1022.     find /usr/src/linux/ -name "*#" -print 
  1023.  
  1024.     If any of these exist, look at them.  In some cases, the 
  1025.     differences will be in RCS identifiers and will be harmless,
  1026.     in other cases, you'll have to manually apply important 
  1027.     parts.  Documentation on diff files and patch is beyond the
  1028.     scope of this document.
  1029.  
  1030.     See also Section 1.8 : Configuring and building the kernel
  1031.  
  1032. Section 4.2.6 :  Installing a driver that has no patches
  1033.  
  1034.     In some cases, a driver author may not offer patches with 
  1035.     the .c and .h files which comprise his driver, or the patches
  1036.     may be against an older revision of the kernel and not go 
  1037.     in cleanly. 
  1038.  
  1039.     1.  Copy the .c and .h files into /usr/src/linux/drivers/scsi
  1040.  
  1041.     2.  Add the configuration option
  1042.  
  1043.         Edit /usr/src/linux/config.in, and add a line in the 
  1044.  
  1045.             *
  1046.             * SCSI low-level drivers
  1047.             *
  1048.  
  1049.         section, add a boolean configuration variable for your
  1050.         driver.  Ie,
  1051.  
  1052.         bool 'Allways IN2000 SCSI support' CONFIG_SCSI_IN2000 y
  1053.  
  1054.     3.  Add the makefile entries
  1055.  
  1056.         Edit /usr/src/linux/drivers/scsi/Makefile, and add 
  1057.         an entry like 
  1058.  
  1059.         ifdef CONFIG_SCSI_IN2000
  1060.         SCSI_OBS := $(SCSI_OBJS) in2000.o
  1061.         SCSI_SRCS := $(SCSI_SRCS) in2000.c
  1062.         endif
  1063.  
  1064.         before the 
  1065.  
  1066.         scsi.a: $(SCSI_OBJS)
  1067.  
  1068.         line in the makefile, where the .c file is the .c
  1069.         file you copied in, and the .o file is the basename
  1070.         of the .c file with a .o suffixed.
  1071.  
  1072.     4.  Add the entry points
  1073.  
  1074.         Edit /usr/src/linux/drivers/scsi/hosts.c, and 
  1075.         add a #inlclude for the header file, conditional
  1076.         on the CONFIG_SCSI preprocessor define you
  1077.         added to the configuration file.  Ie, after 
  1078.  
  1079.         #ifdef CONFIG_SCSI_GENERIC_NCR5380
  1080.         #include "g_NCR5380.h"
  1081.         #endif
  1082.  
  1083.         you might add 
  1084.  
  1085.         #ifdef CONFIG_SCSI_IN2000
  1086.         #include "in2000.h"
  1087.         #endif
  1088.  
  1089.         You will also need to add the Scsi_Host_Template 
  1090.         entry into the scsi_hosts[] array.  Take a look
  1091.         into the .h file, and you should find a #define that
  1092.         looks something like this : 
  1093.  
  1094.         #define IN2000 {"Always IN2000", in2000_detect, \
  1095.                 in2000_info, in2000_command,    \
  1096.                 in2000_queuecommand,            \
  1097.                 in2000_abort,                   \
  1098.                 in2000_reset,                   \
  1099.                 NULL,                           \
  1100.                 in2000_biosparam,               \
  1101.                 1, 7, IN2000_SG, 1, 0, 0}
  1102.  
  1103.         the name of the preprocessor define, and add 
  1104.         it into the scsi_hosts[] array, conditional on
  1105.         definition of the preprocessor symbol you used 
  1106.         in the configuration file.
  1107.  
  1108.         Ie, after 
  1109.  
  1110.         #ifdef CONFIG_SCSI_GENERIC_NCR5380
  1111.                 GENERIC_NCR5380,
  1112.         #endif
  1113.  
  1114.         you might add
  1115.  
  1116.         #ifdef CONFIG_SCSI_IN2000
  1117.             IN2000,
  1118.         #endif
  1119.  
  1120.     See also Section 1.8 : Configuring and building the kernel
  1121.  
  1122. Section 4.2.7 : Failure of a PCI board in a Compaq System
  1123.  
  1124.     A number of Compaq systems map the 32-bit BIOS extensions used
  1125.     to probe for PCI devices into memory which is inaccessable to
  1126.     the Linux kernel due to the memory layout.  If Linux is 
  1127.     unable to detect a supported PCI SCSI board, and the 
  1128.     kernel tells you something like
  1129.  
  1130.     pcibios_init: entry in high memory, unable to access
  1131.  
  1132.     Grab
  1133.  
  1134.         ftp://ftp.compaq.com/pub/softpaq/Software-Solutions/sp0921.zip
  1135.  
  1136.     which is a self-extracting archive of a program which will
  1137.     relocate the BIOS32 code.
  1138.  
  1139. Section 4.2.8 : A SCSI system with PCI boards hangs after the 
  1140.     %d Hosts message
  1141.  
  1142.     Some PCI systems have broken BIOSes which disable interrupts
  1143.     and fail to renable them before returning control to the 
  1144.     caller.  The following patch fixes this
  1145.  
  1146. --- bios32.c.orig    Mon Nov 13 22:35:31 1995
  1147. +++ bios32.c    Thu Jan 18 00:15:09 1996
  1148. @@ -56,6 +56,7 @@
  1149.  #include <linux/pci.h>
  1150.  
  1151.  #include <asm/segment.h>
  1152. +#include <asm/system.h>
  1153.  
  1154.  #define PCIBIOS_PCI_FUNCTION_ID     0xb1XX
  1155.  #define PCIBIOS_PCI_BIOS_PRESENT     0xb101
  1156. @@ -125,7 +126,9 @@
  1157.      unsigned long address;        /* %ebx */
  1158.      unsigned long length;        /* %ecx */
  1159.      unsigned long entry;        /* %edx */
  1160. +    unsigned long flags;
  1161.  
  1162. +    save_flags(flags);
  1163.      __asm__("lcall (%%edi)"
  1164.          : "=a" (return_code),
  1165.            "=b" (address),
  1166. @@ -134,6 +137,7 @@
  1167.          : "0" (service),
  1168.            "1" (0),
  1169.            "D" (&bios32_indirect));
  1170. +    restore_flags(flags);
  1171.  
  1172.      switch (return_code) {
  1173.          case 0:
  1174. @@ -161,11 +165,13 @@
  1175.      unsigned char present_status;
  1176.      unsigned char major_revision;
  1177.      unsigned char minor_revision;
  1178. +    unsigned long flags;
  1179.      int pack;
  1180.  
  1181.      if ((pcibios_entry = bios32_service(PCI_SERVICE))) {
  1182.          pci_indirect.address = pcibios_entry;
  1183.  
  1184. +        save_flags(flags);
  1185.          __asm__("lcall (%%edi)\n\t"
  1186.              "jc 1f\n\t"
  1187.              "xor %%ah, %%ah\n"
  1188. @@ -176,6 +182,7 @@
  1189.              : "1" (PCIBIOS_PCI_BIOS_PRESENT),
  1190.                "D" (&pci_indirect)
  1191.              : "bx", "cx");
  1192. +        restore_flags(flags);
  1193.  
  1194.          present_status = (pack >> 16) & 0xff;
  1195.          major_revision = (pack >> 8) & 0xff;
  1196. @@ -210,7 +217,9 @@
  1197.  {
  1198.      unsigned long bx;
  1199.      unsigned long ret;
  1200. +    unsigned long flags;
  1201.  
  1202. +    save_flags(flags);
  1203.      __asm__ ("lcall (%%edi)\n\t"
  1204.          "jc 1f\n\t"
  1205.          "xor %%ah, %%ah\n"
  1206. @@ -221,6 +230,7 @@
  1207.            "c" (class_code),
  1208.            "S" ((int) index),
  1209.            "D" (&pci_indirect));
  1210. +    restore_flags(flags);
  1211.      *bus = (bx >> 8) & 0xff;
  1212.      *device_fn = bx & 0xff;
  1213.      return (int) (ret & 0xff00) >> 8;
  1214. @@ -232,7 +242,9 @@
  1215.  {
  1216.      unsigned short bx;
  1217.      unsigned short ret;
  1218. +    unsigned long flags;
  1219.  
  1220. +    save_flags(flags);
  1221.      __asm__("lcall (%%edi)\n\t"
  1222.          "jc 1f\n\t"
  1223.          "xor %%ah, %%ah\n"
  1224. @@ -244,6 +256,7 @@
  1225.            "d" (vendor),
  1226.            "S" ((int) index),
  1227.            "D" (&pci_indirect));
  1228. +    restore_flags(flags);
  1229.      *bus = (bx >> 8) & 0xff;
  1230.      *device_fn = bx & 0xff;
  1231.      return (int) (ret & 0xff00) >> 8;
  1232. @@ -254,7 +267,9 @@
  1233.  {
  1234.      unsigned long ret;
  1235.      unsigned long bx = (bus << 8) | device_fn;
  1236. +    unsigned long flags;
  1237.  
  1238. +    save_flags (flags);
  1239.      __asm__("lcall (%%esi)\n\t"
  1240.          "jc 1f\n\t"
  1241.          "xor %%ah, %%ah\n"
  1242. @@ -273,7 +288,9 @@
  1243.  {
  1244.      unsigned long ret;
  1245.      unsigned long bx = (bus << 8) | device_fn;
  1246. +    unsigned long flags;
  1247.  
  1248. +    save_flags(flags);
  1249.      __asm__("lcall (%%esi)\n\t"
  1250.          "jc 1f\n\t"
  1251.          "xor %%ah, %%ah\n"
  1252. @@ -292,7 +309,9 @@
  1253.  {
  1254.      unsigned long ret;
  1255.      unsigned long bx = (bus << 8) | device_fn;
  1256. +    unsigned long flags;
  1257.  
  1258. +    save_flags(flags);
  1259.      __asm__("lcall (%%esi)\n\t"
  1260.          "jc 1f\n\t"
  1261.          "xor %%ah, %%ah\n"
  1262. @@ -303,6 +322,7 @@
  1263.            "b" (bx),
  1264.            "D" ((long) where),
  1265.            "S" (&pci_indirect));
  1266. +    restore_flags(flags);
  1267.      return (int) (ret & 0xff00) >> 8;
  1268.  }
  1269.  
  1270. @@ -311,7 +331,9 @@
  1271.  {
  1272.      unsigned long ret;
  1273.      unsigned long bx = (bus << 8) | device_fn;
  1274. +    unsigned long flags;
  1275.  
  1276. +    save_flags(flags);
  1277.      __asm__("lcall (%%esi)\n\t"
  1278.          "jc 1f\n\t"
  1279.          "xor %%ah, %%ah\n"
  1280. @@ -322,6 +344,7 @@
  1281.            "b" (bx),
  1282.            "D" ((long) where),
  1283.            "S" (&pci_indirect));
  1284. +    restore_flags(flags);
  1285.      return (int) (ret & 0xff00) >> 8;
  1286.  }
  1287.  
  1288. @@ -330,7 +353,9 @@
  1289.  {
  1290.      unsigned long ret;
  1291.      unsigned long bx = (bus << 8) | device_fn;
  1292. +    unsigned long flags;
  1293.  
  1294. +    save_flags(flags);
  1295.      __asm__("lcall (%%esi)\n\t"
  1296.          "jc 1f\n\t"
  1297.          "xor %%ah, %%ah\n"
  1298. @@ -341,6 +366,7 @@
  1299.            "b" (bx),
  1300.            "D" ((long) where),
  1301.            "S" (&pci_indirect));
  1302. +    restore_flags(flags);
  1303.      return (int) (ret & 0xff00) >> 8;
  1304.  }
  1305.  
  1306. @@ -349,7 +375,9 @@
  1307.  {
  1308.      unsigned long ret;
  1309.      unsigned long bx = (bus << 8) | device_fn;
  1310. +    unsigned long flags;
  1311.  
  1312. +    save_flags(flags);
  1313.      __asm__("lcall (%%esi)\n\t"
  1314.          "jc 1f\n\t"
  1315.          "xor %%ah, %%ah\n"
  1316. @@ -360,6 +388,7 @@
  1317.            "b" (bx),
  1318.            "D" ((long) where),
  1319.            "S" (&pci_indirect));
  1320. +    restore_flags(flags);
  1321.      return (int) (ret & 0xff00) >> 8;
  1322.  }
  1323.  
  1324. Section 4.3 : Adaptec 152x, 151x, 1505, 282x, Sound Blaster 16 SCSI, SCSI Pro, 
  1325.     Gigabyte, and other AIC 6260/6360 based products (Standard)
  1326. Supported Configurations :
  1327. BIOS addresses : 0xd8000, 0xdc000, 0xd0000, 0xd4000, 0xc8000, 0xcc000, 0xe0000,
  1328.     0xe4000.
  1329. Ports : 0x140, 0x340
  1330. IRQs : 9, 10, 11, 12
  1331. DMA is not used
  1332. IO : port mapped
  1333.  
  1334. Autoprobe :
  1335.  
  1336.     Works with many boards with an installed BIOS.  All
  1337.     other boards, including the Adaptec 1510, and Sound Blaster16 SCSI 
  1338.     must use a kernel command line or compile time override.
  1339.  
  1340. Autoprobe Override :
  1341. Compile time : 
  1342. Define PORTBASE, IRQ, SCSI_ID, RECONNECT, PARITY as appropriate, see Defines
  1343.  
  1344. kernel command line : aha152x=<PORTBASE>[,<IRQ>[,<SCSI-ID>[,<RECONNECT>[,<PARITY>]]]]
  1345.  
  1346. SCSI-ID is the SCSI ID of the HOST adapter, not of any devices you have installed
  1347. on it.  Usually, this should be 7.
  1348.  
  1349. To force detection at 0x340, IRQ 11, at SCSI-ID 7, allowing 
  1350. disconnect/reconnect, you would use the following command line 
  1351. option : 
  1352.  
  1353. aha152x=0x340,11,7,1
  1354.  
  1355. Antiquity Problems, fix by upgrading : 
  1356. 1.  The driver fails with VLB boards.  There was a timing problem
  1357.     in kernels older than revision 1.0.5.
  1358.  
  1359. Defines : 
  1360. AUTOCONF      : use configuration the controller reports (only 152x)
  1361. IRQ           : override interrupt channel (9,10,11 or 12) (default 11)
  1362. SCSI_ID       : override SCSI ID of AIC-6260 (0-7) (default 7)
  1363. RECONNECT     : override target disconnect/reselect (set to non-zero to 
  1364.         allow, zero to disable)
  1365. DONT_SNARF     : Don't register ports (pl12 and below)
  1366. SKIP_BIOSTEST  : Don't test for BIOS signature (AHA-1510 or disabled BIOS)
  1367. PORTBASE       : Force port base. Don't try to probe
  1368.  
  1369. Section 4.4 : Adaptec 154x, AMI FastDisk VLB, DTC 329x (Standard)  
  1370. Supported Configurations :
  1371. Ports : 0x330 and 0x334 
  1372. IRQs : 9, 10, 11, 12, 14, 15
  1373. DMA channels : 5, 6, 7
  1374. IO : port mapped, bus master
  1375.  
  1376. Autoprobe : will detect boards at 0x330 and 0x334 only.
  1377.  
  1378. Autoprobe override : 
  1379.    aha1542=<PORTBASE>[,<BUSON>,<BUSOFF>[,<DMASPEED>]]
  1380.  
  1381. Note: No-suffix boards, and early 'A' suffix boards do not support 
  1382.     scatter/gather, and thus don't work.  However, they can be made to 
  1383.     work for some definition of the word works if AHA1542_SCATTER is 
  1384.     changed to 0 in drivers/scsi/aha1542.h.
  1385.  
  1386. Note: BusLogic makes a series of boards that are software compatible with
  1387.     the Adaptec 1542, and these come in ISA, VLB, EISA, and PCI flavors.
  1388.  
  1389. Antiquity Problems, fix by upgrading : 
  1390.  
  1391. 1.  Linux kernel revisions prior to .99.10 don't support the 'C' 
  1392.     revision.
  1393.  
  1394. 2.  Linux kernel revisions prior to .99.14k don't support the 'C'
  1395.     revision options for 
  1396.  
  1397.     - BIOS support for the extended mapping for disks > 1G
  1398.  
  1399.     - BIOS support for > 2 drives
  1400.  
  1401.     - BIOS support for autoscanning the SCSI bus
  1402.  
  1403. 3.  Linux kernel revisions prior to .99.15e don't support the 'C'
  1404.     with the BIOS support for > 2 drives turned on and the
  1405.     BIOS support for the extended mapping for disks > 1G turned off.
  1406.  
  1407. 4.  Linux kernel revisions prior to .99.14u don't support the 'CF'
  1408.     revisions of the board.
  1409.  
  1410. 5.  Linux kernel revisions prior to 1.0.5 have a race condition 
  1411.     when multiple devices are accessed at the same time.
  1412.  
  1413. Common problems :
  1414.  
  1415. 1.  There are unexpected errors with a 154xC or 154xCF board,
  1416.  
  1417.     Early examples of the 154xC boards have a high slew rate on 
  1418.     one of the SCSI signals, which results in signal reflections 
  1419.     when cables with the wrong impedance are used.  
  1420.  
  1421.     Newer boards aren't much better, and also suffer from extreme
  1422.     cabling and termination sensitivity.
  1423.  
  1424.     See also Common Problems #2 and #3 and Section 1 : Common Problems,
  1425.     Subsection 1.1 : General Flakiness
  1426.  
  1427. 2.  There are unexpected errors with a 154xC or 154x with
  1428.     both internal and external devices connected.
  1429.  
  1430.     This is probably a termination problem.  In order to 
  1431.     use the software option to disable host adapter termination,
  1432.     you must turn switch 1 off.
  1433.     
  1434.     See also Common Problems #1 and #3 and Section 1 : Common Problems,
  1435.     Subsection 1.1 : General Flakiness
  1436.  
  1437. 3.  The SCSI subsystem locks up completely.
  1438.  
  1439.     There are cases where the lockups seem to occur when multiple devices
  1440.     are in use at the same time.  In this case, you can try contacting
  1441.     the manufacturer of the devices and see if firmware upgrades are
  1442.     available which would correct the problem.  As a last resort, you
  1443.     can go into aha1542.h and change AHA1542_MAILBOX to 1.  This will
  1444.     effectively limit you to one outstanding command on the scsi bus at
  1445.     one time, and may help the situation.  If you have tape drives or
  1446.     slow cdrom drives on the bus, this might not be a practical solution.
  1447.  
  1448.     See also Common Problems #1 and #2 and 
  1449.     Section 1.1 : Common Problems : General Flakiness 
  1450.     Section 1.8 : Common Problems : SCSI Lockups
  1451.  
  1452. 4.  An "Interrupt received, but no mail" message is printed on bootup
  1453.     and your SCSI devices are not detected.
  1454.  
  1455.     Disable the BIOS options to support the extended mapping for 
  1456.     disks > 1G, support for > 2 drives, and for autoscanning the 
  1457.     bus.  Or, upgrade to Linux .99.14k or newer.
  1458.  
  1459. 5.  If infinite timeout errors occur on 'C' revision boards,  you may need 
  1460.         to go into the Adaptec setup program and enable synchronous 
  1461.     negotiation.
  1462.  
  1463. 6.  Linux 1.2.x gives the message
  1464.  
  1465.     Unable to determine Adaptec DMA priority.  Disabling board.
  1466.  
  1467.     This is due to a conflict on some systems with the obsolete BusLogic 
  1468.     driver.  Either rebuild your kernel without it, or give the 
  1469.     BusLogic driver a command line option telling it to look
  1470.     somewhere other than where your controller is configured.  Ie, 
  1471.     if you have an Adaptec board at port 0x334, and nothing at 
  1472.     0x330, use a command line option like
  1473.  
  1474.     buslogic=0x330
  1475.  
  1476. 8.  The system locks up with simultaneous access to multiple devices on 
  1477.     a 1542C or 1540C and disconnection enabled
  1478.  
  1479.     Some Adaptec firmware revisions have bugs.  Upgrading to 
  1480.     BIOS v2.11 purportedly fixes these problems.
  1481.  
  1482. Section 4.5 : Adaptec 174x
  1483. Supported Configurations : 
  1484. Slots : 1-8
  1485. Ports : EISA board, not applicable
  1486. IRQs : 9, 10, 11, 12, 14, 15
  1487. DMA Channels : EISA board, not applicable
  1488. IO : port mapped, bus master
  1489.  
  1490. Autoprobe : works with all supported configurations
  1491.  
  1492. Autoprobe override : none
  1493.  
  1494. Note: This board has been discontinued by Adaptec.
  1495.  
  1496. Common Problems : 
  1497. 1. If the Adaptec 1740 driver prints the message 
  1498.     "aha1740: Board detected, but EBCNTRL = %x, so disabled it."
  1499.  
  1500.     your board was disabled because it was not running in enhanced 
  1501.         mode.  Boards running in standard 1542 mode are not supported.
  1502.  
  1503. Section 4.6 : Adaptec 274x, 284x (Standard) 294x (ALPHA)
  1504.     A newer version which also supports the Adaptec 294x boards 
  1505. is available at 
  1506.  
  1507.     ftp://ftp.ims.com/pub/Linux/aic7xxx
  1508.  
  1509. Supported Configurations 
  1510.         274x            284x        294x
  1511. EISA Slots :     1-12            N/A        N/A
  1512. Ports :     N/A            ALL        ALL
  1513. IRQs :         ALL            ALL        ALL
  1514. DMA Channels :     N/A            ALL        N/A
  1515.  
  1516. IO : port mapped, bus master
  1517.  
  1518. Autoprobe Override :
  1519. kernel command line : aha274x=extended
  1520.     (to force extended mapping)
  1521.  
  1522. Notes:
  1523. 1.  BIOS MUST be enabled
  1524. 2.  The B channel on 2742AT boards is ignored.
  1525. 3.  CONFIG_PCI must be set if you are using a PCI board.
  1526.  
  1527.  
  1528. Section 4.7 : Allways IN2000  (STANDARD)
  1529. Ports : 0x100, 0x110, 0x200, 0x220
  1530. IRQs : 10, 11, 14, 15
  1531. DMA is not used
  1532. IO : port mapped
  1533.  
  1534. Autoprobe : BIOS not required
  1535.  
  1536. Autoprobe override : none
  1537.  
  1538. Common Problems : 
  1539.  
  1540. 1.  There are known problems in systems with IDE drives and with 
  1541.     swapping.
  1542.  
  1543.  
  1544. Section 4.8 : BusLogic MultiMaster Host Adapters
  1545.  
  1546. (this section Copyright 1995 by Leonard N. Zubkoff <lnz@dandelion.com>)
  1547. (see README.BusLogic for more complete BusLogic driver documentation)
  1548.  
  1549.           BusLogic MultiMaster SCSI Driver for Linux
  1550.  
  1551.                Version 1.2.2 for Linux 1.2.13
  1552.                Version 1.3.2 for Linux 1.3.88
  1553.  
  1554.          ftp://ftp.dandelion.com/BusLogic-1.2.2.tar.gz
  1555.          ftp://ftp.dandelion.com/BusLogic-1.3.2.tar.gz
  1556.  
  1557.                  16 April 1996
  1558.  
  1559.                    Leonard N. Zubkoff
  1560.                    Dandelion Digital
  1561.                    lnz@dandelion.com
  1562.  
  1563. BusLogic, Inc. designs and manufactures a variety of high performance SCSI host
  1564. adapters which share a common programming interface across a diverse collection
  1565. of bus architectures by virtue of their MultiMaster ASIC technology.  This
  1566. driver supports all present BusLogic MultiMaster Host Adapters, and should
  1567. support any future MultiMaster designs with little or no modification.  Host
  1568. adapters based on the new FlashPoint architecture are not supported by this
  1569. driver; consult the README.FlashPoint file for information about a program to
  1570. upgrade Linux users from the unsupported FlashPoint LT to the supported BT-948.
  1571.  
  1572. My primary goals in writing this completely new BusLogic driver for Linux are
  1573. to achieve the full performance that BusLogic SCSI Host Adapters and modern
  1574. SCSI peripherals are capable of, and to provide a highly robust driver that can
  1575. be depended upon for high performance mission critical applications.  All of
  1576. the major performance and error recovery features can be configured from the
  1577. Linux kernel command line, allowing individual installations to tune driver
  1578. performance and error recovery to their particular needs.
  1579.  
  1580. BusLogic has been an excellent company to work with and I highly recommend
  1581. their products to the Linux community.  In November 1995, I was offered the
  1582. opportunity to become a beta test site for their latest MultiMaster product,
  1583. the BT-948 PCI Ultra SCSI Host Adapter, and then again for the BT-958 PCI Wide
  1584. Ultra SCSI Host Adapter in January 1996.  This was mutually beneficial since
  1585. BusLogic received a degree and kind of testing that their own testing group
  1586. cannot readily achieve, and the Linux community has available high performance
  1587. host adapters that have been well tested with Linux even before being brought
  1588. to market.  This relationship has also given me the opportunity to interact
  1589. directly with their technical staff, to understand more about the internal
  1590. workings of their products, and in turn to educate them about the needs and
  1591. potential of the Linux community.  Their interest and support is greatly
  1592. appreciated.
  1593.  
  1594. Unlike some other vendors, if you contact BusLogic Technical Support with a
  1595. problem and are running Linux, they will not tell you that your use of their
  1596. products is unsupported.  Their latest product marketing literature even states
  1597. "BusLogic SCSI host adapters are compatible with all major operating systems
  1598. including: ... Linux ...".
  1599.  
  1600. BusLogic, Inc. is located at 4151 Burton Drive, Santa Clara, California, 95054,
  1601. USA and can be reached by Voice at 408/492-9090 or by FAX at 408/492-1542.
  1602. BusLogic maintains a World Wide Web site at http://www.buslogic.com, an
  1603. anonymous FTP site at ftp.buslogic.com, and a BBS at 408/492-1984.  BusLogic
  1604. Technical Support can be reached by electronic mail at techsup@buslogic.com, by
  1605. Voice at 408/654-0760, or by FAX at 408/492-1542.  Contact information for
  1606. offices in Europe and Japan is available on the Web site.
  1607.  
  1608.                 SUPPORTED HOST ADAPTERS
  1609.  
  1610. The following list comprises the supported BusLogic SCSI Host Adapters as of
  1611. the date of this document.  It is recommended that anyone purchasing a BusLogic
  1612. Host Adapter not in the following table contact the author beforehand to verify
  1613. that it is or will be supported.
  1614.  
  1615. "W" Series Host Adapters:
  1616.  
  1617. BT-948        PCI        Ultra Fast Single-ended SCSI-2
  1618. BT-958        PCI        Ultra Wide Single-ended SCSI-2
  1619. BT-958D        PCI        Ultra Wide Differential SCSI-2
  1620.  
  1621. "C" Series Host Adapters:
  1622.  
  1623. BT-946C        PCI        Fast Single-ended SCSI-2
  1624. BT-956C        PCI        Fast Wide Single-ended SCSI-2
  1625. BT-956CD    PCI        Fast Wide Differential SCSI-2
  1626. BT-445C        VLB        Fast Single-ended SCSI-2
  1627. BT-747C        EISA    Fast Single-ended SCSI-2
  1628. BT-757C        EISA    Fast Wide Single-ended SCSI-2
  1629. BT-757CD    EISA    Fast Wide Differential SCSI-2
  1630. BT-545C        ISA        Fast Single-ended SCSI-2
  1631. BT-540CF    ISA        Fast Single-ended SCSI-2
  1632.  
  1633. "S" Series Host Adapters:
  1634.  
  1635. BT-445S        VLB        Fast Single-ended SCSI-2
  1636. BT-747S        EISA    Fast Single-ended SCSI-2
  1637. BT-747D        EISA    Fast Differential SCSI-2
  1638. BT-757S        EISA    Fast Wide Single-ended SCSI-2
  1639. BT-757D        EISA    Fast Wide Differential SCSI-2
  1640. BT-545S        ISA        Fast Single-ended SCSI-2
  1641. BT-542D        ISA        Fast Differential SCSI-2
  1642. BT-742A        EISA    Single-ended SCSI-2 (742A revision H)
  1643. BT-542B        ISA        Single-ended SCSI-2 (542B revision H)
  1644.  
  1645. "A" Series Host Adapters:
  1646.  
  1647. BT-742A        EISA    Single-ended SCSI-2 (742A revisions A - G)
  1648. BT-542B        ISA        Single-ended SCSI-2 (542B revisions A - G)
  1649.  
  1650. AMI FastDisk Host Adapters that are true BusLogic clones are supported by this
  1651. driver.
  1652.  
  1653.               BT-948/958/958D INSTALLATION NOTES
  1654.  
  1655. The BT-948/958/958D PCI Ultra SCSI Host Adapters have some features which may
  1656. require attention in some circumstances when installing Linux.
  1657.  
  1658. o PCI I/O Port Assignments
  1659.  
  1660.   When configured to factory default settings, the BT-948/958/958D will only
  1661.   recognize the PCI I/O port assignments made by the motherboard's PCI BIOS.
  1662.   The BT-948/958/958D will not respond to any of the ISA compatible I/O ports
  1663.   that previous BusLogic SCSI Host Adapters respond to.  This driver supports
  1664.   the PCI I/O port assignments, so this is the preferred configuration.
  1665.   However, if the obsolete BusLogic driver must be used for any reason, such as
  1666.   a Linux distribution that does not yet use this driver in its boot kernel,
  1667.   BusLogic has provided an AutoSCSI configuration option to enable a legacy ISA
  1668.   compatible I/O port.
  1669.  
  1670.   To enable this backward compatibility option, invoke the AutoSCSI utility via
  1671.   Ctrl-B at system startup and select "Adapter Configuration", "View/Modify
  1672.   Configuration", and then change the "ISA Compatible Port" setting from
  1673.   "Disable" to "Primary" or "Alternate".  Once this driver has been installed,
  1674.   the "ISA Compatible Port" option should be set back to "Disable" to avoid
  1675.   possible future I/O port conflicts.  The older BT-946C/956C/956CD also have
  1676.   this configuration option, but the factory default setting is "Primary".
  1677.  
  1678. o PCI Slot Scanning Order
  1679.  
  1680.   In systems with multiple BusLogic PCI Host Adapters, the order in which the
  1681.   PCI slots are scanned may appear reversed with the BT-948/958/958D as
  1682.   compared to the BT-946C/956C/956CD.  For booting from a SCSI disk to work
  1683.   correctly, it is necessary that the host adapter's BIOS and the kernel agree
  1684.   on which disk is the boot device, which requires that they recognize the PCI
  1685.   host adapters in the same order.  The motherboard's PCI BIOS provides a
  1686.   standard way of enumerating the PCI host adapters, which is used by the Linux
  1687.   kernel.  Some PCI BIOS implementations enumerate the PCI slots in order of
  1688.   increasing bus number and device number, while others do so in the opposite
  1689.   direction.
  1690.  
  1691.   Unfortunately, Microsoft decided that Windows 95 would always enumerate the
  1692.   PCI slots in order of increasing bus number and device number regardless of
  1693.   the PCI BIOS enumeration, and requires that their scheme be supported by the
  1694.   host adapter's BIOS to receive Windows 95 certification.  Therefore, the
  1695.   factory default settings of the BT-948/958/958D enumerate the host adapters
  1696.   by increasing bus number and device number.  To disable this feature, invoke
  1697.   the AutoSCSI utility via Ctrl-B at system startup and select "Adapter
  1698.   Configuration", "View/Modify Configuration", press Ctrl-F10, and then change
  1699.   the "Use Bus And Device # For PCI Scanning Seq." option to OFF.
  1700.  
  1701.   This driver will interrogate the setting of the PCI Scanning Sequence option
  1702.   so as to recognize the host adapters in the same order as they are enumerated
  1703.   by the host adapter's BIOS.
  1704.  
  1705.               BUSLOGIC ANNOUNCEMENTS MAILING LIST
  1706.  
  1707. The BusLogic Announcements Mailing List provides a forum for informing Linux
  1708. users of new driver releases and other announcements regarding Linux support
  1709. for BusLogic SCSI Host Adapters.  To join the mailing list, send a message to
  1710. "BusLogic-announce-request@dandelion.com" with the line "subscribe" in the
  1711. message body.
  1712.  
  1713.  
  1714. Section 4.9 : BusLogic FlashPoint Host Adapters
  1715. (this section Copyright 1995 by Leonard N. Zubkoff <lnz@dandelion.com>)
  1716.  
  1717. There are no Linux drivers for the FlashPoint LT/DL/LW (BT-930/932/950)
  1718. available and it is not clear when or if there will be any.  The FlashPoint
  1719. boards have a different architecture from the MultiMaster boards and have no
  1720. onboard CPU, only a SCSI sequencer engine.  They are positioned as a desktop
  1721. workstation product, and are not particularly well suited for a high
  1722. performance multitasking operating system like Linux.
  1723.  
  1724. The MultiMaster BT-948/958 have an onboard CPU and the mailbox programming
  1725. interface allows for parallelism and pipelining between the host operating
  1726. system and the host adapter, whereas the FlashPoint boards require frequent
  1727. host CPU intervention.  As interrupt latencies rise in a loaded multitasking
  1728. system, the BT-948/958 should maintain excellent performance whereas the
  1729. FlashPoint's performance will likely drop quite rapidly.  Furthermore, the
  1730. firmware on the BT-948/958 contains the low level knowledge for proper
  1731. interaction with the SCSI bus, whereas with a sequencer engine the Linux driver
  1732. must contain some or all of this information, and it often takes quite a long
  1733. time to get all the kinks worked out.  Given the relatively small difference in
  1734. the street price of these products, the BT-948 or BT-958 is clearly the better
  1735. choice for Linux.
  1736.  
  1737. <begin quotation>
  1738.  
  1739.                  ANNOUNCEMENT
  1740.           BusLogic FlashPoint/BT-948 Upgrade Program
  1741.                 1 February 1996
  1742.  
  1743. Ever since its introduction last October, the BusLogic FlashPoint LT has
  1744. been problematic for members of the Linux community, in that no Linux
  1745. drivers have been available for this new Ultra SCSI product.  Despite it's
  1746. officially being positioned as a desktop workstation product, and not being
  1747. particularly well suited for a high performance multitasking operating
  1748. system like Linux, the FlashPoint LT has been touted by computer system
  1749. vendors as the latest thing, and has been sold even on many of their high
  1750. end systems, to the exclusion of the older MultiMaster products.  This has
  1751. caused grief for many people who inadvertently purchased a system expecting
  1752. that all BusLogic SCSI Host Adapters were supported by Linux, only to
  1753. discover that the FlashPoint was not supported and would not be for quite
  1754. some time, if ever.
  1755.  
  1756. After this problem was identified, BusLogic contacted its major OEM
  1757. customers to make sure the BT-946C/956C MultiMaster cards would still be
  1758. made available, and that Linux users who mistakenly ordered systems with
  1759. the FlashPoint would be able to upgrade to the BT-946C.  While this helped
  1760. many purchasers of new systems, it was only a partial solution to the
  1761. overall problem of FlashPoint support for Linux users.  It did nothing to
  1762. assist the people who initially purchased a FlashPoint for a supported
  1763. operating system and then later decided to run Linux, or those who had
  1764. ended up with a FlashPoint LT, believing it was supported, and were unable
  1765. to return it.
  1766.  
  1767. In the middle of December, I asked to meet with BusLogic's senior
  1768. management to discuss the issues related to Linux and free software support
  1769. for the FlashPoint.  Rumors of varying accuracy had been circulating
  1770. publicly about BusLogic's attitude toward the Linux community, and I felt
  1771. it was best that these issues be addressed directly.  I sent an email
  1772. message after 11pm one evening, and the meeting took place the next
  1773. afternoon.  Unfortunately, corporate wheels sometimes grind slowly,
  1774. especially when a company is being acquired, and so it's taken until now
  1775. before the details were completely determined and a public statement could
  1776. be made.
  1777.  
  1778. BusLogic is not prepared at this time to release the information necessary
  1779. for third parties to write drivers for the FlashPoint.  The only existing
  1780. FlashPoint drivers have been written directly by BusLogic Engineering, and
  1781. there is no FlashPoint documentation sufficiently detailed to allow outside
  1782. developers to write a driver without substantial assistance.  While there
  1783. are people at BusLogic who would rather not release the details of the
  1784. FlashPoint architecture at all, that debate has not yet been settled either
  1785. way.  In any event, even if documentation were available today it would
  1786. take quite a while for a usable driver to be written, especially since I'm
  1787. not convinced that the effort required would be worthwhile.
  1788.  
  1789. However, BusLogic does remain committed to providing a high performance
  1790. SCSI solution for the Linux community, and does not want to see anyone left
  1791. unable to run Linux because they have a Flashpoint LT.  Therefore, BusLogic
  1792. has put in place a direct upgrade program to allow any Linux user worldwide
  1793. to trade in their FlashPoint LT for the new BT-948 MultiMaster PCI Ultra
  1794. SCSI Host Adapter.  The BT-948 is the Ultra SCSI successor to the BT-946C
  1795. and has all the best features of both the BT-946C and FlashPoint LT,
  1796. including smart termination and a flash PROM for easy firmware updates, and
  1797. is of course compatible with the present Linux driver.  The price for this
  1798. upgrade has been set at US $45, and the upgrade program will be
  1799. administered through BusLogic Technical Support, which can be reached by
  1800. electronic mail at techsup@BusLogic.com, by Voice at +1 408 654-0760, or by
  1801. FAX at +1 408 492-1542.
  1802.  
  1803. I was a beta test site for the BT-948 and versions 1.2.1 and 1.3.1 of my
  1804. BusLogic driver already include latent support for the BT-948.  Additional
  1805. cosmetic support for the Ultra SCSI MultiMaster cards will be added in a
  1806. subsequent release.  As a result of this cooperative testing process,
  1807. several firmware bugs were found and corrected (make sure you have firmware
  1808. version 5.05R or later).  My heavily loaded Linux test system provided an
  1809. ideal environment for testing error recovery processes that are much more
  1810. rarely exercised in production systems, but are crucial to overall system
  1811. stability.  It was especially convenient being able to work directly with
  1812. their firmware engineer in demonstrating the problems under control of the
  1813. firmware debugging environment; things sure have come a long way since the
  1814. last time I worked on firmware for an embedded system.  I am presently
  1815. working on some performance testing and expect to have some data to report
  1816. in the not too distant future.
  1817.  
  1818. BusLogic asked me to send this announcement since a large percentage of the
  1819. questions regarding support for the FlashPoint have either been sent to me
  1820. directly via email, or have appeared in the Linux newsgroups in which I
  1821. participate.  To summarize, BusLogic is offering Linux users an upgrade
  1822. from the unsupported FlashPoint LT (BT-930) to the supported BT-948 for US
  1823. $45.  Contact BusLogic Technical Support at techsup@BusLogic.com or +1 408
  1824. 654-0760 to take advantage of their offer.
  1825.  
  1826.         Leonard N. Zubkoff
  1827.         lnz@dandelion.com
  1828.  
  1829. <end quotation>
  1830.  
  1831.  
  1832. Section 4.10 : EATA: DPT Smartcache, Smartcache Plus, Smartcache III (Standard)
  1833. Supported boards: all, that support the EATA-DMA protocol (no PM2001).
  1834.            DPT Smartcache: PM2011  PM2012A
  1835.                                    PM2012B
  1836.            Smartcache III: PM2021  PM2022  PM2024
  1837.                                    PM2122  PM2124
  1838.                                    PM2322
  1839.            SmartRAID     : PM3021  PM3222  PM3224
  1840.        many of those boards are also available as SKXXXX versions,
  1841.            which are supported as well.
  1842.  
  1843. Supported Configurations :
  1844. Slots        : ALL
  1845. Ports        : ALL
  1846. IRQs         : ALL level & edge triggered
  1847. DMA Channels : ISA ALL, EISA/PCI not applicable
  1848. IO           : port mapped, bus master
  1849. SCSI Channels: ALL
  1850. Autoprobe    : works with all supported configurations
  1851. Autoprobe Override :
  1852.  Compile time : diskgeometry in eata_dma.h for unusual disk geometries
  1853.                which came from the usage of the old DPTFMT utility.
  1854. The latest version of the EATA-DMA driver and a Slackware bootdisk should 
  1855. be available on:
  1856.   ftp.uni-mainz.de:/pub/Linux/arch/i386/system/EATA/
  1857.  
  1858. Common Problems : 
  1859. 1.  The IDE driver detects the ST-506 interface of the EATA board. 
  1860. 1.1     This will look like similar to one of the following 2 examples:
  1861.  
  1862.     hd.c: ST-506 interface disk with more than 16 heads detected,
  1863.       probably due to non-standard sector translation.  Giving up.
  1864.       (disk %d: cyl=%d, sect=63, head=64)
  1865.  
  1866.         hdc: probing with STATUS instead of ALTSTATUS
  1867.         hdc: MP0242 A, 0MB w/128KB Cache, CHS=0/0/0
  1868.      hdc: cannot handle disk with 0 physical heads
  1869.      hdd: probing with STATUS instead of ALTSTATUS
  1870.      hdd: MP0242 A, 0MB w/128KB Cache, CHS=0/0/0
  1871.      hdd: cannot handle disk with 0 physical heads
  1872.  
  1873.         If the IDE driver gets into trouble because of this, ie. you can't
  1874.     access your (real) IDE hardware, change the IO Port and/or the IRQ of 
  1875.     the EATA board.
  1876. 1.2     If the IDE driver finds hardware it can handle ie. harddisks with
  1877.         a capacity <=504MB, it will allocate the IO Port and IRQ, so that
  1878.         the eata driver can't utilize them. In this case also change IO Port
  1879.         and IRQ (!= 14,15).
  1880.  
  1881.  
  1882. 2. Some old SK2011 boards have a broken firmware. Please contact DPT's 
  1883.         customer support for an update.
  1884.  
  1885. Notes:
  1886. 1.  CONFIG_PCI must be set if you are using a PCI board.
  1887.  
  1888. Section 4.11 : Future Domain 16x0 with TMC-1800, TMC-18C30, TMC-18C50,
  1889.     or TMC-36C70 chip 
  1890. Supported Configurations :
  1891. BIOSs :  2.0, 3.0, 3.2, 3.4, 3.5
  1892. BIOS Addresses :    0xc8000, 0xca000, 0xce000, 0xde000
  1893. Ports : 0x140, 0x150, 0x160, 0x170
  1894. IRQs : 3, 5, 10, 11, 12, 14, 15
  1895. DMA is not used
  1896. IO : port mapped
  1897.  
  1898. Autoprobe : works with all supported configurations, requires 
  1899.     installed BIOS
  1900.  
  1901. Autoprobe Override : none
  1902.  
  1903. Antiquity Problems, fix by upgrading : 
  1904.  
  1905. 1.  Old versions do not support the TMC-18C50 chip, and will fail with
  1906.     newer boards. 
  1907.  
  1908. 2.  Old versions will not have the most current BIOS signatures for 
  1909.     autodetection.
  1910.  
  1911. 3.  Versions prior to the one included in Linux 1.0.9 and 1.1.6 
  1912.     don't support the new SCSI chip or 3.4 BIOS.
  1913.  
  1914. Notes : 
  1915.     The Future Domain BIOS often scans for SCSI-devices from highest
  1916.     ID to 0, in reverse order of other SCSI BIOSes.  sda will be the last 
  1917.     "drive letter" (ie, D: rather than C:).  You may also need to use a 
  1918.     a disktab override for LILO.
  1919.  
  1920. Section 4.12 : Generic NCR5380 / T130B
  1921. Supported and Unsupported Configurations : 
  1922. Ports : all
  1923. IRQs : all
  1924. DMA channels - DMA is not used
  1925. IO : port mapped
  1926.  
  1927. Autoprobe : none
  1928.  
  1929. Autoprobe Override :
  1930. Compile time : Define GENERIC_NCR5380_OVERRIDE to be an array of tupples 
  1931. with port, irq, dma, board type - ie 
  1932. #define GENERIC_NCR5380_OVERRIDE {{0x330, 5, DMA_NONE, BOARD_NCR5380}} 
  1933.  
  1934. for a NCR5380 board at port 330, IRQ 5.
  1935.  
  1936. #define GENERIC_NCR5380_OVERRIDE {{0x350, 5, DMA_NONE, BOARD_NCR53C400}}
  1937.  
  1938. for a T130B at port 0x350.
  1939.  
  1940. Older versions of the code eliminate the BOARD_* entry.
  1941.  
  1942. The symbolic IRQs IRQ_NONE and IRQ_AUTO may be used.
  1943.     
  1944. kernel command line : ncr5380=port,irq
  1945.               ncr5380=port,irq,dma
  1946.               ncr53c400=port,irq
  1947.          
  1948. 255 may be used for no irq, 254 for irq autoprobe.
  1949.  
  1950. Common Problems : 
  1951.  
  1952. 1. Using the T130B board with the old (pre public release 6) generic 
  1953.     NCR5380 driver which doesn't support the ncr53c400 command
  1954.     line option.
  1955.  
  1956.     The NCR5380 compatable registers are offset eight from
  1957.     the base address.  So, if your address is 0x350, use 
  1958.  
  1959.     ncr5380=0x358,254
  1960.  
  1961.     on the kernel command line.  
  1962.  
  1963. Antiquity problems, fix by upgrading :
  1964. 1.  The kernel locks up during disk access with T130B or other 
  1965.     NCR53c400 boards
  1966.  
  1967.     Pre-public release 6 versions of the Generic NCR5380
  1968.     driver didn't support interrupts on these boards.  
  1969.     Upgrade.
  1970.  
  1971.  
  1972. Notes : the generic driver doesn't support DMA yet, and pseudo-DMA 
  1973.     isn't supported in the generic driver.
  1974.  
  1975. Section 4.13 : NCR53c8xx (Standard)
  1976.     
  1977. Supported and Unsupported Configurations :
  1978. Base addresses : ALL
  1979. IRQs : ALL
  1980. DMA channels : PCI, not applicable
  1981. IO : port mapped, busmastering
  1982.  
  1983. Autoprobe : requires PCI BIOS, uses PCI BIOS routines to
  1984.     search for devices and read configuration space
  1985.  
  1986. The driver uses the pre-programmed values in some registers for 
  1987. initialization, so a BIOS must be installed.
  1988.  
  1989. Antiquity Problems, fix by upgrading :
  1990.  
  1991. 1.  Older versions of Linux had a problem with swapping
  1992.     See Section 5.2.7 : Disks :  System Hangs When Swapping
  1993.  
  1994. 2.  Older versions of Linux didn't recognize '815 and '825
  1995.     boards.
  1996.  
  1997. 3.  Distribution kernels include release 4 or 5 of the driver, which does 
  1998.     not support useful things like disconnect/reconnect (the most noticeable
  1999.     effect of this being attempts to retension/rewind/file space a tape 
  2000.     lock you out of all SCSI devices), multiple host adapters, and 
  2001.     BIOSless operation.
  2002.  
  2003.     The latest release of the driver is available at
  2004.  
  2005.     ftp://tsx-11.mit.edu/pub/linux/ALPHA/scsi/ncr53c810
  2006.  
  2007.     Currently, this is a 1.2.10 and newer patch, although the next 
  2008.     release will be 1.3.x exclusively.  These patches are NOT
  2009.     entirely clean due to some ELF and other patches which were
  2010.     in the baseline revision of my source tree, and if you 
  2011.     can't manually correct the (four) problems you should get,
  2012.     you shouldn't use them.  Note that only the newest patch is
  2013.     needed; these are not incremental.
  2014.  
  2015.     If you wish to run the newer NCR driver with a 1.3.x kernel
  2016.     before then, Harald Evensen <Harald.Evensen@pvv.unit.no> has 
  2017.     adapted the patches for 1.3.x
  2018.  
  2019.     ftp://ftp.pvv.unit.no/pub/Linux/ALPHA/ncr
  2020.  
  2021.     These patches should be clean.
  2022.  
  2023.     Please see all of the READMEs in these directories.  You should 
  2024.     also join the NCR mailing list if you are interested in running 
  2025.     the ALPHA code, since interim bug fixes and announcements of the 
  2026.     next release are posted to this list.
  2027.  
  2028.     To subscribe, send mail to majordomo@colorado.edu with 
  2029.  
  2030.     subscribe ncr53c810
  2031.     
  2032.     in the text.  You can unsubscribe by sending mail to the same address
  2033.     and including
  2034.     
  2035.     unsubscribe ncr53c810
  2036.  
  2037.     in the text.
  2038.  
  2039. Common Problems : 
  2040.  
  2041. 1.  Many people have encountered problems where the chip worked
  2042.     fine under DOS, but failed under Linux with a timeout on
  2043.     test 1 due to a lost interrupt.
  2044.  
  2045.     This is often due to a mismatch between the IRQ hardware
  2046.     jumper for a slot or mainboard device and the value set
  2047.     in the CMOS setup.  DOUBLE CHECK 
  2048.         - The IRQ you are using is used only by your onboard NCR chip, 
  2049.           or the slot an NCR board is installed in
  2050.         - Any main board jumpers selecting the IRQ for the onboard
  2051.           chip or slot match your CMOS setup.a
  2052.         - Some PCI mainboards have an "auto" assignment 
  2053.           feature, which will not work.
  2054.  
  2055.     It may also be due to PCI INTB, INTC, or INTD being selected
  2056.     on a PCI board in a system which only supports PCI INTA.  If you
  2057.     are using an NCR board which has jumpers to select between PCI 
  2058.     interrupt lines, make sure you are using INTA.
  2059.  
  2060.     Finally, PCI should be using level-sensitive rather
  2061.     than edge triggered interrupts.  Check that your board
  2062.     is jumpered for level-sensitive, and if that fails
  2063.     try edge-triggered because your system may be 
  2064.     broken.
  2065.  
  2066.     This problem is especially common with Viglen some Viglen
  2067.     motherboards, where the mainboard IRQ jumper settings are
  2068.     NOT as documented in the manual.  I've been told that what
  2069.     claims to be IRQ5 is really IRQ9, your mileage will vary.
  2070.  
  2071. 2.  Lockups / other problems occur when using an S3 928, or Tseng 
  2072.         ET4000W32 PCI video board.
  2073.  
  2074.     There are hardware bugs in at least some revisions of these
  2075.     chips.  Don't use them.
  2076.  
  2077. 3.  You get a message on boot up indicating that the I/O mapping 
  2078.     was disabled because base address 0 bits 0..1 indicated a 
  2079.     non I/O mapping
  2080.  
  2081.     This is due to a BIOS bug in some machines which results in
  2082.     dword reads of configuration regsisters returning the 
  2083.     high and low 16 bit words swapped.
  2084.  
  2085. 4.  Some systems have problems if PCI write posting, or CPU->
  2086.     PCI buffering are enabled.  If you have problems,
  2087.     disable these options.
  2088.  
  2089. 5.  Some systems with the NCR SDMS software in an onboard BIOS
  2090.  
  2091.         ROM and in the system BIOS are unable to boot DOS. 
  2092.     Disabling the image in one place should rectify this 
  2093.     problem.
  2094.  
  2095. 6.  If you encounter the message 
  2096.  
  2097.     "scsi%d: IRQ0 not free, detaching"
  2098.  
  2099.     or
  2100.  
  2101.     "scsi%d: IRQ255 not free, detaching"
  2102.  
  2103.     The NCR chip had all 0 or 1 bits stored in the PCI configuration 
  2104.     register.  Either you have configuration problems (see Common 
  2105.     Problem 1), or you have a defective mainboard BIOS.
  2106.  
  2107.     As a work arround, you could edit drivers/scsi/ncr53c7,8xx.c,
  2108.     and change pci_init() so that you have 
  2109.  
  2110.         irq = my_irq;
  2111.  
  2112.     before 
  2113.             return normal_init (tpnt, board, chip, (int) base, 
  2114.             (int) io_port, (int) irq, DMA_NONE, 1, bus, device_fn, 
  2115.             options);
  2116.  
  2117. 7.  Some systems have hideous, broken, BIOS chips.  Don't 
  2118.     make any bug reports until you've made sure you have
  2119.     the newest ROM from your vendor.
  2120.  
  2121. 8.  The command line overrides ncr53c810=xxx, etc. don't work.   
  2122.  
  2123.     In stock kernels, this is because their entry points are not included 
  2124.     in init/main.c, which is quite intentional : 
  2125.  
  2126.         The driver makes no attempt to avoid autoprobing for a board
  2127.         where a command line override was used, so if an override
  2128.         is used where the board actually showed up to the PCI
  2129.         configuration routines, you'll have big problems.
  2130.  
  2131.         The only reason you would need an  override would be if the 
  2132.         PCI hardware + BIOS were broken, in which case certain error 
  2133.         recovery routines wouldn't work, rendering the override
  2134.         less than useful.
  2135.  
  2136.         Finally, nearly all of people who _think_ they need a command line
  2137.         override do because they get configuration or other error messages
  2138.         from the driver.  If the driver says you have a configuration
  2139.         problem, you have a broken system or a configuration problem
  2140.         and no override is going to fix this.
  2141.  
  2142.     If some one has gone and added the appropriate entry points to
  2143.     init/main.c for command line overrides, they are totally unsupported 
  2144.     and may not work.
  2145.  
  2146. 9.  Certain NCR boards (most notably Nexstor) which don't use an 
  2147.     NCR BIOS get timeouts.  Some of these ROMs handle synchronous
  2148.     and transfers, negotiate for sync. transfers on power up,
  2149.     and leave the drives in an unknown state.  When the distribution 
  2150.     Linux NCR driver attempts to talk with them, it gets timeouts
  2151.     and cannot recover because it won't do a bus reset or renegotiate.
  2152.  
  2153.     If you run into this problem, you can either disable 
  2154.     synchronous transfers in the board's setup program, or
  2155.     upgrade to a newer ALPHA release of the NCR driver which
  2156.     will do synchronous negotiation.
  2157.  
  2158.  
  2159. Notes:
  2160. 1.  CONFIG_PCI must be set
  2161.  
  2162. Section 4.14 : Seagate ST0x/Future Domain TMC-8xx/TMC-9xx 
  2163. Supported and Unsupported Configurations : 
  2164. Base addresses : 0xc8000, 0xca000, 0xcc000, 0xce000, 0xdc000, 0xde000 
  2165. IRQs : 3, 5
  2166. DMA channels : DMA is not used
  2167. IO : memory mapped
  2168.  
  2169. Autoprobe : probes for address only, IRQ is assumed to be 5,
  2170.     requires installed BIOS.
  2171.  
  2172. Autoprobe Override :
  2173. Compile time : Define OVERRIDE to be the base address, CONTROLLER to 
  2174. FD or SEAGATE as appropriate, and IRQ to the IRQ.
  2175.  
  2176. kernel command line : st0x=address,irq or tmc8xx=address,irq (only works 
  2177.     for .99.13b and newer)
  2178.  
  2179. Antiquity Problems, fix by upgrading :
  2180.  
  2181. 1.  Versions prior to the one in the Linux .99.12 kernel had a problem
  2182.     handshaking with some slow devices, where
  2183.  
  2184.     This is what happens when you write data out to the bus
  2185.  
  2186.     1.  Write byte to data register, data register is asserted to bus
  2187.     2.  time_remaining = 12us
  2188.     3.  wait while time_remaining > 0 and REQ is not asserted
  2189.     4.  if time_remaining > 0, assert ACK
  2190.     5.  wait while time remaining > 0  and REQ is asserted
  2191.     6.  deassert ACK
  2192.  
  2193.     The problem was encountered in slow devices that do the command
  2194.     processing as they read the command, where the REQ/ACK handshake
  2195.     takes over 12us - REQ didn't go false when the driver expected it
  2196.     to, so the driver ended up sending multiple bytes of data for
  2197.     each REQ pulse.
  2198.  
  2199. 2.  With Linux .99.12, a bug was introduced when I fixed the arbitration
  2200.     code, resulting in failed selections on some systems.  This was
  2201.     fixed in .99.13.
  2202.  
  2203. Common Problems : 
  2204.  
  2205. 1.  There are command timeouts when Linux attempts to read the partition
  2206.     table or do other disk access.
  2207.  
  2208.     The board ships with the defaults set up for MSDOS, ie interrupts
  2209.     are disabled.  To jumper the board for interrupts, on the Seagate
  2210.     use jumper W3 (ST01) or JP3 (ST02) and short pins F-G to select 
  2211.     IRQ 5.
  2212.  
  2213. 2.  The driver can't handle some devices, particularly cheap SCSI 
  2214.     tapes and CDROMs.
  2215.  
  2216.     The Seagate ties the SCSI bus REQ/ACK handshaking into the PC bus
  2217.     IO CHANNEL READY and (optionally) 0WS signals.  Unfortunately, it 
  2218.     doesn't tell you when the watchdog timer runs out, and you have 
  2219.     no way of knowing for certain that REQ went low, and may end up
  2220.     seeing one REQ pulse as multiple REQ pulses.
  2221.  
  2222.     Dealing with this means using a tight loop to look for REQ to 
  2223.     go low, with a timeout incase you don't catch the transition due
  2224.     to an interrupt, etc.  This results in a performance decrease, so it
  2225.     would be undesireable to apply this to all SCSI devices.  Instead, 
  2226.     it is selected on a per-device basis with the "borken" field for 
  2227.     the given SCSI device in the scsi_devices array.  If you run into
  2228.     problems, you should try adding your device to the list of 
  2229.     devices for which borken is not reset to zero (currently, 
  2230.     only the TENEX CDROM drives).
  2231.  
  2232. 3.  A future domain board (specific examples include the 840,841,
  2233.     880, and 881) doesn't work.
  2234.     
  2235.     A few of the Future domain boards use the Seagate 
  2236.     register mapping, and have the MSG and CD bits of the 
  2237.     status register flipped.
  2238.  
  2239.     You should edit seagate.h, swapping the definitions for 
  2240.     STAT_MSG and STAT_CD, and recompile the kernel with 
  2241.     CONTROLLER defined to SEAGATE and an appropriate 
  2242.     IRQ and OVERRIDE specified.
  2243.  
  2244. 4.  When attempting to fdisk your drive, you get error messages
  2245.     indicating that the HDIO_REQ or HDIO_GETGEO ioctl failed,
  2246.     or 
  2247.  
  2248.     You must set heads sectors and cylinders.
  2249.     You can do this from the extra functions menu.
  2250.  
  2251.  
  2252.     See Section 5.4 : Disks : Partitioning
  2253.  
  2254. 5.  After manually specifying the drive geometry, subsequent
  2255.     attempts to read the partition table result in partition
  2256.     boundary not on a cylinder boundary, physical and logical
  2257.     boundaries don't match, etc. error messages.
  2258.  
  2259.     See Section 5.4 : Disks : Partitioning
  2260.  
  2261.  
  2262. 6.  Some systems which worked prior to .99.13 fail with newer 
  2263.     versions of Linux.  Older versions of Linux assigned the 
  2264.     CONTROL and DATA registers in an order different than that 
  2265.     outlined in the Seagate documentation, which broke on some 
  2266.     systems.  Newer versions make the assignment in the correct 
  2267.     way, but this breaks other systems.
  2268.  
  2269.     The code in seagate.c looks like this now : 
  2270.  
  2271.     cli();
  2272.     DATA = (unsigned char) ((1 << target) | (controller_type == SEAGATE ? 0x80 : 0x40));
  2273.     CONTROL = BASE_CMD | CMD_DRVR_ENABLE | CMD_SEL | 
  2274.         (reselect ? CMD_ATTN : 0);
  2275.     sti();
  2276.  
  2277.     Changing this to 
  2278.  
  2279.     cli();
  2280.     CONTROL = BASE_CMD | CMD_DRVR_ENABLE | CMD_SEL | 
  2281.         (reselect ? CMD_ATTN : 0);
  2282.     DATA = (unsigned char) ((1 << target) | (controller_type == SEAGATE ? 0x80 : 0x40));
  2283.     sti()
  2284.  
  2285.     may fix your problem.
  2286.  
  2287. Defines : 
  2288.  
  2289. FAST or FAST32 will use blind transfers where possible
  2290.  
  2291. ARBITRATE will cause the host adapter to arbitrate for the 
  2292.     bus for better SCSI-II compatability, rather than just 
  2293.         waiting for BUS FREE and then doing its thing.  Should
  2294.     let us do one command per Lun when I integrate my 
  2295.     reorganization changes into the distribution sources.
  2296.  
  2297. SLOW_HANDSHAKE will allow compatability with broken devices that don't 
  2298.     handshake fast enough (ie, some CD ROM's) for the Seagate
  2299.     code.
  2300.  
  2301. SLOW_RATE=x, x some number will let you specify a default 
  2302.     transfer rate if handshaking isn't working correctly.
  2303.  
  2304. Section 4.15 : PAS16 SCSI
  2305. Supported and Unsupported Configurations : 
  2306. Ports : 0x388, 0x384, 0x38x, 0x288
  2307. IRQs : 10, 12, 14, 15
  2308.     IMPORTANT : IRQ MUST be different from the IRQ used for the sound
  2309.     portion of the board. 
  2310. DMA is not used for the SCSI portion of the board
  2311. IO : port mapped
  2312.  
  2313. Autoprobe : does not require BIOS
  2314.  
  2315. Autoprobe Override : 
  2316. Compile time : Define PAS16_OVERRIDE to be an array of port, irq 
  2317. tupples.  Ie 
  2318.  
  2319. #define PAS16_OVERRIDE {{0x388, 10}} 
  2320.  
  2321. for a board at port 0x388, IRQ 10.
  2322.  
  2323. kernel command line : 
  2324. pas16=port,irq 
  2325.  
  2326. Defines :
  2327. AUTOSENSE - if defined, REQUEST SENSE will be performed automatically
  2328. for commands that return with a CHECK CONDITION status. 
  2329.  
  2330. PSEUDO_DMA - enables PSEUDO-DMA hardware, should give a 3-4X performance
  2331. increase compared to polled I/O.
  2332.  
  2333. PARITY - enable parity checking.  Not supported
  2334.  
  2335. SCSI2 - enable support for SCSI-II tagged queueing.  Untested
  2336.  
  2337.  
  2338. UNSAFE - leave interrupts enabled during pseudo-DMA transfers.  You
  2339.          only really want to use this if you're having a problem with
  2340.          dropped characters during high speed communications, and even
  2341.          then, you're going to be better off twiddling with transfersize.
  2342.  
  2343. USLEEP - enable support for devices that don't disconnect.  Untested.
  2344.  
  2345.  
  2346. Common problems : 
  2347.  
  2348. 1.  Command timeouts, aborts, etc.
  2349.  
  2350.     You should install the NCR5380 patches that I posted to the net 
  2351.     some time ago, which should be integrated into some future alpha
  2352.     release.  These patches fix a race condition in earlier NCR5380
  2353.     driver cores, as well as fixing support for multiple devices on 
  2354.     NCR5380 based boards.
  2355.  
  2356.     If that fails, you should disable the PSEUDO_DMA option by 
  2357.     changing the #define PSEUDO_DMA line in drivers/scsi/pas16.c to #undef
  2358.     PSEUDO_DMA.
  2359.  
  2360.     Note that the later should be considered a last resort, because
  2361.     there will be a severe performance degradation.
  2362.  
  2363.  
  2364.  
  2365. Section 4.16 : Trantor T128/T128F/T228 
  2366. Supported and Unsupported Configurations : 
  2367. Base addresses :  0xcc000, 00xc8000, 0xdc000, 0xd8000
  2368. IRQs : none, 3, 5, 7 (all boards)
  2369.     10, 12, 14, 15 (T128F only)
  2370. DMA is not used.
  2371. IO : memory mapped
  2372.  
  2373. Autoprobe : works for all supported configurations, requires 
  2374.     installed BIOS.
  2375.  
  2376. Autoprobe Override :
  2377. Compile time : Define T128_OVERRIDE to be an array of address, irq 
  2378. tupples.  Ie 
  2379.  
  2380. #define T128_OVERRIDE {{0xcc000, 5}} 
  2381.  
  2382. for a board at address 0xcc000, IRQ 5.
  2383.  
  2384. The symbolic IRQs IRQ_NONE and IRQ_AUTO may be used.
  2385.  
  2386. kernel command line : t128=address,irq
  2387.  
  2388. -1 may be used for no irq, -2 for irq autoprobe.
  2389.  
  2390. Defines : 
  2391. AUTOSENSE - if defined, REQUEST SENSE will be performed automatically
  2392. for commands that return with a CHECK CONDITION status. 
  2393.  
  2394. PSEUDO_DMA - enables PSEUDO-DMA hardware, should give a 3-4X performance
  2395. increase compared to polled I/O.
  2396.  
  2397. PARITY - enable parity checking.  Not supported
  2398.  
  2399. SCSI2 - enable support for SCSI-II tagged queueing.  Untested
  2400.  
  2401.  
  2402. UNSAFE - leave interrupts enabled during pseudo-DMA transfers.  You
  2403.          only really want to use this if you're having a problem with
  2404.          dropped characters during high speed communications, and even
  2405.          then, you're going to be better off twiddling with transfersize.
  2406.  
  2407. USLEEP - enable support for devices that don't disconnect.  Untested.
  2408.  
  2409. Common Problems :
  2410. 1.  Command timeouts, aborts, etc.
  2411.  
  2412.     You should install the NCR5380 patches that I posted to the net 
  2413.     some time ago, which should be integrated into some future alpha
  2414.     release.  These patches fix a race condition in earlier NCR5380
  2415.     driver cores, as well as fixing support for multiple devices on 
  2416.     NCR5380 based boards.
  2417.  
  2418.     If that fails, you should disable the PSEUDO_DMA option by 
  2419.     changing the #define PSEUDO_DMA line in drivers/scsi/pas16.c to #undef
  2420.     PSEUDO_DMA.
  2421.  
  2422.     Note that the later should be considered a last resort, because
  2423.     there will be a severe performance degradation.
  2424.  
  2425. Section 4.17 : Ultrastor 14f (ISA), 24f (EISA), 34f (VLB)
  2426. Ports : 0x130, 0x140, 0x210, 0x230, 0x240, 0x310, 0x330, 0x340
  2427. IRQs : 10, 11, 14, 15
  2428. DMA channels : 5, 6, 7
  2429. IO : port mapped, bus master
  2430.  
  2431. Autoprobe : does not work for boards at port 0x310, BIOS not required.  
  2432.  
  2433. Autoprobe override : compile time only, define PORT_OVERRIDE
  2434.  
  2435. Common Problems :
  2436. 1.  The address 0x310 is not supported by the autoprobe code, and may 
  2437.         cause conflicts if networking is enabled.
  2438.  
  2439.         Please use a different address.
  2440.  
  2441. 2.  Using an Ultrastor at address 0x330 may cause the system to hang
  2442.         when the sound drivers are autoprobing.
  2443.  
  2444.         Please use a different address.
  2445.  
  2446. 3.  Various other drivers do unsafe probes at various addresses, if you
  2447.         are having problems with detection or the system is hanging at 
  2448.         boot time, please try a different address.
  2449.  
  2450.         0x340 is recommended as an address that is known to work.
  2451.  
  2452. 4.  Linux detects no SCSI devices, but detects your SCSI hard disk
  2453.     on an Ultrastor SCSI board as a normal hard disk, and the
  2454.     hard disk driver refuses to support it.  Note that when this 
  2455.     occurs, you will probably also get a message
  2456.     
  2457.     hd.c: ST-506 interface disk with more than 16 heads detected,
  2458.       probably due to non-standard sector translation.  Giving up.
  2459.       (disk %d: cyl=%d, sect=63, head=64)
  2460.  
  2461.     If this is the case, you are running the Ultrastor board in
  2462.     WD1003 emulation mode.  You have 
  2463.  
  2464.     1.  Switch the ultrastor into native mode.  This is the 
  2465.         recommended action, since the SCSI driver can be 
  2466.         significantly faster than the IDE driver, especially with
  2467.         the clustered read/write patches installed.  Some users have 
  2468.         sustained in excess of 2M/sec through the file system using 
  2469.         these patches.
  2470.  
  2471.         Note that this will be necessary if you wish to use any non-
  2472.         hard disk, or more than two hard disk devices on the Ultrastor.
  2473.  
  2474.     2.  Use the kernel command line switch 
  2475.  
  2476.         hd=cylinders,heads,sectors
  2477.  
  2478.         to override the default setting to bootstrap yourself,
  2479.         keeping number of cylinders <= 2048, number of heads <= 16,
  2480.         and number of sectors <= 255 such that cylinders * heads * sectors
  2481.         is the same for both mappings.
  2482.  
  2483.         You'll also have to manually specify the disk geometry when
  2484.         running fdisk under Linux.  Failure to do so will result in 
  2485.         incorrect partition entries being written, which will work
  2486.         correctly with Linux but fail under MSDOS which looks at 
  2487.         the cylinder/head/sector entries in the table.
  2488.  
  2489.         Once Linux is up, you can avoid the inconvience of having 
  2490.         to boot by hand by recompiling the kernel with an appropriately
  2491.         defined HD_TYPE macro in include/linux/config.h.
  2492.  
  2493. Section 4.18 : Western Digital 7000
  2494. Supported Configurations :
  2495. BIOS Addresses : 0xce000
  2496. Ports : 0x350
  2497. IRQs : 15
  2498. DMA Channels : 6
  2499. IO : port mapped, bus master
  2500.  
  2501. Autoprobe :  requires installed BIOS 
  2502.  
  2503. Common Problems : 
  2504.  
  2505. 1.  There are several revisisions of the chip and firmware.  Supposedly,
  2506.     revision 3 boards do not work, revision 5 boards do, 
  2507.     chips with no suffix do not work, chips with an 'A' suffix do.
  2508.  
  2509. 2.  The board supports a few BIOS addresses which aren't on the list 
  2510.     of supported addresses.  If you run into this situation,
  2511.     please use one of the supported addresses and submit a bug 
  2512.     report as outlined in Section 2, "Bug Reports"
  2513.  
  2514. Section 4.19 : AM53/79C974 (ALPHA)
  2515.     ftp://tsx-11.mit.edu/pub/linux/ALPHA/scsi/AM53C974-0.3.tar.gz
  2516.  
  2517. Supported Configurations :
  2518. Ports : all
  2519. IRQs : all
  2520. DMA Channels : 6
  2521. IO : port mapped, bus master (unintelligent)
  2522.  
  2523.  
  2524.  
  2525. Section 5 : Disks 
  2526.  
  2527. This section gives information that is specific to disk drives.
  2528.  
  2529. Section 5.1 : Supported and Unsupported Hardware
  2530.  
  2531. All direct access SCSI devices with a block size of 256, 512, or 
  2532. 1024 bytes should work.  Other block sizes will not work (Note
  2533. that this can often be fixed by changing the block and/or 
  2534. sector sizes using the MODE SELECT SCSI command)
  2535.  
  2536. Sector size refers to the number of data bytes allocated per sector 
  2537. on a device, ie CDROMs use a 2048 byte sector size.  
  2538.  
  2539. Block size refers to the size of the logical blocks used to interface
  2540. with the device.  Although this is usually identical to sector size,
  2541. some devices map multiple smaller physical sectors (ie, 256 bytes
  2542. in the case of 55M Syquest drives) to larger logical blocks or 
  2543. vice versa (ie, 512 byte blocks on SUN compatable CDROM drives).
  2544.  
  2545. Removeable media devices, including Bernoulis, flopticals, MO drives,
  2546. and Syquests.
  2547.  
  2548. In theory, drives up to a terrabyte in size should work.  There is 
  2549. definately no problem with tiny 9G drives.
  2550.  
  2551. Section 5.2 : Common Problems 
  2552.  
  2553. Section 5.2.1 : Cylinder > 1024 message.
  2554.  
  2555.     When partitioning, you get a warning message about "cylinder > 1024"
  2556.     or you are unable to boot from a partition including a logical
  2557.     cylinder past logical cylinder 1024.
  2558.  
  2559.     This is a BIOS limitation.
  2560.  
  2561.     See Section 5.4 Disk Geometry and Partitioning for an explanation.
  2562.  
  2563. Section 5.2.2 :  You are unable to partition "/dev/hd*"
  2564.  
  2565.     /dev/hd* aren't SCSI devices, /dev/sd* are.  
  2566.  
  2567.     See Section 5.3, Device files, and Section 5.4, Disk
  2568.     Geometry and Partitioning
  2569.     for the correct device names and partitioning procedure.
  2570.  
  2571. Section 5.2.3 :   Unable to eject media from a removeable media drive.
  2572.  
  2573.     Linux attempts to lock the drive door when a piece of 
  2574.     media is mounted to prevent filesystem corruption due to
  2575.     an inadvertant media change.
  2576.  
  2577.     Please unmount your disks before ejecting them.
  2578.  
  2579.  
  2580. Section 5.2.4 : Unable to boot using LILO from a SCSI disk
  2581.  
  2582.     In some cases, the SCSI driver and BIOS will disagree
  2583.     over the correct BIOS mapping to use, and will result 
  2584.     in LILO hanging after 'LI' at boot time and/or 
  2585.     other problems.
  2586.  
  2587.     To workarround this, you'll have to determine your BIOS 
  2588.     geometry mapping used under DOS, and make an entry for 
  2589.     your disk in /etc/lilo/disktab.
  2590.  
  2591.     Alternatively, you may be able to use the "linear" configuration
  2592.     file option.
  2593.  
  2594. Section 5.2.5 : Fdisk responds with
  2595.  
  2596.             You must set heads sectors and cylinders.
  2597.             You can do this from the extra functions menu.
  2598.     
  2599.         and disk geometry is not 'remembered' when fdisk is rerun.
  2600.  
  2601.     See Section 5.4 : Partitioning
  2602.  
  2603. Section 5.2.6 : Only one drive is detected on a bridge board with
  2604.     multiple drives connected.
  2605.  
  2606.     Linux won't search LUNs past zero on SCSI devices which 
  2607.     predate ANSI SCSI revision 1.  If you wish devices on
  2608.     alternate LUNs to be recognized, you will have to modify
  2609.     drivers/scsi/scsi.c:scan_scsis().
  2610.  
  2611. Section 5.2.7 : System hangs when swapping
  2612.  
  2613.     We think this has been fixed, try upgrading to 1.1.38. 
  2614.  
  2615. Section 5.2.8 : Connor CFP1060S disks get corrupted
  2616.  
  2617.     This is due to a microcode bug in the read-ahead and 
  2618.     caching code.  
  2619.  
  2620.     From Soenke Behrens of Conner tech. support : 
  2621.  
  2622. During the past few weeks, we got several calls from customers stating
  2623. that they had severe problems with Conner CFP1060x 1GB SCSI drives
  2624. using the Linux operating system. Symptoms were corrupt filesystems
  2625. (damaged inodes) reported by e2fsck on each system boot and similar
  2626. errors.
  2627.  
  2628. There is now a fix available for customers with a CFP1060x (microcode
  2629. revisions 9WA1.62/1.66/1.68) and Linux. To apply the upgrade, you
  2630. will need a DOS boot disk and ASPI drivers that can access the hard
  2631. drive. The upgrade downloads new queuing and lookahead code into the
  2632. non-volatile SCSI RAM of the drive.
  2633.  
  2634. If you are experiencing problems with a disk that has microcode
  2635. revision 9WA1.60, you will have to contact your nearest Conner service
  2636. centre to get the disk upgraded. The microcode revision can be found
  2637. on the label of the drive and on the underside of the drive on a label
  2638. on one of the ICs.
  2639.  
  2640. If you are confident that you can perform the upgrade yourself, please
  2641. contact Conner Technical Support and have your microcode revision
  2642. ready. Conner Technical Support Europe can be reached on +44-1294-315333,
  2643. Conner Technical Support in the USA can be reached on 1-800-4CONNER.
  2644.  
  2645. Regards
  2646. Soenke Behrens
  2647. European Technical Support
  2648.  
  2649. Section 5.3 : Device Files
  2650.  
  2651. SCSI disks use block device major 8, and there are no "raw" devices
  2652. ala BSD.
  2653.  
  2654. 16 minor numbers are allocated to each SCSI disk, with minor % 16 == 0 
  2655. being the whole disk, minors  1 <= (minor % 16) <= 4 the four primary 
  2656. partitions, minors 5 <= (minor % 16) <= 15 any extended partitions.
  2657.  
  2658. Ie, a configuration may work out like this (with one host adapter)
  2659.  
  2660. Device            Target, Lun        SCSI disk
  2661. 84M Seagate         0    0        /dev/sda
  2662. SCSI->SMD bridge disk 0    3    0        /dev/sdb 
  2663. SCSI->SMD bridge disk 1    3    1        /dev/sdc
  2664. Wangtek tape        4    0        none
  2665. 213M Maxtor        6    0        /dev/sdd
  2666.  
  2667. Etc.  
  2668.  
  2669. The standard naming convention is 
  2670.  
  2671. /dev/sd{letter} for the entire disk device ((minor % 16) == 0)
  2672. /dev/sd{letter}{partition} for the partitions on that device 
  2673.     (1 <= (minor % 16) <= 15)
  2674.  
  2675. Ie
  2676.  
  2677. /dev/sda    block device major 8 minor 0
  2678. /dev/sda1    block device major 8 minor 1
  2679. /dev/sda2    block device major 8 minor 2
  2680. /dev/sdb    block device major 8 minor 16
  2681.  
  2682. etc.
  2683.  
  2684. Section 5.4 : Partitioning
  2685.  
  2686. You can partition your SCSI disks using the partitioning program
  2687. of your choice, under DOS, OS/2, Linux or any other operating 
  2688. system supporting the standard partitioning scheme. 
  2689.  
  2690. The correct way to run the Linux fdisk program is by specifying the
  2691. device on the command line. Ie, to partition the first SCSI disk,
  2692.  
  2693.     fdisk /dev/sda
  2694.  
  2695. If you don't explicitly specify the device, the partitioning program
  2696. may default to /dev/hda, which isn't a SCSI disk.
  2697.  
  2698. In some cases, fdisk will respond with 
  2699.  
  2700.     You must set heads sectors and cylinders.
  2701.     You can do this from the extra functions menu.
  2702.  
  2703.     Command (m for help): 
  2704.  
  2705. and/or give a message to the effect that the HDIO_REQ or 
  2706. HDIO_GETGEO ioctl failed.  In these cases, you must 
  2707. manually specify the disk geometry as outlined in Subsection
  2708. 5.5 : Disk Geometry when running fdisk, and also in /etc/disktab
  2709. if you wish to boot kernels off that disk with LILO.
  2710.  
  2711. If you have manually specified the disk geometry, subsequent
  2712. attempts to run fdisk will give the same error message.  This 
  2713. is normal, since PCs don't store the disk geometry information
  2714. in the partition table. In and of itself, will cause _NO PROBLEMS_,
  2715. and you will have no problems accessing partitions you created on
  2716. the drive with Linux.  Some vendors' poor installation code will 
  2717. choke on this, in which case you should contact your vendor
  2718. and insist that they fix the code.
  2719.  
  2720. In some cases, you will get a warning message about a partition ending
  2721. past cylinder 1024.  If you create one of these partitions, you will 
  2722. be unable to boot Linux kernels off of that partition using LILO.  Note,
  2723. however, that this restriction does not preclude the creation of a 
  2724. root partition partially or entirely above the 1024 cylinder mark,
  2725. since it is possible to create a small /boot partition below the 
  2726. 1024 cylinder mark or to boot kernels off existing partitions.
  2727.  
  2728. Section 5.5 : Disk Geometry 
  2729.  
  2730. Under Linux, each disk is viewed as the SCSI host adapter sees it : 
  2731. N blocks, numbered from 0 to N-1, all error free, where as DOS/BIOS
  2732. predate intelligent disks and apply an arbitrary head / cylinder / 
  2733. sector mapping to this linear addressing.
  2734.  
  2735. This can pose a problem when you partition the drives under Linux,
  2736. since there is no portable way to get DOS/BIOS's idea of the mapped 
  2737. geometry.  In most cases, a HDIO_GETGEO ioctl() can be implemented 
  2738. to return this mapping.  Unfortunately, when the vendor (ie Seagate)
  2739. has chosen a perverse, non-standard, and undocumented mapping, this 
  2740. is not possible and geometry must be manually specified
  2741.  
  2742. If manual specification of the is required, you have one of several
  2743. options :
  2744.  
  2745. 1.  If you don't care about using DOS, or booting kernels from the 
  2746.     drive with LILO, create a translation such that heads * cylinders * 
  2747.     sectors * 512 < size of your drive in bytes (a megabyte is defined 
  2748.     as 2^20 bytes).
  2749.  
  2750.  
  2751.     1 <= heads <= 256
  2752.     1 <= cylinders <= 1024 
  2753.     1 <= sectors <= 63
  2754.  
  2755. 2.  Use the BIOS mapping.  In some cases, this will mean reconfiguring the 
  2756.     disk so that it is at SCSI ID 0, and disabling the second IDE drive (if you have one).
  2757.  
  2758.     You can either use a program like NU, or you can use the following 
  2759.     program :
  2760.  
  2761. begin 664 dparam.com
  2762. MBAZ``##_B+^!`+N!`(H'0SP@=/D\,'5:@#]X=`6`/UAU4(!_`3AU2H!_`P!U
  2763. M1(I7`H#J,(#Z`7<Y@,*`M`C-$PCD=3-14HC()#\PY.@R`.@J`%J(\/[`,.3H
  2764. M)0#H'0!8AL2Q!M+L0.@7`+K"`;0)S2'#NIP!ZR"ZQ0'K&[K5`>L6N]T!,=*Y
  2765. M"@#W\8#",$N(%PG`=>^)VK0)S2'#=7-A9V4Z(&1P87)A;2`P>#@P#0H@("!O
  2766. L<B`@9'!A<F%M(#!X.#$-"B1);G9A;&ED(&1R:79E#0HD("`D```````D``!O
  2767. `
  2768. end
  2769.  
  2770.     When run it prints the sectors, heads, and cylinders of the 
  2771.     drive whose BIOS address was specified on the command line (0x80
  2772.     is the first disk, 0x81 the second).
  2773.  
  2774.     Ie, dparam 0x80
  2775.     60    17    1007
  2776.  
  2777. Would mean that C: had 60 sectors, 17 heads, and 1007 cylinders.
  2778.  
  2779. Section 6 : CD ROMs
  2780.  
  2781. This section gives information that is specific to cdrom drives.
  2782.  
  2783. Section 6.1 : Supported and Unsupported Hardware
  2784.  
  2785. SCSI CDs with a block size of 512 or 2048 bytes should work.  Other
  2786. block sizes will not work.
  2787.  
  2788. Section 6.2 : Common Problems
  2789.  
  2790. Section 6.2.1 : Unable to mount cdrom.
  2791.  
  2792.         The correct syntax to mount an ISO-9660 CDROM is
  2793.  
  2794.         mount -t iso9660 /dev/sr0 /mount_point -o ro
  2795.  
  2796.         Note that for this to work, you must have the kernel
  2797.         configured with support for SCSI, your host adapter,
  2798.         the SCSI CDROM driver, and the iso9660 filesystem.
  2799.  
  2800.     Note that as of Linux 1.1.32, read-only devices such
  2801.     as CDROMs CANNOT be mounted with the default read/write
  2802.     options.
  2803.  
  2804. Section 6.2.2 : Unable to eject cdrom.
  2805.  
  2806.     Linux attempts to lock the drive door when a piece of 
  2807.     media is mounted to prevent filesystem corruption due to
  2808.     an inadvertant media change.
  2809.  
  2810. Section 6.2.3 : Unable to play audio.
  2811.  
  2812.     The programs Workman or xcdplayer will do this for you.
  2813.  
  2814. Section 6.2.4 :  Workman or Xcdplayer do not work.
  2815.  
  2816.     The functions to control audio functions are part of the
  2817. SCSI-II command set, so any drive that is not SCSI-II will probably
  2818. not work here.  Also, many SCSI-I and some SCSI-II CDROM drives use a
  2819. proprietary command set for accessing audio functions instead of the
  2820. SCSI-II command set.  For NEC drives, there is a version of xcdplayer
  2821. specially adapted to use this command set floating around - try
  2822. looking on tsx-11.mit.edu in pub/linux/BETA/cdrom.
  2823.  
  2824.     These programs may work with some of the non-SCSI cdrom drives
  2825. if the driver implements the same ioctls as the scsi drivers.
  2826.  
  2827. Section 6.2.5: Additional drives on CD ROM changers do not work
  2828.  
  2829.     Most CD changers assign each disc to a logical unit.  Insure that 
  2830. you have special files made for each platter (see Section 6.3 : Device Files)
  2831. and see Section 1.10 : LUNS other than 0 don't work
  2832.  
  2833. Section 6.3 : Device Files
  2834.  
  2835. SCSI CD ROMs use major 11.
  2836.  
  2837. Minors are allocated dynamically (See Section 5 : Disks, Subsection 5.3 :
  2838. Device Files for an example) with the first CDROM found being minor 0,
  2839. the second minor 1, etc.
  2840.  
  2841. The standard naming convention is 
  2842.  
  2843. /dev/sr{digit}, although some distributions have used /dev/scd{digit}, with
  2844. examples being
  2845.  
  2846. /dev/sr0    /dev/scd0
  2847. /dev/sr1    /dev/scd1
  2848.  
  2849. Section 7 : Tapes
  2850.  
  2851. This setion gives information that is specific to scsi tape drives.
  2852.  
  2853. Section 7.1 : Supported and Unsupported Hardware
  2854.  
  2855. Drives using both fixed and variable length blocks smaller than the
  2856. the driver buffer length (set to 32K in the distribution sources) are
  2857. supported.
  2858.  
  2859. Parameters (block size, buffering, density) are set with ioctls
  2860. (usually with the mt program), and remain in effect after the 
  2861. device is closed and reopened.
  2862.  
  2863. Virtually all drives should work, including :
  2864.     Archive Viper QIC drives, including the 150M and 525M models
  2865.     Exabyte 8mm drives
  2866.     Wangtek 5150S drives
  2867.     Wangdat DAT drives
  2868.  
  2869. Section 7.2 : Common Problems
  2870.  
  2871. Section 7.2.1 : Tape drive not recognized at boot time.
  2872.  
  2873.     Try booting with a tape in the drive.
  2874.  
  2875. Section 7.2.2 :  Tapes with multiple files cannot be read properly.
  2876.  
  2877.     When reading a tape with multiple files, the first tar 
  2878.     is successful, a second tar fails silently, and retrying 
  2879.     the second tar is successful.
  2880.  
  2881.     User level programs, such as tar, don't understand file marks.
  2882.     The first tar reads up until the end of the file.  The second 
  2883.     tar attempts to read at the file mark, gets nothing, but the 
  2884.     tape spaces over the file mark.  The third tar is successful
  2885.     since the tape is at the start of the next file.
  2886.  
  2887.     Use mt on the no-rewind device to space forward to the next file.
  2888.  
  2889.  
  2890. Section 7.2.3 :  Decompression fails.
  2891.  
  2892.     Decompressing programs cannot handle the zeros padding the 
  2893.     last block of the file. 
  2894.  
  2895.     To prevent warnings and errors, wrap your compressed files 
  2896.     in a .tar file - ie, rather than doing 
  2897.  
  2898.     tar cfvz /dev/nrst0 file.1 file.2 ...
  2899.  
  2900.     do 
  2901.  
  2902.     tar cfvz tmp.tar.z file.1 file.2 ...
  2903.  
  2904.     tar cf /dev/nrst0 tmp.tar.z
  2905.  
  2906. Section 7.2.4 :  Problems taking tapes to/from other systems.
  2907.  
  2908.     You can't read a tape made with another operating system or
  2909.     another operating system can't read a tape written in Linux.
  2910.  
  2911.     Different systems often use different block sizes.  On a
  2912.     tape device using a fixed blocksize, you will get errors 
  2913.     when reading blocks written using a different block size.
  2914.  
  2915.     To read these tapes, you must set the blocksize of 
  2916.     the tape driver to match the blocksize used when
  2917.     the tape was written, or to variable.
  2918.  
  2919.     NOTE : this is the hardware block size, not the blocking
  2920.     factor used with tar, dump, etc.
  2921.  
  2922.     You can do this with the mt command - 
  2923.  
  2924.     
  2925.         mt setblk <size>
  2926.  
  2927.     or 
  2928.     
  2929.         mt setblk 0
  2930.  
  2931.     to get variable block length support. 
  2932.     
  2933.  
  2934.     Note that these mt flags are NOT supported under the GNU version
  2935.     of mt which is included with some Linux distributions.  Instead,
  2936.     you must use the BSD derrived Linux SCSI mt command.  Source
  2937.     should be available from
  2938.  
  2939.         tsx-11.mit.edu:/pub/linux/ALPHA/scsi
  2940.  
  2941.     Also note that by default, ST_BUFFER_BLOCKS (defined
  2942.     in /usr/src/linux/drivers/scsi/st_options.h in newer
  2943.     kernels, st.c in older kernels) is set to allow for 
  2944.     a 32K maximum buffer size; you'll need to edit the source 
  2945.     to use larger blocks.
  2946.  
  2947. Section 7.2.5 :  "No such device" error message.
  2948.  
  2949.     All attempts to access the tape result in a 
  2950.  
  2951.     "No such device"
  2952.  
  2953.     or similar error message.  Check the type of 
  2954.     your tape device - it MUST be a character device with 
  2955.     major and minor numbers matching those specified in subsection
  2956.     C, Device Files.
  2957.  
  2958. Section 7.2.6 : Tape reads at a given density work, writes fail
  2959.  
  2960.     Many tape drives support reading at lower densities
  2961.     for compatability with older harware, but will not 
  2962.     write at those same densities.  
  2963.  
  2964.     This is especially the case with QIC drives, which
  2965.     will read old 60M tapes but only write new 120, 150,
  2966.     250, and 525M formats.
  2967.  
  2968. Section 7.2.6 : Repositioning the tape locks out access to all SCSI devices
  2969.  
  2970.     This is most common with SCSI drivers which only support one 
  2971.     outstanding command at a time (see Section 9.5 : Multiple
  2972.     devices for an explanation, and Section : Driver feature comparison
  2973.     to see which drivers suffer from this limitation), although there may 
  2974.     be a few tape drives out there which refuse to disconnect.  
  2975.  
  2976.     In either case, you can work arround the problem by editing 
  2977.     drivers/scsi/st.c and adding a 
  2978.  
  2979.         #define ST_NOWAIT
  2980.  
  2981.     at the top and rebuilding the kernel.
  2982.  
  2983.     Note that this will defer error condition reporting until the 
  2984.     next SCSI command is executed.  For this reason, you may want to 
  2985.     do something like a   
  2986.  
  2987.         mt status
  2988.  
  2989.     after a mt file positioning command so you don't overwrite tape 
  2990.     files if the positioning command failed.
  2991.  
  2992.     You may also wish to consider changing to a better-supported SCSI
  2993.     board or newer tape drive if you need to use this workarround
  2994.     and are writing multiple files to tapes.
  2995.  
  2996. Section 7.3 : Device Files
  2997.  
  2998. SCSI tapes use character device major 9.  
  2999.  
  3000. Due to constraints imposed by Linux's use of a sixteen bit dev_t with
  3001. only eight bits allocated to the minor number, the SCSI tape minor 
  3002. numbers are assigned dynamically starting with the lowest SCSI HOST/ID/LUN.
  3003.  
  3004. Rewinding devices are numbered from 0 - with the first 
  3005. SCSI tape, /dev/rst0 being c 9 0, the second /dev/rst1 c 9 1, etc.  
  3006. Non-rewinding devices have the high bit set in the minor number, 
  3007. ie /dev/nrst0 is c 9 128.
  3008.  
  3009. The standard naming convention is 
  3010. /dev/nst{digit}     for non-rewinding devices
  3011. /dev/st{digit}        for rewinding devices
  3012.  
  3013. Section 8 : Generic 
  3014.  
  3015. This information gives information that is specific to the generic
  3016. scsi driver.
  3017.  
  3018. Section 8.1 : Supported Hardware 
  3019.  
  3020. The Generic SCSI device driver provides an interface for sending 
  3021. SCSI commands to all SCSI devices - disks, tapes, CDROMs, media
  3022. changer robots, etc. 
  3023.  
  3024. Everything electrically compatable with your SCSI board should work.
  3025.  
  3026. Section 8.2 : Common Problems
  3027.  
  3028. None :-).
  3029.  
  3030. Section 8.3 : Device Files
  3031.  
  3032. SCSI generic devices use character major 21.  Due to constraints 
  3033. imposed by Linux's use of a 16 bit dev_t, minor numbers are dynamically
  3034. assigned from 0, one per device, with
  3035.  
  3036. /dev/sg0 
  3037.  
  3038. corresponding to the lowest numerical target/lun on the first 
  3039. SCSI board.
  3040.  
  3041. Section 9 : Buyers' Guide
  3042.  
  3043.     A frequent question is:
  3044.  
  3045.     "Linux supports quite a number of different boards, so which
  3046. scsi host adapter should I get."
  3047.  
  3048.     The answer depends upon how much performance you expect or need, 
  3049. motherboard, and the scsi peripherals that you plan on attaching to 
  3050. your machine.
  3051.  
  3052. Section 9.1 : Transfer types
  3053.  
  3054.     The biggest factor affecting performance (in terms of throughput
  3055. and interactive response time during SCSI I/O) is the transfer type used.
  3056. The table below lists the various transfer types, the effects they have
  3057. on performance, and some recomendations as to their use.
  3058.  
  3059. Transfer type    Description / Performance / Recomendedations
  3060. Pure        A pure polled I/O board will use the CPU to handle 
  3061. Polled        all of the SCSI processing, including the REQ/ACK
  3062.         handshaking.
  3063.  
  3064.         Even a fast CPU will be slower handling the REQ/ACK
  3065.         handshake sequence than a simple finite state machine,
  3066.         resulting in peak transfer rates of about 150K/sec on
  3067.         a fast machine, perhaps 60K/sec on a slow machine 
  3068.         (through the filesystem).
  3069.  
  3070.         The driver also must sit in a tight loop as long as the 
  3071.         SCSI bus is busy, resulting in near 100% CPU utilitization
  3072.         and extremely poor responsiveness during SCSI I/O.
  3073.         Slow CDROMs which don't disconnect/reconnect will kill 
  3074.         interactive performance with these boards.
  3075.  
  3076.         Not recommended.
  3077.  
  3078. Interlocked    Boards using interlocked polled I/O are essentially
  3079. Polled        the same as pure polled I/O boards, only the SCSI REQ/ACK 
  3080.         handshaking signals are interlocked with the PC bus 
  3081.         handshaking signals.  All SCSI processing beyond 
  3082.         the handshaking is handled by the CPU.
  3083.  
  3084.         Peak transfer rates of 500-600K/sec through the 
  3085.         filesystem are possible on these boards.
  3086.  
  3087.         As with pure polled I/O boards, the driver must sit 
  3088.         in a tight loop as long as the SCSI bus is busy, 
  3089.         resulting in CPU utilization dependant on the 
  3090.         transfer rates of the devices, and when they 
  3091.         disconnect/reconnect.  CPU utilization may vary 
  3092.         between 25% for single speed CDs which handle
  3093.         disconnect/reconnect properly to 100% for faster
  3094.         drives or broken CD ROMs which fail to disconnect/reconnect.
  3095.  
  3096.         On my 486-66, with a T128, I use 90% of my CPU time to 
  3097.         sustain a throughput of 547K/sec on a drive 
  3098.         with a headrate of 1080K/sec with a T128 board.
  3099.  
  3100.         Sometimes acceptable for slow tapes and CDROMs when 
  3101.         low cost is essential.
  3102.  
  3103. FIFO         Boards using FIFO polled I/O put a small (typically 8K)
  3104. Polled        buffer between the CPU and the SCSI bus, and often implement
  3105.         some amount of intelligence.  The net effect is that 
  3106.         the CPU is only tied up when it is transfering data
  3107.         at top speed to the FIFO and when it's handling the 
  3108.         rest of the interrupt processing for FIFO empty conditions,
  3109.         disconnect/reconnect, etc.
  3110.  
  3111.         Peak transfer rates should be sufficient to handle
  3112.         most SCSI devices, and have been measured at up 
  3113.         to 4M/sec using raw SCSI commands to read 64K 
  3114.         blocks on a fast Seagate Barcuda with an Adaptec 
  3115.         1520.
  3116.  
  3117.         CPU utilization is dependant on the transfer
  3118.         rates of the  devices, with faster devices generating
  3119.         more interrupts per unit time which require more CPU 
  3120.         processing time.   Although CPU usage may be high
  3121.         (perhaps 75%) with fast devices, the system usually 
  3122.         remains usable.  These boards will provide excellent
  3123.         interactive performance with broken devices which 
  3124.         don't disconnect/reconnect (typically cheap CDROM 
  3125.         drives)
  3126.  
  3127.         Recommended for persons on a budget.
  3128.  
  3129. Slave          Drivers for boards using slave DMA program the PC's 
  3130. DMA        DMA controller for a channel when they do a data transfer,
  3131.         and return control to the CPU.
  3132.  
  3133.         Peak transfer rates are usually handicapped 
  3134.         by the poor DMA controller used on PCs, 
  3135.         with one such 8-bit board having problems
  3136.         going faster than 140-150K/sec with one mainboard.
  3137.  
  3138.         CPU utilization is very reasonable, slightly 
  3139.         less than what is seen with FIFO polled I/O boards.
  3140.         These boards are very tollerant of broken devices 
  3141.         which don't disconnect/reconnect (typically cheap
  3142.         CSG limitDROM drives).
  3143.  
  3144.         Acceptable for slow CDROM drives, tapes, etc.
  3145.  
  3146. Busmastering    These boards are intelligent.  Drivers 
  3147. DMA         for these boards throw a SCSI command, the destination
  3148.         target and lun, and where the data should end up
  3149.         in a structure, and tell the board "Hey, I have 
  3150.         a command for you."  The driver returns control
  3151.         to various running programs, and eventually the 
  3152.         SCSI board gets back and says that it's done.
  3153.  
  3154.         Since the intelligence is in the host adapter
  3155.         firmware and not the driver, drivers for these
  3156.         boards typically support more features - synchronous
  3157.         transfers, tagged queing, etc.
  3158.  
  3159.         With the clustered read/write patches, peak transfer
  3160.         rates through the file system approach 100% of head rate 
  3161.         writing, 75% reading.  
  3162.  
  3163.         CPU utilization is minimal, irregardless of 
  3164.         I/O load, with a measured 5% CPU usage while 
  3165.         accessing a double speed CDROM on an Adaptec 1540 
  3166.         and 20% while sustaining a 1.2M/sec transfer rate
  3167.         on a SCSI disk. 
  3168.  
  3169.         Recommended in all cases where money is not extremely
  3170.         tight, the main board is not broken (some broken main boards
  3171.         do not work with bus masters), and applications where time 
  3172.         to data is more important than throughput are not being run 
  3173.         (bus master overhead may hit 3-4ms per command).
  3174.  
  3175. Section 9.2 : Scatter/gather
  3176.  
  3177.     The second most important driver/hardware feature with respect 
  3178. to performance is support for scatter/gather I/O.  The overhead of executing 
  3179. a SCSI command is significant - on the order of milliseconds. Intelligent bus 
  3180. masters like the Adaptec 1540 may take 3-4ms to process a SCSI command before 
  3181. the target even sees it.  On unbuffered devices, this overhead is allways enough 
  3182. to slip a revolution, resulting in a transfer rate of about 60K/sec 
  3183. (assuming a 3600RPM drive) per block transfered at a time.  So, to maximize 
  3184. performance, it is necessary to minimize the number of SCSI commands needed 
  3185. to transfer a given amount of data by transfering more data per command.  Due 
  3186. to the design of the Linux buffer cache, contiguous disk blocks are not 
  3187. contiguous in memory. With the clustered read/write patches, 4K worth of 
  3188. buffers are contiguous.  So, the maximum amount of data which can 
  3189. be transfered per SCSI command is going to be 1K * # of scatter/gather
  3190. regions without the clustered read/write patches, 4K * # of regions
  3191. with.  Experimentally, we've determined that 64K is a reasonable 
  3192. amount to transfer with a single SCSI command - meaning 64 scatter/gather
  3193. buffers with clustered read/write patches, 16 without.  With the 
  3194. change from 16K to 64K transfers, we saw an improvement from 
  3195. 50% of headreate, through the filesystem, reading and writing,
  3196. to 75% and 100% respectively using an Adaptec 1540 series board.
  3197.  
  3198. Section 9.3 : Mailbox vs. non-mailbox
  3199.  
  3200.     A number of intelligent host adapters, such as the Ultrastor, WD7000,
  3201. Adaptec 1540, 1740, and BusLogic boards have used a mailbox-metaphor 
  3202. interface, where SCSI commands are executed by putting a SCSI command 
  3203. structure in a fixed memory location (mailbox), signaling the board (ie, 
  3204. raising the outgoing mail flag), and waiting for a return (incoming mail).  
  3205. With this high level programming interface, users can often upgrade to a 
  3206. newer board revision to take advantage of new features, such as FAST + 
  3207. WIDE SCSI, without software changes.  Drivers tend to be simpler to 
  3208. implement, may implement a larger feature set, and may be more stable.
  3209.  
  3210. Other intelligent host adapters, such as the NCR53c7/8xx family,
  3211. and Adaptec AIC-7770/7870 chips (including the 274x, 284x, and 2940
  3212. boards) use a lower level programming interface.  This may prove
  3213. faster since processing can be shifted between the board's processor
  3214. and faster host CPU, allow better flexibility in implementing certain 
  3215. features (ie, target mode for arbitrary devices), and these boards 
  3216. can be built for less money (In some cases, this is passed on to 
  3217. the consumer (ie, most NCR boards)).  On the down side, drivers
  3218. tend to be more complex (read : there is more potential for bugs), 
  3219. and must be modified to take advantage of the features present on 
  3220. newer chips.
  3221.  
  3222. Section 9.4 : Bus types
  3223.  
  3224.     Bus type is the next thing to consider, with choices including ISA,
  3225. EISA, VESA, and PCI.  Marketing types often spout of absurd bandwidth
  3226. numbers based on burst transfer rates and fiction, which isn't very 
  3227. useful.  Instead, I've chosen to state "real-world" numbers based on 
  3228. measured performance with various peripherials.
  3229.  
  3230. Bus    Bandwidth, description, 
  3231. ISA    Bandwidth is slightly better than 5M/sec for  busmastering 
  3232.     devices.  With an ISA bus, arbitration for busmasters is performed 
  3233.     by the venerable 8237 third party DMA controller, resulting in 
  3234.     relatively high bus aquisition times.  Interrupt drivers are
  3235.     tri-state and edge triggered, meaning interrupts cannot be 
  3236.     shared. Generally, ISA is unbuffered, meaning the host/memory
  3237.     bus is tied up whenever a transfer is occuring. No mechanism
  3238.     is provided to prevent bus-hogging.
  3239.  
  3240. VESA    Bandwidth is about 30M/sec.  Some VESA systems run the bus out 
  3241.     of spec, rendering them incompatable with some boards, so this
  3242.     should be taken into consideration before purchasing hardware
  3243.     without a return guarantee.  Generally, VESA is unbuffered, meaning
  3244.     meaning the host/memory bus is tied up whenever a transfer is 
  3245.     occuring.
  3246.  
  3247. EISA    Bandwidth is about 30M/sec, with busmastering operations generally
  3248.     being faster than VESA.  Some EISA systems buffer the bus, allowing
  3249.     burst transfers to the faster host/memory bus and minimizing impact
  3250.     on CPU performance.  EISA interrupt drivers may be either tri-state
  3251.     edge-triggered or open collector level-active, allowing interrupt
  3252.     sharing with drivers that support it.  Since EISA allocates a 
  3253.     separate address space for each board, it is usually less prone to 
  3254.     resource conflicts than ISA or VESA.
  3255.  
  3256. PCI    Bandwidth is about 60M/sec.  Most PCI systems implement write
  3257.     posting buffers on the host bridge, allowing speed mismatches
  3258.     on either side to have a minimum impact on bus/CPU performance.  
  3259.     PCI interrupt drivers are open collector level-active, allowing
  3260.     interrupt sharing with drivers that support it. Mechanisms
  3261.     are provided to prevent bus hogging, and for both master and 
  3262.     slave to suspend a bus-mastering operation. 
  3263.  
  3264.     Since PCI provides a plug-n-play mechanism with writeable 
  3265.     configuration registers on every board, in a separate address space, 
  3266.     a propperly implemented PCI system is plug-and play.  
  3267.  
  3268.     PCI is extremely strict as to trace length, loading, mechanical
  3269.     specifications, etc. and ultimately should be more reliable than
  3270.     VESA or ISA.
  3271.  
  3272.     In summary, PCI is the best PC bus, although it does
  3273.     have its dark side.  PCI is still in its infancy, and although
  3274.     most manufacturers have ironed out the problems, there is 
  3275.     still stock of older, buggy PCI hardware and broken main 
  3276.     BIOSes.  For this reason, I _strongly_ recommend a return
  3277.     guarantee on the hardware.  While the latest PCI mainboards
  3278.     are truly plug-and-play, older PCI boards may require the 
  3279.     user to set options with both jumpers and in software (ie,
  3280.     interrupt assignments).  Although many users have 
  3281.     resolved their PCI problems, it has taken time and for this
  3282.     reason I cannot recommend a PCI purchase if having the 
  3283.     system operational is extremely time critical.
  3284.  
  3285.     For many slower SCSI devices, such as disks with head rates 
  3286. arround 2M/sec or less, CDROMs, and tapes, there will be little difference
  3287. in throughputs with the different PC bus interfaces.  For faster contemporary
  3288. SCSI drives (Typical high end multi-gigabyte drives have a head rate of 
  3289. 4-5M/sec, and at least one company is currently ALPHA testing a parallel
  3290. head unit with a 14M/sec head rate), throughput will often be significantly 
  3291. better with controllers on faster busses, with one user noting a 2.5 fold 
  3292. performance improvement when going from an Adaptec 1542 ISA board to a 
  3293. NCR53c810 PCI board. 
  3294.  
  3295.     With the exception of situations where PCI write-posting or a 
  3296. similar write-buffering mechanism is being used, when one of the busses in 
  3297. your system is busy, all of the busses will be unaccessable.  So, although 
  3298. bus saturation may not be interfering with SCSI performance, it may have a 
  3299. negative effect on interactive performance.  Ie, if you have a 4M/sec SCSI 
  3300. disk under ISA, you'll have lost 80% of your bandwidth, and in an 
  3301. ISA/VESA system would only be able to bitblt at 6M/sec.  In most cases,
  3302. a similar impact on processing jobs in the background would also be felt.
  3303.  
  3304.     Note that having over 16M of memory does not preclude using
  3305. an ISA busmastering SCSI board.  Unlike various broken operating
  3306. systems, Linux will double buffer when using a DMA with an ISA controller
  3307. and a transfer is ultimately destined for an area above 16M.  Performance
  3308. on these transfers only suffers by about 1.5%, ie not noticably.
  3309.  
  3310.     Finally, the price difference between bus masters offered with the 
  3311. different bus interfaces is often minimal.  
  3312.  
  3313.     With all that in mind, based on your priorities you will have 
  3314. certain bus preferences 
  3315.  
  3316.     Stability, time critical installations,      EISA ISA VESA PCI
  3317.         and poor return policies
  3318.     Performance, and typical hobbiest        PCI EISA VESA ISA
  3319.         installations
  3320.  
  3321.  
  3322.      As I pointed out earlier, bus mastering versus other transfer modes is 
  3323. going to have a bigger impact on total system performance, and should be 
  3324. considered more important than bus type when purchasing a SCSI controller.
  3325.  
  3326. Section 9.5 : Multiple devices
  3327.  
  3328.     If will you have multiple devices on your SCSI bus, you may
  3329. want to see whether the host adapter/driver that you are considering supports
  3330. more than one outstanding command at one time.  This is almost 
  3331. essential if you'll be running a tape drive, and very desireable
  3332. if you are mixing devices of different speeds, like a CD ROM and a disk 
  3333. drive.  If the linux driver only supports one outstanding command, you may 
  3334. be locked out of your disk drive while a tape in the tape drive is rewinding or
  3335. seeking to end of media (perhaps for half an hour).  With two
  3336. disk drives, the problem will not be as noticeable, allthough 
  3337. throughput would approach the average of the two transfer rates 
  3338. rather than the sum of the two transfer rates.
  3339.  
  3340. Section 9.6: SCSI-I, SCSI-II, SCSI-III FAST and WIDE options, etc.
  3341.  
  3342.     Over the years, SCSI has evolved, with new revisions of the standard
  3343. introducing higher transfer rates, methods to increase throughput, standardized
  3344. commands for new devices, and new commands for previously supported devices.
  3345.  
  3346.     In and of themselves, the revision levels don't really mean anything.  
  3347. Excepting minor things like SCSI-II not allowing the single initiator option
  3348. of SCSI-I, SCSI is backwards compatable, with new features being introduced 
  3349. as options and not mandatory.  So, the descision to call a SCSI adapter 
  3350. SCSI, SCSI-II, or SCSI-III is almost entirely a marketing one.  
  3351.  
  3352. Section 9.7 : Driver feature comparison
  3353.  
  3354. Driver feature comparison (supported chips are listed in parenthesis)
  3355.  
  3356. Driver                  Simultaneous    SG         > 1 
  3357.         Transfer mode        Commands    limit        Boards
  3358.                     total/LUN
  3359. AM53C974    Busmastering DMA    12s/1s        255s        Y
  3360. aha152x          FIFO(8k) Polled           7s/1s        255s        N
  3361.     (AIC6260,
  3362.     AIC6360)
  3363. aha1542       Busmastering DMA     8s/1s        16        Y
  3364. aha1740          Busmastering DMA     32s        16        N
  3365. aha274x        Busmastering DMA    4s/1s        255s        Y    
  3366. BusLogic    Busmastering DMA    192/31        128s, 8192h    Y
  3367. (values are for BT-948/958/958D, older boards support fewer commands)
  3368. eata_dma        Busmastering DMA        64s/16s         64s             Y
  3369. fdomain        FIFO(8k) Polled        1s        64s        N
  3370.     (TMC1800,     except TMC18c30
  3371.     TMC18c30,    with 2k FIFO
  3372.     TMC18c50,
  3373.     TMC36c70)
  3374.  
  3375. in2000*        FIFO(2k) Polled        1s        255s        N
  3376. g_NCR5380    Pure Polled         16s/2s        255s        Y
  3377.     (NCR5380,
  3378.     NCR53c80,
  3379.     NCR5381, 
  3380.     NCR53c400)
  3381. gsi8*        Slave DMA        16s/2s        255s
  3382.     (NCR5380)
  3383. PAS16        Pure Polled        16s/2s        255s        Y
  3384.     (NCR5380)    or Interlocked Polled
  3385.         (fails on some systems!)
  3386. seagate        Interlocked Polled    1s/1s        255s        N
  3387. wd7000          Busmastering DMA    16s/1s        16         Y
  3388. t128        Interlocked Polled    16s        255s        Y
  3389.     (NCR5380)
  3390. qlogic        Interlocked Polled    1s/1s        255s        N
  3391. ultrastor     Busmastering DMA    16s/2s        32        Y
  3392. 53c7,8xx    Busmastering DMA    
  3393.     (NCR53c810,
  3394.      NCR53c815,
  3395.      NCR53c820,
  3396.      NCR53c825)
  3397.     rel5                 1s/1s        127s        N
  3398.     rel10                8s/1s        127s        Y
  3399.     
  3400.  
  3401. Notes : 
  3402. 1.  drivers flagged with an '*' are not included with the 
  3403.     distribution kernel, and binary boot images may be unavailable.
  3404.  
  3405. 2.  numbers suffixed with an 's' are arbitrary limits set in software 
  3406.     which may be changed with a compile time define.  
  3407.  
  3408. 3.  hardware limits are indicated by an 'h' suffix, and may differ
  3409.     from the software limits currently imposed by the Linux drivers.
  3410.  
  3411. 4.  unsuffixed numbers may indicate either hard or soft limits.
  3412.  
  3413. 5.  rel5 of the NCR53c810 driver is included in the stock 1.2.x and 
  3414.     1.3.x kernels; rel10 is available via anonymous FTP.
  3415.  
  3416. 6.  With the exception of the AM53C974, the busmastering DMA boards
  3417.     are intelligent; with the NCR executing microcode from main memory,
  3418.     the AIC7770 executing microcode from on-chip RAM, and the rest using
  3419.     a mailbox-style interface.
  3420.  
  3421. Section 9.8 : Board comparison 
  3422.  
  3423. Board            Driver        Bus    Price    Notes
  3424. Adaptec AIC-6260    aha152x        ISA        chip, not board
  3425. Adaptec AIC-6360    aha152x        VLB        chip, not board
  3426.     (Used in most 
  3427.     VESA/ISA multi-IO
  3428.     boards with SCSI,
  3429.     Zenon mainboards)
  3430. Adaptec 1520        aha152x        ISA         
  3431. Adaptec 1522        aha152x        ISA    $80    1520 w/FDC
  3432. Adaptec 1510        aha152x        ISA        1520 w/out boot ROM,
  3433.                             won't autoprobe.
  3434. Adaptec 1540C        aha1542        ISA        
  3435. Adaptec 1542C        aha1542        ISA        1540C w/FDC
  3436. Adaptec 1540CF        aha1542        ISA        FAST SCSI-II
  3437. Adaptec 1542CF        aha1542        ISA    $200    1540CF w/FDC
  3438. Adaptec 1640        aha1542        MCA        
  3439.  
  3440. Adaptec 1740        aha1740        EISA        discontinued
  3441. Adaptec 1742        aha1740        EISA        discontinued, 1740 
  3442.                             w/FDC
  3443. Adaptec 2740        aha274x        EISA
  3444. Adaptec 2742        aha274x        EISA        w/FDC
  3445. Adaptec 2840        aha274x        VLB
  3446. Adaptec 2842        aha274x        VLB        w/FDC
  3447. Adaptec 2940        aha274x        PCI        
  3448. Allways IN2000        in2000        ISA
  3449. BusLogic BT-948        BusLogic    PCI    $180    Ultra SCSI
  3450. BusLogic BT-958        BusLogic    PCI    $230    Wide Ultra SCSI
  3451. (see section 4.8 for additional BusLogic board descriptions)
  3452. DPT     PM2011        eata_dma    ISA        FAST SCSI-II
  3453.     PM2012A        eata_dma    EISA        FAST SCSI-II
  3454.     PM2012B        eata_dma    EISA        FAST SCSI-II
  3455.     PM2021        eata_dma    ISA    $245    FAST SCSI-II
  3456.      PM2022        eata_dma    EISA    $449    FAST SCSI-II
  3457.                             active termination
  3458.     PM2024        eata_dma    PCI    $395    FAST SCSI-II  
  3459.                             active termination
  3460.     PM2122        eata_dma    EISA    $595    FAST SCSI-II
  3461.                             active termination
  3462.     PM2124        eata_dma    PCI    $595    FAST SCSI-II
  3463.                             active termination
  3464.     PM2322        eata_dma    EISA        FAST SCSI-II
  3465.                             active termination
  3466.     PM3021        eata_dma    ISA    $1595    FAST SCSI-II
  3467.                             multichannel
  3468.                             raid/simm sockets 
  3469.                             active termination
  3470.     PM3122        eata_dma    EISA    $1795    FAST SCSI-II
  3471.                             multichannel/raid
  3472.                             active termination
  3473.     PM3222        eata_dma    EISA    $1795    FAST SCSI-II
  3474.                             multichannel
  3475.                             raid/simm sockets 
  3476.                             active termination
  3477.     PM3224        eata_dma    PCI    $1995    FAST SCSI-II
  3478.                             multichannel
  3479.                             raid/simm sockets 
  3480.                             active termination
  3481. DTC 3290        aha1542        EISA        Although it should work,
  3482.                             due to documentation
  3483.                             release polcies, DTC
  3484.                             hardware is unsupported
  3485. DTC 3130        53c7,8xx    PCI        '810
  3486. DTC 3130B        53c7,8xx    PCI        '815
  3487. DTC 3292        aha1542        EISA        3290 w/FDC
  3488. DTC 3292        aha1542        EISA        3290 w/FDC
  3489. Future Domain 1680    fdomain        ISA        FDC
  3490. Future Domain 3260    fdomain        PCI
  3491. NCR53c810 (boards sold 53c7,8xx        PCI     $60    chip, not board. Boards
  3492.     by FIC, Chaintech,                (board)    don't include
  3493.     Nextor, Gigabyte, etc.                      BIOS, although most
  3494.     Mainboards with chip by                non-NCR equipped main
  3495.     AMI, ASUS, J-Bond,                    boards have the SDMS
  3496.     etc. Common in DEC                    BIOS
  3497.     PCI systems)
  3498. NCR53c815 (           53c7,8xx        PCI    $100    NCR53c810 plus 
  3499.     Intel PCISCSIKIT,                    bios
  3500.     NCR8150S, etc)
  3501. NCR53c825           53c7,8xx        PCI     $120    Wide variant of 
  3502.                             NCR53c815.  Note that
  3503.                             the current Linux 
  3504.                             driver does not 
  3505.                             negotiate for wide
  3506.                             transfers.
  3507. Pro Audio Spectrum 16    pas16        ISA        Sound board w/SCSI
  3508. Seagate ST01        seagate        ISA    $20    BIOS only works with
  3509.                             some drives
  3510. Seagate ST02        seagate        ISA    $40    ST01 w/FDC
  3511. Sound Blaster 16 SCSI     aha152x        ISA        Sound board w/SCSI
  3512. Western Digital 7000    wd7000        ISA        w/FDC
  3513. Trantor T128        t128        ISA        
  3514. Trantor T128F        t128        ISA        T128 w/FDC and 
  3515.                             support for high IRQs
  3516. Trantor T130B        g_NCR5380    ISA        
  3517. Ultrastor 14F        ultrastor    ISA        w/FDC
  3518. Ultrastor 24F        ultrastor    EISA        w/FDC
  3519. Ultrastor 34F        ultrastor    VLB 
  3520.  
  3521. Notes : 
  3522. 1.  Trantor was recently purchased by Adaptec, and some products are being    
  3523.     sold under the Adaptec name.
  3524.  
  3525. 2.  Ultrastor recently filed for Chapter 11 Bankruptcy, so technical
  3526.     support is non-existant at this time.
  3527.  
  3528. 3.  The price for the busmastering NCR53c810 boards is not
  3529.     a typo, includes the standard ASPI/CAM driver package for 
  3530.     DOS, OS/2 and Windows (32 bit access), and other drivers are 
  3531.     available for free download. 
  3532.  
  3533.     Some people have had luck with the following companies :
  3534.  
  3535.  
  3536.        SW (swt@netcom.com) (214) 907-0871 fax (214) 907-9339
  3537.  
  3538.     As of 23 Dec 1995, their price was $53 on '810 boards.
  3539.  
  3540. 4.  Adaptec's recent SCSI chips show an unusual sensitivity
  3541.     to cabling and termination problems. For this reason,
  3542.     I cannot recommend the Adaptec 154x C and CF revisions or the 
  3543.     2xxx series.
  3544.  
  3545.     Note that the reliability problems do not apply to the 
  3546.     older 154x B revision boards, 174x A revision boards,
  3547.     or to my knowledge AIC-6360/AIC-6260 based boards (1505, 1510,
  3548.     1520, etc).
  3549.  
  3550.     Also, the quality of their technical support has slipped markedly, with
  3551.     long delays becoming more common, and their employees being ignorant 
  3552.     (suggesting there were non-disclosure policies affecting certain
  3553.     literature when there were none), and hostile (ie, refusing to pass 
  3554.     questions on to some one else when they couldn't answer them).
  3555.  
  3556.     If users desire handholding, or wish to make a political statement,
  3557.     they should take this point into consideration.  Otherwise, the 
  3558.     Adaptec 152x/1510/1505 are nicer than the other ISA boards in the 
  3559.     same price range, and there are some excellent deals on used and
  3560.     surplus 154x B revision boards and 1742 boards which IMHO outweigh
  3561.     the support problems.
  3562.  
  3563. 5.  All given prices for the DPT controllers are official list prices.
  3564.     Street prices should be considerably lower.
  3565.     All boards can be upgraded with cache and raid modules, most of the 
  3566.     boards are also available in Wide and/or Differential versions.
  3567.  
  3568. 6.  The various NCR boards are not entirely equivallent.  Ie, while
  3569.     the ASUS SC200 uses active termination, many other NCR53c810 
  3570.     boards use passive termination.  Most '825 boards use active
  3571.     termination, but some use a ROM for BIOS and others have a
  3572.     FLASH ROM.  Most '825 boards have a WIDE external connector,
  3573.     WIDE internal connector, and narrow internal connector, although
  3574.     a few (ie, CSC's less expensive model) lack the narrow internal 
  3575.     connector.
  3576.  
  3577. Section 9.9 : Summary
  3578.  
  3579.     Most ISA, EISA, VESA, and PCI users will probably be served best by a
  3580. BusLogic MultiMaster board, due to its performance, features such as active
  3581. termination, and Adaptec 1540 compatability.  There are a number of models
  3582. available with EISA, ISA, PCI, and VESA local bus interfaces, in single ended
  3583. and differential, and 8/16 bit SCSI bus widths.  The most recent Ultra SCSI PCI
  3584. models, the BT-948/958/958D, also include Flash ROM for easy firmware updates,
  3585. as well as automatic "smart" termination.
  3586.  
  3587.     People with PCI systems should consider NCR53c8xx based boards.  These 
  3588. are bus mastering SCSI controllers, '810s are available quantity one for $53
  3589. (ie, cheaper than the Adaptec 1520).  C't magazine benchmarked the boards
  3590. as faster than both the Adaptec 2940 and BusLogic BT-946C (under DOS),
  3591. and they get reasonable performance under Linux (up to 6M/sec through the 
  3592. file system ). The disadvantages of these boards versus the BusLogics 
  3593. are that they aren't Adaptec 1540 compatable, may or may not come with 
  3594. active termination, you'll need the latest driver revision (standard 
  3595. in 1.3.5x, also available via anonymous FTP for 1.2.x) to make full use 
  3596. of the hardware, and are more likely to have problems than with a mailbox 
  3597. interface board like a BusLogic or DPT.  
  3598.  
  3599.     Where everything working right on the first try is imperative, a
  3600. BusLogic MultiMaster or DPT board is probably optimal due to the 
  3601. complexity and potential for problems in non-mailbox interface boards like 
  3602. the NCR53c8xx and Adaptec AIC7xxx .
  3603.  
  3604.     People wanting non-PCI SCSI on a limited budget will probably be 
  3605. happiest finding a surplus or used Adaptec 154x B revision or 174x A 
  3606. revision, or an Adaptec 1520 clone of some sort (about $80) if they want
  3607. new hardware.  These boards offer reasonable throughput and interactive 
  3608. performance at a modest price.
  3609.  
  3610. Section 10 : Assignment of minor numbers
  3611.  
  3612. Due to constraints imposed by Linux's use of a sixteen bit dev_t with
  3613. only eight bits allocated to the minor number, SCSI disk, tape,
  3614. CDROM, and generic minor numbers are assigned dynamically.  
  3615. iaccording to the following procedure :
  3616.  
  3617.     For all SCSI host adapters, from scsi0 through scsiN
  3618.             For all SCSI IDs on this bus, from 0 through 7, except for 
  3619.           this host adapter's ID
  3620.                 For all logical units, from 0 through max_scsi_luns
  3621.           - Probe the bus, target, and LUN combination by 
  3622.             issuing a TEST UNIT READY command.  If we don't
  3623.             think a unit was here, don't probe any more LUNs
  3624.             on this bus + SCSI ID.
  3625.           - Send an INQUIRY command to determine what we've
  3626.             found; including the device type, vendor, model,
  3627.             firmware revision, etc.
  3628.           - Pass the results of this to a special recognition
  3629.             function for each high level driver present (i.e. disk,
  3630.             tape, etc).  Attach this device to the next available
  3631.             unit for any drivers that are willing to drive this.
  3632.             The generic device will attach to all devices.
  3633.           - If it was SCSI-I, or in a list of devices known 
  3634.             not to handle multiple LUNs, don't probe any more 
  3635.             LUNs on this bus + SCSI ID.
  3636.           - If it is a device known to have multiple LUNs, then
  3637.             a scan of the full LUN spectrum is forced, overriding
  3638.             max_scsi_luns.
  3639.           
  3640. There are frequently problems with this approach because if you have a
  3641. system where some devices are only present some of the time, then the
  3642. minor numbers for a given device will depend upon which devices were
  3643. present at boot time.  This can present problem, because rc scripts or
  3644. the file /etc/fstab might contain instructions for mounting specific
  3645. partitions which fails when the disk appears with a different minor
  3646. number.
  3647.  
  3648.     This problem has not yet been fully solved.  There is a
  3649. program which can be found on tsx-11 that creates a /dev/scsi heirarchy
  3650. based upon host number, id and lun.  This is a bit clumsy, but it would
  3651. help to alleviate some of the problems.
  3652.  
  3653.     A better solution will probably come out of the /proc/scsi pseudo
  3654. directory.  This is currently a work in progress, so at present we cannot
  3655. say exactly the form of the solution, but at the time of this writing
  3656. this appears to be a promising approach for resolving some of these
  3657. issues.
  3658. EOF
  3659.