Re: [PATCH 2/4] pcie: update slot power status only is power control is enabled

2022-02-28 Thread Igor Mammedov
On Mon, 28 Feb 2022 08:39:57 +0100 Gerd Hoffmann wrote: > Hi, > > > This where I wasn't comfortable with idea of calling random PCIe code > > chunks and thought about chaining callbacks so that > > pcie_cap_slot_[pre_]plug_cb() would do necessary PCIe steps > > and acpi_pcihp_device_[pre_]plu

Re: [PATCH 2/4] pcie: update slot power status only is power control is enabled

2022-02-27 Thread Gerd Hoffmann
Hi, > This where I wasn't comfortable with idea of calling random PCIe code > chunks and thought about chaining callbacks so that > pcie_cap_slot_[pre_]plug_cb() would do necessary PCIe steps > and acpi_pcihp_device_[pre_]plug_cb() do ACPI specific things not > intruding on each other, but that

Re: [PATCH 2/4] pcie: update slot power status only is power control is enabled

2022-02-25 Thread Igor Mammedov
On Fri, 25 Feb 2022 08:48:13 -0500 "Michael S. Tsirkin" wrote: > On Fri, Feb 25, 2022 at 02:35:28PM +0100, Igor Mammedov wrote: > > On Fri, 25 Feb 2022 08:08:57 -0500 > > "Michael S. Tsirkin" wrote: > > > > > On Fri, Feb 25, 2022 at 02:02:31PM +0100, Igor Mammedov wrote: > > > > On Fri, 25

Re: [PATCH 2/4] pcie: update slot power status only is power control is enabled

2022-02-25 Thread Michael S. Tsirkin
On Fri, Feb 25, 2022 at 02:35:28PM +0100, Igor Mammedov wrote: > On Fri, 25 Feb 2022 08:08:57 -0500 > "Michael S. Tsirkin" wrote: > > > On Fri, Feb 25, 2022 at 02:02:31PM +0100, Igor Mammedov wrote: > > > On Fri, 25 Feb 2022 11:12:59 +0100 > > > Gerd Hoffmann wrote: > > > > > > > Hi, > > >

Re: [PATCH 2/4] pcie: update slot power status only is power control is enabled

2022-02-25 Thread Igor Mammedov
On Fri, 25 Feb 2022 08:08:57 -0500 "Michael S. Tsirkin" wrote: > On Fri, Feb 25, 2022 at 02:02:31PM +0100, Igor Mammedov wrote: > > On Fri, 25 Feb 2022 11:12:59 +0100 > > Gerd Hoffmann wrote: > > > > > Hi, > > > > > > >pcie_cap_slot_post_load() > > > >-> pcie_cap_update_p

Re: [PATCH 2/4] pcie: update slot power status only is power control is enabled

2022-02-25 Thread Michael S. Tsirkin
On Fri, Feb 25, 2022 at 02:02:31PM +0100, Igor Mammedov wrote: > On Fri, 25 Feb 2022 11:12:59 +0100 > Gerd Hoffmann wrote: > > > Hi, > > > > >pcie_cap_slot_post_load() > > >-> pcie_cap_update_power() > > >-> pcie_set_power_device() > > >-> pci_set_powe

Re: [PATCH 2/4] pcie: update slot power status only is power control is enabled

2022-02-25 Thread Igor Mammedov
On Fri, 25 Feb 2022 11:12:59 +0100 Gerd Hoffmann wrote: > Hi, > > >pcie_cap_slot_post_load() > >-> pcie_cap_update_power() > >-> pcie_set_power_device() > >-> pci_set_power() > >-> pci_update_mappings() > > > Fix it by honoring P

Re: [PATCH 2/4] pcie: update slot power status only is power control is enabled

2022-02-25 Thread Michael S. Tsirkin
On Fri, Feb 25, 2022 at 11:12:59AM +0100, Gerd Hoffmann wrote: > Hi, > > >pcie_cap_slot_post_load() > >-> pcie_cap_update_power() > >-> pcie_set_power_device() > >-> pci_set_power() > >-> pci_update_mappings() > > > Fix it by honoring

Re: [PATCH 2/4] pcie: update slot power status only is power control is enabled

2022-02-25 Thread Michael S. Tsirkin
On Fri, Feb 25, 2022 at 09:18:30AM +0100, Igor Mammedov wrote: > On Thu, 24 Feb 2022 13:05:07 -0500 > "Michael S. Tsirkin" wrote: > > > On Thu, Feb 24, 2022 at 12:44:09PM -0500, Igor Mammedov wrote: > > > on creation a PCIDevice has power turned on at the end of > > > pci_qdev_realize() > > > ho

Re: [PATCH 2/4] pcie: update slot power status only is power control is enabled

2022-02-25 Thread Gerd Hoffmann
Hi, >pcie_cap_slot_post_load() >-> pcie_cap_update_power() >-> pcie_set_power_device() >-> pci_set_power() >-> pci_update_mappings() > Fix it by honoring PCI_EXP_SLTCAP_PCP and updating power status > only if capability is enabled. >

Re: [PATCH 2/4] pcie: update slot power status only is power control is enabled

2022-02-25 Thread Michael S. Tsirkin
On Thu, Feb 24, 2022 at 12:44:09PM -0500, Igor Mammedov wrote: > on creation a PCIDevice has power turned on at the end of pci_qdev_realize() > however later on if PCIe slot isn't populated with any children > it's power is turned off. It's fine if native hotplug is used > as plug callback will pow

Re: [PATCH 2/4] pcie: update slot power status only is power control is enabled

2022-02-25 Thread Igor Mammedov
On Thu, 24 Feb 2022 13:05:07 -0500 "Michael S. Tsirkin" wrote: > On Thu, Feb 24, 2022 at 12:44:09PM -0500, Igor Mammedov wrote: > > on creation a PCIDevice has power turned on at the end of pci_qdev_realize() > > however later on if PCIe slot isn't populated with any children > > it's power is tu

Re: [PATCH 2/4] pcie: update slot power status only is power control is enabled

2022-02-24 Thread Michael S. Tsirkin
On Thu, Feb 24, 2022 at 12:44:09PM -0500, Igor Mammedov wrote: > on creation a PCIDevice has power turned on at the end of pci_qdev_realize() > however later on if PCIe slot isn't populated with any children > it's power is turned off. It's fine if native hotplug is used > as plug callback will pow

[PATCH 2/4] pcie: update slot power status only is power control is enabled

2022-02-24 Thread Igor Mammedov
on creation a PCIDevice has power turned on at the end of pci_qdev_realize() however later on if PCIe slot isn't populated with any children it's power is turned off. It's fine if native hotplug is used as plug callback will power slot on among other things. However when ACPI hotplug is enabled it