summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorguido <guido@FreeBSD.org>1999-01-10 13:00:09 +0000
committerguido <guido@FreeBSD.org>1999-01-10 13:00:09 +0000
commitb0b895bf981495c394ce2e954d19e487be93372a (patch)
treefe42b0be7ca57d34f8a349cd1e7d3ed9333e1cd4
parent32d5c8b4c0a33630ad2883222e933432bcdf52c6 (diff)
downloadFreeBSD-src-b0b895bf981495c394ce2e954d19e487be93372a.zip
FreeBSD-src-b0b895bf981495c394ce2e954d19e487be93372a.tar.gz
When resuming with 2 identical cards in 2 slots, the initialisation
of the second card fails. This fixes that.
-rw-r--r--usr.sbin/pccard/pccardd/cardd.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/usr.sbin/pccard/pccardd/cardd.c b/usr.sbin/pccard/pccardd/cardd.c
index 377ba0f..ed4f6d2 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.31 1998/04/20 15:24:28 nate Exp $";
+ "$Id: cardd.c,v 1.32 1998/04/20 16:24:03 nate Exp $";
#endif /* not lint */
#include <stdio.h>
@@ -279,11 +279,14 @@ assign_driver(struct card *cp)
for (conf = cp->config; conf; conf = conf->next)
if (conf->inuse == 0 && conf->driver->card == cp &&
- conf->driver->config == conf) {
+ conf->driver->config == conf &&
+ conf->driver->inuse == 0) {
#ifdef DEBUG
logmsg("Found existing driver (%s) for %s\n",
conf->driver->name, cp->manuf);
#endif
+ conf->driver->inuse = 1;
+ conf->inuse = 1;
return (conf);
}
/*
OpenPOWER on IntegriCloud