summaryrefslogtreecommitdiff
path: root/MdeModulePkg/Universal/Network/IScsiDxe
diff options
context:
space:
mode:
authorWu Jiaxin <jiaxin.wu@intel.com>2015-02-05 07:56:44 +0000
committerjiaxinwu <jiaxinwu@Edk2>2015-02-05 07:56:44 +0000
commit0e40240230fe51cc1890ec90d6f602046a3d8a77 (patch)
tree09f5998349af79bc228c7f7e438ebd01054ff869 /MdeModulePkg/Universal/Network/IScsiDxe
parentd63a52ebf3ab50ef3578ec412bc5e8675d33e503 (diff)
downloadedk2-0e40240230fe51cc1890ec90d6f602046a3d8a77.zip
edk2-0e40240230fe51cc1890ec90d6f602046a3d8a77.tar.gz
edk2-0e40240230fe51cc1890ec90d6f602046a3d8a77.tar.bz2
Open default Tcp child via BY_CHILD_CONTROLLER.
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Wu Jiaxin <jiaxin.wu@intel.com> Reviewed-by: Ye Ting <ting.ye@intel.com> Reviewed-by: Fu Siyuan <siyuan.fu@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16775 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdeModulePkg/Universal/Network/IScsiDxe')
-rw-r--r--MdeModulePkg/Universal/Network/IScsiDxe/IScsiDriver.c33
1 files changed, 32 insertions, 1 deletions
diff --git a/MdeModulePkg/Universal/Network/IScsiDxe/IScsiDriver.c b/MdeModulePkg/Universal/Network/IScsiDxe/IScsiDriver.c
index b389610..e55bee8 100644
--- a/MdeModulePkg/Universal/Network/IScsiDxe/IScsiDriver.c
+++ b/MdeModulePkg/Universal/Network/IScsiDxe/IScsiDriver.c
@@ -1,7 +1,7 @@
/** @file
The entry point of IScsi driver.
-Copyright (c) 2004 - 2014, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2004 - 2015, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -277,6 +277,30 @@ IScsiDriverBindingStart (
}
//
+ // ISCSI children should share the default Tcp child, just open the default Tcp child via BY_CHILD_CONTROLLER.
+ //
+ Status = gBS->OpenProtocol (
+ Private->ChildHandle, /// Default Tcp child
+ &gEfiTcp4ProtocolGuid,
+ &Interface,
+ This->DriverBindingHandle,
+ Private->ExtScsiPassThruHandle,
+ EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER
+ );
+ if (EFI_ERROR (Status)) {
+ gBS->UninstallMultipleProtocolInterfaces (
+ Private->ExtScsiPassThruHandle,
+ &gEfiExtScsiPassThruProtocolGuid,
+ &Private->IScsiExtScsiPassThru,
+ &gEfiDevicePathProtocolGuid,
+ Private->DevicePath,
+ NULL
+ );
+
+ goto ON_ERROR;
+ }
+
+ //
// Update/Publish the iSCSI Boot Firmware Table.
//
IScsiPublishIbft ();
@@ -357,6 +381,13 @@ IScsiDriverBindingStop (
// EXT SCSI PASS THRU protocol installed on ExtScsiPassThruHandle.
//
gBS->CloseProtocol (
+ Private->ChildHandle,
+ &gEfiTcp4ProtocolGuid,
+ Private->Image,
+ Private->ExtScsiPassThruHandle
+ );
+
+ gBS->CloseProtocol (
Conn->Tcp4Io.Handle,
&gEfiTcp4ProtocolGuid,
Private->Image,