aboutsummaryrefslogtreecommitdiff
path: root/usr.sbin/pccard
diff options
context:
space:
mode:
authorMitsuru IWASAKI <iwasaki@FreeBSD.org>2000-01-24 13:15:05 +0000
committerMitsuru IWASAKI <iwasaki@FreeBSD.org>2000-01-24 13:15:05 +0000
commit29d1eb210d304cfd2b7cb87558437b973bf94d19 (patch)
treee1f50352f285d4f113367c34480119ef0b22e6f0 /usr.sbin/pccard
parentb9857addba2c43f2b55ae7103700d567221599c4 (diff)
downloadsrc-29d1eb210d304cfd2b7cb87558437b973bf94d19.tar.gz
src-29d1eb210d304cfd2b7cb87558437b973bf94d19.zip
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
Notes
Notes: svn path=/head/; revision=56527
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 404aa560ff83..c64c002d17bb 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);