public inbox for linux-mmc@vger.kernel.org
 help / color / mirror / Atom feed
From: Adrian Hunter <adrian.hunter@intel.com>
To: Ulf Hansson <ulf.hansson@linaro.org>
Cc: linux-mmc <linux-mmc@vger.kernel.org>,
	Aaron Lu <aaron.lu@intel.com>, Philip Rakity <prakity@nvidia.com>,
	Al Cooper <alcooperx@gmail.com>,
	Arend van Spriel <arend@broadcom.com>
Subject: Re: [PATCH V6 03/15] mmc: core: Add support for re-tuning before each request
Date: Wed, 06 May 2015 13:17:14 +0300	[thread overview]
Message-ID: <5549EA2A.3020309@intel.com> (raw)
In-Reply-To: <CAPDyKFpmj1PJ4s_K8KpD17W-za-Yq2BS7HEm-vVnyFgj1+gcGQ@mail.gmail.com>

On 06/05/15 12:45, Ulf Hansson wrote:
> On 6 May 2015 at 10:02, Adrian Hunter <adrian.hunter@intel.com> wrote:
>> On 04/05/15 16:28, Ulf Hansson wrote:
>>> On 20 April 2015 at 14:09, Adrian Hunter <adrian.hunter@intel.com> wrote:
>>>> At the start of each request, re-tune if needed and
>>>> then hold off re-tuning again until the request is done.
>>>>
>>>> Note that though there is one function that starts
>>>> requests (mmc_start_request) there are two that wait for
>>>> the request to be done (mmc_wait_for_req_done and
>>>> mmc_wait_for_data_req_done).  Also note that
>>>> mmc_wait_for_data_req_done can return even when the
>>>> request is not done (which allows the block driver
>>>> to prepare a newly arrived request while still
>>>> waiting for the previous request).
>>>>
>>>> This patch ensures re-tuning is held for the duration
>>>> of a request.  Subsequent patches will also hold
>>>> re-tuning at other times when it might cause a
>>>> conflict.
>>>>
>>>> Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
>>>
>>> Patch2 is calling mmc_retune_needed() and thus actually triggers a
>>> re-tune to potentially happen.
>>
>> That won't happen because host->retune_period is not set, so
>> mmc_retune_needed() won't be called.
> 
> mmc_retune_needed() is indeed called in patch2 (v7). From
> mmc_sdio_suspend() and when mmc_card_keep_power().

Yes, here is the chunk but it checks host->retune_period which  is zero
because it never gets set.

diff --git a/drivers/mmc/core/sdio.c b/drivers/mmc/core/sdio.c
index 5bc6c7d..16e1f39 100644
--- a/drivers/mmc/core/sdio.c
+++ b/drivers/mmc/core/sdio.c
@@ -934,8 +934,12 @@ static int mmc_sdio_suspend(struct mmc_host *host)
 		mmc_release_host(host);
 	}

-	if (!mmc_card_keep_power(host))
+	if (!mmc_card_keep_power(host)) {
 		mmc_power_off(host);
+	} else if (host->retune_period) {
+		mmc_retune_timer_stop(host);
+		mmc_retune_needed(host);
+	}

 	return 0;
 }

> 
> I guess that wont be an issue!?

So I don't see an issue.

> 
> But I just felt that it seemed more appropriate to manage hold/release
> of re-tune before actually enabling the feature.

Yes the feature is gated until setting host->retune_period or calling
mmc_retune_needed().


  reply	other threads:[~2015-05-06 10:19 UTC|newest]

