97 lines
3.1 KiB
Diff
97 lines
3.1 KiB
Diff
From d2e8008554faf4905ea9435f129bc6a28303e46a Mon Sep 17 00:00:00 2001
|
|
From: David Kilroy <kilroyd@googlemail.com>
|
|
Date: Thu, 9 Dec 2010 18:56:14 -0500
|
|
Subject: [PATCH] orinoco: initialise priv->hw before assigning the interrupt
|
|
|
|
The interrupt handler takes a lock - but since commit bcad6e80f3f this
|
|
lock goes through an indirection specified in the hermes_t structure.
|
|
We must therefore initialise the structure before setting up the
|
|
interrupt handler.
|
|
|
|
Fix orinoco_cs and spectrum_cs
|
|
|
|
<https://bugzilla.kernel.org/show_bug.cgi?id=23932>
|
|
|
|
Bisected by: Matt Domsch <Matt_Domsch@dell.com>
|
|
Signed-off by: David Kilroy <kilroyd@googlemail.com>
|
|
Cc: stable@kernel.org
|
|
Signed-off-by: John W. Linville <linville@tuxdriver.com>
|
|
|
|
Conflicts:
|
|
|
|
drivers/net/wireless/orinoco/orinoco_cs.c
|
|
drivers/net/wireless/orinoco/spectrum_cs.c
|
|
---
|
|
drivers/net/wireless/orinoco/orinoco_cs.c | 14 +++++++-------
|
|
drivers/net/wireless/orinoco/spectrum_cs.c | 14 +++++++-------
|
|
2 files changed, 14 insertions(+), 14 deletions(-)
|
|
|
|
diff --git a/drivers/net/wireless/orinoco/orinoco_cs.c b/drivers/net/wireless/orinoco/orinoco_cs.c
|
|
index ef46a2d..083999f 100644
|
|
--- a/drivers/net/wireless/orinoco/orinoco_cs.c
|
|
+++ b/drivers/net/wireless/orinoco/orinoco_cs.c
|
|
@@ -248,20 +248,20 @@ orinoco_cs_config(struct pcmcia_device *link)
|
|
goto failed;
|
|
}
|
|
|
|
- ret = pcmcia_request_irq(link, orinoco_interrupt);
|
|
- if (ret)
|
|
- goto failed;
|
|
-
|
|
- /* We initialize the hermes structure before completing PCMCIA
|
|
- * configuration just in case the interrupt handler gets
|
|
- * called. */
|
|
mem = ioport_map(link->resource[0]->start,
|
|
resource_size(link->resource[0]));
|
|
if (!mem)
|
|
goto failed;
|
|
|
|
+ /* We initialize the hermes structure before completing PCMCIA
|
|
+ * configuration just in case the interrupt handler gets
|
|
+ * called. */
|
|
hermes_struct_init(hw, mem, HERMES_16BIT_REGSPACING);
|
|
|
|
+ ret = pcmcia_request_irq(link, orinoco_interrupt);
|
|
+ if (ret)
|
|
+ goto failed;
|
|
+
|
|
/*
|
|
* This actually configures the PCMCIA socket -- setting up
|
|
* the I/O windows and the interrupt mapping, and putting the
|
|
diff --git a/drivers/net/wireless/orinoco/spectrum_cs.c b/drivers/net/wireless/orinoco/spectrum_cs.c
|
|
index 873877e..93070a3 100644
|
|
--- a/drivers/net/wireless/orinoco/spectrum_cs.c
|
|
+++ b/drivers/net/wireless/orinoco/spectrum_cs.c
|
|
@@ -310,21 +310,21 @@ spectrum_cs_config(struct pcmcia_device *link)
|
|
goto failed;
|
|
}
|
|
|
|
- ret = pcmcia_request_irq(link, orinoco_interrupt);
|
|
- if (ret)
|
|
- goto failed;
|
|
-
|
|
- /* We initialize the hermes structure before completing PCMCIA
|
|
- * configuration just in case the interrupt handler gets
|
|
- * called. */
|
|
mem = ioport_map(link->resource[0]->start,
|
|
resource_size(link->resource[0]));
|
|
if (!mem)
|
|
goto failed;
|
|
|
|
+ /* We initialize the hermes structure before completing PCMCIA
|
|
+ * configuration just in case the interrupt handler gets
|
|
+ * called. */
|
|
hermes_struct_init(hw, mem, HERMES_16BIT_REGSPACING);
|
|
hw->eeprom_pda = true;
|
|
|
|
+ ret = pcmcia_request_irq(link, orinoco_interrupt);
|
|
+ if (ret)
|
|
+ goto failed;
|
|
+
|
|
/*
|
|
* This actually configures the PCMCIA socket -- setting up
|
|
* the I/O windows and the interrupt mapping, and putting the
|
|
--
|
|
1.7.3.3
|
|
|