Subject: README: PCMCIA now supported in -current
To: None <current-users@NetBSD.ORG>
From: Jason Thorpe <thorpej@nas.nasa.gov>
List: current-users
Date: 10/16/1997 16:57:32
Folks...

I have just committed Marc Horowitz's new PCMCIA framework to the trunk
of the NetBSD source tree.  NetBSD-current now supports PCMCIA.

The code supports the Intel i82365 and compatible PCMCIA bridge
chips, and the following devices:

	aic		Adaptec APA-1460 SCSI (and compatibles)

	com		modems and serial ports

	ep		3c589 and 3c562 ethernet

	ne		NE2000-compatible ethernet

	sm		Megahertz X-JACK ethernet

For details on configuring these devices, see the GENERIC kernel config
file.

Here's example output from my NEC Versa 6030X:

Copyright (c) 1982, 1986, 1989, 1991, 1993
    The Regents of the University of California.  All rights reserved.

NetBSD 1.2G (YKCI) #131: Thu Oct 16 10:16:00 PDT 1997
    thorpej@icky:/local/netbsd-src/sys/arch/i386/compile/YKCI
cpu0: family 5 model 2 step c
cpu0: Intel Pentium (P54C) (586-class)
real mem  = 24768512
avail mem = 21417984
using 327 buffers containing 1339392 bytes of memory
mainbus0 (root)
pci0 at mainbus0 bus 0: configuration mode 1
pchb0 at pci0 dev 0 function 0
pchb0: Intel 82437MX Mobile System Controller (MTSC) (rev. 0x02)
pcib0 at pci0 dev 1 function 0
pcib0: Intel 82371MX Mobile PCI I/O IDE Xcelerator (MPIIX) (rev. 0x03)
Chips and Technologies 65550 (VGA display, revision 0x45) at pci0 dev 2 function
 0 not configured
Texas Instruments PCI1130 (CardBus bridge, revision 0x04) at pci0 dev 3 function
 0 not configured
Texas Instruments PCI1130 (CardBus bridge, revision 0x04) at pci0 dev 3 function
 1 not configured
isa0 at pcib0
com0 at isa0 port 0x3f8-0x3ff irq 4: ns16550a, working fifo
com1 at isa0 port 0x2f8-0x2ff irq 3: ns16550a, working fifo
com2 at isa0 port 0x3e8-0x3ef irq 5: ns16550a, working fifo
lpt0 at isa0 port 0x378-0x37b irq 7
wdc0 at isa0 port 0x1f0-0x1f7 irq 14
atapibus0 at wdc0
wd0 at wdc0 drive 0: <IBM-DMCA-21440>
wd0: 1376MB, 2796 cyl, 16 head, 63 sec, 512 bytes/sec
wd0: using 16-sector 16-bit pio transfers, lba addressing
sb0 at isa0 port 0x220-0x237 irq 5 drq 1: dsp v4.13
audio0 at sb0
npx0 at isa0 port 0xf0-0xff: using exception 16
vt0 at isa0 port 0x60-0x6f irq 1
vt0: generic, 80 col, color, 8 scr, mf2-kbd, [R3.32]
pms0 at vt0 irq 12
spkr0 at vt0 port 0x61
vt0: console
fdc0 at isa0 port 0x3f0-0x3f7 irq 6 drq 2
pcic0 at isa0 port 0x3e0-0x3e1 iomem 0xd0000-0xd3fff: using irq 9
pcic0: controller 0 (Intel 82365SL Revision 1) has sockets A and B
pcmcia0 at pcic0 controller 0 socket 0
ep0 at pcmcia0 function 0 port 0x400-0x40f: 3Com 3C589 Ethernet
ep0: MAC address 00:60:97:49:63:51
ep0: 8KB byte-wide FIFO, 5:3 Rx:Tx split, utp/aui/bnc (default utp)
pcmcia1 at pcic0 controller 0 socket 1
aic0 at pcmcia1 function 0 port 0x340-0x35f: APA-1460 SCSI Host Adapter
scsibus0 at aic0: 8 targets
pcmcia1: card irq 15
apm0 at mainbus0: Power Management spec V1.1
apm0: battery life expectancy: 91%
apm0: A/C state: on
apm0: battery charge state: charging
biomask c040 netmask c040 ttymask d2c2
boot device: wd0
root on wd0a dumps on wd0b
root file system type: ffs
pcmcia0: card irq 15
pcmcia0: card irq 15

Note the last two "irq" related lines... the code dynamically allocates
IRQs for network interfaces when the interfaces are brought up, and
frees them when the interface is brought down.  Don't be alarmed by
these messages :-)  The code also performs simple power management,
in that when an interface is brought down, the power is turned off to
that card, preserving battery life.  A future project is to have the
in-kernel APM code notify drivers that care that the system is going
to standby or suspend...

A round of applause for Marc, who worked hard on this.  Thanks a bunch!

Others that helped get this going once Marc had the basic framework in
place: Matt Thomas, John Kohl, Bill Sommerfeld, Enami Tsugutomo, and
myself.

If you have questions about or problems with the code, plese don't
hesitate to send an e-mail or bug report (the latter with send-pr, please :-)

Have fun!

Jason R. Thorpe                                       thorpej@nas.nasa.gov
NASA Ames Research Center                            Home: +1 408 866 1912
NAS: M/S 258-6                                       Work: +1 415 604 0935
Moffett Field, CA 94035                             Pager: +1 415 428 6939