- Use pci_channel_state_t instead of enum pci_channel_state (Luc Van Oostenryck) - Simplify __aer_print_error() (Bjorn Helgaas) - Log AER correctable errors as warning, not error (Matt Jolly) - Rename pci_aer_clear_device_status() to pcie_clear_device_status() (Bjorn Helgaas) - Clear PCIe Device Status errors only if OS owns AER (Jonathan Cameron) * pci/error: PCI/ERR: Clear PCIe Device Status errors only if OS owns AER PCI/ERR: Rename pci_aer_clear_device_status() to pcie_clear_device_status() PCI/AER: Log correctable errors as warning, not error PCI/AER: Simplify __aer_print_error() PCI: Use 'pci_channel_state_t' instead of 'enum pci_channel_state'
Unified · Split
| @@ -79,7 +79,7 @@ This structure has the form:: · 78 unmodified lines | ||
| 79 | 79 | |
| 80 | 80 | struct pci_error_handlers |
| 81 | 81 | { |
| 82 | − int (*error_detected)(struct pci_dev *dev, enum pci_channel_state); | |
| 82 | + int (*error_detected)(struct pci_dev *dev, pci_channel_state_t); | |
| 83 | 83 | int (*mmio_enabled)(struct pci_dev *dev); |
| 84 | 84 | int (*slot_reset)(struct pci_dev *dev); |
| 85 | 85 | void (*resume)(struct pci_dev *dev); |
| @@ -87,11 +87,11 @@ This structure has the form:: · 1 unmodified line | ||
| 87 | 87 | |
| 88 | 88 | The possible channel states are:: |
| 89 | 89 | |
| 90 | − enum pci_channel_state { | |
| 90 | + typedef enum { | |
| 91 | 91 | pci_channel_io_normal, /* I/O channel is in normal state */ |
| 92 | 92 | pci_channel_io_frozen, /* I/O to channel is blocked */ |
| 93 | 93 | pci_channel_io_perm_failure, /* PCI card is dead */ |
| 94 | − }; | |
| 94 | + } pci_channel_state_t; | |
| 95 | 95 | |
| 96 | 96 | Possible return values are:: |
| 97 | 97 | |
| @@ -348,7 +348,7 @@ STEP 6: Permanent Failure · 250 unmodified lines | ||
| 348 | 348 | ------------------------- |
| 349 | 349 | A "permanent failure" has occurred, and the platform cannot recover |
| 350 | 350 | the device. The platform will call error_detected() with a |
| 351 | −pci_channel_state value of pci_channel_io_perm_failure. | |
| 351 | +pci_channel_state_t value of pci_channel_io_perm_failure. | |
| 352 | 352 | |
| 353 | 353 | The device driver should, at this point, assume the worst. It should |
| 354 | 354 | cancel all pending I/O, refuse all new I/O, returning -EIO to |
| @@ -214,7 +214,7 @@ static void eeh_dev_save_state(struct eeh_dev *edev, void *userdata) · 213 unmodified lines | ||
| 214 | 214 | pci_save_state(pdev); |
| 215 | 215 | } |
| 216 | 216 | |
| 217 | −static void eeh_set_channel_state(struct eeh_pe *root, enum pci_channel_state s) | |
| 217 | +static void eeh_set_channel_state(struct eeh_pe *root, pci_channel_state_t s) | |
| 218 | 218 | { |
| 219 | 219 | struct eeh_pe *pe; |
| 220 | 220 | struct eeh_dev *edev, *tmp; |
| @@ -625,7 +625,7 @@ static int rsxx_eeh_fifo_flush_poll(struct rsxx_cardinfo *card) · 624 unmodified lines | ||
| 625 | 625 | } |
| 626 | 626 | |
| 627 | 627 | static pci_ers_result_t rsxx_error_detected(struct pci_dev *dev, |
| 628 | − enum pci_channel_state error) | |
| 628 | + pci_channel_state_t error) | |
| 629 | 629 | { |
| 630 | 630 | int st; |
| 631 | 631 | |
| @@ -1267,7 +1267,7 @@ static void ioat_resume(struct ioatdma_device *ioat_dma) · 1266 unmodified lines | ||
| 1267 | 1267 | #define DRV_NAME "ioatdma" |
| 1268 | 1268 | |
| 1269 | 1269 | static pci_ers_result_t ioat_pcie_error_detected(struct pci_dev *pdev, |
| 1270 | − enum pci_channel_state error) | |
| 1270 | + pci_channel_state_t error) | |
| 1271 | 1271 | { |
| 1272 | 1272 | dev_dbg(&pdev->dev, "%s: PCIe AER error %d\n", DRV_NAME, error); |
| 1273 | 1273 | |
| @@ -1186,7 +1186,7 @@ MODULE_DEVICE_TABLE(pci, ngene_id_tbl); · 1185 unmodified lines | ||
| 1186 | 1186 | /****************************************************************************/ |
| 1187 | 1187 | |
| 1188 | 1188 | static pci_ers_result_t ngene_error_detected(struct pci_dev *dev, |
| 1189 | − enum pci_channel_state state) | |
| 1189 | + pci_channel_state_t state) | |
| 1190 | 1190 | { |
| 1191 | 1191 | dev_err(&dev->dev, "PCI error\n"); |
| 1192 | 1192 | if (state == pci_channel_io_perm_failure) |
| @@ -1240,7 +1240,7 @@ static void genwqe_remove(struct pci_dev *pci_dev) · 1239 unmodified lines | ||
| 1240 | 1240 | * error is detected. |
| 1241 | 1241 | */ |
| 1242 | 1242 | static pci_ers_result_t genwqe_err_error_detected(struct pci_dev *pci_dev, |
| 1243 | − enum pci_channel_state state) | |
| 1243 | + pci_channel_state_t state) | |
| 1244 | 1244 | { |
| 1245 | 1245 | struct genwqe_dev *cd; |
| 1246 | 1246 | |
| @@ -15465,7 +15465,7 @@ unmap: · 15464 unmodified lines | ||
| 15465 | 15465 | * remediation. |
| 15466 | 15466 | **/ |
| 15467 | 15467 | static pci_ers_result_t i40e_pci_error_detected(struct pci_dev *pdev, |
| 15468 | − enum pci_channel_state error) | |
| 15468 | + pci_channel_state_t error) | |
| 15469 | 15469 | { |
| 15470 | 15470 | struct i40e_pf *pf = pci_get_drvdata(pdev); |
| 15471 | 15471 | |
| @@ -3586,7 +3586,7 @@ static void ice_remove(struct pci_dev *pdev) · 3585 unmodified lines | ||
| 3586 | 3586 | * is in progress. Allows the driver to gracefully prepare/handle PCI errors. |
| 3587 | 3587 | */ |
| 3588 | 3588 | static pci_ers_result_t |
| 3589 | −ice_pci_err_detected(struct pci_dev *pdev, enum pci_channel_state err) | |
| 3589 | +ice_pci_err_detected(struct pci_dev *pdev, pci_channel_state_t err) | |
| 3590 | 3590 | { |
| 3591 | 3591 | struct ice_pf *pf = pci_get_drvdata(pdev); |
| 3592 | 3592 | |
| @@ -82,7 +82,7 @@ static int ixgb_vlan_rx_kill_vid(struct net_device *netdev, · 81 unmodified lines | ||
| 82 | 82 | static void ixgb_restore_vlan(struct ixgb_adapter *adapter); |
| 83 | 83 | |
| 84 | 84 | static pci_ers_result_t ixgb_io_error_detected (struct pci_dev *pdev, |
| 85 | − enum pci_channel_state state); | |
| 85 | + pci_channel_state_t state); | |
| 86 | 86 | static pci_ers_result_t ixgb_io_slot_reset (struct pci_dev *pdev); |
| 87 | 87 | static void ixgb_io_resume (struct pci_dev *pdev); |
| 88 | 88 | |
| @@ -2194,7 +2194,7 @@ ixgb_restore_vlan(struct ixgb_adapter *adapter) · 2105 unmodified lines | ||
| 2194 | 2194 | * a PCI bus error is detected. |
| 2195 | 2195 | */ |
| 2196 | 2196 | static pci_ers_result_t ixgb_io_error_detected(struct pci_dev *pdev, |
| 2197 | − enum pci_channel_state state) | |
| 2197 | + pci_channel_state_t state) | |
| 2198 | 2198 | { |
| 2199 | 2199 | struct net_device *netdev = pci_get_drvdata(pdev); |
| 2200 | 2200 | struct ixgb_adapter *adapter = netdev_priv(netdev); |
| @@ -1519,7 +1519,7 @@ static const struct dev_pm_ops efx_pm_ops = { · 1518 unmodified lines | ||
| 1519 | 1519 | * Stop the software path and request a slot reset. |
| 1520 | 1520 | */ |
| 1521 | 1521 | static pci_ers_result_t efx_io_error_detected(struct pci_dev *pdev, |
| 1522 | − enum pci_channel_state state) | |
| 1522 | + pci_channel_state_t state) | |
| 1523 | 1523 | { |
| 1524 | 1524 | pci_ers_result_t status = PCI_ERS_RESULT_RECOVERED; |
| 1525 | 1525 | struct efx_nic *efx = pci_get_drvdata(pdev); |
| @@ -3118,7 +3118,7 @@ static const struct dev_pm_ops ef4_pm_ops = { · 3117 unmodified lines | ||
| 3118 | 3118 | * Stop the software path and request a slot reset. |
| 3119 | 3119 | */ |
| 3120 | 3120 | static pci_ers_result_t ef4_io_error_detected(struct pci_dev *pdev, |
| 3121 | − enum pci_channel_state state) | |
| 3121 | + pci_channel_state_t state) | |
| 3122 | 3122 | { |
| 3123 | 3123 | pci_ers_result_t status = PCI_ERS_RESULT_RECOVERED; |
| 3124 | 3124 | struct ef4_nic *efx = pci_get_drvdata(pdev); |
| @@ -2173,6 +2173,14 @@ int pci_set_pcie_reset_state(struct pci_dev *dev, enum pcie_reset_state state) · 2172 unmodified lines | ||
| 2173 | 2173 | } |
| 2174 | 2174 | EXPORT_SYMBOL_GPL(pci_set_pcie_reset_state); |
| 2175 | 2175 | |
| 2176 | +void pcie_clear_device_status(struct pci_dev *dev) | |
| 2177 | +{ | |
| 2178 | + u16 sta; | |
| 2179 | + | |
| 2180 | + pcie_capability_read_word(dev, PCI_EXP_DEVSTA, &sta); | |
| 2181 | + pcie_capability_write_word(dev, PCI_EXP_DEVSTA, sta); | |
| 2182 | +} | |
| 2183 | + | |
| 2176 | 2184 | /** |
| 2177 | 2185 | * pcie_clear_root_pme_status - Clear root port PME interrupt status. |
| 2178 | 2186 | * @dev: PCIe root port or event collector. |
| @@ -92,6 +92,7 @@ void pci_refresh_power_state(struct pci_dev *dev); · 91 unmodified lines | ||
| 92 | 92 | int pci_power_up(struct pci_dev *dev); |
| 93 | 93 | void pci_disable_enabled_device(struct pci_dev *dev); |
| 94 | 94 | int pci_finish_runtime_suspend(struct pci_dev *dev); |
| 95 | +void pcie_clear_device_status(struct pci_dev *dev); | |
| 95 | 96 | void pcie_clear_root_pme_status(struct pci_dev *dev); |
| 96 | 97 | bool pci_check_pme_status(struct pci_dev *dev); |
| 97 | 98 | void pci_pme_wakeup_bus(struct pci_bus *bus); |
| @@ -555,7 +556,7 @@ static inline int pci_dev_specific_disable_acs_redir(struct pci_dev *dev) · 457 unmodified lines | ||
| 555 | 556 | |
| 556 | 557 | /* PCI error reporting and recovery */ |
| 557 | 558 | pci_ers_result_t pcie_do_recovery(struct pci_dev *dev, |
| 558 | − enum pci_channel_state state, | |
| 559 | + pci_channel_state_t state, | |
| 559 | 560 | pci_ers_result_t (*reset_link)(struct pci_dev *pdev)); |
| 560 | 561 | |
| 561 | 562 | bool pcie_wait_for_link(struct pci_dev *pdev, bool active); |
| @@ -658,7 +659,6 @@ void pci_aer_init(struct pci_dev *dev); · 96 unmodified lines | ||
| 658 | 659 | void pci_aer_exit(struct pci_dev *dev); |
| 659 | 660 | extern const struct attribute_group aer_stats_attr_group; |
| 660 | 661 | void pci_aer_clear_fatal_status(struct pci_dev *dev); |
| 661 | −void pci_aer_clear_device_status(struct pci_dev *dev); | |
| 662 | 662 | int pci_aer_clear_status(struct pci_dev *dev); |
| 663 | 663 | int pci_aer_raw_clear_status(struct pci_dev *dev); |
| 664 | 664 | #else |
| @@ -666,7 +666,6 @@ static inline void pci_no_aer(void) { } · 1 unmodified line | ||
| 666 | 666 | static inline void pci_aer_init(struct pci_dev *d) { } |
| 667 | 667 | static inline void pci_aer_exit(struct pci_dev *d) { } |
| 668 | 668 | static inline void pci_aer_clear_fatal_status(struct pci_dev *dev) { } |
| 669 | −static inline void pci_aer_clear_device_status(struct pci_dev *dev) { } | |
| 670 | 669 | static inline int pci_aer_clear_status(struct pci_dev *dev) { return -EINVAL; } |
| 671 | 670 | static inline int pci_aer_raw_clear_status(struct pci_dev *dev) { return -EINVAL; } |
| 672 | 671 | #endif |
| @@ -241,14 +241,6 @@ int pci_disable_pcie_error_reporting(struct pci_dev *dev) · 240 unmodified lines | ||
| 241 | 241 | } |
| 242 | 242 | EXPORT_SYMBOL_GPL(pci_disable_pcie_error_reporting); |
| 243 | 243 | |
| 244 | −void pci_aer_clear_device_status(struct pci_dev *dev) | |
| 245 | −{ | |
| 246 | − u16 sta; | |
| 247 | − | |
| 248 | − pcie_capability_read_word(dev, PCI_EXP_DEVSTA, &sta); | |
| 249 | − pcie_capability_write_word(dev, PCI_EXP_DEVSTA, sta); | |
| 250 | −} | |
| 251 | − | |
| 252 | 244 | int pci_aer_clear_nonfatal_status(struct pci_dev *dev) |
| 253 | 245 | { |
| 254 | 246 | int aer = dev->aer_cap; |
| @@ -447,7 +439,7 @@ static const char *aer_error_layer[] = { · 192 unmodified lines | ||
| 447 | 439 | "Transaction Layer" |
| 448 | 440 | }; |
| 449 | 441 | |
| 450 | −static const char *aer_correctable_error_string[AER_MAX_TYPEOF_COR_ERRS] = { | |
| 442 | +static const char *aer_correctable_error_string[] = { | |
| 451 | 443 | "RxErr", /* Bit Position 0 */ |
| 452 | 444 | NULL, |
| 453 | 445 | NULL, |
| @@ -464,9 +456,25 @@ static const char *aer_correctable_error_string[AER_MAX_TYPEOF_COR_ERRS] = { · 10 unmodified lines | ||
| 464 | 456 | "NonFatalErr", /* Bit Position 13 */ |
| 465 | 457 | "CorrIntErr", /* Bit Position 14 */ |
| 466 | 458 | "HeaderOF", /* Bit Position 15 */ |
| 459 | + NULL, /* Bit Position 16 */ | |
| 460 | + NULL, /* Bit Position 17 */ | |
| 461 | + NULL, /* Bit Position 18 */ | |
| 462 | + NULL, /* Bit Position 19 */ | |
| 463 | + NULL, /* Bit Position 20 */ | |
| 464 | + NULL, /* Bit Position 21 */ | |
| 465 | + NULL, /* Bit Position 22 */ | |
| 466 | + NULL, /* Bit Position 23 */ | |
| 467 | + NULL, /* Bit Position 24 */ | |
| 468 | + NULL, /* Bit Position 25 */ | |
| 469 | + NULL, /* Bit Position 26 */ | |
| 470 | + NULL, /* Bit Position 27 */ | |
| 471 | + NULL, /* Bit Position 28 */ | |
| 472 | + NULL, /* Bit Position 29 */ | |
| 473 | + NULL, /* Bit Position 30 */ | |
| 474 | + NULL, /* Bit Position 31 */ | |
| 467 | 475 | }; |
| 468 | 476 | |
| 469 | −static const char *aer_uncorrectable_error_string[AER_MAX_TYPEOF_UNCOR_ERRS] = { | |
| 477 | +static const char *aer_uncorrectable_error_string[] = { | |
| 470 | 478 | "Undefined", /* Bit Position 0 */ |
| 471 | 479 | NULL, |
| 472 | 480 | NULL, |
| @@ -494,6 +502,11 @@ static const char *aer_uncorrectable_error_string[AER_MAX_TYPEOF_UNCOR_ERRS] = { · 21 unmodified lines | ||
| 494 | 502 | "AtomicOpBlocked", /* Bit Position 24 */ |
| 495 | 503 | "TLPBlockedErr", /* Bit Position 25 */ |
| 496 | 504 | "PoisonTLPBlocked", /* Bit Position 26 */ |
| 505 | + NULL, /* Bit Position 27 */ | |
| 506 | + NULL, /* Bit Position 28 */ | |
| 507 | + NULL, /* Bit Position 29 */ | |
| 508 | + NULL, /* Bit Position 30 */ | |
| 509 | + NULL, /* Bit Position 31 */ | |
| 497 | 510 | }; |
| 498 | 511 | |
| 499 | 512 | static const char *aer_agent_string[] = { |
| @@ -650,24 +663,26 @@ static void __print_tlp_header(struct pci_dev *dev, · 150 unmodified lines | ||
| 650 | 663 | static void __aer_print_error(struct pci_dev *dev, |
| 651 | 664 | struct aer_err_info *info) |
| 652 | 665 | { |
| 666 | + const char **strings; | |
| 653 | 667 | unsigned long status = info->status & ~info->mask; |
| 654 | − const char *errmsg = NULL; | |
| 668 | + const char *level, *errmsg; | |
| 655 | 669 | int i; |
| 656 | 670 | |
| 671 | + if (info->severity == AER_CORRECTABLE) { | |
| 672 | + strings = aer_correctable_error_string; | |
| 673 | + level = KERN_WARNING; | |
| 674 | + } else { | |
| 675 | + strings = aer_uncorrectable_error_string; | |
| 676 | + level = KERN_ERR; | |
| 677 | + } | |
| 678 | + | |
| 657 | 679 | for_each_set_bit(i, &status, 32) { |
| 658 | − if (info->severity == AER_CORRECTABLE) | |
| 659 | − errmsg = i < ARRAY_SIZE(aer_correctable_error_string) ? | |
| 660 | − aer_correctable_error_string[i] : NULL; | |
| 661 | − else | |
| 662 | − errmsg = i < ARRAY_SIZE(aer_uncorrectable_error_string) ? | |
| 663 | − aer_uncorrectable_error_string[i] : NULL; | |
| 680 | + errmsg = strings[i]; | |
| 681 | + if (!errmsg) | |
| 682 | + errmsg = "Unknown Error Bit"; | |
| 664 | 683 | |
| 665 | − if (errmsg) | |
| 666 | − pci_err(dev, " [%2d] %-22s%s\n", i, errmsg, | |
| 684 | + pci_printk(level, dev, " [%2d] %-22s%s\n", i, errmsg, | |
| 667 | 685 | info->first_error == i ? " (First)" : ""); |
| 668 | − else | |
| 669 | − pci_err(dev, " [%2d] Unknown Error Bit%s\n", | |
| 670 | − i, info->first_error == i ? " (First)" : ""); | |
| 671 | 686 | } |
| 672 | 687 | pci_dev_aer_stats_incr(dev, info); |
| 673 | 688 | } |
| @@ -676,6 +691,7 @@ void aer_print_error(struct pci_dev *dev, struct aer_err_info *info) · 2 unmodified lines | ||
| 676 | 691 | { |
| 677 | 692 | int layer, agent; |
| 678 | 693 | int id = ((dev->bus->number << 8) | dev->devfn); |
| 694 | + const char *level; | |
| 679 | 695 | |
| 680 | 696 | if (!info->status) { |
| 681 | 697 | pci_err(dev, "PCIe Bus Error: severity=%s, type=Inaccessible, (Unregistered Agent ID)\n", |
| @@ -686,13 +702,14 @@ void aer_print_error(struct pci_dev *dev, struct aer_err_info *info) · 4 unmodified lines | ||
| 686 | 702 | layer = AER_GET_LAYER_ERROR(info->severity, info->status); |
| 687 | 703 | agent = AER_GET_AGENT(info->severity, info->status); |
| 688 | 704 | |
| 689 | − pci_err(dev, "PCIe Bus Error: severity=%s, type=%s, (%s)\n", | |
| 690 | − aer_error_severity_string[info->severity], | |
| 691 | − aer_error_layer[layer], aer_agent_string[agent]); | |
| 705 | + level = (info->severity == AER_CORRECTABLE) ? KERN_WARNING : KERN_ERR; | |
| 706 | + | |
| 707 | + pci_printk(level, dev, "PCIe Bus Error: severity=%s, type=%s, (%s)\n", | |
| 708 | + aer_error_severity_string[info->severity], | |
| 709 | + aer_error_layer[layer], aer_agent_string[agent]); | |
| 692 | 710 | |
| 693 | − pci_err(dev, " device [%04x:%04x] error status/mask=%08x/%08x\n", | |
| 694 | − dev->vendor, dev->device, | |
| 695 | − info->status, info->mask); | |
| 711 | + pci_printk(level, dev, " device [%04x:%04x] error status/mask=%08x/%08x\n", | |
| 712 | + dev->vendor, dev->device, info->status, info->mask); | |
| 696 | 713 | |
| 697 | 714 | __aer_print_error(dev, info); |
| 698 | 715 | |
| @@ -922,7 +939,8 @@ static void handle_error_source(struct pci_dev *dev, struct aer_err_info *info) · 223 unmodified lines | ||
| 922 | 939 | if (aer) |
| 923 | 940 | pci_write_config_dword(dev, aer + PCI_ERR_COR_STATUS, |
| 924 | 941 | info->status); |
| 925 | − pci_aer_clear_device_status(dev); | |
| 942 | + if (pcie_aer_is_native(dev)) | |
| 943 | + pcie_clear_device_status(dev); | |
| 926 | 944 | } else if (info->severity == AER_NONFATAL) |
| 927 | 945 | pcie_do_recovery(dev, pci_channel_io_normal, aer_root_reset); |
| 928 | 946 | else if (info->severity == AER_FATAL) |
| @@ -46,7 +46,7 @@ static pci_ers_result_t merge_result(enum pci_ers_result orig, · 45 unmodified lines | ||
| 46 | 46 | } |
| 47 | 47 | |
| 48 | 48 | static int report_error_detected(struct pci_dev *dev, |
| 49 | − enum pci_channel_state state, | |
| 49 | + pci_channel_state_t state, | |
| 50 | 50 | enum pci_ers_result *result) |
| 51 | 51 | { |
| 52 | 52 | pci_ers_result_t vote; |
| @@ -147,7 +147,7 @@ out: · 94 unmodified lines | ||
| 147 | 147 | } |
| 148 | 148 | |
| 149 | 149 | pci_ers_result_t pcie_do_recovery(struct pci_dev *dev, |
| 150 | − enum pci_channel_state state, | |
| 150 | + pci_channel_state_t state, | |
| 151 | 151 | pci_ers_result_t (*reset_link)(struct pci_dev *pdev)) |
| 152 | 152 | { |
| 153 | 153 | pci_ers_result_t status = PCI_ERS_RESULT_CAN_RECOVER; |
| @@ -197,7 +197,8 @@ pci_ers_result_t pcie_do_recovery(struct pci_dev *dev, · 43 unmodified lines | ||
| 197 | 197 | pci_dbg(dev, "broadcast resume message\n"); |
| 198 | 198 | pci_walk_bus(bus, report_resume, &status); |
| 199 | 199 | |
| 200 | − pci_aer_clear_device_status(dev); | |
| 200 | + if (pcie_aer_is_native(dev)) | |
| 201 | + pcie_clear_device_status(dev); | |
| 201 | 202 | pci_aer_clear_nonfatal_status(dev); |
| 202 | 203 | pci_info(dev, "device recovery successful\n"); |
| 203 | 204 | return status; |
| @@ -146,7 +146,7 @@ static void pcie_portdrv_remove(struct pci_dev *dev) · 145 unmodified lines | ||
| 146 | 146 | } |
| 147 | 147 | |
| 148 | 148 | static pci_ers_result_t pcie_portdrv_error_detected(struct pci_dev *dev, |
| 149 | − enum pci_channel_state error) | |
| 149 | + pci_channel_state_t error) | |
| 150 | 150 | { |
| 151 | 151 | /* Root Port has no impact. Always recovers. */ |
| 152 | 152 | return PCI_ERS_RESULT_CAN_RECOVER; |
| @@ -2002,7 +2002,7 @@ static void aac_remove_one(struct pci_dev *pdev) · 2001 unmodified lines | ||
| 2002 | 2002 | } |
| 2003 | 2003 | |
| 2004 | 2004 | static pci_ers_result_t aac_pci_error_detected(struct pci_dev *pdev, |
| 2005 | − enum pci_channel_state error) | |
| 2005 | + pci_channel_state_t error) | |
| 2006 | 2006 | { |
| 2007 | 2007 | struct Scsi_Host *shost = pci_get_drvdata(pdev); |
| 2008 | 2008 | struct aac_dev *aac = shost_priv(shost); |
| @@ -1743,7 +1743,7 @@ static void sym2_remove(struct pci_dev *pdev) · 1742 unmodified lines | ||
| 1743 | 1743 | * @state: current state of the PCI slot |
| 1744 | 1744 | */ |
| 1745 | 1745 | static pci_ers_result_t sym2_io_error_detected(struct pci_dev *pdev, |
| 1746 | − enum pci_channel_state state) | |
| 1746 | + pci_channel_state_t state) | |
| 1747 | 1747 | { |
| 1748 | 1748 | /* If slot is permanently frozen, turn everything off */ |
| 1749 | 1749 | if (state == pci_channel_io_perm_failure) { |
| @@ -4678,7 +4678,7 @@ static void ql_eeh_close(struct net_device *ndev) · 4677 unmodified lines | ||
| 4678 | 4678 | * a PCI bus error is detected. |
| 4679 | 4679 | */ |
| 4680 | 4680 | static pci_ers_result_t qlge_io_error_detected(struct pci_dev *pdev, |
| 4681 | − enum pci_channel_state state) | |
| 4681 | + pci_channel_state_t state) | |
| 4682 | 4682 | { |
| 4683 | 4683 | struct net_device *ndev = pci_get_drvdata(pdev); |
| 4684 | 4684 | struct ql_adapter *qdev = netdev_priv(ndev); |
| @@ -179,7 +179,7 @@ static inline const char *pci_power_name(pci_power_t state) · 178 unmodified lines | ||
| 179 | 179 | */ |
| 180 | 180 | typedef unsigned int __bitwise pci_channel_state_t; |
| 181 | 181 | |
| 182 | −enum pci_channel_state { | |
| 182 | +enum { | |
| 183 | 183 | /* I/O channel is in normal state */ |
| 184 | 184 | pci_channel_io_normal = (__force pci_channel_state_t) 1, |
| 185 | 185 | |
| @@ -792,7 +792,7 @@ enum pci_ers_result { · 606 unmodified lines | ||
| 792 | 792 | struct pci_error_handlers { |
| 793 | 793 | /* PCI bus error detected on this device */ |
| 794 | 794 | pci_ers_result_t (*error_detected)(struct pci_dev *dev, |
| 795 | − enum pci_channel_state error); | |
| 795 | + pci_channel_state_t error); | |
| 796 | 796 | |
| 797 | 797 | /* MMIO has been re-enabled, but not DMA */ |
| 798 | 798 | pci_ers_result_t (*mmio_enabled)(struct pci_dev *dev); |