Acidanthera UEFI Development Kit based on EDK II edk2-stable202311
Go to file
Hao Wu a717086c5f MdeModulePkg ScsiDiskDxe: Raise the Tpl of async IO callback to TPL_NOTIFY
When reading data from non-blockingly from a CD-ROM logic partition, the
procedure can be shown by the following call stack:
(The write process is similar)

|-------------------|
| DiskIoDxe (logic) |<---Raise Tpl to TPL_CALLBACK
|-------------------|
 |
 | Sub-task 1 (UnderRun) succeeds
 |
 |    |-----------------|     |-----------------|     |-----------------|
 +--->|  PartitionDxe   |---->| DiskIoDxe (Phy) |---->|   ScsiDiskDxe   |
 |    |-----------------|     |-----------------|     |-----------------|
 |
 | Sub-task 2 (OverRun) fails
 |
 |    |-----------------|     |-----------------|     |-----------------|
 +--->|  PartitionDxe   |---->| DiskIoDxe (Phy) |---->|   ScsiDiskDxe   |
 |    |-----------------|     |-----------------|     |-----------------|
 |                                     ^
 |                                     |
 More subtasks...              Wait indefinitely
 |
 |<---Restore Tpl
 |
 Completes

In PartitionDxe, if the 'Lba' and 'BufferSize' parameters passed to
function PartitionReadBlocksEx() are invalid, the function will issue a
blocking ReadDisk call (in function ProbeMediaStatusEx()).

In DiskIoDxe, blocking I/O request will wait for all the non-blocking I/O
requests to complete first before sending down the blocking request.

If the Tpl of the async I/O callback in ScsiDiskDxe is TPL_CALLBACK and
Sub-task 1 (UnderRun) succeeds but Sub-task 2 (OverRun) fails with an
invalid parameter, DiskIoDxe will wait indefinitely for the event created
by ScsiDiskDxe of Sub-task 1 to signal.

