Bug 56561 - root on an mmc/sd card fails occasionally
Summary: root on an mmc/sd card fails occasionally
Status: CLOSED WILL_NOT_FIX
Alias: None
Product: Drivers
Classification: Unclassified
Component: MMC/SD (show other bugs)
Hardware: All Linux
: P1 normal
Assignee: drivers_mmc-sd
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-04-13 10:43 UTC by Sergey Yanovich
Modified: 2013-11-13 21:09 UTC (History)
1 user (show)

See Also:
Kernel Version: 3.8.7
Subsystem:
Regression: No
Bisected commit-id:


Attachments

Description Sergey Yanovich 2013-04-13 10:43:21 UTC
Steps to reproduce:
1. boot with 'root=/path/to/mmc_card' and without 'rootwait'

Expected results:
the system boots

Actual results:
---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<---

This happens because prepare_namespace() assumes that all devices are ready when all probe() finish, but mmc_start_host() returns asynchronously before the card is properly initialized, thus causing a hard to trace race condition.

The patch was committed which makes mmc_start_host() synchronous, but it was reverted without another solution, because it increases boot time on some systems.

As a result, 'root_wait' is required to ensure boot at the moment.

A possible solution is to make card a separate device (now only the host is a device). In this case, the probing could be done asynchronously without breaking the assumption in prepare_namespace().
Comment 1 Alan 2013-11-13 21:09:52 UTC
Or use an initrd

Note You need to log in before you can comment on or make changes to this bug.