Revision: 16782
          http://sourceforge.net/p/edk2/code/16782
Author:   vanjeff
Date:     2015-02-06 02:34:13 +0000 (Fri, 06 Feb 2015)
Log Message:
-----------
Open default Tcp child via BY_CHILD_CONTROLLER.

(Sync patch r16775 from main trunk.)

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Wu Jiaxin <[email protected]>
Reviewed-by: Ye Ting <[email protected]>
Reviewed-by: Fu Siyuan <[email protected]>

Revision Links:
--------------
    http://sourceforge.net/p/edk2/code/16775

Modified Paths:
--------------
    branches/UDK2014.SP1/MdeModulePkg/Universal/Network/IScsiDxe/IScsiDriver.c

Modified: 
branches/UDK2014.SP1/MdeModulePkg/Universal/Network/IScsiDxe/IScsiDriver.c
===================================================================
--- branches/UDK2014.SP1/MdeModulePkg/Universal/Network/IScsiDxe/IScsiDriver.c  
2015-02-06 02:33:22 UTC (rev 16781)
+++ branches/UDK2014.SP1/MdeModulePkg/Universal/Network/IScsiDxe/IScsiDriver.c  
2015-02-06 02:34:13 UTC (rev 16782)
@@ -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 @@
   }
 
   //
+  // 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 @@
     // 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,


------------------------------------------------------------------------------
Dive into the World of Parallel Programming. The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net/
_______________________________________________
edk2-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-commits

Reply via email to