diff options
author | erictian <erictian@6f19259b-4bc3-4df7-8a09-765794883524> | 2012-03-06 09:34:14 +0000 |
---|---|---|
committer | erictian <erictian@6f19259b-4bc3-4df7-8a09-765794883524> | 2012-03-06 09:34:14 +0000 |
commit | 9c9225255d0e85c2274e8d4df6103e6c5c92600a (patch) | |
tree | 2946890e480d39a866a93e48a38f994c46367c7e /MdeModulePkg/Bus/Scsi | |
parent | 6cfc72925616a2c363300332a0344c16a1da801e (diff) | |
download | edk2-9c9225255d0e85c2274e8d4df6103e6c5c92600a.zip edk2-9c9225255d0e85c2274e8d4df6103e6c5c92600a.tar.gz edk2-9c9225255d0e85c2274e8d4df6103e6c5c92600a.tar.bz2 |
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
Diffstat (limited to 'MdeModulePkg/Bus/Scsi')
-rw-r--r-- | MdeModulePkg/Bus/Scsi/ScsiDiskDxe/ScsiDisk.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/MdeModulePkg/Bus/Scsi/ScsiDiskDxe/ScsiDisk.c b/MdeModulePkg/Bus/Scsi/ScsiDiskDxe/ScsiDisk.c index f47cfe0..324964a 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;
}
}
//
|