adding aliases to mmc ... again

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi all,

The wish to have persistent MMC block device names for passing a suitable
root=/dev/mmcblkX option came up several times already and has been discussed
at least in these threads:

http://lists.infradead.org/pipermail/linux-arm-kernel/2012-July/109984.html
https://www.mail-archive.com/linux-mmc@xxxxxxxxxxxxxxx/msg22104.html
http://comments.gmane.org/gmane.linux.kernel.mmc/21519

Several patches have been proposed to nail the slot index to a known number.
Arguments against these patches were:

- Use an initrd and locate the correct root device there
  even Thomas who suggested this admitted this would be painful to do
- use root=UUID= or root=PARTUUID=
  This generally works but has an important downside. With the UUID
  approach devices which should boot from the internal eMMC may start
  booting from an external SD slot when somebody deliberately inserts
  a SD card with the same UUID.

The following patches should have the technical issues fixed. It works
by counting the mmc aliases in the devicetree during initialization of
the mmc framework. Those slot numbers will never be assigned to other
hosts.

Sascha

----------------------------------------------------------------
Sascha Hauer (2):
      of: Add helper for getting the maximum alias index for a stem
      mmc: Allow setting slot index via devicetree alias

 drivers/mmc/card/block.c | 11 ++++++++++-
 drivers/mmc/core/core.c  | 37 +++++++++++++++++++++++++++++++++++++
 drivers/mmc/core/host.c  | 17 +++++++++++++++--
 drivers/of/base.c        | 29 +++++++++++++++++++++++++++++
 include/linux/mmc/core.h |  3 +++
 include/linux/of.h       |  6 ++++++
 6 files changed, 100 insertions(+), 3 deletions(-)
--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux