Lines Matching full:aer

3  * Implement the AER root port service driver. The driver registers an IRQ
4 * handler. When a root port triggers an AER interrupt, the IRQ handler
15 #define pr_fmt(fmt) "AER: " fmt
53 /* AER stats for the device */
57 * Fields for all AER capable devices. They indicate the errors
59 * end point is causing problems, the AER counters may increment
145 int aer = dev->aer_cap; in enable_ecrc_checking() local
148 if (!aer) in enable_ecrc_checking()
151 pci_read_config_dword(dev, aer + PCI_ERR_CAP, &reg32); in enable_ecrc_checking()
156 pci_write_config_dword(dev, aer + PCI_ERR_CAP, reg32); in enable_ecrc_checking()
169 int aer = dev->aer_cap; in disable_ecrc_checking() local
172 if (!aer) in disable_ecrc_checking()
175 pci_read_config_dword(dev, aer + PCI_ERR_CAP, &reg32); in disable_ecrc_checking()
177 pci_write_config_dword(dev, aer + PCI_ERR_CAP, reg32); in disable_ecrc_checking()
249 int aer = dev->aer_cap; in pci_aer_clear_nonfatal_status() local
256 pci_read_config_dword(dev, aer + PCI_ERR_UNCOR_STATUS, &status); in pci_aer_clear_nonfatal_status()
257 pci_read_config_dword(dev, aer + PCI_ERR_UNCOR_SEVER, &sev); in pci_aer_clear_nonfatal_status()
260 pci_write_config_dword(dev, aer + PCI_ERR_UNCOR_STATUS, status); in pci_aer_clear_nonfatal_status()
268 int aer = dev->aer_cap; in pci_aer_clear_fatal_status() local
275 pci_read_config_dword(dev, aer + PCI_ERR_UNCOR_STATUS, &status); in pci_aer_clear_fatal_status()
276 pci_read_config_dword(dev, aer + PCI_ERR_UNCOR_SEVER, &sev); in pci_aer_clear_fatal_status()
279 pci_write_config_dword(dev, aer + PCI_ERR_UNCOR_STATUS, status); in pci_aer_clear_fatal_status()
283 * pci_aer_raw_clear_status - Clear AER error registers.
286 * Clearing AER error status registers unconditionally, regardless of
293 int aer = dev->aer_cap; in pci_aer_raw_clear_status() local
297 if (!aer) in pci_aer_raw_clear_status()
303 pci_read_config_dword(dev, aer + PCI_ERR_ROOT_STATUS, &status); in pci_aer_raw_clear_status()
304 pci_write_config_dword(dev, aer + PCI_ERR_ROOT_STATUS, status); in pci_aer_raw_clear_status()
307 pci_read_config_dword(dev, aer + PCI_ERR_COR_STATUS, &status); in pci_aer_raw_clear_status()
308 pci_write_config_dword(dev, aer + PCI_ERR_COR_STATUS, status); in pci_aer_raw_clear_status()
310 pci_read_config_dword(dev, aer + PCI_ERR_UNCOR_STATUS, &status); in pci_aer_raw_clear_status()
311 pci_write_config_dword(dev, aer + PCI_ERR_UNCOR_STATUS, status); in pci_aer_raw_clear_status()
326 int aer = dev->aer_cap; in pci_save_aer_state() local
330 if (!aer) in pci_save_aer_state()
338 pci_read_config_dword(dev, aer + PCI_ERR_UNCOR_MASK, cap++); in pci_save_aer_state()
339 pci_read_config_dword(dev, aer + PCI_ERR_UNCOR_SEVER, cap++); in pci_save_aer_state()
340 pci_read_config_dword(dev, aer + PCI_ERR_COR_MASK, cap++); in pci_save_aer_state()
341 pci_read_config_dword(dev, aer + PCI_ERR_CAP, cap++); in pci_save_aer_state()
343 pci_read_config_dword(dev, aer + PCI_ERR_ROOT_COMMAND, cap++); in pci_save_aer_state()
348 int aer = dev->aer_cap; in pci_restore_aer_state() local
352 if (!aer) in pci_restore_aer_state()
360 pci_write_config_dword(dev, aer + PCI_ERR_UNCOR_MASK, *cap++); in pci_restore_aer_state()
361 pci_write_config_dword(dev, aer + PCI_ERR_UNCOR_SEVER, *cap++); in pci_restore_aer_state()
362 pci_write_config_dword(dev, aer + PCI_ERR_COR_MASK, *cap++); in pci_restore_aer_state()
363 pci_write_config_dword(dev, aer + PCI_ERR_CAP, *cap++); in pci_restore_aer_state()
365 pci_write_config_dword(dev, aer + PCI_ERR_ROOT_COMMAND, *cap++); in pci_restore_aer_state()
437 * AER error strings
760 struct aer_capability_regs *aer) in pci_print_aer() argument
767 status = aer->cor_status; in pci_print_aer()
768 mask = aer->cor_mask; in pci_print_aer()
770 status = aer->uncor_status; in pci_print_aer()
771 mask = aer->uncor_mask; in pci_print_aer()
782 info.first_error = PCI_ERR_CAP_FEP(aer->cap_control); in pci_print_aer()
791 aer->uncor_severity); in pci_print_aer()
794 pcie_print_tlp_log(dev, &aer->header_log, dev_fmt(" ")); in pci_print_aer()
797 aer_severity, tlp_header_valid, &aer->header_log); in pci_print_aer()
823 int aer = dev->aer_cap; in is_error_source() local
848 * We check AER status registers to find possible reporter. in is_error_source()
853 /* Check if AER is enabled */ in is_error_source()
858 if (!aer) in is_error_source()
863 pci_read_config_dword(dev, aer + PCI_ERR_COR_STATUS, &status); in is_error_source()
864 pci_read_config_dword(dev, aer + PCI_ERR_COR_MASK, &mask); in is_error_source()
866 pci_read_config_dword(dev, aer + PCI_ERR_UNCOR_STATUS, &status); in is_error_source()
867 pci_read_config_dword(dev, aer + PCI_ERR_UNCOR_MASK, &mask); in is_error_source()
946 * Note: AER must be enabled and supported by the device which must be
951 int aer = dev->aer_cap; in pci_aer_unmask_internal_errors() local
954 pci_read_config_dword(dev, aer + PCI_ERR_UNCOR_MASK, &mask); in pci_aer_unmask_internal_errors()
956 pci_write_config_dword(dev, aer + PCI_ERR_UNCOR_MASK, mask); in pci_aer_unmask_internal_errors()
958 pci_read_config_dword(dev, aer + PCI_ERR_COR_MASK, &mask); in pci_aer_unmask_internal_errors()
960 pci_write_config_dword(dev, aer + PCI_ERR_COR_MASK, mask); in pci_aer_unmask_internal_errors()
1030 * Internal errors of an RCEC indicate an AER error in an in cxl_rch_handle_error()
1085 int aer = dev->aer_cap; in pci_aer_handle_error() local
1092 if (aer) in pci_aer_handle_error()
1093 pci_write_config_dword(dev, aer + PCI_ERR_COR_STATUS, in pci_aer_handle_error()
1208 int aer = dev->aer_cap; in aer_get_device_error_info() local
1215 /* The device might not support AER */ in aer_get_device_error_info()
1216 if (!aer) in aer_get_device_error_info()
1220 pci_read_config_dword(dev, aer + PCI_ERR_COR_STATUS, in aer_get_device_error_info()
1222 pci_read_config_dword(dev, aer + PCI_ERR_COR_MASK, in aer_get_device_error_info()
1232 pci_read_config_dword(dev, aer + PCI_ERR_UNCOR_STATUS, in aer_get_device_error_info()
1234 pci_read_config_dword(dev, aer + PCI_ERR_UNCOR_MASK, in aer_get_device_error_info()
1240 pci_read_config_dword(dev, aer + PCI_ERR_CAP, &aercc); in aer_get_device_error_info()
1245 pcie_read_tlp_log(dev, aer + PCI_ERR_HEADER_LOG, in aer_get_device_error_info()
1246 aer + PCI_ERR_PREFIX_LOG, in aer_get_device_error_info()
1347 * Invoked when Root Port detects AER messages.
1354 int aer = rp->aer_cap; in aer_irq() local
1357 pci_read_config_dword(rp, aer + PCI_ERR_ROOT_STATUS, &e_src.status); in aer_irq()
1361 pci_read_config_dword(rp, aer + PCI_ERR_ROOT_ERR_SRC, &e_src.id); in aer_irq()
1362 pci_write_config_dword(rp, aer + PCI_ERR_ROOT_STATUS, e_src.status); in aer_irq()
1372 int aer = pdev->aer_cap; in aer_enable_irq() local
1376 pci_read_config_dword(pdev, aer + PCI_ERR_ROOT_COMMAND, &reg32); in aer_enable_irq()
1378 pci_write_config_dword(pdev, aer + PCI_ERR_ROOT_COMMAND, reg32); in aer_enable_irq()
1383 int aer = pdev->aer_cap; in aer_disable_irq() local
1387 pci_read_config_dword(pdev, aer + PCI_ERR_ROOT_COMMAND, &reg32); in aer_disable_irq()
1389 pci_write_config_dword(pdev, aer + PCI_ERR_ROOT_COMMAND, reg32); in aer_disable_irq()
1396 * Invoked when PCIe bus loads AER service driver.
1401 int aer = pdev->aer_cap; in aer_enable_rootport() local
1414 pci_read_config_dword(pdev, aer + PCI_ERR_ROOT_STATUS, &reg32); in aer_enable_rootport()
1415 pci_write_config_dword(pdev, aer + PCI_ERR_ROOT_STATUS, reg32); in aer_enable_rootport()
1416 pci_read_config_dword(pdev, aer + PCI_ERR_COR_STATUS, &reg32); in aer_enable_rootport()
1417 pci_write_config_dword(pdev, aer + PCI_ERR_COR_STATUS, reg32); in aer_enable_rootport()
1418 pci_read_config_dword(pdev, aer + PCI_ERR_UNCOR_STATUS, &reg32); in aer_enable_rootport()
1419 pci_write_config_dword(pdev, aer + PCI_ERR_UNCOR_STATUS, reg32); in aer_enable_rootport()
1428 * Invoked when PCIe bus unloads AER service driver.
1433 int aer = pdev->aer_cap; in aer_disable_rootport() local
1439 pci_read_config_dword(pdev, aer + PCI_ERR_ROOT_STATUS, &reg32); in aer_disable_rootport()
1440 pci_write_config_dword(pdev, aer + PCI_ERR_ROOT_STATUS, reg32); in aer_disable_rootport()
1447 * Invoked when PCI Express bus unloads or AER probe fails.
1460 * Invoked when PCI Express bus loads AER service driver.
1490 pci_err(port, "request AER IRQ %d failed\n", dev->irq); in aer_probe()
1526 int aer; in aer_root_reset() local
1532 * Only Root Ports and RCECs have AER Root Command and Root Status in aer_root_reset()
1542 * If the platform retained control of AER, an RCiEP may not have in aer_root_reset()
1546 aer = root ? root->aer_cap : 0; in aer_root_reset()
1548 if ((host->native_aer || pcie_ports_native) && aer) in aer_root_reset()
1563 if ((host->native_aer || pcie_ports_native) && aer) { in aer_root_reset()
1565 pci_read_config_dword(root, aer + PCI_ERR_ROOT_STATUS, &reg32); in aer_root_reset()
1566 pci_write_config_dword(root, aer + PCI_ERR_ROOT_STATUS, reg32); in aer_root_reset()
1575 .name = "aer",
1586 * pcie_aer_init - register AER root service driver
1588 * Invoked when AER root service driver is loaded.