-
Notifications
You must be signed in to change notification settings - Fork 163
NetworkPkg: Add timeout polling for PXE media detection #1636
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: release/202502
Are you sure you want to change the base?
NetworkPkg: Add timeout polling for PXE media detection #1636
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## release/202502 #1636 +/- ##
================================================
Coverage ? 0.55%
================================================
Files ? 165
Lines ? 72020
Branches ? 1781
================================================
Hits ? 402
Misses ? 71611
Partials ? 7
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
25b53de to
fa0ad85
Compare
Simplify the `NetLibDetectMediaWaitTimeout()` execution flow and add a timeout on non-AIP media detection to allow NICs sufficient time to initialize and report media state. Previously, DxeNetLib would only poll AIP media state with a timeout, while non-AIP media detection would immediately return and rely upon a logic bug in the implementation for the caller to be told network media was present (even though it might not be). Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
fa0ad85 to
4820673
Compare
…init Wait for presence to be reported after SNP initialization is called without calling it again. Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
4820673 to
cc0e97a
Compare
|
Since |
Restore the API to the original one to prevent that from being a breaking change. Make internal refactors in support. Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
Update some names to better distinguish between function responsibilities. Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
…n as success Network media detection currently happens through AIP->GetInformation() or SNP->GetStatus(). If the underlying SNP driver does not support media detection, previous code simply returned that media was present. This change allows more correct behavior by default, to force media detection, but adds a PCD to allow treating unsupported media detection as success for backwards compatibility. Platforms that need to enable the PCD, should try to find a way to have media detection be supported. PCD: gEfiNetworkPkgTokenSpaceGuid.PcdTreatSnpMediaUnsupportedAsSuccess Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
Pushed. |
Description
Resolves #1635
Simplify the
NetLibDetectMediaWaitTimeout()execution flow and add a timeout on non-AIP media detection to allow NICs sufficient time to initialize and report media state.Previously, DxeNetLib would only poll AIP media state with a timeout, while non-AIP media detection would immediately return and rely upon a logic bug in the implementation for the caller to be told network media was present (even though it might not be).
By default, network devices must properly report media presence. However, previous implementation would check
Aip->GetInformation()fall back toSnp->GetStatus()and then return media is present if that was not SNP returned that it did not support media detection. A PCD (gEfiNetworkPkgTokenSpaceGuid.PcdTreatSnpMediaUnsupportedAsSuccess) is added to support that behavior if necessary.How This Was Tested
So far:
Todo (PR will be taken out of draft when done):
Integration Instructions