[EHL] Gbe device status fix

Check Gbe device status and update it to D0
if non-D0 state was detected.

Signed-off-by: Ong Kok Tong <kok.tong.ong@intel.com>
This commit is contained in:
Ong Kok Tong 2021-08-10 13:55:23 +08:00 committed by Guo Dong
parent 5579f47e40
commit 87cdb90c84
1 changed files with 2 additions and 2 deletions

View File

@ -62,9 +62,9 @@ CheckGbeStatus (
)
{
UINT16 PmeCtrlStatus;
//Check device status
PmeCtrlStatus = PciRead16 (GbeBase + PMECTRLSTATUS_OFFSET);
if ((PmeCtrlStatus & POWERSTATE) != POWERSTATE) {
//Check device status if not D0 then update it to D0
if ((PmeCtrlStatus & POWERSTATE) != 0x0) {
PciWrite16 ((GbeBase + PMECTRLSTATUS_OFFSET), (PmeCtrlStatus & ~POWERSTATE));
DEBUG ((DEBUG_INFO, "GbeBase:0x%x -> PMECTRLSTATUS:0x%x\n", GbeBase, PmeCtrlStatus));
}