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
This commit is contained in:
parent
b9857addba
commit
29d1eb210d
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=56527
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user