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
52 /* AER stats for the device */
56 * Fields for all AER capable devices. They indicate the errors
58 * end point is causing problems, the AER counters may increment
144 int aer = dev->aer_cap; in enable_ecrc_checking() local
147 if (!aer) in enable_ecrc_checking()
150 pci_read_config_dword(dev, aer + PCI_ERR_CAP, ®32); in enable_ecrc_checking()
155 pci_write_config_dword(dev, aer + PCI_ERR_CAP, reg32); in enable_ecrc_checking()
168 int aer = dev->aer_cap; in disable_ecrc_checking() local
171 if (!aer) in disable_ecrc_checking()
174 pci_read_config_dword(dev, aer + PCI_ERR_CAP, ®32); in disable_ecrc_checking()
176 pci_write_config_dword(dev, aer + PCI_ERR_CAP, reg32); in disable_ecrc_checking()
256 int aer = dev->aer_cap; in pci_aer_clear_nonfatal_status() local
263 pci_read_config_dword(dev, aer + PCI_ERR_UNCOR_STATUS, &status); in pci_aer_clear_nonfatal_status()
264 pci_read_config_dword(dev, aer + PCI_ERR_UNCOR_SEVER, &sev); in pci_aer_clear_nonfatal_status()
267 pci_write_config_dword(dev, aer + PCI_ERR_UNCOR_STATUS, status); in pci_aer_clear_nonfatal_status()
275 int aer = dev->aer_cap; in pci_aer_clear_fatal_status() local
282 pci_read_config_dword(dev, aer + PCI_ERR_UNCOR_STATUS, &status); in pci_aer_clear_fatal_status()
283 pci_read_config_dword(dev, aer + PCI_ERR_UNCOR_SEVER, &sev); in pci_aer_clear_fatal_status()
286 pci_write_config_dword(dev, aer + PCI_ERR_UNCOR_STATUS, status); in pci_aer_clear_fatal_status()
290 * pci_aer_raw_clear_status - Clear AER error registers.
293 * Clearing AER error status registers unconditionally, regardless of
300 int aer = dev->aer_cap; in pci_aer_raw_clear_status() local
304 if (!aer) in pci_aer_raw_clear_status()
310 pci_read_config_dword(dev, aer + PCI_ERR_ROOT_STATUS, &status); in pci_aer_raw_clear_status()
311 pci_write_config_dword(dev, aer + PCI_ERR_ROOT_STATUS, status); in pci_aer_raw_clear_status()
314 pci_read_config_dword(dev, aer + PCI_ERR_COR_STATUS, &status); in pci_aer_raw_clear_status()
315 pci_write_config_dword(dev, aer + PCI_ERR_COR_STATUS, status); in pci_aer_raw_clear_status()
317 pci_read_config_dword(dev, aer + PCI_ERR_UNCOR_STATUS, &status); in pci_aer_raw_clear_status()
318 pci_write_config_dword(dev, aer + PCI_ERR_UNCOR_STATUS, status); in pci_aer_raw_clear_status()
333 int aer = dev->aer_cap; in pci_save_aer_state() local
337 if (!aer) in pci_save_aer_state()
345 pci_read_config_dword(dev, aer + PCI_ERR_UNCOR_MASK, cap++); in pci_save_aer_state()
346 pci_read_config_dword(dev, aer + PCI_ERR_UNCOR_SEVER, cap++); in pci_save_aer_state()
347 pci_read_config_dword(dev, aer + PCI_ERR_COR_MASK, cap++); in pci_save_aer_state()
348 pci_read_config_dword(dev, aer + PCI_ERR_CAP, cap++); in pci_save_aer_state()
350 pci_read_config_dword(dev, aer + PCI_ERR_ROOT_COMMAND, cap++); in pci_save_aer_state()
355 int aer = dev->aer_cap; in pci_restore_aer_state() local
359 if (!aer) in pci_restore_aer_state()
367 pci_write_config_dword(dev, aer + PCI_ERR_UNCOR_MASK, *cap++); in pci_restore_aer_state()
368 pci_write_config_dword(dev, aer + PCI_ERR_UNCOR_SEVER, *cap++); in pci_restore_aer_state()
369 pci_write_config_dword(dev, aer + PCI_ERR_COR_MASK, *cap++); in pci_restore_aer_state()
370 pci_write_config_dword(dev, aer + PCI_ERR_CAP, *cap++); in pci_restore_aer_state()
372 pci_write_config_dword(dev, aer + PCI_ERR_ROOT_COMMAND, *cap++); in pci_restore_aer_state()
439 * AER error strings
766 struct aer_capability_regs *aer) in cper_print_aer() argument
773 status = aer->cor_status; in cper_print_aer()
774 mask = aer->cor_mask; in cper_print_aer()
776 status = aer->uncor_status; in cper_print_aer()
777 mask = aer->uncor_mask; in cper_print_aer()
788 info.first_error = PCI_ERR_CAP_FEP(aer->cap_control); in cper_print_aer()
797 aer->uncor_severity); in cper_print_aer()
800 __print_tlp_header(dev, &aer->header_log); in cper_print_aer()
803 aer_severity, tlp_header_valid, &aer->header_log); in cper_print_aer()
829 int aer = dev->aer_cap; in is_error_source() local
854 * We check AER status registers to find possible reporter. in is_error_source()
859 /* Check if AER is enabled */ in is_error_source()
864 if (!aer) in is_error_source()
869 pci_read_config_dword(dev, aer + PCI_ERR_COR_STATUS, &status); in is_error_source()
870 pci_read_config_dword(dev, aer + PCI_ERR_COR_MASK, &mask); in is_error_source()
872 pci_read_config_dword(dev, aer + PCI_ERR_UNCOR_STATUS, &status); in is_error_source()
873 pci_read_config_dword(dev, aer + PCI_ERR_UNCOR_MASK, &mask); in is_error_source()
944 int aer = dev->aer_cap; in handle_error_source() local
951 if (aer) in handle_error_source()
952 pci_write_config_dword(dev, aer + PCI_ERR_COR_STATUS, in handle_error_source()
988 pr_err("AER recover: Can not find pci_dev for %04x:%02x:%02x:%x\n", in aer_recover_work_func()
1027 pr_err("AER recover: Buffer overflow when recovering AER for %04x:%02x:%02x:%x\n", in aer_recover_queue()
1045 int aer = dev->aer_cap; in aer_get_device_error_info() local
1052 /* The device might not support AER */ in aer_get_device_error_info()
1053 if (!aer) in aer_get_device_error_info()
1057 pci_read_config_dword(dev, aer + PCI_ERR_COR_STATUS, in aer_get_device_error_info()
1059 pci_read_config_dword(dev, aer + PCI_ERR_COR_MASK, in aer_get_device_error_info()
1068 pci_read_config_dword(dev, aer + PCI_ERR_UNCOR_STATUS, in aer_get_device_error_info()
1070 pci_read_config_dword(dev, aer + PCI_ERR_UNCOR_MASK, in aer_get_device_error_info()
1076 pci_read_config_dword(dev, aer + PCI_ERR_CAP, &temp); in aer_get_device_error_info()
1082 aer + PCI_ERR_HEADER_LOG, &info->tlp.dw0); in aer_get_device_error_info()
1084 aer + PCI_ERR_HEADER_LOG + 4, &info->tlp.dw1); in aer_get_device_error_info()
1086 aer + PCI_ERR_HEADER_LOG + 8, &info->tlp.dw2); in aer_get_device_error_info()
1088 aer + PCI_ERR_HEADER_LOG + 12, &info->tlp.dw3); in aer_get_device_error_info()
1187 * Invoked when Root Port detects AER messages.
1194 int aer = rp->aer_cap; in aer_irq() local
1197 pci_read_config_dword(rp, aer + PCI_ERR_ROOT_STATUS, &e_src.status); in aer_irq()
1201 pci_read_config_dword(rp, aer + PCI_ERR_ROOT_ERR_SRC, &e_src.id); in aer_irq()
1202 pci_write_config_dword(rp, aer + PCI_ERR_ROOT_STATUS, e_src.status); in aer_irq()
1250 * Invoked when PCIe bus loads AER service driver.
1255 int aer = pdev->aer_cap; in aer_enable_rootport() local
1268 pci_read_config_dword(pdev, aer + PCI_ERR_ROOT_STATUS, ®32); in aer_enable_rootport()
1269 pci_write_config_dword(pdev, aer + PCI_ERR_ROOT_STATUS, reg32); in aer_enable_rootport()
1270 pci_read_config_dword(pdev, aer + PCI_ERR_COR_STATUS, ®32); in aer_enable_rootport()
1271 pci_write_config_dword(pdev, aer + PCI_ERR_COR_STATUS, reg32); in aer_enable_rootport()
1272 pci_read_config_dword(pdev, aer + PCI_ERR_UNCOR_STATUS, ®32); in aer_enable_rootport()
1273 pci_write_config_dword(pdev, aer + PCI_ERR_UNCOR_STATUS, reg32); in aer_enable_rootport()
1282 pci_read_config_dword(pdev, aer + PCI_ERR_ROOT_COMMAND, ®32); in aer_enable_rootport()
1284 pci_write_config_dword(pdev, aer + PCI_ERR_ROOT_COMMAND, reg32); in aer_enable_rootport()
1291 * Invoked when PCIe bus unloads AER service driver.
1296 int aer = pdev->aer_cap; in aer_disable_rootport() local
1306 pci_read_config_dword(pdev, aer + PCI_ERR_ROOT_COMMAND, ®32); in aer_disable_rootport()
1308 pci_write_config_dword(pdev, aer + PCI_ERR_ROOT_COMMAND, reg32); in aer_disable_rootport()
1311 pci_read_config_dword(pdev, aer + PCI_ERR_ROOT_STATUS, ®32); in aer_disable_rootport()
1312 pci_write_config_dword(pdev, aer + PCI_ERR_ROOT_STATUS, reg32); in aer_disable_rootport()
1319 * Invoked when PCI Express bus unloads or AER probe fails.
1332 * Invoked when PCI Express bus loads AER service driver.
1362 pci_err(port, "request AER IRQ %d failed\n", dev->irq); in aer_probe()
1381 int aer; in aer_root_reset() local
1387 aer = root->aer_cap; in aer_root_reset()
1389 if ((host->native_aer || pcie_ports_native) && aer) { in aer_root_reset()
1391 pci_read_config_dword(root, aer + PCI_ERR_ROOT_COMMAND, ®32); in aer_root_reset()
1393 pci_write_config_dword(root, aer + PCI_ERR_ROOT_COMMAND, reg32); in aer_root_reset()
1409 if ((host->native_aer || pcie_ports_native) && aer) { in aer_root_reset()
1411 pci_read_config_dword(root, aer + PCI_ERR_ROOT_STATUS, ®32); in aer_root_reset()
1412 pci_write_config_dword(root, aer + PCI_ERR_ROOT_STATUS, reg32); in aer_root_reset()
1415 pci_read_config_dword(root, aer + PCI_ERR_ROOT_COMMAND, ®32); in aer_root_reset()
1417 pci_write_config_dword(root, aer + PCI_ERR_ROOT_COMMAND, reg32); in aer_root_reset()
1424 .name = "aer",
1433 * aer_service_init - register AER root service driver
1435 * Invoked when AER root service driver is loaded.