Backport important mmc card fixes