summaryrefslogtreecommitdiffstats
path: root/usr.sbin/pccard
diff options
context:
space:
mode:
authoriwasaki <iwasaki@FreeBSD.org>2000-01-24 13:15:05 +0000
committeriwasaki <iwasaki@FreeBSD.org>2000-01-24 13:15:05 +0000
commitfc58a07bed81853b493e2519ca67a39b5fc32262 (patch)
tree12532af942d705f9eeb441dffb365e4a0c567105 /usr.sbin/pccard
parentcc4f3d1abaf283ab09791506ef6e1b6ec42195bd (diff)
downloadFreeBSD-src-fc58a07bed81853b493e2519ca67a39b5fc32262.zip
FreeBSD-src-fc58a07bed81853b493e2519ca67a39b5fc32262.tar.gz
Merge from PAO3 -- Quick fix a bug which assign_driver() checks wrong
member variable to find the configuration on new driver allocation. Correct condition is that card_config and driver are not in use. Both of them are cleared in card_removed() (conf->driver->card never be cleared). This fix problems `No free configuration for card' on insertion, and pccardd core dump on removal in condition of the same driver but different card. Also this might be emergency measures, complete solution would be made after Hosokawa-san come back. Consulted with: imp Waiting for: hosokawa
Diffstat (limited to 'usr.sbin/pccard')
-rw-r--r--usr.sbin/pccard/pccardd/cardd.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.sbin/pccard/pccardd/cardd.c b/usr.sbin/pccard/pccardd/cardd.c
index 404aa56..c64c002 100644
--- a/usr.sbin/pccard/pccardd/cardd.c
+++ b/usr.sbin/pccard/pccardd/cardd.c
@@ -348,11 +348,11 @@ assign_driver(struct card *cp)
return (conf);
}
/*
- * New driver must be allocated. Find one that matches the
- * any configurations not in use.
+ * New driver must be allocated. Find the first configuration
+ * not in use.
*/
for (conf = cp->config; conf; conf = conf->next)
- if (conf->inuse == 0 && conf->driver->card == 0)
+ if (conf->inuse == 0 && conf->driver->inuse/*card*/ == 0)
break;
if (conf == 0) {
logmsg("No free configuration for card %s", cp->manuf);
OpenPOWER on IntegriCloud