On Fri, Jan 12, 2024 at 10:32:51AM -0600, Bjorn Helgaas wrote: > Please update subject lines of all these patches to match the > capitalization of drivers/pci/ history. Sure, will do. > > On Thu, Jan 11, 2024 at 03:32:16PM +0800, Wang, Qingshun wrote: > > Store status and mask of both correctable and uncorrectable errors in > > aer_err_info. Severity of uncorrectable errors and the values of Device > > Status register is also recorded in order to filter out errors that > > cannot cause Advisory Non-Fatal error. > > > > Refactor rest of the code to use cor/uncor_status and cor/uncor_mask > > fields instead of status and mask fields. > > Can you say something here about the benefit of doing this? This text > essentially describes the code in English, but we can read the code. > What we need here in the commit log is the *reason* for making this > change. Thanks for the advice, I will update the commit message like this: When Advisory Non-Fatal errors are raised, both correctable and uncorrectable error statuses will be set. The current kernel code cannot store both statuses at the same time, thus failing to handle ANFE properly. In addition, to avoid clearing UEs that are not ANFE by accident, UE severity and Device Status also need to be recorded: any fatal UE cannot be ANFE, and if Fatal/Non-Fatal Error Detected is set in Device Status, do not take any assumption and let UE handler to clear UE status. Store status and mask of both correctable and uncorrectable errors in aer_err_info. The severity of UEs and the values of the Device Status register are also recorded, which will be used to determine UEs that should be handled by the ANFE handler. Refactor the rest of the code to use cor/uncor_status and cor/uncor_mask fields instead of status and mask fields. > > Bjorn