summaryrefslogtreecommitdiffstats
path: root/usr.sbin/pccard
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>1995-09-19 12:40:06 +0000
committerphk <phk@FreeBSD.org>1995-09-19 12:40:06 +0000
commit2c8d5766d6d44155fd334a8c6dc1bfdbaec12d70 (patch)
treea6c9c3d5a7e84d5be89ea872cfb3e319730b5bd0 /usr.sbin/pccard
parentc042686c7756bfa11ff8fe6c47f9a7037da66363 (diff)
downloadFreeBSD-src-2c8d5766d6d44155fd334a8c6dc1bfdbaec12d70.zip
FreeBSD-src-2c8d5766d6d44155fd334a8c6dc1bfdbaec12d70.tar.gz
Now pccard modems work to some minimal extent.
Diffstat (limited to 'usr.sbin/pccard')
-rw-r--r--usr.sbin/pccard/pccardd/Makefile4
-rw-r--r--usr.sbin/pccard/pccardd/cardd.c18
-rw-r--r--usr.sbin/pccard/pccardd/sample.config25
3 files changed, 30 insertions, 17 deletions
diff --git a/usr.sbin/pccard/pccardd/Makefile b/usr.sbin/pccard/pccardd/Makefile
index 4a2c192..b1b0eb6 100644
--- a/usr.sbin/pccard/pccardd/Makefile
+++ b/usr.sbin/pccard/pccardd/Makefile
@@ -1,10 +1,12 @@
# Makefile for pccardd
PROG= pccardd
-SRCS= cardd.c file.c util.c readcis.c
+SRCS= cardd.c file.c util.c readcis.c printcis.c
MAN8= pccardd.8
MAN5= pccard.conf.5
DPADD= ${LIBUTIL}
LDADD= -lutil
+CFLAGS= -I${.CURDIR} -I${.CURDIR}/../pccardc
+.PATH: ${.CURDIR}/../pccardc
.include <bsd.prog.mk>
diff --git a/usr.sbin/pccard/pccardd/cardd.c b/usr.sbin/pccard/pccardd/cardd.c
index b705d15..bcb1f47 100644
--- a/usr.sbin/pccard/pccardd/cardd.c
+++ b/usr.sbin/pccard/pccardd/cardd.c
@@ -275,12 +275,14 @@ card_inserted(struct slot *sp)
{
struct card *cp;
+ sleep(5);
sp->cis = readcis(sp->fd);
if (sp->cis == 0)
{
log_1s("Error reading CIS on %s\n", sp->name);
return;
}
+ dumpcis(sp->cis);
for (cp = cards; cp; cp = cp->next)
if (strcmp(cp->manuf, sp->cis->manuf) == 0 &&
strcmp(cp->version, sp->cis->vers) == 0)
@@ -291,7 +293,8 @@ struct card *cp;
*/
if (cp == 0)
{
- log_1s("No card in database for %s", sp->cis->manuf);
+ log_1s("No card in database for \"%s\"", sp->cis->manuf);
+ log_1s("vers: \"%s\"", sp->cis->vers);
return;
}
if (cp->ether)
@@ -339,6 +342,9 @@ unsigned char net_addr[12];
sp->eaddr[3] = net_addr[6];
sp->eaddr[4] = net_addr[8];
sp->eaddr[5] = net_addr[10];
+ printf("Ether=%02x:%02x:%02x:%02x:%02x:%02x\n",
+ sp->eaddr[0], sp->eaddr[1], sp->eaddr[2],
+ sp->eaddr[3], sp->eaddr[4], sp->eaddr[5]);
}
/*
* assign_driver - Assign driver to card.
@@ -491,6 +497,7 @@ struct cis_config *cisconf, *defconf;
#ifdef DEBUG
fprintf(stderr, "Using mem addr 0x%x, size %d, card addr 0x%x\n",
sp->mem.addr, sp->mem.cardaddr, sp->mem.size);
+ sp->mem.cardaddr = 0x4000;
#endif /* DEBUG */
}
/*
@@ -614,10 +621,13 @@ int rw_flags;
#endif
}
mem.window = 0;
- if (sp->mem.size)
+#ifdef DEBUG
+ printf("Mem@ %x %d %x\n",sp->mem.addr, sp->mem.size, sp->mem.cardaddr);
+#endif
+ if (sp->mem.addr)
{
mem.window = 0;
- mem.flags = sp->mem.flags;
+ mem.flags = sp->mem.flags | MDF_ACTIVE;
mem.start = (caddr_t)sp->mem.addr;
mem.card = sp->mem.cardaddr;
mem.size = sp->mem.size;
@@ -656,7 +666,6 @@ int rw_flags;
strcpy(drv.name, drvp->kernel);
drv.unit = drvp->unit;
drv.irqmask = 1 << sp->irq;
- drv.irqmask = 0;
drv.flags = 0x80;
if (sp->mem.size)
{
@@ -680,6 +689,7 @@ int rw_flags;
* If the driver fails to be connected to the device,
* then it may mean that the driver did not recognise it.
*/
+ memcpy(drv.misc,sp->eaddr,6);
if (ioctl(sp->fd, PIOCSDRV, &drv))
{
#ifdef DEBUG
diff --git a/usr.sbin/pccard/pccardd/sample.config b/usr.sbin/pccard/pccardd/sample.config
index cb9552f..9072f52 100644
--- a/usr.sbin/pccard/pccardd/sample.config
+++ b/usr.sbin/pccard/pccardd/sample.config
@@ -3,20 +3,21 @@
#
# Pool parameters.
#
-io 0x2F8 - 0x360
-irq 5 6 8 9 10 15
+io 0x280 - 0x360
+irq 3 5 6 8 9 10 15
memory 0xd4000 96k
#
# Card database.
#
-card "RPTI LTD." "EP400" # NE2000 clone
- ether 0x110
- config 0x30 "ed0" 5
- config 0x31 "ed1" 6
- insert ifconfig $device physical $ether
- insert ifconfig $device bean
+# card "RPTI LTD." "EP400" # NE2000 clone
+# ether 0x110
+# config 0x30 "ed0" 5
+# config 0x31 "ed1" 6
+# insert ifconfig $device physical $ether
+# insert ifconfig $device bean
-card "RIPICAA" "RC144ACL"
- config 0x21 "sio1" 10 20
- insert echo start getty here
- remove echo stop getty
+card "MEGAHERTZ" "CC3144"
+ config 0x21 "sio1" 5
+
+card "Digital" "PCMCIA 28,800 V.34 "
+ config 0x03 "sio1" 10
OpenPOWER on IntegriCloud