Commit 5190f2e4 authored by Amitkumar Karwar's avatar Amitkumar Karwar Committed by Kalle Valo

mwifiex: report error to PCIe for suspend failure

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: default avatarAmitkumar Karwar <akarwar@marvell.com>
Reviewed-by: default avatarBrian Norris <briannorris@chromium.org>
Tested-by: default avatarBrian Norris <briannorris@chromium.org>
Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
parent ec815dd2
...@@ -101,7 +101,6 @@ static int mwifiex_pcie_suspend(struct device *dev) ...@@ -101,7 +101,6 @@ static int mwifiex_pcie_suspend(struct device *dev)
{ {
struct mwifiex_adapter *adapter; struct mwifiex_adapter *adapter;
struct pcie_service_card *card; struct pcie_service_card *card;
int hs_actived;
struct pci_dev *pdev = to_pci_dev(dev); struct pci_dev *pdev = to_pci_dev(dev);
if (pdev) { if (pdev) {
...@@ -117,7 +116,14 @@ static int mwifiex_pcie_suspend(struct device *dev) ...@@ -117,7 +116,14 @@ static int mwifiex_pcie_suspend(struct device *dev)
adapter = card->adapter; 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); flush_workqueue(adapter->workqueue);
/* Indicate device suspended */ /* Indicate device suspended */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment