]> git.proxmox.com Git - mirror_edk2.git/commit
EmbeddedPkg/MmcDxe: Card Presence Detect Race Condition
authoroliviermartin <oliviermartin@6f19259b-4bc3-4df7-8a09-765794883524>
Tue, 30 Aug 2011 18:02:38 +0000 (18:02 +0000)
committeroliviermartin <oliviermartin@6f19259b-4bc3-4df7-8a09-765794883524>
Tue, 30 Aug 2011 18:02:38 +0000 (18:02 +0000)
commit40842a5e7c5b66e711d709f16ae6fc1a7134e3e0
treeee7fb6b22ba8844920686096b9eaee1cbfb18f22
parentc8ece79ccd6542c4a522092c02e456edc17b2355
EmbeddedPkg/MmcDxe: Card Presence Detect Race Condition

The MMC driver defaults to assume a card is not present.  It then starts a timer in MmcDxeInitialize to check for card presence every 200ms.

However it does not immediately check to see if a card is present so if the EFI driver connection process occurs less than 200ms after the driver load, the connection process for partition
or filesystem drivers will fail because MediaPresent still is FALSE.  To resolve this race condition, we need to immediately perform the presence check in the Start routine.

EmbeddedPkg/MmcDxe: Media ID Handling

Initialize the MMC device on Start or when presence changes instead of doing it on the Block IO calls. This way the layered drivers can be stopped and rebuilt with new Media IDs instead of
experiencing errors on calls to Block IO.

Proposed-by: Eugene Cohen (HP)
Reviewed-by: oliviermartin
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12237 6f19259b-4bc3-4df7-8a09-765794883524
EmbeddedPkg/Universal/MmcDxe/Mmc.c
EmbeddedPkg/Universal/MmcDxe/Mmc.h
EmbeddedPkg/Universal/MmcDxe/MmcBlockIo.c