diff --git a/drivers/net/wireless/apple/centauri/t6050/centauri_pci.c b/drivers/net/wireless/apple/centauri/t6050/centauri_pci.c index df385daa8da49..59072f44406c2 100644 --- a/drivers/net/wireless/apple/centauri/t6050/centauri_pci.c +++ b/drivers/net/wireless/apple/centauri/t6050/centauri_pci.c @@ -1035,8 +1035,18 @@ static int centauri_t6050_suspend(struct device *dev) struct centauri_t6050 *c = pci_get_drvdata(pdev); int ret; - if (!apple_centauri_sleep_reboot(pdev)) - return c->boot_phase == CEN_BOOT_READY ? pci_save_state(pdev) : -EBUSY; + if (!apple_centauri_sleep_reboot(pdev)) { + switch (READ_ONCE(c->boot_phase)) { + case CEN_BOOT_ROM: + case CEN_BOOT_CYCLE: + case CEN_BOOT_IPC: + /* A boot in flight; let it finish before the sleep. */ + return -EBUSY; + default: + /* Ready, or failed or stopped: nothing is in flight. */ + return pci_save_state(pdev); + } + } ret = centauri_t6050_quiesce(c); if (ret) goto recover;