summaryrefslogtreecommitdiff
path: root/MdeModulePkg/Bus/Scsi/ScsiDiskDxe/ScsiDisk.h
AgeCommit message (Collapse)Author
2016-12-26MdeModulePkg: Move to new locationGuo Mang
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Guo Mang <mang.guo@intel.com>
2015-12-23MdeModulePkg ScsiDiskDxe: Raise the Tpl of async IO callback to TPL_NOTIFYHao Wu
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. (Sync patch r19452 from main trunk.) 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/branches/UDK2015@19473 6f19259b-4bc3-4df7-8a09-765794883524
2015-12-23MdeModulePkg ScsiDiskDxe: Fix async request retry times info lost issueHao Wu
(Sync patch r19450 from main trunk.) 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/branches/UDK2015@19471 6f19259b-4bc3-4df7-8a09-765794883524
2015-12-23MdeModulePkg ScsiDiskDxe: Modify FlushBlocksEx() to follow UEFI specHao Wu
The function ScsiDiskFlushBlocksEx() in ScsiDiskDxe/ScsiDisk.c originally always returns EFI_SUCCESS, which is not aligned with the UEFI spec. This commit adds addtional checks to see if the media in the device is changed or removed. Check for whether the device can be written is also added. Corresponding status will be returned according to the check result. (Sync patch r19444 from main trunk.) 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/branches/UDK2015@19465 6f19259b-4bc3-4df7-8a09-765794883524
2015-12-11MdeModulePkg ScsiDiskDxe: Add BlockIO2 SupportHao Wu
Together with EFI_BLOCK_IO_PROTOCOL, EFI_BLOCK_IO2_PROTOCOL is installed as well in ScsiDiskDxe. Block I/O 2 functions are implemented: Reset ReadBlocksEx WriteBlocksEx FlushBlocksEx (Sync patch r19215 from main trunk.) 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/branches/UDK2015@19222 6f19259b-4bc3-4df7-8a09-765794883524
2014-04-30MdeModulePkg/ScsiDisk: Using back-off algorithm to dynamically adjust ↵Tian, Feng
transfer length in a single SCSI/ATAPI transfer to reach best device compatibility. Besides this, the patch also fixed: 1) Wrong return value in SenseDataLength field of packet field of EFI_EXT_SCSI_PASS_THRU protocol, it should reflect real sense data length we got. 2) Wrong logic in ScsiDiskRequestSenseKeys that the logic makes SenseData pointer unaligned compared with BlockIo.Media.IoAlign field. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Tian, Feng <feng.tian@intel.com> Reviewed-by: Zeng, Star <star.zeng@intel.com> Reviewed-by: Fu, Siyuan <siyuan.fu@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15491 6f19259b-4bc3-4df7-8a09-765794883524
2013-08-05MdeMdeModulePkg/Scsi: Enlarge SCSI cmd timeout to a more reasonable ↵Feng Tian
experience value to cover more devices Signed-off-by: Feng Tian <feng.tian@intel.com> Reviewed-by: Elvin Li <elvin.li@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14521 6f19259b-4bc3-4df7-8a09-765794883524
2011-07-06Fix the comments to follow UEFI Spec regarding how to check an EFI_HANDLE is ↵niruiyu
valid/invalid. Signed-off-by: niruiyu Reviewed-by: lgao4 git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11987 6f19259b-4bc3-4df7-8a09-765794883524
2010-08-23Change the check condition for 16 byte command, when HDD size is > 2TB, use ↵li-elvin
16 byte command instead. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10817 6f19259b-4bc3-4df7-8a09-765794883524
2010-05-28If SCSI version support Read/Write (16) command, use both commands to access ↵li-elvin
disk especially for above 2TB. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10550 6f19259b-4bc3-4df7-8a09-765794883524
2010-04-24Update the copyright notice formathhtian
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10420 6f19259b-4bc3-4df7-8a09-765794883524
2010-02-11Coding style fix and minor improvements.rsun3
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9977 6f19259b-4bc3-4df7-8a09-765794883524
2010-01-15Fix some coding style issues in MdeModulePkg.rsun3
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9774 6f19259b-4bc3-4df7-8a09-765794883524
2009-12-22Enhance SCSI disk module to produce Disk Info protocol on the same Block IO ↵qhuang8
handle: SCSI Interface GUID: Physical SCSI disk IDE Interface GUID: ATAPI device run in legacy IDE mode AHCI Interface GUID: ATAPI device run in AHCI mode. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9584 6f19259b-4bc3-4df7-8a09-765794883524
2009-06-29Update the SCSI Disk Driver to not mount drives on physical only SCSI channelsgikidy
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@8677 6f19259b-4bc3-4df7-8a09-765794883524
2009-04-30Replace references to RFC 3066 with RFC 4646. gikidy
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@8212 6f19259b-4bc3-4df7-8a09-765794883524
2009-04-01Read-Capacity16 command added for SCSI driversjji4
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@8000 6f19259b-4bc3-4df7-8a09-765794883524
2008-12-18Library class of MemoryAllocationLib has been added.jji4
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@7073 6f19259b-4bc3-4df7-8a09-765794883524
2008-12-16Clean up to update the reference of the these macros:qhuang8
EFI_SIGNATURE_16 -> SIGNATURE_16 EFI_SIGNATURE_32 -> SIGNATURE_32 EFI_SIGNATURE_64 -> SIGNATURE_64 EFI_FIELD_OFFSET -> OFFSET_OF EFI_MAX_BIT -> MAX_BIT EFI_MAX_ADDRESS -> MAX_ADDRESS These macros are not defined in UEFI spec. It makes more sense to use the equivalent macros in Base.h to avoid alias. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@7056 6f19259b-4bc3-4df7-8a09-765794883524
2008-11-13Rename the reference library class of ScsiLib to UefiScsiLib.qhuang8
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@6523 6f19259b-4bc3-4df7-8a09-765794883524
2008-11-12Code Scrub:jji4
MdeModulePkg\Bus\ScsiBusDxe\ MdeModulePkg\Bus\ScsiDisk\ git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@6465 6f19259b-4bc3-4df7-8a09-765794883524
2008-04-09Update all files to follow doxygen style file header.qhuang8
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@5017 6f19259b-4bc3-4df7-8a09-765794883524
2008-03-11edk2/MdeModulePkg/Universal/Network/IScsiDxe/IScsiTcp4Io.h:jljusten
edk2/MdeModulePkg/Universal/Network/IScsiDxe/IScsiProto.h: edk2/MdeModulePkg/Universal/Network/IScsiDxe/IScsiExtScsiPassThru.h: edk2/MdeModulePkg/Universal/Network/IScsiDxe/IScsiDhcp.h: edk2/MdeModulePkg/Universal/Network/IScsiDxe/IScsiIbft.h: edk2/MdeModulePkg/Universal/Network/IScsiDxe/Md5.h: edk2/MdeModulePkg/Universal/Network/IScsiDxe/IScsiDriver.h: edk2/MdeModulePkg/Bus/Scsi/ScsiBusDxe/ScsiBus.h: edk2/MdeModulePkg/Bus/Scsi/ScsiDiskDxe/ScsiDisk.h: Fix filename case(sensitivity) issues. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@4840 6f19259b-4bc3-4df7-8a09-765794883524
2007-09-30Update to support to produce Component Name and & Component Name 2 protocol ↵qhuang8
based on Feature flag PcdComponentNameDisable & PcdComponentName2Disable. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@4001 6f19259b-4bc3-4df7-8a09-765794883524
2007-09-201. Set the Target array to zero before fill the target id.qhuang8
2. Get the command/control register base address for each channel through IDE common registers. 3. Correctify some return status to sync with newest Uefi Spec 2.1 git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@3901 6f19259b-4bc3-4df7-8a09-765794883524
2007-06-29Add ScsiDiskDxe driver for Nt32Pkg klu2
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@2879 6f19259b-4bc3-4df7-8a09-765794883524