diff options
author | Christian Daudt <csd@broadcom.com> | 2016-05-12 01:06:48 +0300 |
---|---|---|
committer | Kalle Valo <kvalo@codeaurora.org> | 2016-06-04 17:58:52 +0300 |
commit | b88a2e80396ba463a4800c62c96e86954cb0f4f7 (patch) | |
tree | c5be681c59487929db0971ce43effd775df41d22 /drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.h | |
parent | 83e41e77819b642a084f5e9e54ba4ad5d4e17466 (diff) | |
download | linux-b88a2e80396ba463a4800c62c96e86954cb0f4f7.tar.xz |
brcmfmac: Fix kernel oops in failed chip_attach
When chip attach fails, brcmf_sdiod_intr_unregister is being called
but that is too early as sdiodev->settings has not been set yet
nor has brcmf_sdiod_intr_register been called.
Change to use oob_irq_requested + newly created sd_irq_requested
to decide on what to unregister at intr_unregister time.
Steps to reproduce problem:
- modprobe brcmfmac using buggy FW
- rmmod brcmfmac
- modprobe brcmfmac again.
If done with a buggy firmware, brcm_chip_attach will fail on the
2nd modprobe triggering the call to intr_unregister and the
kernel oops when attempting to de-reference sdiodev->settings->bus.sdio
which has not yet been set.
Signed-off-by: Christian Daudt <csd@broadcom.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Diffstat (limited to 'drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.h')
-rw-r--r-- | drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.h b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.h index dcf0ce8cd2c1..c07ad2577355 100644 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.h +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.h @@ -186,6 +186,7 @@ struct brcmf_sdio_dev { struct brcmf_bus *bus_if; struct brcmf_mp_device *settings; bool oob_irq_requested; + bool sd_irq_requested; bool irq_en; /* irq enable flags */ spinlock_t irq_en_lock; bool irq_wake; /* irq wake enable flags */ |