summaryrefslogtreecommitdiffstats
path: root/EmbeddedPkg/Universal/MmcDxe/Mmc.h
diff options
context:
space:
mode:
authoroliviermartin <oliviermartin@6f19259b-4bc3-4df7-8a09-765794883524>2011-08-30 18:02:38 +0000
committeroliviermartin <oliviermartin@6f19259b-4bc3-4df7-8a09-765794883524>2011-08-30 18:02:38 +0000
commit40842a5e7c5b66e711d709f16ae6fc1a7134e3e0 (patch)
treeee7fb6b22ba8844920686096b9eaee1cbfb18f22 /EmbeddedPkg/Universal/MmcDxe/Mmc.h
parentc8ece79ccd6542c4a522092c02e456edc17b2355 (diff)
downloadedk2-40842a5e7c5b66e711d709f16ae6fc1a7134e3e0.tar.gz
edk2-40842a5e7c5b66e711d709f16ae6fc1a7134e3e0.tar.bz2
edk2-40842a5e7c5b66e711d709f16ae6fc1a7134e3e0.zip
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
Diffstat (limited to 'EmbeddedPkg/Universal/MmcDxe/Mmc.h')
-rw-r--r--EmbeddedPkg/Universal/MmcDxe/Mmc.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/EmbeddedPkg/Universal/MmcDxe/Mmc.h b/EmbeddedPkg/Universal/MmcDxe/Mmc.h
index 2904d91484..f3b9029573 100644
--- a/EmbeddedPkg/Universal/MmcDxe/Mmc.h
+++ b/EmbeddedPkg/Universal/MmcDxe/Mmc.h
@@ -288,4 +288,15 @@ MmcFlushBlocks (
IN EFI_BLOCK_IO_PROTOCOL *This
);
+EFI_STATUS InitializeMmcDevice(
+ IN MMC_HOST_INSTANCE *MmcHost
+ );
+
+VOID
+EFIAPI
+CheckCardsCallback (
+ IN EFI_EVENT Event,
+ IN VOID *Context
+ );
+
#endif