From: margitsw@t-online.de (Margit Schubert-While)
To: jgarzik@pobox.com
Cc: netdev@oss.sgi.com, prism54-devel@prism54.org
Subject: [PATCH Linux-2.6.8-rc2] prism54 URGENT - Fix IRQ handling
Date: Fri, 30 Jul 2004 10:23:57 +0200 [thread overview]
Message-ID: <200407301023.58457.margitsw@t-online.de> (raw)
[-- Attachment #1: Type: text/plain, Size: 473 bytes --]
2004-07-30 Margit Schubert-While <margitsw@t-online.de>
* We are handing back HANDLED even though the IRQ is not for us.
We also change device state.
This is plainly wrong.
AFAICT we also need to take the spin lock early.
Tested/running on UP/SMP for about a week now.
(Discovered on one of my lappies that had the X driver on the same IRQ)
(Proposed on Prism54 Devel with no objections)
* Jeff, I think we need to squeeze this one into 2.6.8
Margit
[-- Attachment #2: interrupt.patch --]
[-- Type: text/x-diff, Size: 1711 bytes --]
diff -Naur linux-2.6.8-01/drivers/net/wireless/prism54/islpci_dev.c linux-2.6.8-02/drivers/net/wireless/prism54/islpci_dev.c
--- linux-2.6.8-01/drivers/net/wireless/prism54/islpci_dev.c 2004-07-28 13:58:06.000000000 +0200
+++ linux-2.6.8-02/drivers/net/wireless/prism54/islpci_dev.c 2004-07-28 14:04:08.000000000 +0200
@@ -186,6 +186,9 @@
void *device = priv->device_base;
int powerstate = ISL38XX_PSM_POWERSAVE_STATE;
+ /* lock the interrupt handler */
+ spin_lock(&priv->slock);
+
/* received an interrupt request on a shared IRQ line
* first check whether the device is in sleep mode */
reg = readl(device + ISL38XX_CTRL_STAT_REG);
@@ -195,14 +198,10 @@
#if VERBOSE > SHOW_ERROR_MESSAGES
DEBUG(SHOW_TRACING, "Assuming someone else called the IRQ\n");
#endif
+ spin_unlock(&priv->slock);
return IRQ_NONE;
}
- if (islpci_get_state(priv) != PRV_STATE_SLEEP)
- powerstate = ISL38XX_PSM_ACTIVE_STATE;
-
- /* lock the interrupt handler */
- spin_lock(&priv->slock);
/* check whether there is any source of interrupt on the device */
reg = readl(device + ISL38XX_INT_IDENT_REG);
@@ -213,6 +212,9 @@
reg &= ISL38XX_INT_SOURCES;
if (reg != 0) {
+ if (islpci_get_state(priv) != PRV_STATE_SLEEP)
+ powerstate = ISL38XX_PSM_ACTIVE_STATE;
+
/* reset the request bits in the Identification register */
isl38xx_w32_flush(device, reg, ISL38XX_INT_ACK_REG);
@@ -340,6 +342,12 @@
isl38xx_handle_wakeup(priv->control_block,
&powerstate, priv->device_base);
}
+ } else {
+#if VERBOSE > SHOW_ERROR_MESSAGES
+ DEBUG(SHOW_TRACING, "Assuming someone else called the IRQ\n");
+#endif
+ spin_unlock(&priv->slock);
+ return IRQ_NONE;
}
/* sleep -> ready */
[-- Attachment #3: Type: text/plain, Size: 151 bytes --]
_______________________________________________
Prism54-devel mailing list
Prism54-devel@prism54.org
http://prism54.org/mailman/listinfo/prism54-devel
next reply other threads:[~2004-07-30 8:23 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-07-30 8:23 Margit Schubert-While [this message]
2004-08-10 20:53 ` [PATCH Linux-2.6.8-rc2] prism54 URGENT - Fix IRQ handling Jeff Garzik
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200407301023.58457.margitsw@t-online.de \
--to=margitsw@t-online.de \
--cc=jgarzik@pobox.com \
--cc=netdev@oss.sgi.com \
--cc=prism54-devel@prism54.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).