]> git.proxmox.com Git - mirror_edk2.git/commit
MdeModulePkg: Refine SNP driver's media status check logic.
authorFu Siyuan <siyuan.fu@intel.com>
Tue, 3 May 2016 09:11:22 +0000 (17:11 +0800)
committerFu Siyuan <siyuan.fu@intel.com>
Fri, 6 May 2016 00:52:26 +0000 (08:52 +0800)
commit128946c9c38977ac2047c86d4143db2a172fc2f6
treedda739bf0ac6a467eddd4967c103b8ea20110182
parent89ecd4cf8078aa946083cdcbf9af81ff29f8d9f5
MdeModulePkg: Refine SNP driver's media status check logic.

Some UNDI drivers may not support the cable detect in UNDI INITIALIZE command,
but support the media present check in UNDI GET_STATUS command. Current SNP
driver will set the MediaPresentSupported field to FALSE in EFI_SIMPLE_NETWORK_MODE
for such case, which forbid the media detect from the callers.

This patch updates the SNP driver to support such kind of UNDIs for media detect.
MediaPresentSupported will be set to TRUE, and a GET_STATUS command will be issued
immediately after INITIALIZE command in SNP->Initialize() function, to refresh
the value of MediaPresent in SNP mode data.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Fu Siyuan <siyuan.fu@intel.com>
Reviewed-By: Ye Ting <ting.ye@intel.com>
Reviewed-By: Wu Jiaxin <jiaxin.wu@intel.com>
MdeModulePkg/Universal/Network/SnpDxe/Get_status.c
MdeModulePkg/Universal/Network/SnpDxe/Initialize.c
MdeModulePkg/Universal/Network/SnpDxe/Snp.c
MdeModulePkg/Universal/Network/SnpDxe/Snp.h