Christoph Hellwig 5e69a33c5c PCI/ERR: Recognize disconnected devices in report_error_detected()
When a device is already unplugged by pciehp by the time the AER handler is
invoked, the PCIe device will already be in the pci_channel_io_perm_failure
state.  In that case simply return PCI_ERS_RESULT_DISCONNECT instead of
trying to do a state transition that will fail.

Also untangle the state transition failure from the lack of methods to
improve the debugging output in case it happens again.

Link: https://lore.kernel.org/r/20220601074024.3481035-1-hch@lst.de
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Reviewed-by: Kuppuswamy Sathyanarayanan <sathyanarayanan.kuppuswamy@linux.intel.com>
2022-06-08 15:08:40 -05:00
..
2022-06-03 11:48:47 -07:00
2022-06-02 15:23:54 -07:00
2022-06-04 13:42:53 -07:00
2022-06-03 11:48:47 -07:00
2022-06-03 11:48:47 -07:00
2022-05-29 11:38:27 -07:00
2022-05-25 16:18:27 -07:00
2022-06-05 09:12:28 -07:00
2022-06-04 14:04:27 -07:00
2022-06-03 11:48:47 -07:00
2022-06-04 14:04:27 -07:00
2022-05-26 21:08:40 -07:00
2022-06-04 13:42:53 -07:00
2022-05-31 09:56:54 -07:00
2022-06-02 15:23:54 -07:00
2022-06-03 10:25:56 -07:00
2022-06-02 15:23:54 -07:00
2022-06-02 15:23:54 -07:00
2022-06-04 14:04:27 -07:00
2022-05-27 21:24:19 -07:00
2022-06-05 09:25:12 -07:00
2022-05-25 16:18:27 -07:00
2022-05-25 15:02:26 +02:00
2022-06-02 15:23:54 -07:00
2022-05-23 21:06:11 -07:00
2022-05-19 16:56:17 +02:00
2022-05-30 11:01:50 -07:00
2022-06-03 11:48:47 -07:00
2022-06-02 15:23:54 -07:00
2022-06-03 11:48:47 -07:00
2022-06-05 09:25:12 -07:00
2022-06-03 11:48:47 -07:00
2022-06-03 11:48:47 -07:00
2022-06-04 13:42:53 -07:00
2022-06-05 09:25:12 -07:00
2022-06-03 11:48:47 -07:00
2022-06-01 13:49:15 -07:00
2022-05-31 12:45:10 -04:00
2022-06-02 15:27:44 -07:00
2022-06-04 13:42:53 -07:00
2022-06-05 09:25:12 -07:00
2022-06-05 09:25:12 -07:00