Re: [PATCH v3 10/15] pcie: introduce pcie_sltctl_powered_off() helper

2023-02-09 Thread Philippe Mathieu-Daudé
On 9/2/23 21:08, Vladimir Sementsov-Ogievskiy wrote: In pcie_cap_slot_write_config() we check for PCI_EXP_SLTCTL_PWR_OFF in a bad form. We should distinguish PCI_EXP_SLTCTL_PWR which is a "mask" and PCI_EXP_SLTCTL_PWR_OFF which is value for that mask. Better code is in

[PATCH v3 10/15] pcie: introduce pcie_sltctl_powered_off() helper

2023-02-09 Thread Vladimir Sementsov-Ogievskiy
In pcie_cap_slot_write_config() we check for PCI_EXP_SLTCTL_PWR_OFF in a bad form. We should distinguish PCI_EXP_SLTCTL_PWR which is a "mask" and PCI_EXP_SLTCTL_PWR_OFF which is value for that mask. Better code is in pcie_cap_slot_unplug_request_cb() and in pcie_cap_update_power(). Let's use same