From: fuller@athena.cs.uga.edu (James P. H. Fuller)
Subject: AAA: Archive, Adaptec, AARRRGH!
Organization: University of Georgia, Athens
Date: Sun, 24 Jan 1993 22:03:40 GMT


     "How can I get my SCSI tape to work" is certainly a FAQ in this
group, as it was in the old comp.unix.sysv386.  But there are so many
variables that every case is different, and I hope the cognoscenti
reading this will tolerate the question yet another time.  Low bows
all around from me to anyone with the fortitude to wade through the
following gory details and spot the blunder (it's gotta be there
somewhere....)

     Basic info: Gateway 486, ISC Unix r.2.2.  Primary HD controller
is esdi, full up [two physical drives] and working, IRQ 14. Secondary
controller is SCSI, no disk, just a tape.  Available IRQs for the SCSI
card are 10, 11, and 12 (I chose 11.)

     Various tidbits I have picked up on the net and taken into account:
DMA channel must be changed from 5 to 6 on a secondary SCSI controller
card under ISC Unix, and this value correctly entered into the mdevice
file (which may be, incorrectly, -1); tapes should get logical unit number
4 or greater; major and minor device numbers for the tape special files
are critical, and confusing; a node.d/tape file will have to be created
manually if the tape's /dev entries are to be created automatically.




  1) First off, the SCSI card (Adaptec AHA-1542B) jumper settings:

         J5:

         1 2 3 4 5 6 7 8 9 1 1 1 1     * Pairs 4 and 5 jumpered, 6 not:
                           0 1 2 3       (SCSI Address ID = 4)
         -------------------------
         o o o o o o o o o o o o o     * Pair 7 jumpered, 8 not:
               | |   |     |   |         (DMA Channel select = 6)
         o o o o o o o o o o o o o
         -------------------------     * Pair 9 not jumpered, pair 10 jumpered,
                                         pair 11 not jumpered:
                                         (Interrupt channel select = 11)

                                       * Pair 12 jumpered, pair 13 not:
                                         (DMA transfer speed = 5.7mb/sec)


        J6:

        1 2 3 4 5                      * Pair 1 jumpered:
        ---------                        (On-card BIOS enabled; tried both
        o o o o o                        enabled and not enabled)
        |
        o o o o o
        ---------


        J7:

        1 2 3 4 5 6 7 8                * Pairs 2, 3, and 4 not jumpered:
        ---------------                  (AT I/O port = 334H) (* see below)
        o o o o o o o o
                                       * Pairs 5 and 6 not jumpered:
        o o o o o o o o                  (BIOS wait state = 0 nsec)
        ---------------
                                       * Pairs 7 and 8 not jumpered:
                                         (BIOS base address = DC000)


        J8:

        1 2 3 4 5 6 7 8                * All jumpers removed as per Adaptec
        ---------------                  instruction folder if card is not
        o o o o o o o o                  controlling floppy drives.

        o o o o o o o o
        ---------------


        J9:

        1 2 3 4 5 6 7 8 9 1 1 1 1 1   * Pair 3 jumpered:
                          0 1 2 3 4     (DMA Request select = 6)
        ---------------------------
        o o o o o o o o o o o o o o   * Pair 7 jumpered:
            |       |       |           (DMA ACK select = 6)
        o o o o o o o o o o o o o o
        ---------------------------   * Pair 11 jumpered:
                                        (INT Request select = 11)


        * note regarding I/O port:
        On bootup while the machine is going through the various system tests,
        if the Adaptec BIOS is enabled it reports

           >   HOST ADAPTER NOT FOUND AT 330H
           >
           >   Strike the F1 key to continue, F2 to run the setup utility

        Pressing F1 gets you the "Booting the UNIX system..." message.
        I have the I/O port set at 334H because of a conflict with a MIDI
        card already at 330H that can't be changed.  I have a saved message
        from Thomas Hoberg, who has seemed very knowledgeable in the past,
        stating that the 330H I/O address is hardcoded into the Adaptec card
        BIOS but that this is irrelevant under Unix since Unix doesn't use
        the card BIOS for anything but reading the bootstrap code.  I infer
        from this that Unix doesn't use the card BIOS for *anything* if you
        have only a tape and no disk on the card, as I do.


 2) Terminating resistors:

        The Adaptec instruction folder:

        > The SCSI factory-installed terminators on the AHA-1540B/1542B
        > should be removed *if and only if* you attach SCSI devices to
        > *both* an internal and an external cable since the internal and
        > external SCSI connectors are on the same SCSI bus.

            In accordance with this I left the terminators (long thin orange
        thingies with a single line of pins) in place on the card near the
        cable connector at rn2, rn3 and rn5.  I also left similar-looking
        thingies in place on the end of the tape drive just above the cable
        connector.


 3) Tape drive (Archive 2150s) jumpers:

        These are currently set as follows, (looking at rear of drive,
        circuit board down:

                RxD  o  o  TxD   o--o  CF2   o--o  ID2

                     o  o  DIA   o--o  CF1   o  o  ID1

                     o  o  PEN   o--o  CF0   o  o  ID0

        I believe this setup specifies a 32K maximum block size (CF* column)
        and SCSI address 4 (ID* column).  I have also tried 16K (CF1 re-
        moved).


 4) Cable to drive connector:

        The internal SCSI port on the controller card has a pin 1 indicator.
        The cable is connected so that the red edge on the grey cable is at
        the pin 1 end of the connector.  The connector at the tape drive has
        no indication which is pin 1; presently the red edge of the cable is
        right next to the jumper array but this was a random guess and I've
        got a 50% chance of getting it wrong.  Whatever happened to keyways
        and other forms of idiotproofing?


 5) HPDD configuration:

        kconfig presently reports


        > The HPDD configuration selected is as follows:
        >
        > Primary controller:
        >     Standard AT controller
        >     Number of disk drives:       2  (maximum supported)
        >     Interrupt vector:            14
        >
        > Secondary controller:
        >     SCSI controller:             Adaptec AHA-1540,154XA,1640
        >     Number of disk drives:       4  (maximum supported)
        >     Interrupt vector:            11
        >     SCSI tape drive:             ARCHIVE 2150S
        >
        > RAM disk: none

        I assume that when it says there are 4 disk drives on the secondary
        controller it's just telling me how many I *could* attach, because
        there are in fact no disks attached to the SCSI card, just a tape.
        There *are* 2 physical esdi disks attached to the primary controller,
        both working fine.


  6) /etc/conf/cf.d/mdevice:

        Possibly-relevant lines from the mdevice file:

