1: 156636cac8ff ! 1: c19892755aa9 wifi: brcmfmac: handle missing D3 ACK on BCM4377 T2 Macs @@ Commit message The current PCIe suspend callback treats this as fatal and aborts system suspend.  - On the affected PCI and DMI combinations, mask the mailbox interrupt, - preserve the bus-down state, and let generic PCI/ACPI suspend proceed. On - resume the existing recovery path tears down and probes the device again - instead of relying on a D0 mailbox transaction. + When this happens on BCM4377, mask the mailbox interrupt, preserve the + bus-down state, and let generic PCI/ACPI suspend proceed. On resume the + existing recovery path tears down and probes the device again instead of + relying on a D0 mailbox transaction.  Tested-on: MacBookAir9,1, MacBookPro15,4, MacBookPro16,3 Signed-off-by: Andre Eikmeyer   ## drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c ## -@@ - #include  - #include  - #include  -+#include  - #include  - #include  - #include  -@@ drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c: enum brcmf_pcie_state { - BRCMFMAC_PCIE_STATE_UP - }; -  -+/* -+ * BCM4377 on these T2 Macs never acknowledges HOST_D3_INFORM. The platform -+ * can nevertheless enter and leave system suspend if the PCIe mailbox -+ * interrupt is masked and resume takes the existing cold-reprobe path. -+ */ -+static const struct dmi_system_id brcmf_pcie_no_d3_ack_quirk[] = { -+ { -+ .matches = { -+ DMI_EXACT_MATCH(DMI_BOARD_VENDOR, "Apple Inc."), -+ DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "MacBookAir9,1"), -+ }, -+ }, -+ { -+ .matches = { -+ DMI_EXACT_MATCH(DMI_BOARD_VENDOR, "Apple Inc."), -+ DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "MacBookPro15,4"), -+ }, -+ }, -+ { -+ .matches = { -+ DMI_EXACT_MATCH(DMI_BOARD_VENDOR, "Apple Inc."), -+ DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "MacBookPro16,3"), -+ }, -+ }, -+ {} -+}; -+ -+static bool brcmf_pcie_quirk_no_d3_ack(struct pci_dev *pdev) -+{ -+ return pdev->vendor == PCI_VENDOR_ID_BROADCOM && -+ pdev->device == BRCM_PCIE_4377_DEVICE_ID && -+ dmi_check_system(brcmf_pcie_no_d3_ack_quirk); -+} -+ - BRCMF_FW_DEF(43602, "brcmfmac43602-pcie"); - BRCMF_FW_DEF(4350, "brcmfmac4350-pcie"); - BRCMF_FW_DEF(4350C, "brcmfmac4350c2-pcie");  @@ drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c: static int brcmf_pcie_pm_enter_D3(struct device *dev) wait_event_timeout(devinfo->mbdata_resp_wait, devinfo->mbdata_completed, BRCMF_PCIE_MBDATA_TIMEOUT); if (!devinfo->mbdata_completed) { -+ if (brcmf_pcie_quirk_no_d3_ack(devinfo->pdev)) { ++ if (devinfo->pdev->device == BRCM_PCIE_4377_DEVICE_ID) {  + dev_info(dev, "D3 ACK missing; masking PCIe mailbox interrupt\n");  + brcmf_pcie_intr_disable(devinfo);  + goto done;