Skip to content

Commit

Permalink
Avoid lockup in PCIe setup when the M.2 header is not populated (#75)
Browse files Browse the repository at this point in the history
* Pcie30PhyInit () may fail e.g. on boards w/o the M.2 header populated.

Abort driver startup in this case and return with an early error.

* Fix style
  • Loading branch information
MartinHusemann committed Jan 30, 2024
1 parent d3cc9bf commit 590208c
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,11 @@ InitializePciHost (

if (PCIE_SEGMENT == PCIE_SEGMENT_PCIE30X1 || PCIE_SEGMENT == PCIE_SEGMENT_PCIE30X2) {
/* Configure PCIe 3.0 PHY */
Pcie30PhyInit ();
EFI_STATUS Status;
Status = Pcie30PhyInit ();
if (EFI_ERROR(Status)) {
return Status;
}
} else {
/* Configure PCIe 2.0 PHY */
MultiPhySetMode (2, MULTIPHY_MODE_PCIE);
Expand Down

0 comments on commit 590208c

Please sign in to comment.