=== R E A D M E ================================================================
    Megahertz Modem / D-Link Ethernet PCMCIA (Intel PCIC) Driver
    and the NetBSD _ed_ Driver for BSDI BSD/OS 1.1
================================================================================
This is the hacked up version of Bdale Garbees pcmcia hack (as he called
it) for the Megahertz 14.4/fax PCMCIA modem card (with or without X-JACK).
There is now support for the D-Link DE-650 PCMCIA Ethernet adapter, as
well as the _ed_ ethernet driver from NetBSD.  The pcmcia code does not
do card discovery (which card is in which slot) and it does not handle
dynamic insertion/extraction.  The i/o address and IRQ for the D-Link
card are hardwired to 0x300 and 10.  This is unlikely to be a problem
on a notebook pc, but if so you can change them in pcmcia.c and in the
insert-ed file.

The _ed_ driver is generic driver for Western Digital/SMC 8003 and 8013
series, SMC Elite Ultra (8216), 3Com 3c503, NE1000 and NE2000 adapters.
It is also supposed to be faster then the original BSD equivalents.
We were unable to coerce the _ne_ driver to work with the D-Link, but
thanks to Yoichi Shinoda sharing his _ed_ port with us it works great!

The Megahertz and D-Link specific stuff *might* work with other modems
or NE2000 clones - we have no idea.  The _ed_ driver is non-pcmcia
specific and should be able to be used standalone with the above
ethernet cards.

================================================================================

Installation steps:

  * Note: if you don't already have a kernel config file, refer to
    the BSD/386 1.1 Lizard Book and follow the steps in the
    "Rebuilding Your Kernel" section.  I suggest you first make
    your own config file and comment out all the devices you don't
    need.  Boot this version to make sure it works before continuing.

  o Untar the distribution somewhere.
    A pcmcia+ed directory will be created with everything in it.

      # gunzip <pcmcia+ed-950112.tar.gz | tar xvf -

  o Change /sys/i386/i386/conf.c using the diffs in conf.c.diff,
    either by hand or using patch(1) (if your conf.c is unmodified).
    
  o Change /sys/i386/conf/files.i386 using the diffs in files.i386.diff
    either by hand or using patch(1) (if your files.i386 is unmodified).

  o Copy i82365sl.h to the /sys/i386/isa/ic directory.

  o Edit pcmcia.c and define SLOT_DLINK and SLOT_MEGAHERTZ near the top
    of the file the way you want them.  Sorry - the slots are hard coded
    until someone add some card discovery code.  If you aren't using both
    cards, no problem - the code will figure out the card isn't there.

  o Copy if_ed.c, if_edreg.h and pcmcia.c to the /sys/i386/isa directory.

  o Edit your kernel config file:
    - Insert the file insert-pcmcia after the pccons/pcaux entries
      and before the serial port entries.
    - Insert the file insert-ed down with the other ethernet entries,
      say before the Novell ne0 entries.

  o Build and install a new kernel.

      # cd /sys/i386/conf
      # config YOUR_CONFIG_FILE
      # cd /sys/compile/YOUR_CONFIG_FILE
      # make depend
      # make
      # mv /bsd /bsd.save
      # mv bsd /

  o Edit your /etc/netstart file and change your ifconfig line
    to ifconfig ed0 instead of ne0 or pe0 or whatever.

  o Put your pcmcia cards in the correct slots, connect the external
    part of your D-Link to the card (and network), and reboot!

I think that's all... you will hopefully see something similar
to these boot messages:

    pcmcia0: chip version 3 at base 0x3e0 maddr 0xd0000
      slot0: card in slot A configured for D-Link Ethernet adapter
	Slot A valid, card detected.
    dl650: ethernet address: 00:80:c8:80:56:24
      slot1: card in slot B configured for Megahertz modem
	Slot B valid, card detected.
	    .
	    .
	    .
    ed0 at isa0 iobase 0x300 irq 10
    ed0: address 00:80:c8:80:56:24, type D-Link/NE-2000 (16 bit) 

================================================================================

Quick Installation for unmodified i386/i386/conf.c & i386/conf/files.i386

The following steps worked for me with a fresh 1.1 /usr/sys:
    cd /sys
    gunzip <~rdavis/pcmcia+ed-950112.tar.gz | tar xvf -
    cd pcmcia+ed
    patch /sys/i386/i386/conf.c conf.c.diff
    patch /sys/i386/conf/files.i386 files.i386.diff 
    cp i82365sl.h /sys/i386/isa/ic
    vi pcmcia.c				# define slots correctly
    cp if_ed.c if_edreg.h pcmcia.c /sys/i386/isa
    vi /sys/i386/conf/MASSLESS		# add both insert files
	    /pcaux0
	    :r insert-pcmcia
	    /ne0
	    }				# go to after all the ne0 entries
	    :r insert-ed
	    :wq
    cd /sys/i386/conf
    config MASSLESS
    cd /sys/compile/MASSLESS 
    make depend
    make
    mv /bsd /bsd.save
    mv bsd /
    vi /etc/netstart			# changed ifconfig pe0 to ed0
    reboot

=== C R E D I T S ==============================================================
Original Megahertz Modem PCMCIA driver by Bdale Garbee <bdale@gag.com>.
D-Link part, PCMCIA cleanup and _ed_ hack by Ray Davis <rdavis@convex.com>.
NetBSD _ed_ driver port to BSD/OS by Yoichi Shinoda <shinoda@cs.washington.edu>.
A lot of PCMCIA and _ed_ expertise by Stefan Grefen <grefen@convex.com>.
================================================================================
