summaryrefslogtreecommitdiff
path: root/MdeModulePkg/Bus/Scsi/ScsiDiskDxe/ScsiDisk.c
AgeCommit message (Collapse)Author
2015-04-29MdeModulePkg: fix some issues in ScsiDisk to co-work with UFS stackFeng Tian
The changes in ScsiDisk include: 1. Add UFS disk info support. 2. Remove the wrong block size calculation. 3. Get sense data for TEST_UNIT_READY cmd immediately rather than sending a REQUEST_SENSE cmd again. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Feng Tian <feng.tian@intel.com> Reviewed-by: Star Zeng <star.zeng@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17247 6f19259b-4bc3-4df7-8a09-765794883524
2015-04-23MdeModulePkg/ScsiDisk: Set correct value to the Media->IoAlign field of ↵Feng Tian
BlockIo protocol instance. Media->IoAlign field of BlockIo protocol instance installed by this driver should be set to the value of ScsiIo->IoAlign. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Feng Tian <feng.tian@intel.com> Reviewed-by: Star Zeng <star.zeng@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17195 6f19259b-4bc3-4df7-8a09-765794883524
2014-09-30MdeModulePkg/ScsiDiskDxe: Fix the build warning/error "unreachable statement"Olivier Martin
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Olivier Martin <olivier.martin@arm.com> Reviewed-by: Feng Tian <feng.tian@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16190 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
2014-02-11MdeModulePkg/ScsiDisk:If the SCSI device target status is in ↵Tian, Feng
CHECK_CONDITION, then parse sense data to decide which actions need to be done. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Tian, Feng <feng.tian@intel.com> Reviewed-by: Fu, Siyuan <siyuan.fu@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15215 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
2013-01-04MdeModulePkg/AtaBus&ScsiBus: Dynamically calculate how long shall we wait ↵erictian
for the finish of a read/write operation according to the actual transfer length Signed-off-by: Feng Tian <feng.tian@intel.com> Reviewed-by: Elvin Li <elvin.li@intel.com> git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14028 6f19259b-4bc3-4df7-8a09-765794883524
2012-03-06MdeModulePkg: When media_change happens at Partition.Start(), the lower ↵erictian
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
2011-11-25Allocate aligned buffer to satisfy the IoAlign requirement of high level ↵lzeng14
protocol. Signed-off-by: lzeng14 Reviewed-by: erictian git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12788 6f19259b-4bc3-4df7-8a09-765794883524
2011-11-03MdeModulePkg: ATA performance tuning.erictian
1. Boost IDE mode boot when slave device is absent. 2. Use D2H FIS to check if the PIO OUT/DMA IN/DMA OUT transfer is finished or error happened. ATA PIO IN has special check as it may just receive PIO SETUP FIS for success case. 3. Add command status register check for IDE DMA transfer. 4. ScsiDiskReadCapacity() in ScsiDisk should return EFI_SUCCESS if SENSE Data request is success. Signed-off-by: erictian Reviewed-by: rsun3 Reviewed-by: xdu2 Reviewed-by: mdkinney git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12658 6f19259b-4bc3-4df7-8a09-765794883524
2011-09-07Media detection logic is enhanced to be more robust.erictian
Signed-off-by: erictian Reviewed-by: hhuan13 Reviewed-by: mdkinney git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12289 6f19259b-4bc3-4df7-8a09-765794883524
2011-06-14ScsiBus/ScsiDisk enhancement for no_media state.erictian
Ahci enumeration logic tuning for boot performance. Signed-off-by:erictian Reviewed-by:qianouyang, hhuan13 git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11820 6f19259b-4bc3-4df7-8a09-765794883524
2011-05-23Change Partition/ScsiDxe driver to produce Block IO revision 3.niruiyu
Signed-off-by: niruiyu Reviewed-by: erictian git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11692 6f19259b-4bc3-4df7-8a09-765794883524
2011-04-25Change BlockIo drivers to return EFI_NO_MEDIA or EFI_MEDIA_CHANGED even the ↵niruiyu
Buffer/BufferSize/Lba is invalid so that caller can probe the media status easier. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11584 6f19259b-4bc3-4df7-8a09-765794883524
2010-10-19return EFI_DEVICE_ERROR if the Status value is not EFI_SUCCESS.erictian
it's because BlockIo.Reset() only has two possible values: EFI_SUCCESS and EFI_DEVICE_ERROR according to UEFI2.3 spec git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10956 6f19259b-4bc3-4df7-8a09-765794883524
2010-09-15Refine soma code to make code run safely.ydong10
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10877 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-08-04According to SCSI spec, ANSI version is 3 bits, so 0x7 should be used to get ↵li-elvin
correct ANSI version. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10773 6f19259b-4bc3-4df7-8a09-765794883524
2010-06-04Change MaxBlock to HEX value to avoid GCC build failure.li-elvin
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10566 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-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
2009-02-23Minor update on capitalization for ECC check.xli24
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@7561 6f19259b-4bc3-4df7-8a09-765794883524
2009-02-06Coding style checkedjji4
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@7454 6f19259b-4bc3-4df7-8a09-765794883524
2008-12-18Some codes have been altered and replaced by functions of memory allocation ↵jji4
library. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@7072 6f19259b-4bc3-4df7-8a09-765794883524
2008-12-17Fix some typo.gikidy
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@7067 6f19259b-4bc3-4df7-8a09-765794883524
2008-11-17Update SCSI modules to use new macros defined in UefiLib.qhuang8
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@6564 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-11-10Rename EfiScsiStallSeconds to EFI_SCSI_STALL_SECONDS to follow the naming ↵qwang12
convention for MACRO. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@6444 6f19259b-4bc3-4df7-8a09-765794883524
2008-08-30The driver and library in MdePkg, MdeModulePkg and Nt32Pkg that don't depend ↵lgao4
on PI spec should include Uefi.h not PiDxe.h. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@5758 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
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-08-14Sync code with MdePkg spec for Scsi library class and CustomDecompress ↵lgao4
library class. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@3636 6f19259b-4bc3-4df7-8a09-765794883524
2007-07-20remove some comments introduced by tools.vanjeff
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@3387 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