home *** CD-ROM | disk | FTP | other *** search
/ Caldera Network Desktop 1.0 / caldera-network-desktop-1.0.bin / doc / HOWTO / SCSI-HOWTO < prev    next >
Text File  |  1995-11-08  |  115KB  |  3,143 lines

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