Hence, this commit will raise the Tpl of async IO callback in ScsiDiskDxe
to TPL_NOTIFY so that the indefinite wait in DiskIoDxe can be avoided.

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>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19452 6f19259b-4bc3-4df7-8a09-765794883524
2015-12-22 13:57:42 +00:00
AppPkg AppPkg/Applications/Python/Python-2.7.10: Initial Checkin part 5/5. 2015-11-07 19:43:57 +00:00
ArmPkg ArmPkg/ArmSoftfloatLib: add missing entry points for RVCT 2015-12-17 16:29:23 +00:00
ArmPlatformPkg ArmVExpressPkg/ArmVExpress-FVP-AArch64: run GICv3 in v3 mode 2015-12-15 13:08:56 +00:00
ArmVirtPkg ArmVirtPkg/ArmVirtXen: add ARM support 2015-12-17 17:11:33 +00:00
BaseTools BaseTools: Update Scripts to support VS2015 env 2015-12-22 01:01:54 +00:00
BeagleBoardPkg BeagleBoardPkg: remove ArmPlatformGlobalVariableLib resolution 2015-11-27 17:05:24 +00:00
Conf EDK II: Add .gitignore 2014-10-14 16:08:15 +00:00
CorebootModulePkg CorebootModulePkg:Removing EFI_RESOURCE_ATTRIBUTE_TESTED 2015-08-18 16:08:22 +00:00
CorebootPayloadPkg CorebootPayloadPkg PlatformHookLib: Fix GCC build failure 2015-11-30 21:11:29 +00:00
CryptoPkg CryptoPkg: fix build support under RVCT 2015-12-17 17:02:06 +00:00
DuetPkg DuetPkg: Fix GCC error to avoid the duplicated global variable in SmbiosGenDxe 2015-12-18 02:29:12 +00:00
EdkCompatibilityPkg EdkCompatibilityPkg: Fix GCC error to avoid the duplicated global variables 2015-12-18 02:28:18 +00:00
EdkShellBinPkg */Contributions.txt: Update example email address 2015-02-03 17:29:14 +00:00
EdkShellPkg */Contributions.txt: Update example email address 2015-02-03 17:29:14 +00:00
EmbeddedPkg EmbeddedPkg: Convert all .uni files to utf-8 2015-12-15 04:51:40 +00:00
EmulatorPkg EmulatorPkg: Convert all .uni files to utf-8 2015-12-15 04:51:49 +00:00
FatBinPkg FatBinPkg: Update EBC/IA32/X64/IPF binaries 2015-08-28 03:14:25 +00:00
IntelFrameworkModulePkg IntelFrameworkModulePkg: Convert all .uni files to utf-8 2015-12-15 04:52:33 +00:00
IntelFrameworkPkg IntelFrameworkPkg: Convert all .uni files to utf-8 2015-12-15 04:52:47 +00:00
IntelFspPkg Handle extra module patchable PCD variable in Linux map. 2015-09-06 22:36:43 +00:00
IntelFspWrapperPkg Fix >4G issue on IDT not restored correctly. 2015-12-15 04:27:00 +00:00
MdeModulePkg MdeModulePkg ScsiDiskDxe: Raise the Tpl of async IO callback to TPL_NOTIFY 2015-12-22 13:57:42 +00:00
MdePkg MdePkg UefiScsiLib: Close event when SCSI command fails 2015-12-22 13:55:59 +00:00
NetworkPkg NetworkPkg : Remove unused local variables to fix gcc build errors. 2015-12-22 02:02:11 +00:00
Nt32Pkg Nt32Pkg: Fix VS2015 Build Failure 2015-12-22 01:01:31 +00:00
Omap35xxPkg Omap35xxPkg SerialPortLib: Implement Get(Set)Control/SetAttributes 2015-11-26 08:49:53 +00:00
OptionRomPkg OptionRomPkg: Remove redundant included header file defintion in Ax88772.h and Ax88772b.h files 2015-07-08 02:56:54 +00:00
OvmfPkg OvfmPkg/XenHypercallLib: add missing GCC_ASM_EXPORT to XenHypercall2 2015-12-17 17:10:59 +00:00
PcAtChipsetPkg PcAtChipsetPkg/Rtc: Fix a UEFI Win7 boot hang issue 2015-12-22 13:52:47 +00:00
PerformancePkg PerformancePkg: Convert all .uni files to utf-8 2015-12-15 04:57:45 +00:00
QuarkPlatformPkg QuarkPlatformPkg/PlatformSecLib: Sync Flat32.S with Flat32.asm 2015-12-16 17:34:23 +00:00
QuarkSocPkg QuarkSocPkg: Add new package for Quark SoC X1000 2015-12-15 19:22:23 +00:00
SecurityPkg SecurityPkg: SecureBootConfigDxe: Remove useless code in VFR 2015-12-22 00:43:05 +00:00
ShellBinPkg ShellBinPkg: Ia32/X64 Shell binary update. 2015-12-17 13:34:43 +00:00
ShellPkg ShellPkg: Add AIP IPv6 UNDI support to Shell dh 2015-12-22 02:13:18 +00:00
SourceLevelDebugPkg SourceLevelDebugPkg: Correct gEfiDebugAgentGuid usage in DxeDebugAgentLib 2015-12-17 08:29:58 +00:00
StdLib StdLib: remove mention of ARMGCC 2015-08-12 05:25:12 +00:00
StdLibPrivateInternalFiles */Contributions.txt: Update example email address 2015-02-03 17:29:14 +00:00
UefiCpuPkg UefiCpuPkg/CpuMpPei: Remove un-used AsmCliHltLoop() 2015-12-18 03:26:40 +00:00
UnixPkg UnixPkg: Remove UnixPkg files (It is replaced by EmulatorPkg) 2013-07-29 21:09:55 +00:00
Vlv2DeviceRefCodePkg Vlv2TbltDevicePkg/Vlv2DeviceRefCodePkg: 2015-11-10 07:47:29 +00:00
Vlv2TbltDevicePkg Vlv2TbltDevicePkg: Convert all .uni files to utf-8 2015-12-15 04:59:37 +00:00
.gitignore EDK II: Add .gitignore 2014-10-14 16:08:15 +00:00
BuildNotes2.txt
Edk2Setup.bat BaseTools: Update Edk2Setup.bat to support multiple workspaces 2015-10-08 09:29:36 +00:00
Maintainers.txt Maintainers.txt: Update maintainers for Quark*Pkg 2015-12-17 07:33:33 +00:00
edksetup.bat BaseTools: Add VS2015 tool chain in tools_def.template 2015-12-03 03:19:01 +00:00
edksetup.sh BaseTools: Update edksetup.sh to support multiple workspaces 2015-10-08 09:29:56 +00:00