]> git.hungrycats.org Git - linux/commitdiff
pcmcia: only keep saved I365_CSCINT flag if there is no PCI irq
authorDominik Brodowski <linux@dominikbrodowski.net>
Fri, 21 May 2010 13:16:53 +0000 (15:16 +0200)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 5 Jul 2010 18:22:43 +0000 (11:22 -0700)
commit 02caa56e4b789b80ae7e0f0f0789f94b44ad32ef upstream.

Keeping the saved I365_CSCINT flag around breaks PCMCIA on some system,
and is only needed on a few systems to get PCMCIA to work. This patch
allows PCMCIA to work on both types, and it fixes
https://bugzilla.kernel.org/show_bug.cgi?id=16015

Reported-by: Justin P. Mattock <justinmattock@gmail.com>
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/pcmcia/yenta_socket.c

index 83ace277426ca5592cebc5a461b877b90c9c7a6e..6bb6cb9f10f8493ddfeca7e8c598a61c7971f3cf 100644 (file)
@@ -975,7 +975,7 @@ static irqreturn_t yenta_probe_handler(int irq, void *dev_id)
 /* probes the PCI interrupt, use only on override functions */
 static int yenta_probe_cb_irq(struct yenta_socket *socket)
 {
-       u8 reg;
+       u8 reg = 0;
 
        if (!socket->cb_irq)
                return -1;
@@ -989,7 +989,8 @@ static int yenta_probe_cb_irq(struct yenta_socket *socket)
        }
 
        /* generate interrupt, wait */
-       reg = exca_readb(socket, I365_CSCINT);
+       if (!socket->dev->irq)
+               reg = exca_readb(socket, I365_CSCINT);
        exca_writeb(socket, I365_CSCINT, reg | I365_CSC_STSCHG);
        cb_writel(socket, CB_SOCKET_EVENT, -1);
        cb_writel(socket, CB_SOCKET_MASK, CB_CSTSMASK);