mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Sai Prakash Ranjan <saiprakash.ranjan@codeaurora.org>
To: youghand@codeaurora.org
Cc: ath10k@lists.infradead.org, briannorris@chromium.org,
	dianders@chromium.org, kuabhs@chromium.org,
	linux-kernel@vger.kernel.org, linux-wireless@vger.kernel.org,
	pillair@codeaurora.org,
	Sai Prakash Ranjan <saiprakash.ranjan@codeaurora.org>
Subject: Re: [PATCH v2] ath10k: skip the wait for completion to recovery in shutdown path
Date: Tue,  8 Dec 2020 13:55:24 +0530	[thread overview]
Message-ID: <20201208082524.20451-1-saiprakash.ranjan@codeaurora.org> (raw)
In-Reply-To: <20201126171553.2097-1-youghand@codeaurora.org>

On Thu, Nov 26, 2020 at 9:16 AM Youghandhar Chintala
<youghand@codeaurora.org> wrote:
> --- a/drivers/net/wireless/ath/ath10k/snoc.c
> +++ b/drivers/net/wireless/ath/ath10k/snoc.c
> @@ -1790,9 +1790,6 @@ static int ath10k_snoc_remove(struct platform_device *pdev)
>
>         reinit_completion(&ar->driver_recovery);
>
> -       if (test_bit(ATH10K_SNOC_FLAG_RECOVERY, &ar_snoc->flags))
> -               wait_for_completion_timeout(&ar->driver_recovery, 3 * HZ);

You are skipping recovery in ath10k_snoc_remove() which is a remove callback
and also called in shutdown callback. So that means it is also called when
you unload the ath10k module and not just when the system reboots/shutdown.
While it makes sense to not skip recovery in shutdown/reboot sequence because
the system is going down, it might very well be needed in case of unloading
the module because we expect the system to be up and stable after unloading
the ath10k module and we should be able to reload the ath10k module smoothly.

If you remove that now and try to reload the ath10k module, won't that leave
the system in possibly an inconsistent state because we skipped recovery in
module remove and then we are trying to load the ath10k module when the
recovery is not yet complete? In other words, you need to test ath10k module
load/unload as well in addition to reboot tests to make sure this works as
expected or else you will need a separate shutdown callback which skips the
recovery part.

Thanks,
Sai
-- 
QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member
of Code Aurora Forum, hosted by The Linux Foundation

      parent reply	other threads:[~2020-12-08  8:26 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-26 17:15 Youghandhar Chintala
2020-12-01 19:35 ` Brian Norris
2020-12-07 16:12   ` Kalle Valo
2020-12-08  8:25 ` Sai Prakash Ranjan [this message]

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=20201208082524.20451-1-saiprakash.ranjan@codeaurora.org \
    --to=saiprakash.ranjan@codeaurora.org \
    --cc=ath10k@lists.infradead.org \
    --cc=briannorris@chromium.org \
    --cc=dianders@chromium.org \
    --cc=kuabhs@chromium.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=pillair@codeaurora.org \
    --cc=youghand@codeaurora.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome