summaryrefslogtreecommitdiffstats
path: root/MdeModulePkg/Universal/Disk
diff options
context:
space:
mode:
authorHao Wu <hao.a.wu@intel.com>2016-03-17 10:03:44 +0800
committerHao Wu <hao.a.wu@intel.com>2016-03-29 13:39:13 +0800
commita5e5a2f581eec25df0b42f6d8a41a39ae3cf2b6e (patch)
tree8e4af1cbfbe5f0c8778794c68478f5ca1aea7d1a /MdeModulePkg/Universal/Disk
parent744c71687bc1cdff4ab20efdfba78f3b3525f747 (diff)
downloadedk2-a5e5a2f581eec25df0b42f6d8a41a39ae3cf2b6e.tar.gz
edk2-a5e5a2f581eec25df0b42f6d8a41a39ae3cf2b6e.tar.bz2
edk2-a5e5a2f581eec25df0b42f6d8a41a39ae3cf2b6e.zip
MdeModulePkg DiskIoDxe: Media status check not be done at DiskIo level
Found an issue that file system cannot be started on a DVD when doing the following process: Boot to shell with a DVD inside a SATA DVDROM. Eject the DVD and run "reconnect -r". Put the DVD inside again and run "reconnect -r". The cause is that after executing the second reconnect action, DiskIo immediately returns EFI_NO_MEDIA in function DiskIo2ReadWriteDisk() when checking the media information. However, at this time, the media information does not get updated by the ScsiDisk driver. Therefore, DiskIo driver should left the no media check to ScsiDisk driver. Generally, the media changed and media write protect check should also be left to lower-level device driver. Thus, these two checks in function DiskIo2ReadWriteDisk() are also removed. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Hao Wu <hao.a.wu@intel.com> Reviewed-by: Feng Tian <feng.tian@intel.com>
Diffstat (limited to 'MdeModulePkg/Universal/Disk')
-rw-r--r--MdeModulePkg/Universal/Disk/DiskIoDxe/DiskIo.c14
1 files changed, 1 insertions, 13 deletions
diff --git a/MdeModulePkg/Universal/Disk/DiskIoDxe/DiskIo.c b/MdeModulePkg/Universal/Disk/DiskIoDxe/DiskIo.c
index 97f2d508a2..b8bde2a25e 100644
--- a/MdeModulePkg/Universal/Disk/DiskIoDxe/DiskIo.c
+++ b/MdeModulePkg/Universal/Disk/DiskIoDxe/DiskIo.c
@@ -9,7 +9,7 @@
Aligned - A read of N contiguous sectors.
OverRun - The last byte is not on a sector boundary.
-Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2006 - 2016, 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
@@ -833,18 +833,6 @@ DiskIo2ReadWriteDisk (
Status = EFI_SUCCESS;
Blocking = (BOOLEAN) ((Token == NULL) || (Token->Event == NULL));
- if (!(Media->MediaPresent)) {
- return EFI_NO_MEDIA;
- }
-
- if (Media->MediaId != MediaId) {
- return EFI_MEDIA_CHANGED;
- }
-
- if (Write && Media->ReadOnly) {
- return EFI_WRITE_PROTECTED;
- }
-
if (Blocking) {
//
// Wait till pending async task is completed.