Skip to content

Commit 2e9225c

Browse files
hechaoyongferruhy
authored andcommitted
net/nfp: reserve BAR for expansion ROM
For some platform, the warm restart of host doesn't trigger the reset of NIC, which causes the initialize process of NIC not executed with the right expansion ROM mapping. Consequently, the PXE boot won't work in this case. Now reserve BAR 2.0 which used by expansion ROM so that the mapping is fixed. Signed-off-by: Chaoyong He <[email protected]> Reviewed-by: Long Wu <[email protected]> Reviewed-by: Peng Zhang <[email protected]>
1 parent 9415759 commit 2e9225c

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

drivers/net/nfp/nfpcore/nfp6000_pcie.c

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -370,6 +370,16 @@ nfp_enable_bars(struct nfp_pcie_user *nfp)
370370
if (nfp_bar_write(nfp, bar, barcfg_msix_general) < 0)
371371
return -EIO;
372372

373+
374+
/* Reserve BAR2.0 for expansion rom mapping */
375+
if (type == RTE_PROC_PRIMARY) {
376+
if (nfp->pci_dev->id.device_id == PCI_DEVICE_ID_NFP3800_PF_NIC) {
377+
bar = &nfp->bar[16];
378+
if (bar != NULL)
379+
bar->lock = true;
380+
}
381+
}
382+
373383
return 0;
374384
}
375385

0 commit comments

Comments
 (0)