From 5d5148cd48f9a2a1067e878092de7142b379e83b Mon Sep 17 00:00:00 2001 From: Kyle McMartin Date: Thu, 9 Dec 2010 19:02:25 -0500 Subject: orinoco: initialise priv->hw before assigning the interrupt Enable previous sched patch, which hadn't been applypatch'd. --- ...se-priv_hw-before-assigning-the-interrupt.patch | 91 ++++++++++++++++++++++ 1 file changed, 91 insertions(+) create mode 100644 orinoco-initialise-priv_hw-before-assigning-the-interrupt.patch (limited to 'orinoco-initialise-priv_hw-before-assigning-the-interrupt.patch') diff --git a/orinoco-initialise-priv_hw-before-assigning-the-interrupt.patch b/orinoco-initialise-priv_hw-before-assigning-the-interrupt.patch new file mode 100644 index 000000000..7461d29a3 --- /dev/null +++ b/orinoco-initialise-priv_hw-before-assigning-the-interrupt.patch @@ -0,0 +1,91 @@ +From 17f1e34b178ffc0111d768f48a86b58fd0c88c56 Mon Sep 17 00:00:00 2001 +From: David Kilroy +Date: Tue, 7 Dec 2010 18:50:42 +0000 +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 + + + +Bisected by: Matt Domsch +Signed-off by: David Kilroy +Cc: stable@kernel.org +Signed-off-by: John W. Linville +--- + 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 71b3d68..32954c4 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) + 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; +diff --git a/drivers/net/wireless/orinoco/spectrum_cs.c b/drivers/net/wireless/orinoco/spectrum_cs.c +index fb859a5..db34c28 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) + 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; +-- +1.7.3.3 + -- cgit