public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [PATCH v1 0/2] NetworkPkg/iScsiDxe: Update iScsiStart Policy
@ 2017-02-13  6:24 hegdenag
  2017-02-13  6:24 ` [PATCH v1 1/2] NetworkPkg/iSCSIDxe: Update the condition for IScsiStart Abort hegdenag
  2017-02-13  6:24 ` [PATCH v1 2/2] NetworkPkg/NetworkPkg.dec: Update comments for the PCD hegdenag
  0 siblings, 2 replies; 3+ messages in thread
From: hegdenag @ 2017-02-13  6:24 UTC (permalink / raw)
  To: edk2-devel; +Cc: jiaxin.wu, jaben.carsey, ruiyu.ni, lubo.zhang, sriram-s

Today, iSCSI driver checks whether there are AIP instances
installed by iSCSI HBA adapter and if yes, the iSCSI driver
will return EFI_ABORTED in its driver binding Start. 
We can not guarantee the existence of AIP instances always during
iSCSI DBStart. Hence, we might end up doing a iScsiStart even if
the intent of the customer was to use only iSCSI on HBA.
The series of patch will define a new PCD value for the PCD 
PcdIScsiAIPNetworkBootPolicy, "Always use iSCSI HBA and ignore
UEFI iSCSI", update iScsiStart to check this PCD value and return
EFI_ABORT in this case even before checking for AIP instances.

hegdenag (2):
  NetworkPkg/iSCSIDxe: Update the condition for IScsiStart Abort
  NetworkPkg/NetworkPkg.dec: Update comments for the PCD

 NetworkPkg/IScsiDxe/IScsiDriver.c |  8 +++++++-
 NetworkPkg/IScsiDxe/IScsiDriver.h | 19 +++++++++++--------
 NetworkPkg/NetworkPkg.dec         |  5 +++--
 3 files changed, 21 insertions(+), 11 deletions(-)

-- 
2.8.3.windows.1



^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH v1 1/2] NetworkPkg/iSCSIDxe: Update the condition for IScsiStart Abort
  2017-02-13  6:24 [PATCH v1 0/2] NetworkPkg/iScsiDxe: Update iScsiStart Policy hegdenag
@ 2017-02-13  6:24 ` hegdenag
  2017-02-13  6:24 ` [PATCH v1 2/2] NetworkPkg/NetworkPkg.dec: Update comments for the PCD hegdenag
  1 sibling, 0 replies; 3+ messages in thread
From: hegdenag @ 2017-02-13  6:24 UTC (permalink / raw)
  To: edk2-devel; +Cc: jiaxin.wu, jaben.carsey, ruiyu.ni, lubo.zhang, sriram-s

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



^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [PATCH v1 2/2] NetworkPkg/NetworkPkg.dec: Update comments for the PCD
  2017-02-13  6:24 [PATCH v1 0/2] NetworkPkg/iScsiDxe: Update iScsiStart Policy hegdenag
  2017-02-13  6:24 ` [PATCH v1 1/2] NetworkPkg/iSCSIDxe: Update the condition for IScsiStart Abort hegdenag
@ 2017-02-13  6:24 ` hegdenag
  1 sibling, 0 replies; 3+ messages in thread
From: hegdenag @ 2017-02-13  6:24 UTC (permalink / raw)
  To: edk2-devel; +Cc: jiaxin.wu, jaben.carsey, ruiyu.ni, lubo.zhang, sriram-s

Update comment section for the PCD PcdIScsiAIPNetworkBootPolicy.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Hegde Nagaraj P <nagaraj-p.hegde@hpe.com>
---
 NetworkPkg/NetworkPkg.dec | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/NetworkPkg/NetworkPkg.dec b/NetworkPkg/NetworkPkg.dec
index 2ad485d..eedd1e5 100644
--- a/NetworkPkg/NetworkPkg.dec
+++ b/NetworkPkg/NetworkPkg.dec
@@ -3,8 +3,8 @@
 #
 # This package provides network modules that conform to UEFI 2.4 specification.
 #
-# (C) Copyright 2015 Hewlett-Packard Development Company, L.P.<BR>
 # Copyright (c) 2009 - 2017, Intel Corporation. All rights reserved.<BR>
+# (C) Copyright 2015-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.
@@ -95,7 +95,7 @@
   gEfiNetworkPkgTokenSpaceGuid.PcdDhcp6UidType|4|UINT8|0x10000001
 
   ## Network boot policy to stop UEFI iSCSI if applicable.
-  # 0x00 = Always use UEFI iSCSI and ignore AIP.
+  # 0x00 = Always use UEFI iSCSI and ignore iSCSI HBA.
   # 0x01 = Stop UEFI iSCSI if iSCSI HBA adapter produces AIP protocol with Network Boot.
   # 0x02 = Stop UEFI iSCSI if iSCSI HBA adapter supports booting from iSCSI IPv4 targets.
   # 0x04 = Stop UEFI iSCSI if iSCSI HBA adapter supports booting from iSCSI IPv6 targets.
@@ -103,6 +103,7 @@
   # 0x10 = Stop UEFI iSCSI if iSCSI HBA adapter supports multipath I/O for iSCSI boot.
   # 0x20 = Stop UEFI iSCSI if iSCSI HBA adapter is currently configured to boot from iSCSI IPv4 targets.
   # 0x40 = Stop UEFI iSCSI if iSCSI HBA adapter is currently configured to boot from iSCSI IPv6 targets.
+  # 0xFF = Always use iSCSI HBA and ignore UEFI iSCSI.
   # @Prompt Type Value of network boot policy used in iSCSI.
   gEfiNetworkPkgTokenSpaceGuid.PcdIScsiAIPNetworkBootPolicy|0x08|UINT8|0x10000007
 
-- 
2.8.3.windows.1



^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-02-13  6:24 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-02-13  6:24 [PATCH v1 0/2] NetworkPkg/iScsiDxe: Update iScsiStart Policy hegdenag
2017-02-13  6:24 ` [PATCH v1 1/2] NetworkPkg/iSCSIDxe: Update the condition for IScsiStart Abort hegdenag
2017-02-13  6:24 ` [PATCH v1 2/2] NetworkPkg/NetworkPkg.dec: Update comments for the PCD hegdenag

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox