Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752268AbbE0BuH (ORCPT ); Tue, 26 May 2015 21:50:07 -0400 Received: from mailout4.samsung.com ([203.254.224.34]:44359 "EHLO mailout4.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752031AbbE0BuD (ORCPT ); Tue, 26 May 2015 21:50:03 -0400 X-AuditID: cbfee68d-f79106d00000728c-6b-556522c883b5 Message-id: <556522C8.3000605@samsung.com> Date: Wed, 27 May 2015 10:50:00 +0900 From: Jaehoon Chung User-Agent: Mozilla/5.0 (X11; Linux i686; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 MIME-version: 1.0 To: Ulf Hansson , Prabu Thangamuthu Cc: Seungwon Jeon , "linux-mmc@vger.kernel.org" , "linux-kernel@vger.kernel.org" , Manjunath M Bettegowda Subject: Re: [PATCH 1/1] dw_mmc: insmod followed by rmmod will hung for eMMC References: <705D14B1C7978B40A723277C067CEDE245182CD0@IN01WEMBXB.internal.synopsys.com> In-reply-to: Content-type: text/plain; charset=utf-8 Content-transfer-encoding: 7bit X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFprOIsWRmVeSWpSXmKPExsWyRsSkUPeEUmqowdfzphaXd81hszjyv5/R YsXsuWwWE7YeZ7X4cP8is8XxteEObB53ru1h8+jbsorRY8v+z4wenzfJBbBEcdmkpOZklqUW 6dslcGVcfD2PpeCKYMWvV/dYGxi38HYxcnJICJhIrPjSzgRhi0lcuLeerYuRi0NIYCmjxPvV n1hhiq4uf8oMkVjEKLHs1SVGCOcBo8S9h7fZQap4BbQk5n67BFTFwcEioCpx4ZExSJhNQEdi +7fjYBtEBcIkHqzbywpRLijxY/I9FhBbRCBEov3wWhaQmcwCtxglNv5+zwySEBbwkXgxZzeY LSSwgFGi4QfYUE6BYInJn/YygexiFlCXmDIlFyTMLCAvsXnNW7BDJQQOsUucOrAF7DYWAQGJ b5MPsYDUSwjISmw6wAzxmKTEwRU3WCYwis1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4mDU6qB0YqF+6yE3t5J3+8Uz8hvmtT6 c1LWzjfi74weiVwoFJseEJ9wwt3txUOndaXiuv6rKyay1xzdE7iF60jSW71gA4uMBenMboYu 2XIcXW9/rY11DGEVzhbX4u0M+7//zKVjk/kYIoy12V04GTZz++3J9OE87/EzKPF/3oW+C19+ 6DKvX3mH8dh9JZbijERDLeai4kQAYc+66/QCAAA= DLP-Filter: Pass X-MTR: 20000000000000000@CPGS X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2435 Lines: 75 Hi, Pradu. Sorry for late. I will wait for your next version than i will check yours. To Ulf. Thanks for review! Best Regards, Jaehoon Chung On 05/22/2015 10:21 PM, Ulf Hansson wrote: > On 18 May 2015 at 16:23, Prabu Thangamuthu wrote: >> Removing dw_mmc driver immediately after inserting the dw_mmc driver is > > I guess it hangs even if you remove it after a couple of days? :-) > > Perhaps makes this a bit more clear? > >> getting hung for eMMC device. Root cause for this issue is, dw_mci_remove >> will disable all the interrupts then it will call dw_mci_cleanup_slot. >> dw_mci_cleanup_slot is issuing CMD6 to disable boot partition access and >> it's 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. > > /s dw_mci_remove / dw_mci_remove() > >> >> Signed-off-by: Prabu Thangamuthu > > This patch looks good overall, but please send a new version with > updated changelog. Moreover, please use "mmc: dw_mmc:" as prefix for > the commit message header. > > Kind regards > Uffe > >> --- >> 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 5f5adaf..f0a0aff 100644 >> --- a/drivers/mmc/host/dw_mmc.c >> +++ b/drivers/mmc/host/dw_mmc.c >> @@ -2941,15 +2941,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); >> -- >> 1.7.6.5 > -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/