Re: [PATCH v2 4/4] x86/quirks: Use pci_power_eq() in apple_airport_reset()
From: andriy.shevchenko@xxxxxxxxx
Date: Thu Nov 19 2026 - 12:20:21 EST
On Thu, Nov 19, 2026 at 02:35:50PM +0000, Habil Eren Türker wrote:
> Use pci_power_eq() to check the PCI power state in the
> Apple Airport reset quirk.
...
> - if ((pmcsr & PCI_PM_CTRL_STATE_MASK) != (__force u16)PCI_D0) {
> - pmcsr &= ~PCI_PM_CTRL_STATE_MASK;
> + if (!pci_power_eq(pmcsr, PCI_D0)) {
> + pci_power_t_set(&pmcsr, PCI_D0);
Haven't checked the code, but consider (if enough users) also have
// update state if it wasn't equal to the required
static inline bool pci_power_t_update(...)
{
if (pci_power_eq(pmcsr, state))
return false;
pci_power_t_set(&pmcsr, state);
return true;
}
if (pci_power_t_update(&pmcsr, PCI_D0)) {
--
With Best Regards,
Andy Shevchenko