summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ape/main.c10
-rw-r--r--libs/NCSI/ncsi.c2
2 files changed, 7 insertions, 5 deletions
diff --git a/ape/main.c b/ape/main.c
index eaf51e1..603abb6 100644
--- a/ape/main.c
+++ b/ape/main.c
@@ -260,19 +260,23 @@ void __attribute__((noreturn)) loaderLoop(void)
}
else
{
+ wait_for_all_rx();
+ initRMU();
if (SHM_HOST_DRIVER_STATE_STATE_UNLOAD == host_state)
{
printf("host unloaded.\n");
+ NCSI_reload(ALWAYS_RESET);
}
else
{
printf("wol?\n");
+ NCSI_reload(AS_NEEDED);
}
- wait_for_all_rx();
- initRMU();
- NCSI_reload(AS_NEEDED);
}
}
+
+ NetworkPort_t *port = &gPort0;
+ Network_checkPortState(port);
}
}
diff --git a/libs/NCSI/ncsi.c b/libs/NCSI/ncsi.c
index 46f5be9..ce859e4 100644
--- a/libs/NCSI/ncsi.c
+++ b/libs/NCSI/ncsi.c
@@ -406,8 +406,6 @@ static void getLinkStatusHandler(NetworkFrame_t *frame)
uint32_t rx = port->shm_channel->NcsiChannelCtrlstatAllRx.r32;
uint32_t tx = port->shm_channel->NcsiChannelCtrlstatAllRx.r32;
- Network_checkPortState(port);
-
APE_aquireLock();
stat.r16 = MII_readRegister(port->device, phy, (mii_reg_t)REG_MII_AUXILIARY_STATUS_SUMMARY);
APE_releaseLock();
OpenPOWER on IntegriCloud