* Patch "brcmfmac: unbind all devices upon failure in firmware callback" has been added to the 4.9-stable tree
@ 2017-06-26 7:00 gregkh
0 siblings, 0 replies; only message in thread
From: gregkh @ 2017-06-26 7:00 UTC (permalink / raw)
To: arend.vanspriel, enric.balletbo, franky.lin, gregkh,
hante.meuleman, kvalo, pieter-paul.giesberts
Cc: stable, stable-commits
This is a note to let you know that I've just added the patch titled
brcmfmac: unbind all devices upon failure in firmware callback
to the 4.9-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
brcmfmac-unbind-all-devices-upon-failure-in-firmware-callback.patch
and it can be found in the queue-4.9 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@vger.kernel.org> know about it.
>From 7a51461fc2da82a6c565a3ee65c41c197f28225d Mon Sep 17 00:00:00 2001
From: Arend Van Spriel <arend.vanspriel@broadcom.com>
Date: Mon, 12 Jun 2017 12:47:34 +0100
Subject: brcmfmac: unbind all devices upon failure in firmware callback
From: Arend Van Spriel <arend.vanspriel@broadcom.com>
commit 7a51461fc2da82a6c565a3ee65c41c197f28225d upstream.
When request firmware fails, brcmf_ops_sdio_remove is being called and
brcmf_bus freed. In such circumstancies if you do a suspend/resume cycle
the kernel hangs on resume due a NULL pointer dereference in resume
function. So in brcmf_sdio_firmware_callback() we need to unbind the
driver from both sdio_func devices when firmware load failure is indicated.
Tested-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
Reviewed-by: Hante Meuleman <hante.meuleman@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieter-paul.giesberts@broadcom.com>
Reviewed-by: Franky Lin <franky.lin@broadcom.com>
Signed-off-by: Arend van Spriel <arend.vanspriel@broadcom.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c
@@ -3985,14 +3985,14 @@ static void brcmf_sdio_firmware_callback
u8 saveclk;
brcmf_dbg(TRACE, "Enter: dev=%s, err=%d\n", dev_name(dev), err);
+ bus_if = dev_get_drvdata(dev);
+ sdiodev = bus_if->bus_priv.sdio;
if (err)
goto fail;
- bus_if = dev_get_drvdata(dev);
if (!bus_if->drvr)
return;
- sdiodev = bus_if->bus_priv.sdio;
bus = sdiodev->bus;
/* try to download image and nvram to the dongle */
@@ -4081,6 +4081,7 @@ release:
fail:
brcmf_dbg(TRACE, "failed: dev=%s, err=%d\n", dev_name(dev), err);
device_release_driver(dev);
+ device_release_driver(&sdiodev->func[2]->dev);
}
struct brcmf_sdio *brcmf_sdio_probe(struct brcmf_sdio_dev *sdiodev)
Patches currently in stable-queue which might be from arend.vanspriel@broadcom.com are
queue-4.9/brcmfmac-use-firmware-callback-upon-failure-to-load.patch
queue-4.9/brcmfmac-add-parameter-to-pass-error-code-in-firmware-callback.patch
queue-4.9/brcmfmac-unbind-all-devices-upon-failure-in-firmware-callback.patch
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2017-06-26 7:11 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-06-26 7:00 Patch "brcmfmac: unbind all devices upon failure in firmware callback" has been added to the 4.9-stable tree gregkh
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).