]> git.proxmox.com Git - mirror_edk2.git/commitdiff
Omap35xxPkg/MMCHSDxe: Fixed initialization when started from gBS->ConnectController()
authoroliviermartin <oliviermartin@6f19259b-4bc3-4df7-8a09-765794883524>
Thu, 18 Aug 2011 09:20:17 +0000 (09:20 +0000)
committeroliviermartin <oliviermartin@6f19259b-4bc3-4df7-8a09-765794883524>
Thu, 18 Aug 2011 09:20:17 +0000 (09:20 +0000)
As soon as the MMCHSDxe is initialized is reinstalled its protocol.
It was crashing when the PartitionDxe was scanning for partition headers and the the MMC driver
reinstalls its protocols in the same time. The initial DiskIo and BlockIo instances used
by PartitionDxe were not valid after this reinstallation.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12160 6f19259b-4bc3-4df7-8a09-765794883524

Omap35xxPkg/MMCHSDxe/MMCHS.c

index 9ddb48a65b046ad150412c47f3902f40d014933b..786bc882731d276656c1caf111c022f1fc954fe9 100644 (file)
@@ -1152,17 +1152,12 @@ SdReadWrite (
   if (Update) {
     DEBUG ((EFI_D_INFO, "SD Card ReinstallProtocolInterface ()\n"));
     gBS->ReinstallProtocolInterface (
   if (Update) {
     DEBUG ((EFI_D_INFO, "SD Card ReinstallProtocolInterface ()\n"));
     gBS->ReinstallProtocolInterface (
-
           gImageHandle,
           gImageHandle,
-
           &gEfiBlockIoProtocolGuid,
           &gEfiBlockIoProtocolGuid,
-
           &gBlockIo,
           &gBlockIo,
-
           &gBlockIo
           &gBlockIo
-
           );
           );
-
+    return EFI_MEDIA_CHANGED;
   }
 
   if (EFI_ERROR (Status)) {
   }
 
   if (EFI_ERROR (Status)) {