diff options
| author | David Kilroy <kilroyd@googlemail.com> | 2010-12-07 13:50:42 -0500 |
|---|---|---|
| committer | John W. Linville <linville@tuxdriver.com> | 2010-12-08 15:23:31 -0500 |
| commit | 229bd792be0bad245b78ed8f119952733a4752e5 (patch) | |
| tree | df352f1bff8843a49a10086ae70bec9326c57b58 /drivers | |
| parent | 884a963fa1c828a5c5fa7a46b2877dd463bfd47c (diff) | |
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>
Diffstat (limited to 'drivers')
| -rw-r--r-- | drivers/net/wireless/orinoco/orinoco_cs.c | 14 | ||||
| -rw-r--r-- | 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 71b3d68b940..32954c4b243 100644 --- a/drivers/net/wireless/orinoco/orinoco_cs.c +++ b/drivers/net/wireless/orinoco/orinoco_cs.c | |||
| @@ -151,20 +151,20 @@ orinoco_cs_config(struct pcmcia_device *link) | |||
| 151 | goto failed; | 151 | goto failed; |
| 152 | } | 152 | } |
| 153 | 153 | ||
| 154 | ret = pcmcia_request_irq(link, orinoco_interrupt); | ||
| 155 | if (ret) | ||
| 156 | goto failed; | ||
| 157 | |||
| 158 | /* We initialize the hermes structure before completing PCMCIA | ||
| 159 | * configuration just in case the interrupt handler gets | ||
| 160 | * called. */ | ||
| 161 | mem = ioport_map(link->resource[0]->start, | 154 | mem = ioport_map(link->resource[0]->start, |
| 162 | resource_size(link->resource[0])); | 155 | resource_size(link->resource[0])); |
| 163 | if (!mem) | 156 | if (!mem) |
| 164 | goto failed; | 157 | goto failed; |
| 165 | 158 | ||
| 159 | /* We initialize the hermes structure before completing PCMCIA | ||
| 160 | * configuration just in case the interrupt handler gets | ||
| 161 | * called. */ | ||
| 166 | hermes_struct_init(hw, mem, HERMES_16BIT_REGSPACING); | 162 | hermes_struct_init(hw, mem, HERMES_16BIT_REGSPACING); |
| 167 | 163 | ||
| 164 | ret = pcmcia_request_irq(link, orinoco_interrupt); | ||
| 165 | if (ret) | ||
| 166 | goto failed; | ||
| 167 | |||
| 168 | ret = pcmcia_enable_device(link); | 168 | ret = pcmcia_enable_device(link); |
| 169 | if (ret) | 169 | if (ret) |
| 170 | goto failed; | 170 | goto failed; |
diff --git a/drivers/net/wireless/orinoco/spectrum_cs.c b/drivers/net/wireless/orinoco/spectrum_cs.c index fb859a5ad2e..db34c282e59 100644 --- a/drivers/net/wireless/orinoco/spectrum_cs.c +++ b/drivers/net/wireless/orinoco/spectrum_cs.c | |||
| @@ -214,21 +214,21 @@ spectrum_cs_config(struct pcmcia_device *link) | |||
| 214 | goto failed; | 214 | goto failed; |
| 215 | } | 215 | } |
| 216 | 216 | ||
| 217 | ret = pcmcia_request_irq(link, orinoco_interrupt); | ||
| 218 | if (ret) | ||
| 219 | goto failed; | ||
| 220 | |||
| 221 | /* We initialize the hermes structure before completing PCMCIA | ||
| 222 | * configuration just in case the interrupt handler gets | ||
| 223 | * called. */ | ||
| 224 | mem = ioport_map(link->resource[0]->start, | 217 | mem = ioport_map(link->resource[0]->start, |
| 225 | resource_size(link->resource[0])); | 218 | resource_size(link->resource[0])); |
| 226 | if (!mem) | 219 | if (!mem) |
| 227 | goto failed; | 220 | goto failed; |
| 228 | 221 | ||
| 222 | /* We initialize the hermes structure before completing PCMCIA | ||
| 223 | * configuration just in case the interrupt handler gets | ||
| 224 | * called. */ | ||
| 229 | hermes_struct_init(hw, mem, HERMES_16BIT_REGSPACING); | 225 | hermes_struct_init(hw, mem, HERMES_16BIT_REGSPACING); |
| 230 | hw->eeprom_pda = true; | 226 | hw->eeprom_pda = true; |
| 231 | 227 | ||
| 228 | ret = pcmcia_request_irq(link, orinoco_interrupt); | ||
| 229 | if (ret) | ||
| 230 | goto failed; | ||
| 231 | |||
| 232 | ret = pcmcia_enable_device(link); | 232 | ret = pcmcia_enable_device(link); |
| 233 | if (ret) | 233 | if (ret) |
| 234 | goto failed; | 234 | goto failed; |
