root port should exhibit its AER capability and only then can
kernel PCIe subsystem load corresponding AER driver thereby enabling
it to print AER message as and when they occur. There was an issue because
of which root port wasn't exhibiting its AER capability and hence
AER messages (if any) aren't seen in the log. This patch fixes that issue
Bug
200166513
Change-Id: I3783f28f8e14d80dc87e331bf1f5059ac956a8b4
Signed-off-by: Vidya Sagar <vidyas@nvidia.com>
Reviewed-on: http://git-master/r/933829
(cherry picked from commit
544c0b29fc2f7fe3d431d30b210da3e989aec36b)
Reviewed-on: http://git-master/r/934996
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Hayden Du <haydend@nvidia.com>
unsigned int data;
PR_FUNC_LINE;
- if (!port->status)
- return;
-
data = rp_readl(port, NV_PCIE2_RP_VEND_CTL1);
if (enable)
data |= PCIE2_RP_VEND_CTL1_ERPT;
pci_rescan_bus(bus);
/* unhide AER capability */
list_for_each_entry(port, &pcie->ports, list)
- tegra_pcie_enable_aer(port, true);
+ if (port->status)
+ tegra_pcie_enable_aer(port, true);
hotplug_event = false;
return 0;
/* hide AER capability to avoid log spew */
list_for_each_entry(port, &pcie->ports, list)
- tegra_pcie_enable_aer(port, false);
+ if (port->status)
+ tegra_pcie_enable_aer(port, false);
/* remove all pcie data structures */
for_each_pci_dev(pdev) {