diff options
author | Dominik Brodowski <linux@dominikbrodowski.net> | 2010-01-17 13:30:53 -0500 |
---|---|---|
committer | Dominik Brodowski <linux@dominikbrodowski.net> | 2010-02-17 11:48:26 -0500 |
commit | af461fc1875b6ec18e23b5f670af36c4ed35c84e (patch) | |
tree | fa09a446c94d533c169b9e28e97c0e8c03d36912 /drivers/pcmcia/cs.c | |
parent | f971dbd5da4e2fbf756d07b938a9c65a9c75178b (diff) |
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.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/pcmcia/cs.c b/drivers/pcmcia/cs.c index 823ecda3221..d529e02c2d5 100644 --- a/drivers/pcmcia/cs.c +++ b/drivers/pcmcia/cs.c | |||
@@ -728,6 +728,11 @@ static int pccardd(void *__skt) | |||
728 | if (!ret) | 728 | if (!ret) |
729 | socket_suspend(skt); | 729 | socket_suspend(skt); |
730 | } | 730 | } |
731 | if ((sysfs_events & PCMCIA_UEVENT_REQUERY) && | ||
732 | !(skt->state & SOCKET_CARDBUS)) { | ||
733 | if (!ret && skt->callback) | ||
734 | skt->callback->requery(skt); | ||
735 | } | ||
731 | } | 736 | } |
732 | mutex_unlock(&skt->skt_mutex); | 737 | mutex_unlock(&skt->skt_mutex); |
733 | 738 | ||
@@ -783,7 +788,8 @@ EXPORT_SYMBOL(pcmcia_parse_events); | |||
783 | * userspace-issued insert, eject, suspend and resume commands must be | 788 | * userspace-issued insert, eject, suspend and resume commands must be |
784 | * handled by pccardd to avoid any sysfs-related deadlocks. Valid events | 789 | * handled by pccardd to avoid any sysfs-related deadlocks. Valid events |
785 | * are PCMCIA_UEVENT_EJECT (for eject), PCMCIA_UEVENT__INSERT (for insert), | 790 | * are PCMCIA_UEVENT_EJECT (for eject), PCMCIA_UEVENT__INSERT (for insert), |
786 | * PCMCIA_UEVENT_RESUME (for resume) and PCMCIA_UEVENT_SUSPEND (for suspend). | 791 | * PCMCIA_UEVENT_RESUME (for resume), PCMCIA_UEVENT_SUSPEND (for suspend) |
792 | * and PCMCIA_UEVENT_REQUERY (for re-querying the PCMCIA card). | ||
787 | */ | 793 | */ |
788 | void pcmcia_parse_uevents(struct pcmcia_socket *s, u_int events) | 794 | void pcmcia_parse_uevents(struct pcmcia_socket *s, u_int events) |
789 | { | 795 | { |