summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorvanjeff <vanjeff@6f19259b-4bc3-4df7-8a09-765794883524>2013-05-22 06:00:28 +0000
committervanjeff <vanjeff@6f19259b-4bc3-4df7-8a09-765794883524>2013-05-22 06:00:28 +0000
commit3b18c341bf605d2cd7bea42915f5b2bfa067c264 (patch)
tree954b7e2bb599782bfbe9e2ac5b4cc68fdf400ce3
parentab808b9728e5c8981cc772021b068f01dde4f800 (diff)
downloadedk2-3b18c341bf605d2cd7bea42915f5b2bfa067c264.zip
edk2-3b18c341bf605d2cd7bea42915f5b2bfa067c264.tar.gz
edk2-3b18c341bf605d2cd7bea42915f5b2bfa067c264.tar.bz2
Check DHCP Server Binding protocol in Supported().
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/branches/UDK2010.SR1@14384 6f19259b-4bc3-4df7-8a09-765794883524
-rw-r--r--MdeModulePkg/Universal/Network/IScsiDxe/IScsiDriver.c14
-rw-r--r--NetworkPkg/IScsiDxe/IScsiDriver.c17
2 files changed, 28 insertions, 3 deletions
diff --git a/MdeModulePkg/Universal/Network/IScsiDxe/IScsiDriver.c b/MdeModulePkg/Universal/Network/IScsiDxe/IScsiDriver.c
index f668fe3..9dda900 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 - 2011, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2004 - 2013, 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
@@ -82,6 +82,18 @@ IScsiDriverBindingSupported (
return EFI_UNSUPPORTED;
}
+ Status = gBS->OpenProtocol (
+ ControllerHandle,
+ &gEfiDhcp4ServiceBindingProtocolGuid,
+ NULL,
+ This->DriverBindingHandle,
+ ControllerHandle,
+ EFI_OPEN_PROTOCOL_TEST_PROTOCOL
+ );
+ if (EFI_ERROR (Status)) {
+ return EFI_UNSUPPORTED;
+ }
+
CurrentDevicePath = RemainingDevicePath;
if (CurrentDevicePath != NULL) {
while (!IsDevicePathEnd (CurrentDevicePath)) {
diff --git a/NetworkPkg/IScsiDxe/IScsiDriver.c b/NetworkPkg/IScsiDxe/IScsiDriver.c
index cc452e7..2d30769 100644
--- a/NetworkPkg/IScsiDxe/IScsiDriver.c
+++ b/NetworkPkg/IScsiDxe/IScsiDriver.c
@@ -112,13 +112,16 @@ IScsiSupported (
EFI_STATUS Status;
EFI_GUID *IScsiServiceBindingGuid;
EFI_GUID *TcpServiceBindingGuid;
+ EFI_GUID *DhcpServiceBindingGuid;
if (IpVersion == IP_VERSION_4) {
IScsiServiceBindingGuid = &gIScsiV4PrivateGuid;
TcpServiceBindingGuid = &gEfiTcp4ServiceBindingProtocolGuid;
+ DhcpServiceBindingGuid = &gEfiDhcp4ServiceBindingProtocolGuid;
} else {
IScsiServiceBindingGuid = &gIScsiV6PrivateGuid;
TcpServiceBindingGuid = &gEfiTcp6ServiceBindingProtocolGuid;
+ DhcpServiceBindingGuid = &gEfiDhcp6ServiceBindingProtocolGuid;
}
Status = gBS->OpenProtocol (
@@ -141,9 +144,19 @@ IScsiSupported (
EFI_OPEN_PROTOCOL_TEST_PROTOCOL
);
if (!EFI_ERROR (Status)) {
- Status = IScsiIsDevicePathSupported (RemainingDevicePath);
+ Status = gBS->OpenProtocol (
+ ControllerHandle,
+ DhcpServiceBindingGuid,
+ NULL,
+ This->DriverBindingHandle,
+ ControllerHandle,
+ EFI_OPEN_PROTOCOL_TEST_PROTOCOL
+ );
if (!EFI_ERROR (Status)) {
- return EFI_SUCCESS;
+ Status = IScsiIsDevicePathSupported (RemainingDevicePath);
+ if (!EFI_ERROR (Status)) {
+ return EFI_SUCCESS;
+ }
}
}
}