From 9c9225255d0e85c2274e8d4df6103e6c5c92600a Mon Sep 17 00:00:00 2001 From: erictian Date: Tue, 6 Mar 2012 09:34:14 +0000 Subject: 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 --- MdeModulePkg/Bus/Scsi/ScsiDiskDxe/ScsiDisk.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'MdeModulePkg/Bus/Scsi') 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.
+Copyright (c) 2006 - 2012, Intel Corporation. All rights reserved.
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; } } // -- cgit v1.2.3