From patchwork Tue Jun 14 20:32:41 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Andrei Warkentin X-Patchwork-Id: 880042 Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by demeter2.kernel.org (8.14.4/8.14.4) with ESMTP id p5EKXAsW008634 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Tue, 14 Jun 2011 20:33:31 GMT Received: from canuck.infradead.org ([2001:4978:20e::1]) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1QWaID-0000E5-DA; Tue, 14 Jun 2011 20:32:57 +0000 Received: from localhost ([127.0.0.1] helo=canuck.infradead.org) by canuck.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1QWaIC-0000KW-Kj; Tue, 14 Jun 2011 20:32:56 +0000 Received: from exprod5og117.obsmtp.com ([64.18.0.149]) by canuck.infradead.org with smtps (Exim 4.76 #1 (Red Hat Linux)) id 1QWaI2-0000I2-C8 for linux-arm-kernel@lists.infradead.org; Tue, 14 Jun 2011 20:32:47 +0000 Received: from il93mgrg01.am.mot-mobility.com ([144.188.21.13]) (using TLSv1) by exprod5ob117.postini.com ([64.18.4.12]) with SMTP ID DSNKTffFaqpWaJ6jTxWuaN/X+BoO8x0CuUqg@postini.com; Tue, 14 Jun 2011 13:32:46 PDT Received: from il93mgrg01.am.mot-mobility.com ([10.22.94.167]) by il93mgrg01.am.mot-mobility.com (8.14.3/8.14.3) with ESMTP id p5EKTxa3019360 for ; Tue, 14 Jun 2011 16:29:59 -0400 (EDT) Received: from mail-px0-f169.google.com (mail-px0-f169.google.com [209.85.212.169]) by il93mgrg01.am.mot-mobility.com (8.14.3/8.14.3) with ESMTP id p5EKCl7G009691 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=OK) for ; Tue, 14 Jun 2011 16:29:58 -0400 (EDT) Received: by mail-px0-f169.google.com with SMTP id 9so4054213pxi.0 for ; Tue, 14 Jun 2011 13:32:41 -0700 (PDT) MIME-Version: 1.0 Received: by 10.142.222.18 with SMTP id u18mr1261404wfg.40.1308083561235; Tue, 14 Jun 2011 13:32:41 -0700 (PDT) Received: by 10.142.53.5 with HTTP; Tue, 14 Jun 2011 13:32:41 -0700 (PDT) In-Reply-To: <201106141610.42700.heiko@sntech.de> References: <201106022149.47936.heiko@sntech.de> <201106030956.43174.heiko@sntech.de> <201106141610.42700.heiko@sntech.de> Date: Tue, 14 Jun 2011 15:32:41 -0500 Message-ID: Subject: Re: irq flood with mmc boot partitions on s3c2416 with 3.0rc1 From: Andrei Warkentin To: =?ISO-8859-1?Q?Heiko_St=FCbner?= X-CFilter-Loop: Reflected X-CRM114-Version: 20090807-BlameThorstenAndJenny ( TRE 0.7.6 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20110614_163246_732129_17206425 X-CRM114-Status: GOOD ( 24.40 ) X-Spam-Score: -2.3 (--) X-Spam-Report: SpamAssassin version 3.3.1 on canuck.infradead.org summary: Content analysis details: (-2.3 points) pts rule name description ---- ---------------------- -------------------------------------------------- -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at http://www.dnswl.org/, medium trust [64.18.0.149 listed in list.dnswl.org] Cc: linux-mmc@vger.kernel.org, Kyungmin Park , linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linux-arm-kernel-bounces@lists.infradead.org Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter2.kernel.org [140.211.167.43]); Tue, 14 Jun 2011 20:33:31 +0000 (UTC) X-MIME-Autoconverted: from quoted-printable to 8bit by demeter2.kernel.org id p5EKXAsW008634 Hi Heiko, On Tue, Jun 14, 2011 at 9:10 AM, Heiko Stübner wrote: > Hi Andrei, > > Am Dienstag 14 Juni 2011 schrieb Andrei Warkentin: >> I recently came back from vacation (which is why I didn't pitch in >> before). Has there been any further update on this? I want to exclude >> my EMMC partitioning changes as the possible culprit here. > > nope, no updates yet. The flood also only starts when udev wants to > create its device nodes, meaning the initial detection seems not to > produce this problem > > But when I disable the whole boot partition stuff, it works as before > without irq storms. > > As there don't seem to exist reports from other emmc users about this > I guess the problem lays somewhere between the boot-partitions-patch > and the sdhci-s3c driver (for s3c2416 at least). > > As my knowledge about the whole mmc-subsystem is quite spare I also > don't really know where to start looking for the culprit yet. Alright. Curious. Can you let me know what eMMC device you are connecting to the controller? What is the eMMC revision? Can you also apply the following and let me know the results? This adds an error message if the partition switch fails, and forces the device to ALWAYS switch back to main user area after every completed RQ. >>>>>>>>>>>> start @@ -1325,10 +1326,13 @@ static int mmc_blk_resume(struct mmc_card *card) mmc_blk_set_blksize(md, card); /* - * Resume involves the card going into idle state, - * so current partition is always the main one. + * Force main user area on resume. Technically + * card should have switched itself during reset. */ - md->part_curr = md->part_type; + ret = mmc_blk_part_switch(card, md); + if (ret) + return ret; + mmc_queue_resume(&md->queue); list_for_each_entry(part_md, &md->part, part) { mmc_queue_resume(&part_md->queue); >>>>>>>>>>>>>>>>>>> end Thanks for helping tracking this down, A diff --git a/drivers/mmc/card/block.c b/drivers/mmc/card/block.c index 71da564..74e1029 100755 --- a/drivers/mmc/card/block.c +++ b/drivers/mmc/card/block.c @@ -450,9 +450,12 @@ static inline int mmc_blk_part_switch(struct mmc_card *card, ret = mmc_switch(card, EXT_CSD_CMD_SET_NORMAL, EXT_CSD_PART_CONFIG, card->ext_csd.part_config, card->ext_csd.part_time); - if (ret) + if (ret) { + printk(KERN_ERR ">>> error switching to part_type %d\n", + md->part_type); return ret; -} + } + } main_md->part_curr = md->part_type; return 0; @@ -964,6 +967,13 @@ static int mmc_blk_issue_rq(struct mmc_queue *mq, struct request *req) } out: + + /* Switch to main_md (type = 0) */ + ret = mmc_blk_part_switch(card, (struct mmc_blk_data *) mmc_get_drvdata(card)); + if (ret) { + ret = 0; + } + mmc_release_host(card->host); return ret; } >>>>>>>>>>>>>>>> end I am curious about the results. Here is another thing to try out. This forces a switch to user area (main partition) every time blk resume is invoked - >>>>>>>>>>>>>>>>>>> start diff --git a/drivers/mmc/card/block.c b/drivers/mmc/card/block.c index 71da564..f7be8f7 100755 --- a/drivers/mmc/card/block.c +++ b/drivers/mmc/card/block.c @@ -1318,6 +1318,7 @@ static int mmc_blk_suspend(struct mmc_card *card, pm_message_t state) static int mmc_blk_resume(struct mmc_card *card) { + int ret; struct mmc_blk_data *part_md; struct mmc_blk_data *md = mmc_get_drvdata(card);