summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFederico G. Schwindt <fgsch@cvs.openbsd.org>2000-05-29 21:39:07 +0000
committerFederico G. Schwindt <fgsch@cvs.openbsd.org>2000-05-29 21:39:07 +0000
commit1179cc83000040456e575a9b4dac5e894a2fd78f (patch)
tree047fc0c39abd9899013d3c8546437648ed5e89fa
parent7cb5002b801b1e42ae24d98efa847c6ef78a7072 (diff)
OR the values in misc within cftable entry; in iospace, irq and misc
clean the flags before checking for particular capabilities. this is needed because we use a template that might end messing the flags.
-rw-r--r--sys/dev/pcmcia/pcmcia_cis.c16
1 files changed, 12 insertions, 4 deletions
diff --git a/sys/dev/pcmcia/pcmcia_cis.c b/sys/dev/pcmcia/pcmcia_cis.c
index fa7da31e243..fc1866f068a 100644
--- a/sys/dev/pcmcia/pcmcia_cis.c
+++ b/sys/dev/pcmcia/pcmcia_cis.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pcmcia_cis.c,v 1.3 1999/05/16 22:44:12 niklas Exp $ */
+/* $OpenBSD: pcmcia_cis.c,v 1.4 2000/05/29 21:39:06 fgsch Exp $ */
/* $NetBSD: pcmcia_cis.c,v 1.9 1998/08/22 23:41:48 msaitoh Exp $ */
/*
@@ -1026,6 +1026,8 @@ pcmcia_parse_cis_tuple(tuple, arg)
reg = pcmcia_tuple_read_1(tuple, idx);
idx++;
+ cfe->flags &=
+ ~(PCMCIA_CFE_IO8 | PCMCIA_CFE_IO16);
if (reg & PCMCIA_TPCE_IO_BUSWIDTH_8BIT)
cfe->flags |= PCMCIA_CFE_IO8;
if (reg & PCMCIA_TPCE_IO_BUSWIDTH_16BIT)
@@ -1105,6 +1107,9 @@ pcmcia_parse_cis_tuple(tuple, arg)
reg = pcmcia_tuple_read_1(tuple, idx);
idx++;
+ cfe->flags &= ~(PCMCIA_CFE_IRQSHARE
+ | PCMCIA_CFE_IRQPULSE
+ | PCMCIA_CFE_IRQLEVEL);
if (reg & PCMCIA_TPCE_IR_SHARE)
cfe->flags |= PCMCIA_CFE_IRQSHARE;
if (reg & PCMCIA_TPCE_IR_PULSE)
@@ -1228,12 +1233,15 @@ pcmcia_parse_cis_tuple(tuple, arg)
reg = pcmcia_tuple_read_1(tuple, idx);
idx++;
+ cfe->flags &= ~(PCMCIA_CFE_POWERDOWN
+ | PCMCIA_CFE_READONLY
+ | PCMCIA_CFE_AUDIO);
if (reg & PCMCIA_TPCE_MI_PWRDOWN)
- cfe->flags = PCMCIA_CFE_POWERDOWN;
+ cfe->flags |= PCMCIA_CFE_POWERDOWN;
if (reg & PCMCIA_TPCE_MI_READONLY)
- cfe->flags = PCMCIA_CFE_READONLY;
+ cfe->flags |= PCMCIA_CFE_READONLY;
if (reg & PCMCIA_TPCE_MI_AUDIO)
- cfe->flags = PCMCIA_CFE_AUDIO;
+ cfe->flags |= PCMCIA_CFE_AUDIO;
cfe->maxtwins = reg & PCMCIA_TPCE_MI_MAXTWINS;
while (reg & PCMCIA_TPCE_MI_EXT) {