All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jaehoon Chung <jh80.chung@samsung.com>
To: Prabu Thangamuthu <Prabu.T@synopsys.com>,
	Seungwon Jeon <tgih.jun@samsung.com>,
	Jaehoon Chung <jh80.chung@samsung.com>,
	Ulf Hansson <ulf.hansson@linaro.org>,
	"linux-mmc@vger.kernel.org" <linux-mmc@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Cc: Manjunath M Bettegowda <Manjunath.MB@synopsys.com>
Subject: Re: [PATCH v2] mmc: dw_mmc: insmod followed by rmmod will hung for eMMC
Date: Mon, 01 Jun 2015 12:45:10 +0900	[thread overview]
Message-ID: <556BD546.1060208@samsung.com> (raw)
In-Reply-To: <705D14B1C7978B40A723277C067CEDE245184BC7@IN01WEMBXB.internal.synopsys.com>

Hi, Prabu.

Thanks for resending the patch.
Will apply this patch at my tree.

Thanks!

Best Regards,
Jaehoon Chung

On 05/28/2015 09:21 PM, Prabu Thangamuthu wrote:
> Remove module of dw_mmc driver will hung for eMMC devices if we follow the
> steps which are listed below,
> 	insmod dw_mmc.ko
> 	insmod dw_mmc-pci.ko
> 	rmmod dw_mmc-pci.ko
> 
> The root cause for this issue is, dw_mci_remove() will disable all the
> interrupts by programming 0x0 to INTMASK register then it will call
> dw_mci_cleanup_slot(). But dw_mci_cleanup_slot() is issuing CMD6 to
> disable the eMMC boot partition and it is waiting for Command Complete
> interrupt. Since INTMASK was already cleared by dw_mci_remove(), Command
> Complete interrupt is not reaching the system. This leads to process hung.
> 
> Signed-off-by: Prabu Thangamuthu <prabu.t@synopsys.com>
> ---
> Change log v2:
> 	-Added prefix "mmc:" to the commit message header.
> 	-Updated the Commit Message.
> 
>  drivers/mmc/host/dw_mmc.c |    6 +++---
>  1 files changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/mmc/host/dw_mmc.c b/drivers/mmc/host/dw_mmc.c
> index 55179f1..40e9d8e 100644
> --- a/drivers/mmc/host/dw_mmc.c
> +++ b/drivers/mmc/host/dw_mmc.c
> @@ -2926,15 +2926,15 @@ void dw_mci_remove(struct dw_mci *host)
>  {
>  	int i;
>  
> -	mci_writel(host, RINTSTS, 0xFFFFFFFF);
> -	mci_writel(host, INTMASK, 0); /* disable all mmc interrupt first */
> -
>  	for (i = 0; i < host->num_slots; i++) {
>  		dev_dbg(host->dev, "remove slot %d\n", i);
>  		if (host->slot[i])
>  			dw_mci_cleanup_slot(host->slot[i], i);
>  	}
>  
> +	mci_writel(host, RINTSTS, 0xFFFFFFFF);
> +	mci_writel(host, INTMASK, 0); /* disable all mmc interrupt first */
> +
>  	/* disable clock to CIU */
>  	mci_writel(host, CLKENA, 0);
>  	mci_writel(host, CLKSRC, 0);
> 


      reply	other threads:[~2015-06-01  3:45 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-28 12:21 [PATCH v2] mmc: dw_mmc: insmod followed by rmmod will hung for eMMC Prabu Thangamuthu
2015-06-01  3:45 ` Jaehoon Chung [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=556BD546.1060208@samsung.com \
    --to=jh80.chung@samsung.com \
    --cc=Manjunath.MB@synopsys.com \
    --cc=Prabu.T@synopsys.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=tgih.jun@samsung.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 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.