[prev in list] [next in list] [prev in thread] [next in thread] 

List:       freebsd-doc
Subject:    How-To on PC Cards
From:       Annelise Anderson <andrsn () andrsn ! stanford ! edu>
Date:       1999-01-30 21:48:01
[Download RAW message or body]

	I wrote up a short document on the process of getting 
PC cards to work, which I put on my web page at

http://andrsn.stanford.edu/FreeBSD/pccards.html.

Here's a copy of it for comment or whatever; it doesn't do as
much with modem cards as it probably should:


                        Getting Your PC Card to Work
                                      
     * 1. There are two manual pages on PC cards, pccardd and
       pccard.conf. There is no manual page for pccardc, but typing
       the command alone will give you a list of available options.
       Another resource is the PAO page at
       http://www.jp.freebsd.org/PAO. This page lists a great many
       cards that people have used successfully. Many of the PAO
       features described there have been incorporated into FreeBSD,
       but not necessarily exactly as described there and not all
       listed drivers are included in FreeBSD.
     * 2. The basic objective is to have drivers in the kernel for the
       cards you want to use and for the pccard device itself, to
       enable card support on startup, and to have an accurate
       description of the card in the /etc/pccard.conf database. The
       following steps should get you to this point.
     * 2.1 Recompile your kernel, commenting out the zp and ze drivers
       by placing a # in front of these lines and including the three
       general lines for pccard support, one for the controller itself
       and two for the card slots. These can be found in the LINT
       kernel. They currently look like this:
       controller card0
       device pcic0 at card?
       device pcic1 at card?
       You will also want to include the driver for the card in the
       kernel configuration file. The drivers for modems (sio0 and
       sio1) will already be there; you may want to add sio2 and sio3.
       You will need to select an ethernet driver, or make sure it is
       included, by reading the information on the box your card came
       in. For example, an NE2000 compatible card uses the ed0 driver.
     * 2.2 Edit rc.conf, so that pccard_enable="YES". If you are
       installing an ethernet card, you will also want to include the
       driver as one of the network interfaces in rc.conf.
     * 2.3 Move or copy /etc/pccard.conf.sample to /etc/pccard.conf.
       This is the data base of pccards to which the card will be
       matched when it is inserted. If there is a card with a
       manufacturer and name that matches your card, that will be the
       entry to work with. Otherwise you will have to create one.
     * 2.4 Reboot the computer without the card in the slot and check
       to ensure that the ze and zp drivers are not mentioned and that
       the controller for the pccard is identified and given an IRQ.
       The two card slots will also appear.
       It will look something like this, if you've included the ed0
       driver:
       ed0 not found at 0x280
       PC-Card Cirrus Logic PD672X (5 mem & 2 I/O windows)
       pcic: controller irq 5
       Initializing PC-card drivers: ed sio
     * 2.5 Insert the card in the slot and run pccardc dumpcis. This
       will produce an output of information from the card itself in
       the form of tuples. You may want to print this information out
       or save it to a file for future reference. Here are a few lines
       from an ethernet card that isn't included in the data base but
       is NE2000 compatible (according to box) and thus uses the ed0
       driver:
       Configuration data for card in slot 0
       Tuple #6, code = 0x15 (Version 1 info), length = 38
           Version = 4.1, Manuf = [D-Link],card vers = [DE-660]
       Tuple #8, code = 0x1b (Configuration entry), length = 7
           Config index = 0x20(default)
           Interface byte = 0x81 (I/O) wait signal supported
       2 slots found
       Sometimes several alternatives may be available for the
       configuration index. From this information and examples already
       in the pccard.conf file, we can construct a card entry to be
       included in pccard.conf:
       #D-LINK Ethernet PC Card DE-660
       card "D-Link" "DE-660"
           config 0x20 "ed0" 10
           ether 0x81
           insert echo D-Link 660 Ethernet inserted
           insert /etc/pccard_ether ed0
           remove echo D-Link 660 Ethernet removed
           remove /sbin/ifconfig ed0 delete
       Save the card entry information to pccard.conf.
     * 2.6 Reboot without the card in the slot. If everything is
       right, you should get a message on the console when the card is
       inserted showing (for an ethernet card) its address as well as
       the "echo" text. If there are errors during boot about
       incorrect configuration or inability to assign resources to the
       card, the card entry is not correct and you will need to
       experiment. The beginning of /etc/pccard.conf shows some
       resources being made available; you may need to edit these.
     * 2.7 If the card is correctly identified, you have a working
       card. You can use ed0 (in this example) as you normally would,
       writing ifconfig statements at the command line.
       At this point you can choose to have the network configuration
       take place when the card is inserted. You will notice in the
       above that on insertion two commands are run, echo and
       /etc/pccard_ether ed0. The second calls the pccard_ether script
       in /etc, which uses information from the pccard_ifconfig line
       in /etc/rc.conf and other routing information provided in
       rc.conf. When the card is removed, the ed0 interface is
       deleted. Note that one of the options for the configuration of
       pccard_ifconfig is "DHCP".
       Alternatively you may wish to boot with the card in the slot
       and have the network come up on boot. It may work just as well
       in that case to have the information in an ordinary ifconfig
       statement in rc.conf (and include ed0 in the list of
       interfaces) and leave pccard_ifconfig blank.
     * 3.0 This how-to is not intended to address every difficulty,
       but it should give you an overview of how the process works so
       that you can experiment yourself. Let me know if it works or if
       I've left out any information you find important.
       
   Annelise Anderson andrsn@andrsn.stanford.edu
   Wed Jan 27 PST 1999



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-doc" in the body of the message

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic