summaryrefslogtreecommitdiff
path: root/drivers/pcmcia/cs.c
diff options
context:
space:
mode:
authorDominik Brodowski <linux@dominikbrodowski.net>2010-01-17 21:30:53 +0300
committerDominik Brodowski <linux@dominikbrodowski.net>2010-02-17 19:48:26 +0300
commitaf461fc1875b6ec18e23b5f670af36c4ed35c84e (patch)
treefa09a446c94d533c169b9e28e97c0e8c03d36912 /drivers/pcmcia/cs.c
parentf971dbd5da4e2fbf756d07b938a9c65a9c75178b (diff)
downloadlinux-af461fc1875b6ec18e23b5f670af36c4ed35c84e.tar.xz
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>
Diffstat (limited to 'drivers/pcmcia/cs.c')
-rw-r--r--drivers/pcmcia/cs.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/pcmcia/cs.c b/drivers/pcmcia/cs.c
index 823ecda32216..d529e02c2d54 100644
--- a/drivers/pcmcia/cs.c
+++ b/drivers/pcmcia/cs.c
@@ -728,6 +728,11 @@ static int pccardd(void *__skt)
if (!ret)
socket_suspend(skt);
}
+ if ((sysfs_events & PCMCIA_UEVENT_REQUERY) &&
+ !(skt->state & SOCKET_CARDBUS)) {
+ if (!ret && skt->callback)
+ skt->callback->requery(skt);
+ }
}
mutex_unlock(&skt->skt_mutex);
@@ -783,7 +788,8 @@ EXPORT_SYMBOL(pcmcia_parse_events);
* userspace-issued insert, eject, suspend and resume commands must be
* handled by pccardd to avoid any sysfs-related deadlocks. Valid events
* are PCMCIA_UEVENT_EJECT (for eject), PCMCIA_UEVENT__INSERT (for insert),
- * PCMCIA_UEVENT_RESUME (for resume) and PCMCIA_UEVENT_SUSPEND (for suspend).
+ * PCMCIA_UEVENT_RESUME (for resume), PCMCIA_UEVENT_SUSPEND (for suspend)
+ * and PCMCIA_UEVENT_REQUERY (for re-querying the PCMCIA card).
*/
void pcmcia_parse_uevents(struct pcmcia_socket *s, u_int events)
{