audk/MdeModulePkg/Bus/Pci
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
..
EhciDxe MdeModulePkg/Usb: Adjust TPL to not block async transfer during usb enum. 2015-08-06 07:13:16 +00:00
EhciPei MdeModulePkg/EhciPei: Remove unused macro 2015-06-09 03:22:18 +00:00
IdeBusPei MdeModulePkg/IdeBusPei: Add RecoveryBlockIo2 support 2015-05-20 06:30:48 +00:00
IncompatiblePciDeviceSupportDxe MdeModulePkg: Convert non DOS format files to DOS format and remove unused module UNI files. 2014-09-03 08:39:12 +00:00
NvmExpressDxe MdeModulePkg/NvmExpressDxe: Add SecurityStorageProtocol support 2015-06-16 01:04:47 +00:00
PciBusDxe MdeModulePkg: exit pci function loops early if device is not multi-function 2015-10-06 20:55:31 +00:00
UfsPciHcDxe MdeModulePkg/UfsPciHcDxe: Fix EBC build error 2015-05-29 05:33:25 +00:00
UfsPciHcPei MdeModulePkg: Add UFS (Universal Flash Storage) Stack 2015-04-29 02:42:58 +00:00
UhciDxe MdeModulePkg/Usb: Adjust TPL to not block async transfer during usb enum. 2015-08-06 07:13:16 +00:00
UhciPei MdeModulePkg: Convert non DOS format files to DOS format and remove unused module UNI files. 2014-09-03 08:39:12 +00:00
XhciDxe MdeModulePkg/Xhci: Remove TDs from transfer ring when timeout happens 2015-08-26 01:19:09 +00:00
XhciPei MdeModulePkg/Xhci: Remove TDs from transfer ring when timeout happens 2015-08-26 01:19:09 +00:00