*BSD News Article 36072


Return to BSD News archive

Xref: sserve comp.os.386bsd.questions:13336 comp.os.386bsd.development:2575
Path: sserve!newshost.anu.edu.au!harbinger.cc.monash.edu.au!msuinfo!agate!violet.berkeley.edu!jkh
From: jkh@violet.berkeley.edu (Jordan K. Hubbard)
Newsgroups: comp.os.386bsd.questions,comp.os.386bsd.development
Subject: Re: Notebook / Laptop issues WRT: FreeBSD
Date: 23 Sep 1994 01:40:18 GMT
Organization: University of California, Berkeley
Lines: 42
Message-ID: <35tbm2$5jt@agate.berkeley.edu>
References: <35rfhv$b1g@agate.berkeley.edu> <1994Sep22.214854.29723@mega.com.au>
NNTP-Posting-Host: violet.berkeley.edu

In article <1994Sep22.214854.29723@mega.com.au>,
Andrew McRae <andrew@megadata.mega.com.au> wrote:
>I am doing some work on making ze0 more generic by recognising
>the CIS string in the ethernet card. I also am looking at
>porting the Linux PCMCIA stuff, or at least implementing
>something similar by putting in a PCIC device driver and
>write a daemon that performs some autoconfig when a card
>gets plugged in etc.

That's great - I knew when I folded the ze0 stuff in that it was
just a stop-gap solution (I had a laptop and a PCMCIA ethernet
card, and I wanted it to work! :-) and the REAL way to do it would
be something more along the lines of what Linux has done.  Now
that we've got LKMs, it should even be possible to load the driver
in on insertion.  I personally think that the PCMCIA configuration
should be done primarily from user mode, as you've suggested.  My
ideal system would be something like:

1. You have a `pcmciad' that runs and hooks itself in to the PCMCIA "bus"
   code by opening a device special (/dev/pcmcia?).  It also reads a
   configuration file that tells it what commands to run when a given type
   of card is inserted or extracted.

2. pcmciad sleeps on requests, and when it sees a card has been inserted it
   does a `modload' to pull the driver into the kernel and then runs the
   associated commands.  In the case of an ethernet card, this might #ifconfig
   the interface up, in the case of a modem it might start a getty on the
   dial-in side of the serial interface, etc.

3. When it sees a card has been removed, it runs any associated commands
   (downs the interface, removes the getty, whatever) and then does a
   modunload on the driver.

I would be very interested in seeing something like this done!

Garrett Wollman has already done the required changes so that every
filesystem except UFS (and that's next, for diskless boots!) and LFS
(not usable yet anyway) can be dynamically loaded as an LKM, and I would
be very happy to see device drivers next!  The VFS stuff will be in 2.0,
the device drivers depend on volunteers coming forward!

					Jordan