summaryrefslogtreecommitdiffstats
path: root/drivers/pcmcia/ds.c
diff options
context:
space:
mode:
authorDominik Brodowski2006-11-03 16:54:00 +0100
committerDominik Brodowski2006-12-05 02:09:14 +0100
commit4ae1cbf17d14ba6fd316a94b290ea4e741cba15c (patch)
tree56c5f6939fd486b6041945497d2d541e76b0e1e6 /drivers/pcmcia/ds.c
parent[PATCH] cm4000_cs: fix return value check (diff)
downloadkernel-qcow2-linux-4ae1cbf17d14ba6fd316a94b290ea4e741cba15c.tar.gz
kernel-qcow2-linux-4ae1cbf17d14ba6fd316a94b290ea4e741cba15c.tar.xz
kernel-qcow2-linux-4ae1cbf17d14ba6fd316a94b290ea4e741cba15c.zip
[PATCH] pcmcia: start over after CIS override
When overriding the CIS, re-start the configuration of the card from scratch. Reported and debugged by Fabrice Bellet <fabrice@bellet.info> Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
Diffstat (limited to 'drivers/pcmcia/ds.c')
-rw-r--r--drivers/pcmcia/ds.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/drivers/pcmcia/ds.c b/drivers/pcmcia/ds.c
index 21d83a895b21..7f6e94cd067a 100644
--- a/drivers/pcmcia/ds.c
+++ b/drivers/pcmcia/ds.c
@@ -714,22 +714,26 @@ static int pcmcia_requery(struct device *dev, void * _data)
return 0;
}
-static void pcmcia_bus_rescan(struct pcmcia_socket *skt)
+static void pcmcia_bus_rescan(struct pcmcia_socket *skt, int new_cis)
{
- int no_devices=0;
+ int no_devices = 0;
int ret = 0;
unsigned long flags;
/* must be called with skt_mutex held */
spin_lock_irqsave(&pcmcia_dev_list_lock, flags);
if (list_empty(&skt->devices_list))
- no_devices=1;
+ no_devices = 1;
spin_unlock_irqrestore(&pcmcia_dev_list_lock, flags);
+ /* If this is because of a CIS override, start over */
+ if (new_cis && !no_devices)
+ pcmcia_card_remove(skt, NULL);
+
/* if no devices were added for this socket yet because of
* missing resource information or other trouble, we need to
* do this now. */
- if (no_devices) {
+ if (no_devices || new_cis) {
ret = pcmcia_card_add(skt);
if (ret)
return;