audk/MdeModulePkg/Bus
Joseph Shifflett 25a2664625 MdeModulePkg: exit pci function loops early if device is not multi-function
When looping through all PCI functions, code should not look for functions
1-7 if function 0 is not present or if function 0 indicates the device is
not multifunction.  Prior to this fix the code would use stale data in a
buffer to determine if a device is multifunction even if function 0 is not
present.  This fixes a code bug and provides very small performance
improvements.

PCI 2.3 Specification states: They [multifunction devices] are also
required to always implement function 0 in the device. Implementing other
functions is optional and may be assigned in any order.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Joseph Shifflett <joseph.shifflett@hpe.com>
Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18574 6f19259b-4bc3-4df7-8a09-765794883524
2015-10-06 20:55:31 +00:00
..
Ata MdeModulePkg: AtaAtapiPassThru: select master/slave around DIAG command 2015-09-22 11:18:31 +00:00
I2c/I2cDxe MdePkg, MdeModulePkg: Remove EFI_ABORTED from I2C protocols per PI spec 1.4. 2015-05-08 07:30:45 +00:00
Isa/IsaBusDxe MdeModulePkg: Add the missing module UNI files. 2015-08-28 02:46:46 +00:00
Pci MdeModulePkg: exit pci function loops early if device is not multi-function 2015-10-06 20:55:31 +00:00
Scsi MdeModulePkg: ScsiDiskDxe: adapt SectorCount when shortening transfers 2015-09-10 11:25:09 +00:00
Ufs MdeModulePkg/UfsPassThru: Fix wrong GLOBAL_REMOVE_IF_UNREFERENCED usage 2015-07-28 02:47:52 +00:00
Usb MdeModulePkg/Usb: Adjust TPL to not block async transfer during usb enum. 2015-08-06 07:13:16 +00:00