pcmcia: delay re-scanning and re-querying of PCMCIA bus

After a CIS update -- or the finalization of the resource database --,
proceed with the re-scanning or re-querying of PCMCIA cards only in
a separate thread to avoid deadlocks.

Tested-by: Wolfram Sang <w.sang@pengutronix.de>
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
This commit is contained in:
Dominik Brodowski
2010-01-17 19:30:53 +01:00
parent f971dbd5da
commit af461fc187
5 changed files with 59 additions and 53 deletions

View File

@@ -201,16 +201,7 @@ static ssize_t pccard_store_resource(struct device *dev,
s->resource_setup_done = 1;
mutex_unlock(&s->ops_mutex);
mutex_lock(&s->skt_mutex);
if ((s->callback) &&
(s->state & SOCKET_PRESENT) &&
!(s->state & SOCKET_CARDBUS)) {
if (try_module_get(s->callback->owner)) {
s->callback->requery(s, 0);
module_put(s->callback->owner);
}
}
mutex_unlock(&s->skt_mutex);
pcmcia_parse_uevents(s, PCMCIA_UEVENT_REQUERY);
return count;
}