File tree Expand file tree Collapse file tree 4 files changed +11
-12
lines changed Expand file tree Collapse file tree 4 files changed +11
-12
lines changed Original file line number Diff line number Diff line change @@ -2046,6 +2046,14 @@ int pci_set_pcie_reset_state(struct pci_dev *dev, enum pcie_reset_state state)
2046
2046
}
2047
2047
EXPORT_SYMBOL_GPL (pci_set_pcie_reset_state );
2048
2048
2049
+ void pcie_clear_device_status (struct pci_dev * dev )
2050
+ {
2051
+ u16 sta ;
2052
+
2053
+ pcie_capability_read_word (dev , PCI_EXP_DEVSTA , & sta );
2054
+ pcie_capability_write_word (dev , PCI_EXP_DEVSTA , sta );
2055
+ }
2056
+
2049
2057
/**
2050
2058
* pcie_clear_root_pme_status - Clear root port PME interrupt status.
2051
2059
* @dev: PCIe root port or event collector.
Original file line number Diff line number Diff line change @@ -92,6 +92,7 @@ void pci_refresh_power_state(struct pci_dev *dev);
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 );
@@ -658,15 +659,13 @@ void pci_aer_init(struct pci_dev *dev);
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
665
665
static inline void pci_no_aer (void ) { }
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
Original file line number Diff line number Diff line change @@ -241,14 +241,6 @@ int pci_disable_pcie_error_reporting(struct pci_dev *dev)
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 ;
@@ -947,7 +939,7 @@ static void handle_error_source(struct pci_dev *dev, struct aer_err_info *info)
947
939
if (aer )
948
940
pci_write_config_dword (dev , aer + PCI_ERR_COR_STATUS ,
949
941
info -> status );
950
- pci_aer_clear_device_status (dev );
942
+ pcie_clear_device_status (dev );
951
943
} else if (info -> severity == AER_NONFATAL )
952
944
pcie_do_recovery (dev , pci_channel_io_normal , aer_root_reset );
953
945
else if (info -> severity == AER_FATAL )
Original file line number Diff line number Diff line change @@ -197,7 +197,7 @@ pci_ers_result_t pcie_do_recovery(struct pci_dev *dev,
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
+ pcie_clear_device_status (dev );
201
201
pci_aer_clear_nonfatal_status (dev );
202
202
pci_info (dev , "device recovery successful\n" );
203
203
return status ;
You can’t perform that action at this time.
0 commit comments