]> git.proxmox.com Git - mirror_edk2.git/commit
NetworkPkg: Fix the driver model issue in HTTP Boot driver.
authorFu Siyuan <siyuan.fu@intel.com>
Mon, 14 Mar 2016 02:43:42 +0000 (10:43 +0800)
committerFu Siyuan <siyuan.fu@intel.com>
Wed, 16 Mar 2016 06:43:17 +0000 (14:43 +0800)
commit7537258100166bdf6e9f4203ac13e53a14f97490
treeaf266f6ba498fc0ccc63a125026f6ae81715f6ca
parent6ddc2e438bd55e72b65806414c4fd712d50e612d
NetworkPkg: Fix the driver model issue in HTTP Boot driver.

The HTTP Boot driver have some UEFI driver model problems which will make the
code ASSERT when it's disconnected.
First, the driver opens the HttpSb protocol BY_CHILD without BY_DRIVER attribute.
So the driver binding stop won't be called when HTTP driver is disconnected, so
a child handle is left and made HTTP driver binding stop function goes into error.
This patch remove this unnecessary OpenProtocol and only unload the HII from when
both the IP4 and IP6 stack have been stopped completely.
The second issue is the HTTP boot driver always use the driver's image handle as
it's driver binding handle, it's not correct. HTTP Boot driver provides 2 separate
driver binding protocols from IP4 and IP6 stack, so it has 2 driver binding handle.
So this patch fix the code to use correct driver binding handle when create/open
a HTTP child handle.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Fu Siyuan <siyuan.fu@intel.com>
Reviewed-by: Jiaxin Wu <jiaxin.wu@intel.com>
NetworkPkg/HttpBootDxe/HttpBootClient.c
NetworkPkg/HttpBootDxe/HttpBootConfig.c
NetworkPkg/HttpBootDxe/HttpBootConfig.h
NetworkPkg/HttpBootDxe/HttpBootDxe.c
NetworkPkg/HttpBootDxe/HttpBootDxe.h
NetworkPkg/HttpBootDxe/HttpBootSupport.c