This is a note to let you know that I've just added the patch titled mwifiex: report error to PCIe for suspend failure 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: mwifiex-report-error-to-pcie-for-suspend-failure.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@xxxxxxxxxxxxxxx> know about it. >From 5190f2e405919cd30ba2f12c58129fb2d71cd6b6 Mon Sep 17 00:00:00 2001 From: Amitkumar Karwar <akarwar@xxxxxxxxxxx> Date: Wed, 28 Sep 2016 18:18:22 +0530 Subject: mwifiex: report error to PCIe for suspend failure From: Amitkumar Karwar <akarwar@xxxxxxxxxxx> commit 5190f2e405919cd30ba2f12c58129fb2d71cd6b6 upstream. When host_sleep_config command fails, we should return an error to PCIe, instead of continuing (and possibly panicking, when we try to keep processing a timed-out ioctl after we return "successfully" from suspend). Signed-off-by: Amitkumar Karwar <akarwar@xxxxxxxxxxx> Reviewed-by: Brian Norris <briannorris@xxxxxxxxxxxx> Tested-by: Brian Norris <briannorris@xxxxxxxxxxxx> Signed-off-by: Kalle Valo <kvalo@xxxxxxxxxxxxxx> Signed-off-by: Amit Pundir <amit.pundir@xxxxxxxxxx> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- drivers/net/wireless/marvell/mwifiex/pcie.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) --- a/drivers/net/wireless/marvell/mwifiex/pcie.c +++ b/drivers/net/wireless/marvell/mwifiex/pcie.c @@ -101,7 +101,6 @@ static int mwifiex_pcie_suspend(struct d { struct mwifiex_adapter *adapter; struct pcie_service_card *card; - int hs_actived; struct pci_dev *pdev = to_pci_dev(dev); if (pdev) { @@ -117,7 +116,14 @@ static int mwifiex_pcie_suspend(struct d adapter = card->adapter; - hs_actived = mwifiex_enable_hs(adapter); + /* Enable the Host Sleep */ + if (!mwifiex_enable_hs(adapter)) { + mwifiex_dbg(adapter, ERROR, + "cmd: failed to suspend\n"); + adapter->hs_enabling = false; + return -EFAULT; + } + flush_workqueue(adapter->workqueue); /* Indicate device suspended */ Patches currently in stable-queue which might be from akarwar@xxxxxxxxxxx are queue-4.9/mwifiex-fix-p2p-device-doesn-t-find-in-scan-problem.patch queue-4.9/mwifiex-fix-null-pointer-dereference-in-skb_dequeue.patch queue-4.9/mwifiex-report-error-to-pcie-for-suspend-failure.patch queue-4.9/mwifiex-prevent-register-accesses-after-host-is-sleeping.patch