Subject: suggested pcmcia changes
To: None <tech-kern@netbsd.org>
From: Christian E. Hopps <chopps@merit.edu>
List: tech-kern
Date: 01/24/2000 19:09:52
Regarding my recent mail on a possible bug in the pcmcia code can people
please test the following and let me know that it doesn't break
anything?
Thanks,
Chris.
Index: pcmcia_cis.c
===================================================================
RCS file: /cvsroot/syssrc/sys/dev/pcmcia/pcmcia_cis.c,v
retrieving revision 1.15
diff -u -r1.15 pcmcia_cis.c
--- pcmcia_cis.c 2000/01/20 08:47:59 1.15
+++ pcmcia_cis.c 2000/01/25 00:07:50
@@ -970,6 +970,10 @@
if (intface) {
reg = pcmcia_tuple_read_1(tuple, idx);
idx++;
+ cfe->flags &= ~(PCMCIA_CFE_MWAIT_REQUIRED
+ | PCMCIA_CFE_RDYBSY_ACTIVE
+ | PCMCIA_CFE_WP_ACTIVE
+ | PCMCIA_CFE_BVD_ACTIVE);
if (reg & PCMCIA_TPCE_IF_MWAIT)
cfe->flags |= PCMCIA_CFE_MWAIT_REQUIRED;
if (reg & PCMCIA_TPCE_IF_RDYBSY)
@@ -1038,6 +1042,8 @@
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)
@@ -1115,6 +1121,9 @@
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)
@@ -1237,6 +1246,9 @@
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;
if (reg & PCMCIA_TPCE_MI_READONLY)