From: Brian Norris <briannorris@chromium.org>
To: Amitkumar Karwar <akarwar@marvell.com>
Cc: linux-wireless@vger.kernel.org, Cathy Luo <cluo@marvell.com>,
Nishant Sarmukadam <nishants@marvell.com>
Subject: Re: [2/8] mwifiex: report error to PCIe for suspend failure
Date: Tue, 4 Oct 2016 15:24:22 -0700 [thread overview]
Message-ID: <20161004222422.GB4646@localhost> (raw)
In-Reply-To: <1475066908-11771-2-git-send-email-akarwar@marvell.com>
On Wed, Sep 28, 2016 at 06:18:22PM +0530, Amitkumar Karwar wrote:
> 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@marvell.com>
In case it helps to note this: this is what's already done in sdio.c,
and adding this patch prevented some crashes on my system with pcie.c.
Reviewed-by: Brian Norris <briannorris@chromium.org>
Tested-by: Brian Norris <briannorris@chromium.org>
You might want to fixup usb.c to do the same.
> ---
> drivers/net/wireless/marvell/mwifiex/pcie.c | 10 ++++++++--
> 1 file changed, 8 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/net/wireless/marvell/mwifiex/pcie.c b/drivers/net/wireless/marvell/mwifiex/pcie.c
> index 2833d47..063c707 100644
> --- 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 device *dev)
> {
> 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 device *dev)
>
> 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 */
next prev parent reply other threads:[~2016-10-04 22:24 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-28 12:48 [PATCH 1/8] mwifiex: prevent register accesses after host is sleeping Amitkumar Karwar
2016-09-28 12:48 ` [PATCH 2/8] mwifiex: report error to PCIe for suspend failure Amitkumar Karwar
2016-10-04 22:24 ` Brian Norris [this message]
2016-09-28 12:48 ` [PATCH 3/8] mwifiex: Fix NULL pointer dereference in skb_dequeue() Amitkumar Karwar
2016-09-28 12:48 ` [PATCH 4/8] mwifiex: vendor_ie length check for parse WMM IEs Amitkumar Karwar
2016-09-28 12:48 ` [PATCH 5/8] mwifiex: add memrw command information in README Amitkumar Karwar
2016-09-28 12:48 ` [PATCH 6/8] mwifiex: update tx_pkts_queued for requeued packets Amitkumar Karwar
2016-09-28 12:48 ` [PATCH 7/8] mwifiex: fix command timeout problem seen in stress tests Amitkumar Karwar
2016-09-28 12:48 ` [PATCH 8/8] mwifiex: fix p2p device doesn't find in scan problem Amitkumar Karwar
2016-10-04 22:20 ` [PATCH 1/8] mwifiex: prevent register accesses after host is sleeping Brian Norris
2016-11-09 1:34 ` [1/8] " Kalle Valo
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20161004222422.GB4646@localhost \
--to=briannorris@chromium.org \
--cc=akarwar@marvell.com \
--cc=cluo@marvell.com \
--cc=linux-wireless@vger.kernel.org \
--cc=nishants@marvell.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.