Skip to content

Commit d75ccd4

Browse files
ming4lidavejiang
authored andcommitted
cxl/pci: Remove duplicate host_bridge->native_aer checking
cxl_dport_init_ras_reporting() already checks host_bridge->native_aer before invoking cxl_disable_rch_root_ints(), so cxl_disable_rch_root_ints() does not need to check it again. Signed-off-by: Li Ming <[email protected]> Reviewed-by: Jonathan Cameron <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Dave Jiang <[email protected]>
1 parent c8706cc commit d75ccd4

File tree

1 file changed

+6
-11
lines changed

1 file changed

+6
-11
lines changed

drivers/cxl/core/pci.c

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -800,14 +800,11 @@ static void cxl_dport_map_ras(struct cxl_dport *dport)
800800
static void cxl_disable_rch_root_ints(struct cxl_dport *dport)
801801
{
802802
void __iomem *aer_base = dport->regs.dport_aer;
803-
struct pci_host_bridge *bridge;
804803
u32 aer_cmd_mask, aer_cmd;
805804

806805
if (!aer_base)
807806
return;
808807

809-
bridge = to_pci_host_bridge(dport->dport_dev);
810-
811808
/*
812809
* Disable RCH root port command interrupts.
813810
* CXL 3.0 12.2.1.1 - RCH Downstream Port-detected Errors
@@ -816,14 +813,12 @@ static void cxl_disable_rch_root_ints(struct cxl_dport *dport)
816813
* the root cmd register's interrupts is required. But, PCI spec
817814
* shows these are disabled by default on reset.
818815
*/
819-
if (bridge->native_aer) {
820-
aer_cmd_mask = (PCI_ERR_ROOT_CMD_COR_EN |
821-
PCI_ERR_ROOT_CMD_NONFATAL_EN |
822-
PCI_ERR_ROOT_CMD_FATAL_EN);
823-
aer_cmd = readl(aer_base + PCI_ERR_ROOT_COMMAND);
824-
aer_cmd &= ~aer_cmd_mask;
825-
writel(aer_cmd, aer_base + PCI_ERR_ROOT_COMMAND);
826-
}
816+
aer_cmd_mask = (PCI_ERR_ROOT_CMD_COR_EN |
817+
PCI_ERR_ROOT_CMD_NONFATAL_EN |
818+
PCI_ERR_ROOT_CMD_FATAL_EN);
819+
aer_cmd = readl(aer_base + PCI_ERR_ROOT_COMMAND);
820+
aer_cmd &= ~aer_cmd_mask;
821+
writel(aer_cmd, aer_base + PCI_ERR_ROOT_COMMAND);
827822
}
828823

829824
/**

0 commit comments

Comments
 (0)