Re: [PATCH 1/2] PCI: save and restore device state during bus reset

2016-09-13 Thread Sinan Kaya
On 9/13/2016 7:20 PM, Sinan Kaya wrote: > On 9/13/2016 5:53 PM, Bjorn Helgaas wrote: >>> + pci_bus_restore(dev->bus); >> This path eventually writes the Bridge Control register: >> >> pci_reset_bridge_secondary_bus >> pcibios_reset_secondary_bus >> pci_reset_secondary_bus >>

Re: [PATCH 1/2] PCI: save and restore device state during bus reset

2016-09-13 Thread Sinan Kaya
On 9/13/2016 7:20 PM, Sinan Kaya wrote: > On 9/13/2016 5:53 PM, Bjorn Helgaas wrote: >>> + pci_bus_restore(dev->bus); >> This path eventually writes the Bridge Control register: >> >> pci_reset_bridge_secondary_bus >> pcibios_reset_secondary_bus >> pci_reset_secondary_bus >>

Re: [PATCH 1/2] PCI: save and restore device state during bus reset

2016-09-13 Thread Sinan Kaya
On 9/13/2016 5:53 PM, Bjorn Helgaas wrote: >> +pci_bus_restore(dev->bus); > This path eventually writes the Bridge Control register: > > pci_reset_bridge_secondary_bus > pcibios_reset_secondary_bus > pci_reset_secondary_bus > pci_write_config_word(dev, PCI_BRIDGE_CONTROL,

Re: [PATCH 1/2] PCI: save and restore device state during bus reset

2016-09-13 Thread Sinan Kaya
On 9/13/2016 5:53 PM, Bjorn Helgaas wrote: >> +pci_bus_restore(dev->bus); > This path eventually writes the Bridge Control register: > > pci_reset_bridge_secondary_bus > pcibios_reset_secondary_bus > pci_reset_secondary_bus > pci_write_config_word(dev, PCI_BRIDGE_CONTROL,

Re: [PATCH 1/2] PCI: save and restore device state during bus reset

2016-09-13 Thread Bjorn Helgaas
On Thu, Sep 01, 2016 at 07:00:00PM -0400, Sinan Kaya wrote: > A secondary bus reset causes settings to be lost by all downstream > devices on the tree. The code is currently saving and restoring device > states only when called from the VFIO path via pci_probe_reset_bus > and pci_reset_bus

Re: [PATCH 1/2] PCI: save and restore device state during bus reset

2016-09-13 Thread Bjorn Helgaas
On Thu, Sep 01, 2016 at 07:00:00PM -0400, Sinan Kaya wrote: > A secondary bus reset causes settings to be lost by all downstream > devices on the tree. The code is currently saving and restoring device > states only when called from the VFIO path via pci_probe_reset_bus > and pci_reset_bus

Re: [PATCH 1/2] PCI: save and restore device state during bus reset

2016-09-13 Thread Sinan Kaya
Hi Bjorn, On 9/13/2016 12:42 PM, Bjorn Helgaas wrote: > > This comment is no longer correct (you don't leave the devices in > power-on state). Sorry about that, I can fix the comment. > >> + */ >> +void pci_reset_bridge_secondary_bus(struct pci_dev *dev) >> +{ >> +

Re: [PATCH 1/2] PCI: save and restore device state during bus reset

2016-09-13 Thread Sinan Kaya
Hi Bjorn, On 9/13/2016 12:42 PM, Bjorn Helgaas wrote: > > This comment is no longer correct (you don't leave the devices in > power-on state). Sorry about that, I can fix the comment. > >> + */ >> +void pci_reset_bridge_secondary_bus(struct pci_dev *dev) >> +{ >> +

Re: [PATCH 1/2] PCI: save and restore device state during bus reset

2016-09-13 Thread Bjorn Helgaas
On Thu, Sep 01, 2016 at 07:00:00PM -0400, Sinan Kaya wrote: > A secondary bus reset causes settings to be lost by all downstream > devices on the tree. The code is currently saving and restoring device > states only when called from the VFIO path via pci_probe_reset_bus > and pci_reset_bus

Re: [PATCH 1/2] PCI: save and restore device state during bus reset

2016-09-13 Thread Bjorn Helgaas
On Thu, Sep 01, 2016 at 07:00:00PM -0400, Sinan Kaya wrote: > A secondary bus reset causes settings to be lost by all downstream > devices on the tree. The code is currently saving and restoring device > states only when called from the VFIO path via pci_probe_reset_bus > and pci_reset_bus

[PATCH 1/2] PCI: save and restore device state during bus reset

2016-09-01 Thread Sinan Kaya
A secondary bus reset causes settings to be lost by all downstream devices on the tree. The code is currently saving and restoring device states only when called from the VFIO path via pci_probe_reset_bus and pci_reset_bus functions. Moving the save and restore into pci_reset_bridge_secondary_bus

[PATCH 1/2] PCI: save and restore device state during bus reset

2016-09-01 Thread Sinan Kaya
A secondary bus reset causes settings to be lost by all downstream devices on the tree. The code is currently saving and restoring device states only when called from the VFIO path via pci_probe_reset_bus and pci_reset_bus functions. Moving the save and restore into pci_reset_bridge_secondary_bus