[RFC] if_spi.c: enable host interrupts after host ISR is registered
George Shore
George.Shore at imgtec.com
Fri Oct 9 06:37:02 EDT 2009
During the firmware loading process a number of interrupts are fired
within this code. However, this happens when interrupts are being masked
out. When the host interrupts are enabled after the download an
interrupt is fired but left unhandled by the time the ISR is registered,
causing timeouts on every command until a warm reset is made. This issue
does not happen if the firmware code does not need to be downloaded.
This moves the call to spu_set_interrupt_mode() to after the ISR is
registered, so that the interrupt caused by the firmware load can be
handled by the ISR (which currently does nothing with it anyway).
Any thoughts upon this?
George.
---
drivers/net/wireless/libertas/if_spi.c | 11 +++++++----
1 files changed, 7 insertions(+), 4 deletions(-)
diff --git a/drivers/net/wireless/libertas/if_spi.c
b/drivers/net/wireless/libertas/if_spi.c
index 6564282..f95d9e8 100644
--- a/drivers/net/wireless/libertas/if_spi.c
+++ b/drivers/net/wireless/libertas/if_spi.c
@@ -1103,10 +1103,6 @@ static int __devinit if_spi_probe(struct
spi_device *spi)
lbs_deb_spi("loaded FW for Marvell WLAN 802.11 adapter\n");
}
- err = spu_set_interrupt_mode(card, 0, 1);
- if (err)
- goto free_card;
-
/* Register our card with libertas.
* This will call alloc_etherdev */
priv = lbs_add_card(card, &spi->dev);
@@ -1139,6 +1135,13 @@ static int __devinit if_spi_probe(struct
spi_device *spi)
goto terminate_thread;
}
+ /* Enable the card->host interrupts now that the ISR has been
+ * registered. This will allow the driver to handle the interrupts
+ * that are fired when the firmware is loading. */
+ err = spu_set_interrupt_mode(card, 0, 1);
+ if (err)
+ goto free_card;
+
/* Start the card.
* This will call register_netdev, and we'll start
* getting interrupts... */
--
1.6.5.rc2
-
This message is subject to Imagination Technologies' e-mail terms: http://www.imgtec.com/e-mail.htm
Imagination Technologies Ltd is a limited company registered in England No: 1306335
Registered Office: Imagination House, Home Park Estate, Kings Langley, Hertfordshire, WD4 8LZ.
Email to and from the company may be monitored for compliance and other administrative purposes.
-
More information about the libertas-dev
mailing list