Skip to content

Commit

Permalink
orinoco: initialise priv->hw before assigning the interrupt
Browse files Browse the repository at this point in the history
The interrupt handler takes a lock - but since commit bcad6e8 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>
  • Loading branch information
David Kilroy authored and John W. Linville committed Dec 8, 2010
1 parent 884a963 commit 229bd79
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 14 deletions.
14 changes: 7 additions & 7 deletions drivers/net/wireless/orinoco/orinoco_cs.c
Original file line number Diff line number Diff line change
Expand Up @@ -151,20 +151,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;

ret = pcmcia_enable_device(link);
if (ret)
goto failed;
Expand Down
14 changes: 7 additions & 7 deletions drivers/net/wireless/orinoco/spectrum_cs.c
Original file line number Diff line number Diff line change
Expand Up @@ -214,21 +214,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;

ret = pcmcia_enable_device(link);
if (ret)
goto failed;
Expand Down

0 comments on commit 229bd79

Please sign in to comment.