audk/MdeModulePkg/Bus/Pci
Star Zeng aa4240edff MdeModulePkg SataControllerDxe: Calculate ChannelCount based on PI value
Current code calculates ChannelCount based on CAP(NP) value.
It only works when the ports implemented number are <= CAP(NP),
for example, platform has CAP(NP) = 5 (means 6 ports) and ports
implemented are 0, 1, 2, 3, 4 and 5.

But we have some platform that has CAP(NP) = 1 (means 2 ports) and
ports implemented are 1 and 2, and has no port 0 implemented, then
current code does not work.

This patch updates the code to calculate ChannelCount based on PI value.

Cc: Amy Chan <amy.chan@intel.com>
Cc: Hong-chihX Hsueh <hong-chihx.hsueh@intel.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Sami Mujawar <sami.mujawar@arm.com>
Cc: Ruiyu Ni <ruiyu.ni@intel.com>
Cc: Hao Wu <hao.a.wu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Hao Wu <hao.a.wu@intel.com>
Tested-by: Hong-chihX Hsueh <hong-chihx.hsueh@intel.com>
2018-07-02 16:38:13 +08:00
..
EhciDxe MdeModulePkg: Clean up source files 2018-06-28 11:19:45 +08:00
EhciPei MdeModulePkg: Clean up source files 2018-06-28 11:19:45 +08:00
IdeBusPei MdeModulePkg: Clean up source files 2018-06-28 11:19:45 +08:00
IncompatiblePciDeviceSupportDxe MdeModulePkg: Clean up source files 2018-06-28 11:19:45 +08:00
NonDiscoverablePciDeviceDxe MdeModulePkg/NonDiscoverable: fix memory override bug 2017-11-08 12:52:04 +08:00
NvmExpressDxe MdeModulePkg: Clean up source files 2018-06-28 11:19:45 +08:00
NvmExpressPei MdeModulePkg/NvmExpressPei: Add the NVME device PEI BlockIo support 2018-06-25 09:13:12 +08:00
PciBusDxe MdeModulePkg: Clean up source files 2018-06-28 11:19:45 +08:00
PciHostBridgeDxe MdeModulePkg: Clean up source files 2018-06-28 11:19:45 +08:00
PciSioSerialDxe MdeModulePkg: Clean up source files 2018-06-28 11:19:45 +08:00
SataControllerDxe MdeModulePkg SataControllerDxe: Calculate ChannelCount based on PI value 2018-07-02 16:38:13 +08:00
SdMmcPciHcDxe MdeModulePkg/SdMmcPciHcDxe: allow HC capabilities to be overridden 2018-01-30 09:25:13 +00:00
SdMmcPciHcPei MdeModulePkg: Clean up source files 2018-06-28 11:19:45 +08:00
UfsPciHcDxe MdeModulePkg: Clean up source files 2018-06-28 11:19:45 +08:00
UfsPciHcPei MdeModulePkg: Clean up source files 2018-06-28 11:19:45 +08:00
UhciDxe MdeModulePkg: Clean up source files 2018-06-28 11:19:45 +08:00
UhciPei MdeModulePkg: Clean up source files 2018-06-28 11:19:45 +08:00
XhciDxe MdeModulePkg: Clean up source files 2018-06-28 11:19:45 +08:00
XhciPei MdeModulePkg: Clean up source files 2018-06-28 11:19:45 +08:00