aha1540 -       iHo             aha_    0       0       0       2       -1
athd    -       iHo             athd_   0       0       1       2       -1

gendev  I       ir              gdev_   0       0       1       4       -1

tape    ocrwi   ioc             tape_   0       41      0       1       6


 7) /etc/conf/cf.d/sdevice:

        Possibly-relevant lines from sdevice:


aha1540 Y       2       0       0       0       0       0       0       0

athd    Y       1       0       0       0       0       0       0       0

gendev  Y       4       5       1       11      0       0       0       0
gendev  Y       4       5       1       14      0       0       0       0

tape    Y       1       0       0       0       0       0       0       0

    It puzzles me that the I/O addresses aren't specified in columns 7 and
    8, as you would think from reading sdevice(4), but this is the way I
    found the file after reconfiguring HPDD and rebuilding/reinstalling
    Unix.  While thrashing around I did manually edit 334 and 335 into the
    tape line (and supporting sdevice.d/tape file) and rebuild (no luck)
    and alternatively into the aha1540 line (and sdevice.d/aha1540 file)
    (also no luck).


 8) Device nodes:

    Before rebuilding Unix I manually created an /etc/conf/node.d/tape
    file containing

tape    ntape   c       64
tape    tape    c       72

    The minor device numbers are 64 and 72 rather than 0 and 8 because of
    the ISC System Maintenance Procedures manual, p.102:

    >                   SCSI Tape Devices
    >   Name               Minor Number              Description
    > /dev/ntape                0                 No rewind after closing
    > /dev/tape                 8                 Rewind after closing
    >
    > It may be necessary to edit the file /etc/conf/node.d/tape in order
    > to create the correct nodes for a SCSI tape drive on a second con-
    > troller.  In this case, change the values in the fourth field by adding
    > 64 to the original value.

    With the node.d/tape file in place, upon rebuild/reboot I find the follow-
    ing device files in /dev

crw-rw-rw-   1 root     root      41, 64 Jan 24 12:52 ntape
crw-rw-rw-   1 root     root      41, 72 Jan 24 12:52 tape

    I also tried a version of node.d/tape that used 0 and 8 as minor num-
    bers rather that 64 and 72 -- no luck.




    That's all I can think of to try.

    Throughout all the permutations of the above that I have tried, I can't
write tapes.  The only sign of activity on the drive is that the light flashes
briefly during bootup, right after the floppy light flashes.  After building
umpteen kernels, when I try to write to the tape drive, e.g.

    # find . -depth -print |cpio -ocvBC40960 >/dev/tape

I have yet to get anything except

    /dev/tape: cannot create

I did try to check out the hardware under DOS with DEBUG and the on-card
test routines (-g=dc00:9).  The diagnostic introductory message comes up, and
a "Press any key to continue" message, but thereafter nothing but a long
series of "test failed" messages scrolling past too fast to read the details.
Frankly, it *looks* as if the card is trying to test a hard disk at Logical
Unit Nnumber 0.  *Is* there a way to use the Adaptec diagnostics to test a
SCSI tape at LUN 4?


    IMMENSE gratitude to any determined souls who read this far.  Extra-
immense gratitude to anyone who can suggest something I have done wrong, or
something else I can try.

    Thanks very much!



| James P. H. Fuller, research director        Soil/Water Biology Laboratory |
|                                              Institute of Ecology          |
| work: fuller@athena.cs.uga.edu               University of Georgia         |
| home: (crom2 rejoins the bitstream one day)  Athens, GA U.S.A.             |


Newsgroups: comp.unix.pc-clone.32bit,biz.sco.general,comp.unix.sys5.r3,comp.unix.sysv386