Hello, World!

This is the readme file for the IOMEGA PC2/2B driver.  It has been
written under the assumption that all readers (include myself) are
idiots to minimize confusion, and is sorted with most important
information first for the impatient reader.

-----------------
+++How to install
-----------------

NOTE: I'm assuming your kernel source is in /usr/src/linux and is
      v1.1.0.  

1) Copy iomega_pc2.c and iomega_pc2.h into /usr/src/linux/drivers/scsi
2) cd /usr/src/linux
3) patch < /previous/directory/config.in.diff
4) cd drivers/scsi
5) patch < /twice/previous/directory/scsi.diff
6) Edit iomega_pc2.c
    a) Search forewards for `USER' in all caps, without the quotes.  It
       only appears once in the file so this shouldn't be confusing.
    b) Read the comments and adjust as necessary.  If you need
       assistance (i.e. you don't know C and aren't comfortable editing
       the file) feel free to email me.  (bwh8918@rit.edu)
7) Rebuild the kernel
    a) cd /use/src/linux
    b) make config
        i) When it asks you if you want SCSI support, say `y'
        ii) Make sure you say `y' to SCSI disk support or tape or CDROM
            depending on what's hooked up to your PC2.
        iii) When it asks you if you want IOMEGA PC2/2B support, say `y'
        iv) I don't care what you do with the rest of the
             configuration.  
8) Run lilo if you're using it, or copy the kernel onto a boot disk or
   whatever
9) Reboot!

------------------
+++ Known Problems
------------------

Only 1, and it's currently specific to my A10 drive.  If you have the
drive ON you MUST have it fully loaded with cartridges.  If you don't,
it "kind of" reports the error, confuses the mid-level driver and your
machine WILL CRASH.  More testing is in order to see what happens if
you turn the drive off and then try to access it, but this isn't
recommended either.

There are a few bugs on the PC2 card.  I worked around a DMA bug by
following my documentation's directions, but you may still see something
about a `borken parity algorithm'.  Yes, borken (Drew Eckhardt's idea).  
The PC2 usually produces parity bits for the SCSI bus, but some of the older
cards' algorithms didn't work.  I'm running a check at boot time to test
you card, and if it doesn't pass you'll see a message.  No big deal-
the driver doesn't look at it even if it DOES work!

-----------------------
+++ Babysitting options
-----------------------

I am blessed with a MOSTLY ANSI SCSI compatible drive.  I put in a
compile time thing called `BABYSIT_A10' that keeps an eye on my drive so
it doesn't do anything stupid.  If your drive needs babysitting too, I
recommend you do text searches for `MYDRIVE' and add code for your drive
like the comments say.  I'd appreciate it if you left the
`BABYSIT_MYDRIVE' stuff in so the next guy down the line has the example
to work off of too.

--------------------
+++ Unknown problems
--------------------

If something weird happens and the bottom drops out of the kernel you'll
probably see 

iomega_pc2: resetting with status 0x##

    This means your drive went bonkers and we tried to reset the SCSI
bus.  This has never left my machine in a stable condition, so I put in
the above message.  Here's how you interpret the status code (and,
hence, attempt to figure out why it was reset!)


For those of you that can do Binary/Hex conversions:

Bit  Explaination ("if the bit is 1...")
---  ------------
0    Drive is requesting something (depends on bits 1,2, and 3).  This
     usually means that either your drive or my driver is messed up
1    We're in the process of reading from the drive.  (Data was being
     transferred from the drive to the card).  If 0, we were writing to
     the drive.  (Data was being sent to the drive from the card)
2    We're sending the command
3    `Message' bit.  Drive wants to send a message (last thing
     transferred for each command execution)
4    Busy.  There was a drive out there paying attention to what we were
     saying.
5    Parity bit.  Doesn't work on my card anyway
6    ACK.  I have never seen this set
7    Latch bit.  0 if we're in the process of DMAing, 1 otherwise

    If we ignore the top 3 bits (5, 6, and 7), it all boils down to
this:

0x00: Bus was free, nothing was happening.  Usually shows up as 0x80
      (because of the latch bit... see below)
0x10: In the middle of getting a drive's attention.  
0x11: Drive want us to send out data
0x13: Drive wants to send us data
0x15: Drive wants a command byte
0x17: Drive is sending a message

    A lot of times, the LATCH bit will be set, so you would see 0x80,
0x90, 0x91, 0x93, 0x95, and 0x97 instead.  If a number appears that is 1
LESS than on of the above numbers, we were in the process of doing that
action when the drive stopped asking for stuff (REQuest was never
raised).  Don't ask me! :)

-----------------------
+++ Need Documentation?
-----------------------

I have full documentation for the PC2 and A10H.  I'd be happy to share.

---------
+++ To-do 
---------

- Fix the cartridge-out problem.  Probably requires more babysitting but
  at a higher level

- Add support for the other non-standard drives out there (babysitting
  stuff).  If you have one of these drives, email me!

- Check parity bits on working cards

- Hook up this 80M connor SCSI drive and see if it works off the PC2!
  This should be an adventure.


 Brian
 bwh8918@rit.edu
 6/4/94
