On Thu, Jul 07, 2022 at 11:42:38AM -0400, Paul Luse wrote: > From: paul luse <paul.e.luse@xxxxxxxxx> > > The PCI subsystem does not currently save and restore the configuration > space for the TPH (Transaction Layer Packet Processing Hints) capability, > leading to the possibility of configuration loss in some scenarios. For > more information please refer to PCIe r6.0 sec 6.17. > > This was discovered working on the SPDK Project (Storage Performance > Development Kit, see https://spdk.io/) where we typically unbind devices > from their native kernel driver and bind to VFIO for use with our own > user space drivers. The process of binding to VFIO results in the loss > of TPH settings due to the resulting PCI reset. > > Signed-off-by: Jing Liu <jing2.liu@xxxxxxxxx> > Signed-off-by: paul luse <paul.e.luse@xxxxxxxxx> > --- Hi Paul, If you need to submit subsequent versions, could you include a summary of what changed from the previous? You can just jot them down below this '---' line for the reviewers, and any text there would be omitted from the changelog. As far as I can tell, the only difference is 'tph' is a u16 instead of an int in pci_save_tph_state(). > +config PCIE_TPH > + bool "PCI TPH (Transaction Layer Packet Processing Hints) capability support" > + help > + This enables PCI Express TPH (Transaction Layer Packet Processing Hints) by > + making sure they are saved and restored across resets. Enable this if your > + hardware uses the PCI Express TPH capabilities. For more information please > + refer to PCIe r6.0 sec 6.17. I'm not sure this needs a config option. Even if hardware isn't supporting TPH, this state save code doesn't takes up much space, and saving this config capability seems to always be the right thing if hardware is supporting TPH. Otherwise, this looks good to me.