From: Jaehoon Chung <jh80.chung@samsung.com>
To: Markos Chandras <markos.chandras@imgtec.com>
Cc: linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org,
Seungwon Jeon <tgih.jun@samsung.com>,
Jaehoon Chung <jh80.chung@samsung.com>,
Chris Ball <cjb@laptop.org>
Subject: Re: [PATCH 1/3] dw_mmc: Don't loop when handling an interrupt
Date: Wed, 13 Mar 2013 17:31:47 +0900 [thread overview]
Message-ID: <51403973.9080601@samsung.com> (raw)
In-Reply-To: <1363085593-22214-1-git-send-email-markos.chandras@imgtec.com>
Acked-by: Jaehoon Chung <jh80.chung@samsung.com>
On 03/12/2013 07:53 PM, Markos Chandras wrote:
> There is no reason to loop when handling an interrupt. The "if" clauses
> will handle all of them sequentially. This also eliminates the extra loop
> we used to take with no pending interrupts and we ended up breaking out
> of the while loop.
>
> Signed-off-by: Markos Chandras <markos.chandras@imgtec.com>
> Cc: Seungwon Jeon <tgih.jun@samsung.com>
> Cc: Jaehoon Chung <jh80.chung@samsung.com>
> Cc: Chris Ball <cjb@laptop.org>
> ---
> The patch is based on Chris Ball's mmc-next branch
>
> drivers/mmc/host/dw_mmc.c | 11 ++++-------
> 1 files changed, 4 insertions(+), 7 deletions(-)
>
> diff --git a/drivers/mmc/host/dw_mmc.c b/drivers/mmc/host/dw_mmc.c
> index 60063cc..78c7251 100644
> --- a/drivers/mmc/host/dw_mmc.c
> +++ b/drivers/mmc/host/dw_mmc.c
> @@ -1563,11 +1563,11 @@ static irqreturn_t dw_mci_interrupt(int irq, void *dev_id)
> {
> struct dw_mci *host = dev_id;
> u32 pending;
> - unsigned int pass_count = 0;
> int i;
>
> - do {
> - pending = mci_readl(host, MINTSTS); /* read-only mask reg */
> + pending = mci_readl(host, MINTSTS); /* read-only mask reg */
> +
> + if (pending) {
>
> /*
> * DTO fix - version 2.10a and below, and only if internal DMA
> @@ -1579,9 +1579,6 @@ static irqreturn_t dw_mci_interrupt(int irq, void *dev_id)
> pending |= SDMMC_INT_DATA_OVER;
> }
>
> - if (!pending)
> - break;
> -
> if (pending & DW_MCI_CMD_ERROR_FLAGS) {
> mci_writel(host, RINTSTS, DW_MCI_CMD_ERROR_FLAGS);
> host->cmd_status = pending;
> @@ -1642,7 +1639,7 @@ static irqreturn_t dw_mci_interrupt(int irq, void *dev_id)
> }
> }
>
> - } while (pass_count++ < 5);
> + }
>
> #ifdef CONFIG_MMC_DW_IDMAC
> /* Handle DMA interrupts */
>
next prev parent reply other threads:[~2013-03-13 8:31 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-12 10:53 [PATCH 1/3] dw_mmc: Don't loop when handling an interrupt Markos Chandras
2013-03-12 10:53 ` [PATCH 2/3] dw_mmc: Avoid adding the number of transmitted bytes twice Markos Chandras
2013-03-22 16:50 ` Chris Ball
2013-03-12 10:53 ` [PATCH 3/3] dw_mmc: Handle unaligned data submission correctly Markos Chandras
2013-03-22 16:52 ` Chris Ball
2013-03-13 8:31 ` Jaehoon Chung [this message]
2013-03-13 14:22 ` [PATCH 1/3] dw_mmc: Don't loop when handling an interrupt Seungwon Jeon
2013-03-13 14:26 ` Chris Ball
2013-03-13 14:27 ` Markos Chandras
2013-03-13 14:26 ` Markos Chandras
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=51403973.9080601@samsung.com \
--to=jh80.chung@samsung.com \
--cc=cjb@laptop.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mmc@vger.kernel.org \
--cc=markos.chandras@imgtec.com \
--cc=tgih.jun@samsung.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