From: Subhash Jadavani <subhashj@codeaurora.org>
To: Kiwoong Kim <kwmad.kim@samsung.com>
Cc: linux-scsi@vger.kernel.org, vinholikatti@gmail.com,
cpgs@samsung.com, HeonGwang Chu <hg.chu@samsung.com>,
linux-scsi-owner@vger.kernel.org
Subject: Re: [PATCH v2] ufs: introduce UFSHCI_QUIRK_SKIP_RESET_INTR_AGGR quirk
Date: Tue, 15 Nov 2016 10:30:53 -0800 [thread overview]
Message-ID: <6e2645c44d00c27be785cc3262b4ee8f@codeaurora.org> (raw)
In-Reply-To: <00eb01d23f2f$09299aa0$1b7ccfe0$@samsung.com>
On 2016-11-15 02:57, Kiwoong Kim wrote:
> If UFS driver resets interrupt aggregation timer and counter
> when there are some pended tasks, an IO competion interrupt
> of any corresponing task may be issued.
> That would casue a command timeout.
>
> One thing you should mind to use interrupt aggreation
> with this quirk is that the host controller should be
> able to refresh interrupt aggreation counter or timer
> in other way, such as doing it automatically when receiving
> any response.
>
> V2
As Martin mentioned in other email, please separate this version history
from commit text with line having "----" before the start of version
history.
Rest all looks good but i will wait for updated patch fixing above
before giving Reviewed-By.
> - modify the commit message
> - change the name of the quirk
> (s/ UFSHCI_QUIRK_SKIP_INTR_AGGR/UFSHCI_QUIRK_SKIP_RESET_INTR_AGGR)
>
> Signed-off-by: Kiwoong Kim <kwmad.kim@samsung.com>
> ---
> drivers/scsi/ufs/ufshcd.c | 3 ++-
> drivers/scsi/ufs/ufshcd.h | 7 +++++++
> 2 files changed, 9 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c
> index 8aac98f..7b62d8b 100644
> --- a/drivers/scsi/ufs/ufshcd.c
> +++ b/drivers/scsi/ufs/ufshcd.c
> @@ -3713,7 +3713,8 @@ static void ufshcd_transfer_req_compl(struct
> ufs_hba *hba)
> * false interrupt if device completes another request after
> resetting
> * aggregation and before reading the DB.
> */
> - if (ufshcd_is_intr_aggr_allowed(hba))
> + if ((ufshcd_is_intr_aggr_allowed(hba))
> + && !(hba->quirks & UFSHCI_QUIRK_SKIP_RESET_INTR_AGGR))
> ufshcd_reset_intr_aggr(hba);
>
> tr_doorbell = ufshcd_readl(hba, REG_UTP_TRANSFER_REQ_DOOR_BELL);
> diff --git a/drivers/scsi/ufs/ufshcd.h b/drivers/scsi/ufs/ufshcd.h
> index dfa17ac..d6861ed 100644
> --- a/drivers/scsi/ufs/ufshcd.h
> +++ b/drivers/scsi/ufs/ufshcd.h
> @@ -505,6 +505,13 @@ struct ufs_hba {
> */
> #define UFSHCD_QUIRK_BROKEN_HCE UFS_BIT(9)
>
> + /*
> + * This quirk is only not to reset interrupt aggregation logic
> + * in ISR. The reset can make the host controller miss an event
> + * of previously completed IO.
> + */
> + #define UFSHCI_QUIRK_SKIP_RESET_INTR_AGGR UFS_BIT(10)
> +
> unsigned int quirks; /* Deviations from standard UFSHCI spec. */
>
> /* Device deviations from standard UFS device spec. */
--
The Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project
prev parent reply other threads:[~2016-11-15 18:30 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-15 10:57 [PATCH v2] ufs: introduce UFSHCI_QUIRK_SKIP_RESET_INTR_AGGR quirk Kiwoong Kim
2016-11-15 18:30 ` Subhash Jadavani [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=6e2645c44d00c27be785cc3262b4ee8f@codeaurora.org \
--to=subhashj@codeaurora.org \
--cc=cpgs@samsung.com \
--cc=hg.chu@samsung.com \
--cc=kwmad.kim@samsung.com \
--cc=linux-scsi-owner@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=vinholikatti@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).