RE: [PATCH 4/5 V2] PCI: only return true when dev io state is really changed

2020-09-26 Thread Zhao, Haifeng
; mika.westerb...@linux.intel.com Cc: linux-...@vger.kernel.org; linux-kernel@vger.kernel.org; Jia, Pei P ; ashok@linux.intel.com; Kuppuswamy, Sathyanarayanan Subject: Re: [PATCH 4/5 V2] PCI: only return true when dev io state is really changed On Sat, 2020-09-26 at 23:28 -0400, Ethan Zhao

Re: [PATCH 4/5 V2] PCI: only return true when dev io state is really changed

2020-09-26 Thread Joe Perches
On Sat, 2020-09-26 at 23:28 -0400, Ethan Zhao wrote: > simplify the pci_dev_set_io_state() function to only return true > when dev->error_state is changed. [] > diff --git a/drivers/pci/pci.h b/drivers/pci/pci.h [] > @@ -362,35 +362,11 @@ static inline bool pci_dev_set_io_state(struct pci_dev > *d

[PATCH 4/5 V2] PCI: only return true when dev io state is really changed

2020-09-26 Thread Ethan Zhao
When uncorrectable error happens, AER driver and DPC driver interrupt handlers likely call pcie_do_recovery() ->pci_walk_bus() ->report_frozen_detected() with pci_channel_io_frozen the same time. If pci_dev_set_io_state() return true even if the original state is pci_channel_io_froz