summaryrefslogtreecommitdiffstats
path: root/usr.sbin/pccard
diff options
context:
space:
mode:
authornate <nate@FreeBSD.org>1998-04-20 16:24:03 +0000
committernate <nate@FreeBSD.org>1998-04-20 16:24:03 +0000
commitd41836ff1783a567dc07d9c040a9d1fc6696e82e (patch)
tree82c7896fba327889ebbe54b11cc70d0281a514b3 /usr.sbin/pccard
parentc1d7e6cda4f6e4c1812e1ef9631e63eafabe7f4d (diff)
downloadFreeBSD-src-d41836ff1783a567dc07d9c040a9d1fc6696e82e.zip
FreeBSD-src-d41836ff1783a567dc07d9c040a9d1fc6696e82e.tar.gz
- Argh, fix stupid logic error in the laststate/state fix previously. That's
what I get for trying to do too many things at once.
Diffstat (limited to 'usr.sbin/pccard')
-rw-r--r--usr.sbin/pccard/pccardd/cardd.c13
1 files changed, 3 insertions, 10 deletions
diff --git a/usr.sbin/pccard/pccardd/cardd.c b/usr.sbin/pccard/pccardd/cardd.c
index 3449a04..377ba0f 100644
--- a/usr.sbin/pccard/pccardd/cardd.c
+++ b/usr.sbin/pccard/pccardd/cardd.c
@@ -26,7 +26,7 @@
#ifndef lint
static const char rcsid[] =
- "$Id: cardd.c,v 1.30 1998/03/09 05:18:50 hosokawa Exp $";
+ "$Id: cardd.c,v 1.31 1998/04/20 15:24:28 nate Exp $";
#endif /* not lint */
#include <stdio.h>
@@ -142,18 +142,11 @@ slot_change(struct slot *sp)
switch (state.state) {
case empty:
case noslot:
- if (state.laststate == filled)
+ /* Debounce potentially incorrectly reported removals */
+ if (state.laststate == filled || state.laststate == suspend)
card_removed(sp);
break;
case filled:
- /*
- * If the previous state was suspend, fake a removal to get
- * our state in sync with the kernel. This happens when the
- * system resumes, since we can only reliably process
- * the state change after we resume.
- */
- if (state.laststate == suspend)
- card_removed(sp);
card_inserted(sp);
break;
case suspend:
OpenPOWER on IntegriCloud