• Home
  • Raw
  • Download

Lines Matching +full:rpc +full:- +full:if

1 // SPDX-License-Identifier: GPL-2.0
11 * (C) Copyright 2009 Hewlett-Packard Development Company, L.P.
17 #include <linux/pci-acpi.h>
67 * "as seen by this device". Note that this may mean that if an
141 * enable_ercr_checking - enable PCIe ECRC checking for a device
151 if (!pci_is_pcie(dev)) in enable_ecrc_checking()
152 return -ENODEV; in enable_ecrc_checking()
154 pos = dev->aer_cap; in enable_ecrc_checking()
155 if (!pos) in enable_ecrc_checking()
156 return -ENODEV; in enable_ecrc_checking()
159 if (reg32 & PCI_ERR_CAP_ECRC_GENC) in enable_ecrc_checking()
161 if (reg32 & PCI_ERR_CAP_ECRC_CHKC) in enable_ecrc_checking()
169 * disable_ercr_checking - disables PCIe ECRC checking for a device
179 if (!pci_is_pcie(dev)) in disable_ecrc_checking()
180 return -ENODEV; in disable_ecrc_checking()
182 pos = dev->aer_cap; in disable_ecrc_checking()
183 if (!pos) in disable_ecrc_checking()
184 return -ENODEV; in disable_ecrc_checking()
194 * pcie_set_ecrc_checking - set/unset PCIe ECRC checking for a device based on global policy
214 * pcie_ecrc_get_policy - parse kernel command-line ecrc option
221 if (!strncmp(str, ecrc_policy_str[i], in pcie_ecrc_get_policy()
224 if (i >= ARRAY_SIZE(ecrc_policy_str)) in pcie_ecrc_get_policy()
235 return ACPI_HEST_SEGMENT(p->bus) == pci_domain_nr(pci->bus) && in hest_match_pci()
236 ACPI_HEST_BUS(p->bus) == pci->bus->number && in hest_match_pci()
237 p->device == PCI_SLOT(pci->devfn) && in hest_match_pci()
238 p->function == PCI_FUNC(pci->devfn); in hest_match_pci()
244 u16 hest_type = hest_hdr->type; in hest_match_type()
247 if ((hest_type == ACPI_HEST_TYPE_AER_ROOT_PORT && in hest_match_type()
252 (dev->class >> 16) == PCI_BASE_CLASS_BRIDGE)) in hest_match_type()
264 if (hest_hdr->type == ACPI_HEST_TYPE_AER_ROOT_PORT || in hest_source_is_pcie_aer()
265 hest_hdr->type == ACPI_HEST_TYPE_AER_ENDPOINT || in hest_source_is_pcie_aer()
266 hest_hdr->type == ACPI_HEST_TYPE_AER_BRIDGE) in hest_source_is_pcie_aer()
277 if (!hest_source_is_pcie_aer(hest_hdr)) in aer_hest_parse()
281 ff = !!(p->flags & ACPI_HEST_FIRMWARE_FIRST); in aer_hest_parse()
284 * If no specific device is supplied, determine whether in aer_hest_parse()
287 if (!info->pci_dev) { in aer_hest_parse()
288 info->firmware_first |= ff; in aer_hest_parse()
293 if (p->flags & ACPI_HEST_GLOBAL) { in aer_hest_parse()
294 if (hest_match_type(hest_hdr, info->pci_dev)) in aer_hest_parse()
295 info->firmware_first = ff; in aer_hest_parse()
297 if (hest_match_pci(p, info->pci_dev)) in aer_hest_parse()
298 info->firmware_first = ff; in aer_hest_parse()
313 if (rc) in aer_set_firmware_first()
314 pci_dev->__aer_firmware_first = 0; in aer_set_firmware_first()
316 pci_dev->__aer_firmware_first = info.firmware_first; in aer_set_firmware_first()
317 pci_dev->__aer_firmware_first_valid = 1; in aer_set_firmware_first()
322 if (!pci_is_pcie(dev)) in pcie_aer_get_firmware_first()
325 if (pcie_ports_native) in pcie_aer_get_firmware_first()
328 if (!dev->__aer_firmware_first_valid) in pcie_aer_get_firmware_first()
330 return dev->__aer_firmware_first; in pcie_aer_get_firmware_first()
336 * aer_acpi_firmware_first - Check if APEI should control AER.
346 if (pcie_ports_native) in aer_acpi_firmware_first()
349 if (!parsed) { in aer_acpi_firmware_first()
363 if (pcie_aer_get_firmware_first(dev)) in pci_enable_pcie_error_reporting()
364 return -EIO; in pci_enable_pcie_error_reporting()
366 if (!dev->aer_cap) in pci_enable_pcie_error_reporting()
367 return -EIO; in pci_enable_pcie_error_reporting()
375 if (pcie_aer_get_firmware_first(dev)) in pci_disable_pcie_error_reporting()
376 return -EIO; in pci_disable_pcie_error_reporting()
396 pos = dev->aer_cap; in pci_cleanup_aer_uncorrect_error_status()
397 if (!pos) in pci_cleanup_aer_uncorrect_error_status()
398 return -EIO; in pci_cleanup_aer_uncorrect_error_status()
400 if (pcie_aer_get_firmware_first(dev)) in pci_cleanup_aer_uncorrect_error_status()
401 return -EIO; in pci_cleanup_aer_uncorrect_error_status()
407 if (status) in pci_cleanup_aer_uncorrect_error_status()
419 pos = dev->aer_cap; in pci_aer_clear_fatal_status()
420 if (!pos) in pci_aer_clear_fatal_status()
423 if (pcie_aer_get_firmware_first(dev)) in pci_aer_clear_fatal_status()
430 if (status) in pci_aer_clear_fatal_status()
440 if (!pci_is_pcie(dev)) in pci_cleanup_aer_error_status_regs()
441 return -ENODEV; in pci_cleanup_aer_error_status_regs()
443 pos = dev->aer_cap; in pci_cleanup_aer_error_status_regs()
444 if (!pos) in pci_cleanup_aer_error_status_regs()
445 return -EIO; in pci_cleanup_aer_error_status_regs()
447 if (pcie_aer_get_firmware_first(dev)) in pci_cleanup_aer_error_status_regs()
448 return -EIO; in pci_cleanup_aer_error_status_regs()
451 if (port_type == PCI_EXP_TYPE_ROOT_PORT) { in pci_cleanup_aer_error_status_regs()
467 dev->aer_cap = pci_find_ext_capability(dev, PCI_EXT_CAP_ID_ERR); in pci_aer_init()
469 if (dev->aer_cap) in pci_aer_init()
470 dev->aer_stats = kzalloc(sizeof(struct aer_stats), GFP_KERNEL); in pci_aer_init()
477 kfree(dev->aer_stats); in pci_aer_exit()
478 dev->aer_stats = NULL; in pci_aer_exit()
520 "Uncorrected (Non-Fatal)",
595 u64 *stats = pdev->aer_stats->stats_array; \
598 if (strings_array[i]) \
601 else if (stats[i]) \
606 pdev->aer_stats->total_field); \
607 return str-buf; \
627 return sprintf(buf, "%llu\n", pdev->aer_stats->field); \
654 if (!pdev->aer_stats) in aer_stats_attrs_are_visible()
657 if ((a == &dev_attr_aer_rootport_total_err_cor.attr || in aer_stats_attrs_are_visible()
663 return a->mode; in aer_stats_attrs_are_visible()
674 int status, i, max = -1; in pci_dev_aer_stats_incr()
676 struct aer_stats *aer_stats = pdev->aer_stats; in pci_dev_aer_stats_incr()
678 if (!aer_stats) in pci_dev_aer_stats_incr()
681 switch (info->severity) { in pci_dev_aer_stats_incr()
683 aer_stats->dev_total_cor_errs++; in pci_dev_aer_stats_incr()
684 counter = &aer_stats->dev_cor_errs[0]; in pci_dev_aer_stats_incr()
688 aer_stats->dev_total_nonfatal_errs++; in pci_dev_aer_stats_incr()
689 counter = &aer_stats->dev_nonfatal_errs[0]; in pci_dev_aer_stats_incr()
693 aer_stats->dev_total_fatal_errs++; in pci_dev_aer_stats_incr()
694 counter = &aer_stats->dev_fatal_errs[0]; in pci_dev_aer_stats_incr()
699 status = (info->status & ~info->mask); in pci_dev_aer_stats_incr()
701 if (status & (1 << i)) in pci_dev_aer_stats_incr()
708 struct aer_stats *aer_stats = pdev->aer_stats; in pci_rootport_aer_stats_incr()
710 if (!aer_stats) in pci_rootport_aer_stats_incr()
713 if (e_src->status & PCI_ERR_ROOT_COR_RCV) in pci_rootport_aer_stats_incr()
714 aer_stats->rootport_total_cor_errs++; in pci_rootport_aer_stats_incr()
716 if (e_src->status & PCI_ERR_ROOT_UNCOR_RCV) { in pci_rootport_aer_stats_incr()
717 if (e_src->status & PCI_ERR_ROOT_FATAL_RCV) in pci_rootport_aer_stats_incr()
718 aer_stats->rootport_total_fatal_errs++; in pci_rootport_aer_stats_incr()
720 aer_stats->rootport_total_nonfatal_errs++; in pci_rootport_aer_stats_incr()
728 t->dw0, t->dw1, t->dw2, t->dw3); in __print_tlp_header()
736 status = (info->status & ~info->mask); in __aer_print_error()
739 if (!(status & (1 << i))) in __aer_print_error()
742 if (info->severity == AER_CORRECTABLE) in __aer_print_error()
749 if (errmsg) in __aer_print_error()
750 pci_err(dev, " [%2d] %-22s%s\n", i, errmsg, in __aer_print_error()
751 info->first_error == i ? " (First)" : ""); in __aer_print_error()
754 i, info->first_error == i ? " (First)" : ""); in __aer_print_error()
762 int id = ((dev->bus->number << 8) | dev->devfn); in aer_print_error()
764 if (!info->status) { in aer_print_error()
766 aer_error_severity_string[info->severity]); in aer_print_error()
770 layer = AER_GET_LAYER_ERROR(info->severity, info->status); in aer_print_error()
771 agent = AER_GET_AGENT(info->severity, info->status); in aer_print_error()
774 aer_error_severity_string[info->severity], in aer_print_error()
778 dev->vendor, dev->device, in aer_print_error()
779 info->status, info->mask); in aer_print_error()
783 if (info->tlp_header_valid) in aer_print_error()
784 __print_tlp_header(dev, &info->tlp); in aer_print_error()
787 if (info->id && info->error_dev_num > 1 && info->id == id) in aer_print_error()
790 trace_aer_event(dev_name(&dev->dev), (info->status & ~info->mask), in aer_print_error()
791 info->severity, info->tlp_header_valid, &info->tlp); in aer_print_error()
796 u8 bus = info->id >> 8; in aer_print_port_info()
797 u8 devfn = info->id & 0xff; in aer_print_port_info()
800 info->multi_error_valid ? "Multiple " : "", in aer_print_port_info()
801 aer_error_severity_string[info->severity], in aer_print_port_info()
802 pci_domain_nr(dev->bus), bus, PCI_SLOT(devfn), PCI_FUNC(devfn)); in aer_print_port_info()
826 if (aer_severity == AER_CORRECTABLE) { in cper_print_aer()
827 status = aer->cor_status; in cper_print_aer()
828 mask = aer->cor_mask; in cper_print_aer()
830 status = aer->uncor_status; in cper_print_aer()
831 mask = aer->uncor_mask; in cper_print_aer()
842 info.first_error = PCI_ERR_CAP_FEP(aer->cap_control); in cper_print_aer()
849 if (aer_severity != AER_CORRECTABLE) in cper_print_aer()
851 aer->uncor_severity); in cper_print_aer()
853 if (tlp_header_valid) in cper_print_aer()
854 __print_tlp_header(dev, &aer->header_log); in cper_print_aer()
856 trace_aer_event(dev_name(&dev->dev), (status & ~mask), in cper_print_aer()
857 aer_severity, tlp_header_valid, &aer->header_log); in cper_print_aer()
862 * add_error_device - list device to be handled
868 if (e_info->error_dev_num < AER_MAX_MULTI_ERR_DEVICES) { in add_error_device()
869 e_info->dev[e_info->error_dev_num] = pci_dev_get(dev); in add_error_device()
870 e_info->error_dev_num++; in add_error_device()
873 return -ENOSPC; in add_error_device()
877 * is_error_source - check whether the device is source of reported error
891 if ((PCI_BUS_NUM(e_info->id) != 0) && in is_error_source()
892 !(dev->bus->bus_flags & PCI_BUS_FLAGS_NO_AERSID)) { in is_error_source()
894 if (e_info->id == ((dev->bus->number << 8) | dev->devfn)) in is_error_source()
897 /* Continue id comparing if there is no multiple error */ in is_error_source()
898 if (!e_info->multi_error_valid) in is_error_source()
910 if (atomic_read(&dev->enable_cnt) == 0) in is_error_source()
913 /* Check if AER is enabled */ in is_error_source()
915 if (!(reg16 & PCI_EXP_AER_FLAGS)) in is_error_source()
918 pos = dev->aer_cap; in is_error_source()
919 if (!pos) in is_error_source()
922 /* Check if error is recorded */ in is_error_source()
923 if (e_info->severity == AER_CORRECTABLE) { in is_error_source()
930 if (status & ~mask) in is_error_source()
940 if (is_error_source(dev, e_info)) { in find_device_iter()
942 if (add_error_device(e_info, dev)) { in find_device_iter()
948 /* If there is only a single error, stop iteration */ in find_device_iter()
949 if (!e_info->multi_error_valid) in find_device_iter()
956 * find_source_device - search through device hierarchy for source device
960 * Return true if found.
965 * e_info->error_dev_num and e_info->dev[], based on the given information.
974 e_info->error_dev_num = 0; in find_source_device()
978 if (result) in find_source_device()
981 pci_walk_bus(parent->subordinate, find_device_iter, e_info); in find_source_device()
983 if (!e_info->error_dev_num) { in find_source_device()
985 e_info->id); in find_source_device()
992 * handle_error_source - handle logging error into an event log
1002 if (info->severity == AER_CORRECTABLE) { in handle_error_source()
1007 pos = dev->aer_cap; in handle_error_source()
1008 if (pos) in handle_error_source()
1010 info->status); in handle_error_source()
1012 } else if (info->severity == AER_NONFATAL) in handle_error_source()
1014 else if (info->severity == AER_FATAL) in handle_error_source()
1043 if (!pdev) { in aer_recover_work_func()
1050 if (entry.severity == AER_NONFATAL) in aer_recover_work_func()
1052 else if (entry.severity == AER_FATAL) in aer_recover_work_func()
1079 if (kfifo_put(&aer_recover_ring, entry)) in aer_recover_queue()
1090 * aer_get_device_error_info - read error status from dev and store it to info
1103 info->status = 0; in aer_get_device_error_info()
1104 info->tlp_header_valid = 0; in aer_get_device_error_info()
1106 pos = dev->aer_cap; in aer_get_device_error_info()
1109 if (!pos) in aer_get_device_error_info()
1112 if (info->severity == AER_CORRECTABLE) { in aer_get_device_error_info()
1114 &info->status); in aer_get_device_error_info()
1116 &info->mask); in aer_get_device_error_info()
1117 if (!(info->status & ~info->mask)) in aer_get_device_error_info()
1119 } else if (pci_pcie_type(dev) == PCI_EXP_TYPE_ROOT_PORT || in aer_get_device_error_info()
1121 info->severity == AER_NONFATAL) { in aer_get_device_error_info()
1125 &info->status); in aer_get_device_error_info()
1127 &info->mask); in aer_get_device_error_info()
1128 if (!(info->status & ~info->mask)) in aer_get_device_error_info()
1133 info->first_error = PCI_ERR_CAP_FEP(temp); in aer_get_device_error_info()
1135 if (info->status & AER_LOG_TLP_MASKS) { in aer_get_device_error_info()
1136 info->tlp_header_valid = 1; in aer_get_device_error_info()
1138 pos + PCI_ERR_HEADER_LOG, &info->tlp.dw0); in aer_get_device_error_info()
1140 pos + PCI_ERR_HEADER_LOG + 4, &info->tlp.dw1); in aer_get_device_error_info()
1142 pos + PCI_ERR_HEADER_LOG + 8, &info->tlp.dw2); in aer_get_device_error_info()
1144 pos + PCI_ERR_HEADER_LOG + 12, &info->tlp.dw3); in aer_get_device_error_info()
1156 for (i = 0; i < e_info->error_dev_num && e_info->dev[i]; i++) { in aer_process_err_devices()
1157 if (aer_get_device_error_info(e_info->dev[i], e_info)) in aer_process_err_devices()
1158 aer_print_error(e_info->dev[i], e_info); in aer_process_err_devices()
1160 for (i = 0; i < e_info->error_dev_num && e_info->dev[i]; i++) { in aer_process_err_devices()
1161 if (aer_get_device_error_info(e_info->dev[i], e_info)) in aer_process_err_devices()
1162 handle_error_source(e_info->dev[i], e_info); in aer_process_err_devices()
1167 * aer_isr_one_error - consume an error detected by root port
1168 * @rpc: pointer to the root port which holds an error
1171 static void aer_isr_one_error(struct aer_rpc *rpc, in aer_isr_one_error() argument
1174 struct pci_dev *pdev = rpc->rpd; in aer_isr_one_error()
1175 struct aer_err_info *e_info = &rpc->e_info; in aer_isr_one_error()
1183 if (e_src->status & PCI_ERR_ROOT_COR_RCV) { in aer_isr_one_error()
1184 e_info->id = ERR_COR_ID(e_src->id); in aer_isr_one_error()
1185 e_info->severity = AER_CORRECTABLE; in aer_isr_one_error()
1187 if (e_src->status & PCI_ERR_ROOT_MULTI_COR_RCV) in aer_isr_one_error()
1188 e_info->multi_error_valid = 1; in aer_isr_one_error()
1190 e_info->multi_error_valid = 0; in aer_isr_one_error()
1193 if (find_source_device(pdev, e_info)) in aer_isr_one_error()
1197 if (e_src->status & PCI_ERR_ROOT_UNCOR_RCV) { in aer_isr_one_error()
1198 e_info->id = ERR_UNCOR_ID(e_src->id); in aer_isr_one_error()
1200 if (e_src->status & PCI_ERR_ROOT_FATAL_RCV) in aer_isr_one_error()
1201 e_info->severity = AER_FATAL; in aer_isr_one_error()
1203 e_info->severity = AER_NONFATAL; in aer_isr_one_error()
1205 if (e_src->status & PCI_ERR_ROOT_MULTI_UNCOR_RCV) in aer_isr_one_error()
1206 e_info->multi_error_valid = 1; in aer_isr_one_error()
1208 e_info->multi_error_valid = 0; in aer_isr_one_error()
1212 if (find_source_device(pdev, e_info)) in aer_isr_one_error()
1218 * get_e_source - retrieve an error source
1219 * @rpc: pointer to the root port which holds an error
1222 * Return 1 if an error source is retrieved, otherwise 0.
1226 static int get_e_source(struct aer_rpc *rpc, struct aer_err_source *e_src) in get_e_source() argument
1231 spin_lock_irqsave(&rpc->e_lock, flags); in get_e_source()
1232 if (rpc->prod_idx == rpc->cons_idx) { in get_e_source()
1233 spin_unlock_irqrestore(&rpc->e_lock, flags); in get_e_source()
1237 *e_src = rpc->e_sources[rpc->cons_idx]; in get_e_source()
1238 rpc->cons_idx++; in get_e_source()
1239 if (rpc->cons_idx == AER_ERROR_SOURCES_MAX) in get_e_source()
1240 rpc->cons_idx = 0; in get_e_source()
1241 spin_unlock_irqrestore(&rpc->e_lock, flags); in get_e_source()
1247 * aer_isr - consume errors detected by root port
1254 struct aer_rpc *rpc = container_of(work, struct aer_rpc, dpc_handler); in aer_isr() local
1257 mutex_lock(&rpc->rpc_mutex); in aer_isr()
1258 while (get_e_source(rpc, &e_src)) in aer_isr()
1259 aer_isr_one_error(rpc, &e_src); in aer_isr()
1260 mutex_unlock(&rpc->rpc_mutex); in aer_isr()
1264 * aer_irq - Root Port's ISR
1274 struct aer_rpc *rpc = get_service_data(pdev); in aer_irq() local
1279 pos = pdev->port->aer_cap; in aer_irq()
1284 spin_lock_irqsave(&rpc->e_lock, flags); in aer_irq()
1287 pci_read_config_dword(pdev->port, pos + PCI_ERR_ROOT_STATUS, &status); in aer_irq()
1288 if (!(status & (PCI_ERR_ROOT_UNCOR_RCV|PCI_ERR_ROOT_COR_RCV))) { in aer_irq()
1289 spin_unlock_irqrestore(&rpc->e_lock, flags); in aer_irq()
1294 pci_read_config_dword(pdev->port, pos + PCI_ERR_ROOT_ERR_SRC, &id); in aer_irq()
1295 pci_write_config_dword(pdev->port, pos + PCI_ERR_ROOT_STATUS, status); in aer_irq()
1298 next_prod_idx = rpc->prod_idx + 1; in aer_irq()
1299 if (next_prod_idx == AER_ERROR_SOURCES_MAX) in aer_irq()
1301 if (next_prod_idx == rpc->cons_idx) { in aer_irq()
1303 * Error Storm Condition - possibly the same error occurred. in aer_irq()
1306 spin_unlock_irqrestore(&rpc->e_lock, flags); in aer_irq()
1309 rpc->e_sources[rpc->prod_idx].status = status; in aer_irq()
1310 rpc->e_sources[rpc->prod_idx].id = id; in aer_irq()
1311 rpc->prod_idx = next_prod_idx; in aer_irq()
1312 spin_unlock_irqrestore(&rpc->e_lock, flags); in aer_irq()
1315 schedule_work(&rpc->dpc_handler); in aer_irq()
1326 if ((type == PCI_EXP_TYPE_ROOT_PORT) || in set_device_error_reporting()
1329 if (enable) in set_device_error_reporting()
1335 if (enable) in set_device_error_reporting()
1342 …* set_downstream_devices_error_reporting - enable/disable the error reporting bits on the root po…
1351 if (!dev->subordinate) in set_downstream_devices_error_reporting()
1353 pci_walk_bus(dev->subordinate, set_device_error_reporting, &enable); in set_downstream_devices_error_reporting()
1357 * aer_enable_rootport - enable Root Port's interrupts when receiving messages
1358 * @rpc: pointer to a Root Port data structure
1362 static void aer_enable_rootport(struct aer_rpc *rpc) in aer_enable_rootport() argument
1364 struct pci_dev *pdev = rpc->rpd; in aer_enable_rootport()
1377 aer_pos = pdev->aer_cap; in aer_enable_rootport()
1399 * aer_disable_rootport - disable Root Port's interrupts when receiving messages
1400 * @rpc: pointer to a Root Port data structure
1404 static void aer_disable_rootport(struct aer_rpc *rpc) in aer_disable_rootport() argument
1406 struct pci_dev *pdev = rpc->rpd; in aer_disable_rootport()
1416 pos = pdev->aer_cap; in aer_disable_rootport()
1428 * aer_alloc_rpc - allocate Root Port data structure
1435 struct aer_rpc *rpc; in aer_alloc_rpc() local
1437 rpc = kzalloc(sizeof(struct aer_rpc), GFP_KERNEL); in aer_alloc_rpc()
1438 if (!rpc) in aer_alloc_rpc()
1442 spin_lock_init(&rpc->e_lock); in aer_alloc_rpc()
1444 rpc->rpd = dev->port; in aer_alloc_rpc()
1445 INIT_WORK(&rpc->dpc_handler, aer_isr); in aer_alloc_rpc()
1446 mutex_init(&rpc->rpc_mutex); in aer_alloc_rpc()
1448 /* Use PCIe bus function to store rpc into PCIe device */ in aer_alloc_rpc()
1449 set_service_data(dev, rpc); in aer_alloc_rpc()
1451 return rpc; in aer_alloc_rpc()
1455 * aer_remove - clean up resources
1462 struct aer_rpc *rpc = get_service_data(dev); in aer_remove() local
1464 if (rpc) { in aer_remove()
1465 /* If register interrupt service, it must be free. */ in aer_remove()
1466 if (rpc->isr) in aer_remove()
1467 free_irq(dev->irq, dev); in aer_remove()
1469 flush_work(&rpc->dpc_handler); in aer_remove()
1470 aer_disable_rootport(rpc); in aer_remove()
1471 kfree(rpc); in aer_remove()
1477 * aer_probe - initialize resources
1485 struct aer_rpc *rpc; in aer_probe() local
1486 struct device *device = &dev->port->dev; in aer_probe()
1488 /* Alloc rpc data structure */ in aer_probe()
1489 rpc = aer_alloc_rpc(dev); in aer_probe()
1490 if (!rpc) { in aer_probe()
1491 dev_printk(KERN_DEBUG, device, "alloc AER rpc failed\n"); in aer_probe()
1493 return -ENOMEM; in aer_probe()
1497 status = request_irq(dev->irq, aer_irq, IRQF_SHARED, "aerdrv", dev); in aer_probe()
1498 if (status) { in aer_probe()
1500 dev->irq); in aer_probe()
1505 rpc->isr = 1; in aer_probe()
1507 aer_enable_rootport(rpc); in aer_probe()
1508 dev_info(device, "AER enabled with IRQ %d\n", dev->irq); in aer_probe()
1513 * aer_root_reset - reset link on Root Port
1524 pos = dev->aer_cap; in aer_root_reset()
1547 * aer_error_resume - clean up corresponding error status bits
1570 * aer_service_init - register AER root service driver
1576 if (!pci_aer_available() || aer_acpi_firmware_first()) in pcie_aer_init()
1577 return -ENXIO; in pcie_aer_init()