From d41836ff1783a567dc07d9c040a9d1fc6696e82e Mon Sep 17 00:00:00 2001 From: nate Date: Mon, 20 Apr 1998 16:24:03 +0000 Subject: - 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. --- usr.sbin/pccard/pccardd/cardd.c | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) (limited to 'usr.sbin/pccard') 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 @@ -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: -- cgit v1.1