Thread overview: 47+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-20 12:09 [PATCH V6 00/15] mmc: host: Add facility to support re-tuning Adrian Hunter
2015-04-20 12:09 ` [PATCH V6 01/15] " Adrian Hunter
2015-05-04 13:14   ` Ulf Hansson
2015-04-20 12:09 ` [PATCH V6 02/15] mmc: core: Enable / disable re-tuning Adrian Hunter
2015-04-21  8:59   ` Ulf Hansson
2015-04-21 10:37     ` Adrian Hunter
2015-04-28 13:18       ` [PATCH V7 " Adrian Hunter
2015-04-20 12:09 ` [PATCH V6 03/15] mmc: core: Add support for re-tuning before each request Adrian Hunter
2015-05-04 13:28   ` Ulf Hansson
2015-05-06  8:02     ` Adrian Hunter
2015-05-06  9:45       ` Ulf Hansson
2015-05-06 10:17         ` Adrian Hunter [this message]
2015-05-06 10:37           ` Ulf Hansson
2015-04-20 12:09 ` [PATCH V6 04/15] mmc: core: Check re-tuning before retrying Adrian Hunter
2015-05-04 13:30   ` Ulf Hansson
2015-04-20 12:09 ` [PATCH V6 05/15] mmc: core: Hold re-tuning during switch commands Adrian Hunter
2015-04-20 12:09 ` [PATCH V6 06/15] mmc: core: Hold re-tuning during erase commands Adrian Hunter
2015-04-20 12:09 ` [PATCH V6 07/15] mmc: core: Hold re-tuning while bkops ongoing Adrian Hunter
2015-04-20 12:09 ` [PATCH V6 08/15] mmc: mmc: Hold re-tuning if the card is put to sleep Adrian Hunter
2015-04-21  9:42   ` Ulf Hansson
2015-04-21 11:00     ` Adrian Hunter
2015-04-21 11:53       ` Ulf Hansson
2015-04-21 12:26         ` Adrian Hunter
2015-04-21 18:25           ` Arend van Spriel
2015-04-22  7:24             ` Adrian Hunter
2015-04-22  8:30               ` Arend van Spriel
2015-04-22  8:45                 ` Ulf Hansson
2015-05-04 13:44   ` Ulf Hansson
2015-05-06  8:39     ` Adrian Hunter
2015-05-06  9:32       ` Ulf Hansson
2015-05-06 10:28         ` Adrian Hunter
2015-05-06 11:36           ` Ulf Hansson
2015-05-06 12:42             ` Adrian Hunter
2015-05-06 13:21               ` Ulf Hansson
2015-05-07  7:49                 ` Adrian Hunter
2015-04-20 12:09 ` [PATCH V6 09/15] mmc: core: Separate out the mmc_switch status check so it can be re-used Adrian Hunter
2015-04-20 12:09 ` [PATCH V6 10/15] mmc: core: Add support for HS400 re-tuning Adrian Hunter
2015-04-20 12:09 ` [PATCH V6 11/15] mmc: sdhci: Change to new way of doing re-tuning Adrian Hunter
2015-04-20 12:09 ` [PATCH V6 12/15] mmc: sdhci: Flag re-tuning is needed on CRC or End-Bit errors Adrian Hunter
2015-05-04 13:55   ` Ulf Hansson
2015-05-06 11:09     ` Adrian Hunter
2015-05-06 11:40       ` Ulf Hansson
2015-04-20 12:09 ` [PATCH V6 13/15] mmc: block: Check re-tuning in the recovery path Adrian Hunter
2015-04-20 12:09 ` [PATCH V6 14/15] mmc: block: Retry errored data requests when re-tuning is needed Adrian Hunter
2015-04-20 12:09 ` [PATCH V6 15/15] mmc: core: Don't print reset warning if reset is not supported Adrian Hunter
2015-05-04 10:39 ` [PATCH V6 00/15] mmc: host: Add facility to support re-tuning Adrian Hunter
2015-05-04 13:13   ` Ulf Hansson

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=5549EA2A.3020309@intel.com \
    --to=adrian.hunter@intel.com \
    --cc=aaron.lu@intel.com \
    --cc=alcooperx@gmail.com \
    --cc=arend@broadcom.com \
    --cc=linux-mmc@vger.kernel.org \
    --cc=prakity@nvidia.com \
    --cc=ulf.hansson@linaro.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