From patchwork Thu Mar 14 01:23:13 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sergey Yanovich X-Patchwork-Id: 2267241 Return-Path: X-Original-To: patchwork-linux-mmc@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id 0B34E3FD8C for ; Thu, 14 Mar 2013 01:23:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756546Ab3CNBXX (ORCPT ); Wed, 13 Mar 2013 21:23:23 -0400 Received: from mail-we0-f169.google.com ([74.125.82.169]:49446 "EHLO mail-we0-f169.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755679Ab3CNBXX (ORCPT ); Wed, 13 Mar 2013 21:23:23 -0400 Received: by mail-we0-f169.google.com with SMTP id t11so1663812wey.0 for ; Wed, 13 Mar 2013 18:23:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:from:to:cc:subject:date:message-id:x-mailer:in-reply-to :references; bh=e8tgzyVY5MwsISAXn6gYJLk+3Nj4cX0D77lfupBpt0c=; b=MMnQm9OfgnaaxS0GxNkG2IaxznzVPKWXf/t+fVCkCYtdw6FBeg3g+ioxLfC1mXrJ7v sQN7Raddhz58eVBOFAOrzDZTHD14joNLw2DTXhUb/NSeS2778XM7dQXD7AXJtj7RZ8tF maZf7kOjiTmlMgXjh1GwnRRkvZvG81ubaCaxF6qMLt7mte0Kb/UAqYbcQRAqKwv3khlT MF+Jo/grBhWuaw36owQnZcvQLZa4237lc1aJQnVIJPHIKqMnEyHg89lUOwRbse1N2YgV 7TWCisC1wMAlAzp9W9XoJp6+FYkH1JWcLprJ2ALsdlp5Dvu1dfm4KlyryFVwr8znEE6u WUKw== X-Received: by 10.180.8.4 with SMTP id n4mr718962wia.13.1363224201904; Wed, 13 Mar 2013 18:23:21 -0700 (PDT) Received: from host5.s2.wicon.ru ([195.96.87.210]) by mx.google.com with ESMTPS id ek4sm6131568wib.11.2013.03.13.18.23.19 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 13 Mar 2013 18:23:21 -0700 (PDT) From: Sergey Yanovich To: Chris Ball Cc: Sergey Yanovich , Greg Kroah-Hartman , Ulf Hansson , Linus Walleij , Jaehoon Chung , Namjae Jeon , linux-kernel@vger.kernel.org, linux-mmc@vger.kernel.org Subject: [PATCH v2] wait while adding MMC host to ensure root mounts Date: Thu, 14 Mar 2013 05:23:13 +0400 Message-Id: <1363224194-7366-1-git-send-email-ynvich@gmail.com> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1363223183-3772-1-git-send-email-ynvich@gmail.com> References: <1363223183-3772-1-git-send-email-ynvich@gmail.com> Sender: linux-mmc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org MMC hosts are added asynchronously. We need to wait until detect returns to avoid failed root filesystem mounts. ---8<--- VFS: Cannot open root device "mmcblk0p1" or unknown-block(0,0): error -6 Please append a correct "root=" boot option; here are the available partitions: mmc0: host does not support reading read-only switch. assuming write-enable. 1f00 256 mtdblock0 (driver?) 1f01 256 mtdblock1 (driver?) 1f02 2560 mtdblock2 mmc0: new SDHC card at address b368 (driver?) 1f03 29696 mtdblock3 (driver?) 1f04 16384 mtdblock4 mmcblk0: mmc0:b368 USD 3.72 GiB (driver?) mmcblk0: p1 b300 3910656 mmcblk0 driver: mmcblk b301 3906560 mmcblk0p1 00000000-01 Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0) ---8<--- Signed-off-by: Sergey Yanovich --- changes for v2: - removed exporting as symbol is in the same file drivers/mmc/core/core.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c index aaed768..7196888 100644 --- a/drivers/mmc/core/core.c +++ b/drivers/mmc/core/core.c @@ -2225,6 +2225,7 @@ void mmc_start_host(struct mmc_host *host) host->rescan_disable = 0; mmc_power_up(host); mmc_detect_change(host, 0); + mmc_flush_scheduled_work(); } void mmc_stop_host(struct mmc_host *host)