Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge branch 'pci/aer'

- Clear stale errors on reporting agents upon probe so they don't look like
recent errors (Lukas Wunner)

* pci/aer:
PCI/AER: Clear stale errors on reporting agents upon probe

+25 -1
+25 -1
drivers/pci/pcie/aer.c
··· 1608 1608 pci_write_config_dword(pdev, aer + PCI_ERR_ROOT_COMMAND, reg32); 1609 1609 } 1610 1610 1611 + static int clear_status_iter(struct pci_dev *dev, void *data) 1612 + { 1613 + u16 devctl; 1614 + 1615 + /* Skip if pci_enable_pcie_error_reporting() hasn't been called yet */ 1616 + pcie_capability_read_word(dev, PCI_EXP_DEVCTL, &devctl); 1617 + if (!(devctl & PCI_EXP_AER_FLAGS)) 1618 + return 0; 1619 + 1620 + pci_aer_clear_status(dev); 1621 + pcie_clear_device_status(dev); 1622 + return 0; 1623 + } 1624 + 1611 1625 /** 1612 1626 * aer_enable_rootport - enable Root Port's interrupts when receiving messages 1613 1627 * @rpc: pointer to a Root Port data structure ··· 1643 1629 pcie_capability_clear_word(pdev, PCI_EXP_RTCTL, 1644 1630 SYSTEM_ERROR_INTR_ON_MESG_MASK); 1645 1631 1646 - /* Clear error status */ 1632 + /* Clear error status of this Root Port or RCEC */ 1647 1633 pci_read_config_dword(pdev, aer + PCI_ERR_ROOT_STATUS, &reg32); 1648 1634 pci_write_config_dword(pdev, aer + PCI_ERR_ROOT_STATUS, reg32); 1635 + 1636 + /* Clear error status of agents reporting to this Root Port or RCEC */ 1637 + if (reg32 & AER_ERR_STATUS_MASK) { 1638 + if (pci_pcie_type(pdev) == PCI_EXP_TYPE_RC_EC) 1639 + pcie_walk_rcec(pdev, clear_status_iter, NULL); 1640 + else if (pdev->subordinate) 1641 + pci_walk_bus(pdev->subordinate, clear_status_iter, 1642 + NULL); 1643 + } 1644 + 1649 1645 pci_read_config_dword(pdev, aer + PCI_ERR_COR_STATUS, &reg32); 1650 1646 pci_write_config_dword(pdev, aer + PCI_ERR_COR_STATUS, reg32); 1651 1647 pci_read_config_dword(pdev, aer + PCI_ERR_UNCOR_STATUS, &reg32);