Skip to content

Commit 299b636

Browse files
Rafał MiłeckiKalle Valo
authored andcommitted
brcmfmac: fix regression in parsing NVRAM for multiple devices
NVRAM is designed to work with Broadcom's SDK Linux kernel which fakes PCI domain 0 for all internal MMIO devices. Since official Linux kernel uses platform devices for that purpose there is a mismatch in numbering PCI domains. There used to be a fix for that problem but it was accidentally dropped during the last firmware loading rework. That resulted in brcmfmac not being able to extract device specific NVRAM content and all kind of calibration problems. Reported-by: Aditya Xavier <[email protected]> Fixes: 2baa3aa ("brcmfmac: introduce brcmf_fw_alloc_request() function") Cc: [email protected] # v4.17+ Signed-off-by: Rafał Miłecki <[email protected]> Acked-by: Arend van Spriel <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
1 parent 0a5257b commit 299b636

File tree

1 file changed

+2
-1
lines changed
  • drivers/net/wireless/broadcom/brcm80211/brcmfmac

1 file changed

+2
-1
lines changed

drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1785,7 +1785,8 @@ brcmf_pcie_prepare_fw_request(struct brcmf_pciedev_info *devinfo)
17851785
fwreq->items[BRCMF_PCIE_FW_CODE].type = BRCMF_FW_TYPE_BINARY;
17861786
fwreq->items[BRCMF_PCIE_FW_NVRAM].type = BRCMF_FW_TYPE_NVRAM;
17871787
fwreq->items[BRCMF_PCIE_FW_NVRAM].flags = BRCMF_FW_REQF_OPTIONAL;
1788-
fwreq->domain_nr = pci_domain_nr(devinfo->pdev->bus);
1788+
/* NVRAM reserves PCI domain 0 for Broadcom's SDK faked bus */
1789+
fwreq->domain_nr = pci_domain_nr(devinfo->pdev->bus) + 1;
17891790
fwreq->bus_nr = devinfo->pdev->bus->number;
17901791

17911792
return fwreq;

0 commit comments

Comments
 (0)