public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: hegdenag <nagaraj-p.hegde@hpe.com>
To: edk2-devel@lists.01.org
Cc: jiaxin.wu@intel.com, ting.ye@intel.com, lubo.zhang@intel.com,
	siyuan.fu@intel.com, sriram-s@hpe.com
Subject: [PATCH v2 1/2] NetworkPkg/iSCSIDxe: Update the condition for IScsiStart Abort
Date: Mon, 13 Feb 2017 12:50:17 +0530	[thread overview]
Message-ID: <20170213072018.14272-2-nagaraj-p.hegde@hpe.com> (raw)
In-Reply-To: <20170213072018.14272-1-nagaraj-p.hegde@hpe.com>

Update existing #define and add a new #define used for the
PCD PcdIScsiAIPNetworkBootPolicy. Update the code in iScsiStart
according to the #define changes in iScsiDriver.h

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Hegde Nagaraj P <nagaraj-p.hegde@hpe.com>
---
 NetworkPkg/IScsiDxe/IScsiDriver.c |  8 +++++++-
 NetworkPkg/IScsiDxe/IScsiDriver.h | 19 +++++++++++--------
 2 files changed, 18 insertions(+), 9 deletions(-)

diff --git a/NetworkPkg/IScsiDxe/IScsiDriver.c b/NetworkPkg/IScsiDxe/IScsiDriver.c
index 78c93ba..5ea24b6 100644
--- a/NetworkPkg/IScsiDxe/IScsiDriver.c
+++ b/NetworkPkg/IScsiDxe/IScsiDriver.c
@@ -2,6 +2,8 @@
   The entry point of IScsi driver.
 
 Copyright (c) 2004 - 2017, Intel Corporation. All rights reserved.<BR>
+(C) Copyright 2017 Hewlett Packard Enterprise Development LP<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
@@ -419,7 +421,11 @@ IScsiStart (
   }
 
   NetworkBootPolicy = PcdGet8 (PcdIScsiAIPNetworkBootPolicy);
-  if (NetworkBootPolicy != ALWAYS_USE_UEFI_ISCSI_AND_IGNORE_AIP) {
+  if (NetworkBootPolicy == ALWAYS_USE_ISCSI_HBA_AND_IGNORE_UEFI_ISCSI) {
+    return EFI_ABORTED;
+  }
+
+  if (NetworkBootPolicy != ALWAYS_USE_UEFI_ISCSI_AND_IGNORE_ISCSI_HBA) {
     //
     // Check existing iSCSI AIP.
     //
diff --git a/NetworkPkg/IScsiDxe/IScsiDriver.h b/NetworkPkg/IScsiDxe/IScsiDriver.h
index 9e59b38..e3c15fa 100644
--- a/NetworkPkg/IScsiDxe/IScsiDriver.h
+++ b/NetworkPkg/IScsiDxe/IScsiDriver.h
@@ -2,6 +2,8 @@
   The header file of IScsiDriver.c.
 
 Copyright (c) 2004 - 2015, Intel Corporation. All rights reserved.<BR>
+(C) Copyright 2017 Hewlett Packard Enterprise Development LP<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
@@ -29,14 +31,15 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 
 #define IP_MODE_AUTOCONFIG_IP4     3
 #define IP_MODE_AUTOCONFIG_IP6     4
-#define ALWAYS_USE_UEFI_ISCSI_AND_IGNORE_AIP    0x00
-#define STOP_UEFI_ISCSI_IF_HBA_INSTALL_AIP      0x01
-#define STOP_UEFI_ISCSI_IF_AIP_SUPPORT_IP4      0x02
-#define STOP_UEFI_ISCSI_IF_AIP_SUPPORT_IP6      0x04
-#define STOP_UEFI_ISCSI_IF_AIP_SUPPORT_OFFLOAD  0x08
-#define STOP_UEFI_ISCSI_IF_AIP_SUPPORT_MPIO     0x10
-#define STOP_UEFI_ISCSI_IF_AIP_CONFIGURED_IP4   0x20
-#define STOP_UEFI_ISCSI_IF_AIP_CONFIGURED_IP6   0x40
+#define ALWAYS_USE_UEFI_ISCSI_AND_IGNORE_ISCSI_HBA  0x00
+#define STOP_UEFI_ISCSI_IF_HBA_INSTALL_AIP          0x01
+#define STOP_UEFI_ISCSI_IF_AIP_SUPPORT_IP4          0x02
+#define STOP_UEFI_ISCSI_IF_AIP_SUPPORT_IP6          0x04
+#define STOP_UEFI_ISCSI_IF_AIP_SUPPORT_OFFLOAD      0x08
+#define STOP_UEFI_ISCSI_IF_AIP_SUPPORT_MPIO         0x10
+#define STOP_UEFI_ISCSI_IF_AIP_CONFIGURED_IP4       0x20
+#define STOP_UEFI_ISCSI_IF_AIP_CONFIGURED_IP6       0x40
+#define ALWAYS_USE_ISCSI_HBA_AND_IGNORE_UEFI_ISCSI  0xFF
 
 extern EFI_COMPONENT_NAME2_PROTOCOL       gIScsiComponentName2;
 extern EFI_COMPONENT_NAME_PROTOCOL        gIScsiComponentName;
-- 
2.8.3.windows.1



  reply	other threads:[~2017-02-13  7:20 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-13  7:20 [PATCH v2 0/2] NetworkPkg/iScsiDxe: Update iScsiStart Policy hegdenag
2017-02-13  7:20 ` hegdenag [this message]
2017-02-13  7:20 ` [PATCH v2 2/2] NetworkPkg/NetworkPkg.dec: Update comments for the PCD hegdenag
2017-02-13  7:45 ` [PATCH v2 0/2] NetworkPkg/iScsiDxe: Update iScsiStart Policy Wu, Jiaxin
2017-02-13  8:10 ` Subramanian, Sriram
2017-02-13 10:28 ` Zhang, Lubo
2017-02-14  2:56 ` Ye, Ting
2017-02-14  3:33 ` Fu, Siyuan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170213072018.14272-2-nagaraj-p.hegde@hpe.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox