summaryrefslogtreecommitdiff
path: root/MdeModulePkg/Bus/Scsi/ScsiBusDxe/ScsiBus.c
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 ScsiBusDxe: Raise the Tpl of async IO callback to TPL_NOTIFYHao Wu
Raise the Tpl of async SCSI I/O callback function to TPL_NOTIFY to match the behavior in ScsiDiskDxe driver. (Sync patch r19454 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@19475 6f19259b-4bc3-4df7-8a09-765794883524
2015-12-23MdeModulePkg ScsiBusDxe: Only signal caller event when PassThru() succeedsHao Wu
In ScsiExecuteSCSICommand(), when SCSI devices do not support non-blocking I/O but an event is passed from caller (UefiScsiLib), the function will execute the SCSI I/O command in a blocking manner and signal the caller event when the command completes. Originally, caller event from UefiScsiLib will be signaled if the SCSI command fails. UefiScsiLib will continue to signal its caller (BlockIO2 request from ScsiDiskDxe driver), which is not aligned with the UEFI spec that event will not be signaled when BlockIO2 request returns with error. This commit will signal ScsiExecuteSCSICommand()'s caller event only when the SCSI command succeeds. (Sync patch r19447 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@19468 6f19259b-4bc3-4df7-8a09-765794883524
2015-12-11MdeModulePkg ScsiBusDxe: Fix caller event may nerver be signaledHao Wu
For function ScsiExecuteSCSICommand(), when the 'Event' parameter is not NULL but the target SCSI device does not support non-blocking I/O, it will execute a blocking I/O operation instead. However, after the SCSI operation is done, the 'Event' is not signaled to inform the caller. (Sync patch r19217 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@19224 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
2012-10-30Add missing status code in several modules.li-elvin
Signed-off-by: Li Elvin <elvin.li@intel.com> Reviewed-by: Yao Jiewen <jiewen.yao@intel.com> Reviewed-by: Ni Ruiyu <ruiyu.ni@intel.com> Reviewed-by: Gao Liming <liming.gao@intel.com> Reviewed-by: Tian Feng <feng.tian@intel.com> Reviewed-by: Fan Jeff <jeff.fan@intel.com> git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13890 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-09-18Clean up the private GUID definition in module Level.lgao4
0. Remove the unused private GUID from module source files. 1. Use gEfiCallerIdGuid replace of the private module GUID. 2. Add the public header files to define HII FormSet and PackageList GUID used in every HII driver. 3. Move two EBC protocols for debug purpose from EBC driver to MdeModulePkg Include directory. Signed-off-by: lgao4 Reviewed-by: ydong10 gdong1 tye jfan12 wli12 rsun3 jyao1 git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12373 6f19259b-4bc3-4df7-8a09-765794883524
2011-06-20Fix potential null pointer dereferenceerictian
Signed-off-by: erictian Reviewed-by: ydong10 git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11859 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
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-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-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-02when remaining device path is not NULL, check if it's the device managed by ↵erictian
bus driver. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9904 6f19259b-4bc3-4df7-8a09-765794883524
2010-01-111. Add missing CloseProtocol in case RemainingDevicePath is NULL or EndOfDpdavidhuang
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9707 6f19259b-4bc3-4df7-8a09-765794883524
2010-01-111. Eliminate RemainingDevicePath Type limitation, let PassThru to check its ↵davidhuang
validation. 2. Change ScsiTargetId from allocation to local variable. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9706 6f19259b-4bc3-4df7-8a09-765794883524
2009-09-151. updated PCI/AGP Devices to check RemainingDevicePath in Supported() and ↵vanjeff
Start() functions. The main changes are: a. Add check validation of RemainingDevicePath in Supported() b. In Star() function, if RemaingDevicePath is the End of Device Path Node, don't create child device and return EFI_SUCCESS. 2. fixed one device path issue in ScsiBus driver. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9264 6f19259b-4bc3-4df7-8a09-765794883524
2009-09-14updated the Bus Driver that is able to create all or one of its child ↵vanjeff
handles on each call to Start() not to create new child handle if RemainingDeviepath is the End of Device Path Node, per UEFI 2.3. The others changes include: 1. Check RemainingDevicePath at beginning of Supported(), make sure it has been verified before Start() is called. 2. Check IO protocol firstly rather than EfiDevicePathProtocolGuid, reduce the times entering into Start() function because EfiDevicePathProtocolGuid existed on most of handle. 3. If no any child device is created on last time, and RemainingDevicePath is valid Uart Devcie path, go on creating child device handle based on this RemainingDevicePath. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9262 6f19259b-4bc3-4df7-8a09-765794883524
2009-06-26Enhance error handle of BuildDevicePath for it is possible to receive other ↵gikidy
errors. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@8667 6f19259b-4bc3-4df7-8a09-765794883524
2009-05-19Fix a bug in the SCSI Bus driver due to which some SCSI devices can not be ↵rsun3
discovered. Per SCSI spec, the standard INQUIRY data shall contain at least 36 bytes and the length of the data is variable. The definition /// /// Standard INQUIRY data format /// typedef struct { UINT8 Peripheral_Type : 5; UINT8 Peripheral_Qualifier : 3; UINT8 DeviceType_Modifier : 7; UINT8 Rmb : 1; UINT8 Version; UINT8 Response_Data_Format; UINT8 Addnl_Length; UINT8 Reserved_5_95[95 - 5 + 1]; } EFI_SCSI_INQUIRY_DATA; is longer than 36 bytes and EFI_BAD_BUFFER_SIZE may be returned if the actual inquiry data is less than that of EFI_SCSI_INQUIRY_DATA. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@8329 6f19259b-4bc3-4df7-8a09-765794883524
2009-03-19R8 tracker sync:eric_tian
Our UEFI Driver supports both SCSI Passthru (SPT) and Ext SCSI Passthru (That is our driver installs both SCSI Passthru and Ext SCSI Passthru). When we unload our driver SCSI Bus driver closes only ESPT and keeps SPT open. Due to this when I load my driver second time the SPT installation will fail and now attempting to unload will either crash the system or hang the system. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@7906 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-03Code size optimized jji4
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@7415 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-17Some codes have been altered and replaced by library functions which makes ↵jji4
more efficient and rational. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@7065 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-14Code Scrubjji4
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@6543 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-10-30Patch to remove STATIC modifier. This is on longer recommended by EFI ↵jji4
Framework coding style. All duplicated symbols has been renamed accordingly. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@6296 6f19259b-4bc3-4df7-8a09-765794883524
2008-09-04clean up the un-suitable ';' location when declaring the functions.vanjeff
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@5820 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-11-20Remove debug print statement checked in inadvertently qhuang8
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@4311 6f19259b-4bc3-4df7-8a09-765794883524
2007-11-20Remove Atapi Pass Thru driver in MdeModulePkg. This module is only used for ↵qhuang8
testing. We can use this module from OptionRomPkg git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@4310 6f19259b-4bc3-4df7-8a09-765794883524
2007-10-09Clean up Network Components to support GCC build.yshang1
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@4062 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-27Make MdeModulePkg GCC clean.qwang12
It also pass ICC+IPF and MYTOOLS+EBC build. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@3711 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-07-171. Fixed tools_def.template to meet ICC build for IA32vanjeff
2. Modified some source files to meet ICC build for IA32 and IPF. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@3271 6f19259b-4bc3-4df7-8a09-765794883524
2007-07-02Porting R8's PI-enabled ScsiBus driver klu2
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@2927 6f19259b-4bc3-4df7-8a09-765794883524
2007-06-29Patch so the tree will compileAJFISH
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@2916 6f19259b-4bc3-4df7-8a09-765794883524
2007-06-29Porting ScsiBus module for Nt32Pkg.klu2
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@2876 6f19259b-4bc3-4df7-8a09-765794883524