Re: [PATCH 05/13] wifi: brcmfmac: Negotiate PCIe mailbox transport with firmware
From: André Eikmeyer
Date: Fri Nov 06 2026 - 09:49:47 EST
Hi Michael,
I tested 01, 04 and 05 on a T2 Macbook Air 9,1 (BCM4377/4). IIRC should be
the same chip as on T2 Macbook 15,4.
Arend, with the patch we get D3 ACK on s2idle and s3. So this basically
renders the D3 ACK WoWL workaround patch obsolete, you recently acked.
So it will suspend now without refusing d3cold transition, but BT is still
dead on resume, which is a separate issue. Just mentioning...
Anyways Michael, the patch as acked now will fail on resume with
brcmf_pcie_send_mb_data: Failed to send H2D mailbox data (-5)
brcmf_pcie_pm_leave_D3() sends D0_INFORM while devinfo->state is still
DOWN, hence we get an -EIO, so the driver falls back to remove and
re-probe. The Asahi tree sets the state before D0_INFORM. With that
change my 4377 resumes without reset.
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c
@@ -2838,10 +2838,10 @@ static int brcmf_pcie_pm_leave_D3(struct device *dev)
/* Check if device is still up and running, if so we are ready */
if (brcmf_pcie_read_pcie32(devinfo, devinfo->reginfo->intmask) != 0) {
brcmf_dbg(PCIE, "Try to wakeup device....\n");
+ devinfo->state = BRCMFMAC_PCIE_STATE_UP;
if (brcmf_pcie_send_mb_data(devinfo, BRCMF_H2D_HOST_D0_INFORM))
goto cleanup;
brcmf_dbg(PCIE, "Hot resume, continue....\n");
- devinfo->state = BRCMFMAC_PCIE_STATE_UP;
brcmf_pcie_select_core(devinfo, BCMA_CORE_PCIE2);
brcmf_bus_change_state(bus, BRCMF_BUS_UP);
brcmf_pcie_intr_enable(devinfo);
@@ -2851,6 +2851,7 @@ static int brcmf_pcie_pm_leave_D3(struct device *dev)
}
cleanup:
+ devinfo->state = BRCMFMAC_PCIE_STATE_DOWN;
brcmf_chip_detach(devinfo->ci);
devinfo->ci = NULL;
pdev = devinfo->pdev;
Feel free to fold it into v2, or I can send it as a follow-up if the
series is already applied.
Andre