summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorerictian <erictian@6f19259b-4bc3-4df7-8a09-765794883524>2012-03-06 09:34:14 +0000
committererictian <erictian@6f19259b-4bc3-4df7-8a09-765794883524>2012-03-06 09:34:14 +0000
commit9c9225255d0e85c2274e8d4df6103e6c5c92600a (patch)
tree2946890e480d39a866a93e48a38f994c46367c7e
parent6cfc72925616a2c363300332a0344c16a1da801e (diff)
downloadedk2-platforms-9c9225255d0e85c2274e8d4df6103e6c5c92600a.tar.xz
MdeModulePkg: When media_change happens at Partition.Start(), the lower driver (ScsiDisk) should immediately return EFI_MEDIA_CHANGE but not EFI_SUCCESS. This way is used to avoid the interrupted Partition.Start() closes those opened protocols(DiskIo and DevicePath protocol) who are using by the re-entered partition driver at the same handle.
Signed-off-by: erictian Reviewed-by: rsun3 git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13082 6f19259b-4bc3-4df7-8a09-765794883524
-rw-r--r--MdeModulePkg/Bus/Scsi/ScsiDiskDxe/ScsiDisk.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/MdeModulePkg/Bus/Scsi/ScsiDiskDxe/ScsiDisk.c b/MdeModulePkg/Bus/Scsi/ScsiDiskDxe/ScsiDisk.c
index f47cfe07e1..324964a81c 100644
--- a/MdeModulePkg/Bus/Scsi/ScsiDiskDxe/ScsiDisk.c
+++ b/MdeModulePkg/Bus/Scsi/ScsiDiskDxe/ScsiDisk.c
@@ -1,7 +1,7 @@
/** @file
SCSI disk driver that layers on every SCSI IO protocol in the system.
-Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2006 - 2012, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -521,6 +521,8 @@ ScsiDiskReadBlocks (
&ScsiDiskDevice->BlkIo,
&ScsiDiskDevice->BlkIo
);
+ Status = EFI_MEDIA_CHANGED;
+ goto Done;
}
}
//
@@ -637,6 +639,8 @@ ScsiDiskWriteBlocks (
&ScsiDiskDevice->BlkIo,
&ScsiDiskDevice->BlkIo
);
+ Status = EFI_MEDIA_CHANGED;
+ goto Done;
}
}
//