summaryrefslogtreecommitdiffstats
path: root/NetworkPkg/IScsiDxe/IScsiDriver.c
Commit message (Collapse)AuthorAgeFilesLines
* NetworkPkg/IScsiDxe: Fix various typosAntoine Coeur2020-02-101-5/+5
| | | | | | | | | | | | | Fix various typos in comments and documentation. Cc: Jiaxin Wu <jiaxin.wu@intel.com> Cc: Siyuan Fu <siyuan.fu@intel.com> Cc: Maciej Rabeda <maciej.rabeda@intel.com> Signed-off-by: Antoine Coeur <coeur@gmx.fr> Reviewed-by: Philippe Mathieu-Daude <philmd@redhat.com> Reviewed-by: Maciej Rabeda <maciej.rabeda@linux.intel.com> Signed-off-by: Philippe Mathieu-Daude <philmd@redhat.com> Message-Id: <20200207010831.9046-42-philmd@redhat.com>
* NetworkPkg: Replace BSD License with BSD+Patent LicenseMichael D Kinney2019-04-091-7/+1
| | | | | | | | | | | | | | | | | | | | https://bugzilla.tianocore.org/show_bug.cgi?id=1373 Replace BSD 2-Clause License with BSD+Patent License. This change is based on the following emails: https://lists.01.org/pipermail/edk2-devel/2019-February/036260.html https://lists.01.org/pipermail/edk2-devel/2018-October/030385.html RFCs with detailed process for the license change: V3: https://lists.01.org/pipermail/edk2-devel/2019-March/038116.html V2: https://lists.01.org/pipermail/edk2-devel/2019-March/037669.html V1: https://lists.01.org/pipermail/edk2-devel/2019-March/037500.html Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com> Reviewed-by: Siyuan Fu <siyuan.fu@intel.com>
* NetworkPkg/IScsiDxe: Use UEFILib APIs to uninstall protocols.Ashish Singhal2019-01-101-20/+11
| | | | | | | | | | | | During cleanup in case of initialization failure, some driver bindings are not installed. Using abstractions in UEFILib takes care of it. REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1428 Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ashish Singhal <ashishsingha@nvidia.com> Reviewed-by: Fu Siyuan <siyuan.fu@intel.com>
* NetworkPkg: Clean up source filesLiming Gao2018-06-281-128/+128
| | | | | | | | | 1. Do not use tab characters 2. No trailing white space in one line 3. All files must end with CRLF Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Liming Gao <liming.gao@intel.com>
* NetworkPkg: Fix MSFT C4255 warningSong, BinX2017-11-141-0/+1
| | | | | | | | | | | | | | | | | | V2: Fix MSFT C4255 warning V1: Enable MSFT C4255 warning. From MSDN: Compiler Warning (level 4) C4255 function' : no function prototype given: converting '()' to '(void)' The compiler did not find an explicit list of arguments to a function. This warning is for the C compiler only. Cc: Liming Gao <liming.gao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Bell Song <binx.song@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
* NetworkPkg/IScsiDxe: Add IPv6 support condition check.Jiaxin Wu2017-10-261-1/+1
| | | | | | | | | | | | | | Base on the request of https://bugzilla.tianocore.org/show_bug.cgi?id=710, we provide this patch to IPv6 condition check by leveraging AIP Protocol. Cc: Karunakar P <karunakarp@amiindia.co.in> Cc: Ye Ting <ting.ye@intel.com> Cc: Fu Siyuan <siyuan.fu@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Karunakar P <karunakarp@amiindia.co.in> Signed-off-by: Wu Jiaxin <jiaxin.wu@intel.com> Reviewed-by: Karunakar p <karunakarp@amiindia.co.in> Reviewed-by: Wu Jiaxin <jiaxin.wu@intel.com>
* NetworkPkg/IScsiDxe: Fix the incorrect error handling in DriverEntryPointJiaxin Wu2017-03-231-4/+7
| | | | | | | | | | | | | Currently, error handling in IScsiDriverEntryPoint is incorrect. For example, if IScsiCreateAttempts() return error due to the limited max variable size, iSCSI will not unload the configuration entries. Cc: Zhang Lubo <lubo.zhang@intel.com> Cc: Ye Ting <ting.ye@intel.com> Cc: Fu Siyuan <siyuan.fu@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Wu Jiaxin <jiaxin.wu@intel.com> Reviewed-by: Zhang Lubo <lubo.zhang@intel.com>
* NetworkPkg:Add scriptable configuration to iSCSI driver by leveraging x-UEFI.Zhang Lubo2017-02-231-6/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | v2: Add error handling if can not create Attempts in driver entry point. Since we support to define a macro be a PCD value, we enhance our code by modifying the structure in IFR_NVDATA. This effect code logic mainly in Creating Keywords,Convert IFR NvData To AttemptConfigData ByKeyword and reverse function. Fix typo errors and sync based on the latest code. Enable iSCSI keywords configuration based on x-UEFI name space. we introduce new PCD to control the attempt numbers which will be created in non activated state, besides the Attempt name is changed to READ_ONLY attribute in UI. We can invoke KEYWORD HANDLER Protocol to configure the related keywords. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Zhang Lubo <lubo.zhang@intel.com> Cc: Ye Ting <ting.ye@intel.com> Cc: Fu Siyuan <siyuan.fu@intel.com> Cc: Wu Jiaxin <jiaxin.wu@intel.com> Reviewed-by: Ye Ting <ting.ye@intel.com> Reviewed-by: Fu Siyuan <siyuan.fu@intel.com> Reviewed-by: Wu Jiaxin jiaxin.wu@intel.com
* NetworkPkg/iSCSIDxe: Update the condition for IScsiStart Aborthegdenag2017-02-151-1/+7
| | | | | | | | | | | | | | 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> Reviewed-by: Wu Jiaxin <jiaxin.wu@intel.com> Reviewed-by: Sriram Subramanian <sriram-s@hpe.com> Reviewed-by: Zhang Lubo <lubo.zhang@intel.com> Reviewed-by: Ye Ting <ting.ye@intel.com> Reviewed-by: Fu Siyuan <siyuan.fu@intel.com>
* NetworkPkg: Add dns support for target URL configuration in ISCSI.Zhang Lubo2017-01-191-2/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | v2: *1. Add IScsiDnsIsConfigured function in IScsiSupported to check attempt using DNS protocol or not.2. Fix wrongs typos in IScsiDns.c and .uni file.3. define a macro for the length of target URL.4. update the Copyright to 2017. Add DNS support for target URL directly configuration in UI. Besides, When we enable the option (Get target info via DHCP) , the dhcp server will return target info include the rootpath, like the format "iscsi:"<servername>":"<protocol>":"<port>":"<LUN>":"<targetname> According to the RFC 4173,the server name region is expressed as IPv4(192.168.10.20 )or IPv6 ([2000:bbbb::3]) or domain name, but currently we only support the IP address format. To enable this feature, we can support both. Another enhancement is that we can deal with the data received from the iSCSI login response with an target redirection status, in which contains the Target Address in the format domainname[:port][,portal-group-tag] required by RFC 3720. Cc: Ye Ting <ting.ye@intel.com> Cc: Fu Siyuan <siyuan.fu@intel.com> Cc: Wu Jiaxin <jiaxin.wu@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Zhang Lubo <lubo.zhang@intel.com> Reviewed-by: Wu Jiaxin <jiaxin.wu@intel.com> Reviewed-by: Ye Ting <ting.ye@intel.com> Reviewed-by: Fu Siyuan <siyuan.fu@intel.com>
* NetworkPkg/IScsiDxe: rebase to ARRAY_SIZE()Laszlo Ersek2016-10-271-1/+1
| | | | | | | | | Cc: Jiaxin Wu <jiaxin.wu@intel.com> Cc: Siyuan Fu <siyuan.fu@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Fu Siyuan <siyuan.fu@intel.com> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
* NetworkPkg: Record user configured TargetIP/Port in iBFTYe Ting2016-10-141-0/+19
| | | | | | | | | | | | | | | | | | | | Current ISCSI driver records redirected iSCSI targetIP/Port in iBFT once redirection occurs, which removes the possibility of the OS to reconnect to the configured IP for load balancing. The behavior is not explicitly described in IBFT spec, though the MSFT expert confirm we should record original user setting rather than publish the redirected IP. Thanks Sriram for reviewing and validating this patch in his test-bed. Cc: Subramanian Sriram <sriram-s@hpe.com> Cc: Fu Siyuan <siyuan.fu@intel.com> Cc: Zhang Lubo <lubo.zhang@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ye Ting <ting.ye@intel.com> Reviewed-by: Fu Siyuan <siyuan.fu@intel.com> Reviewed-by: Subramanian Sriram <sriram-s@hpe.com>
* NetworkPkg: Replace ASSERT with error handling in Http boot and IScsiZhang Lubo2016-06-231-0/+1
| | | | | | | | | | | | | | | v2: *Fix some memory leak issue. This patch is used to replace ASSERT with error handling in Http boot Driver and IScsi driver. Cc: Ye Ting <ting.ye@intel.com> Cc: Fu Siyuan <siyuan.fu@intel.com> Cc: Wu Jiaxin <jiaxin.wu@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Zhang Lubo <lubo.zhang@intel.com> Reviewed-By: Wu Jiaxin <jiaxin.wu@intel.com>
* NetworkPkg: Replace UnicodeStrToAsciiStr/AsciiStrToUnicodeStrStar Zeng2016-06-211-1/+1
| | | | | | | | | | | | | | | It is the follow up of 3ab41b7a325ca11a12b42f5ad1661c4b6791cb49 to replace UnicodeStrToAsciiStr/AsciiStrToUnicodeStr with UnicodeStrToAsciiStrS/AsciiStrToUnicodeStrS. Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Siyuan Fu <siyuan.fu@intel.com> Cc: Jiaxin Wu <jiaxin.wu@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Star Zeng <star.zeng@intel.com> Reviewed-by: Jaben Carsey <jaben.carsey@intel.com> Reviewed-by: Jiaxin Wu <jiaxin.wu@intel.com> Reviewed-by: Siyuan Fu <siyuan.fu@intel.com>
* NetworkPkg: Bug fix of iSCSI to support MPIOZhang, Lubo2016-05-121-3/+15
| | | | | | | | | | | | | | | | | | If two attempts added on different NIC and enable MPIO attribute, then change the attempts order. If both two attempts succeed to connect the target,it should abort the later one in the order and uninstall ExtScsiPassThruProtocol Interface, But now it unistall it twice. Cc: Ye Ting <ting.ye@intel.com> Cc: Fu Siyuan <siyuan.fu@intel.com> Cc: Wu Jiaxin <jiaxin.wu@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Zhang Lubo <lubo.zhang@intel.com> Reviewed-By: Ye Ting <ting.ye@intel.com> Reviewed-By: Fu Siyuan <siyuan.fu@intel.com> Reviewed-By: Wu Jiaxin <jiaxin.wu@intel.com>
* NetworkPkg: refine codes of iSCSI driver.Zhang Lubo2016-04-221-4/+16
| | | | | | | | | | | | | | | Add error handling logic in DriverBingingStop function, it may return error status when invoking the UninstallProtocolInterface. Cc: Fu Siyuan <siyuan.fu@intel.com> Cc: Ye Ting <ting.ye@intel.com> Cc: Wu Jiaxin <jiaxin.wu@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Zhang Lubo <lubo.zhang@intel.com> Reviewed-by: Ye Ting <ting.ye@intel.com> Reviewed-by: Fu Siyuan <siyuan.fu@intel.com> Reviewed-by: Jiaxin Wu <jiaxin.wu@intel.com>
* NetworkPkg: Fix suspicious dereference of pointer before NULL checkJiaxin Wu2015-12-251-1/+4
| | | | | | | | | | | | | This patch is used to fix suspicious dereference of pointer before NULL check in IScsiDxe driver. Cc: Ye Ting <ting.ye@intel.com> Cc: Fu Siyuan <siyuan.fu@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jiaxin Wu <jiaxin.wu@intel.com> Reviewed-by: Ye Ting <ting.ye@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19552 6f19259b-4bc3-4df7-8a09-765794883524
* NetworkPkg: Update iSCSI driver to check existing AIP instancesYe Ting2015-12-181-0/+151
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | According to UEFI spec, iSCSI HBA must install an AIP instance with network boot information block. This patch updates UEFI iSCSI driver to check whether there are AIP instances installed by iSCSI HBA adapter and if yes, the UEFI iSCSI driver will return EFI_ABORTED in its driver binding Start(). Also the patch introduces a PCD PcdIScsiAIPNetworkBootPolicy for platform owner to define particular policy when the iSCSI HBA will survive and UEFI iSCSI will fail. The default policy is STOP_UEFI_ISCSI_IF_AIP_SUPPORT_OFFLOAD which means that when ISCSI HBA adapter installs an AIP and claims it supports an offload engine for iSCSI boot, the UEFI iSCSI driver will return EFI_ABORTED. The patch V2 adds a new value ALWAYS_USE_UEFI_ISCSI_AND_IGNORE_AIP to PCD PcdIScsiAIPNetworkBootPolicy. This allows the platform to avoid running into buggy IHV drivers that have issue with AIP. It is suggested by El-Haj-Mahmoud,Samer <samer.el-haj-mahmoud@hpe.com>. Cc: El-Haj-Mahmoud Samer <samer.el-haj-mahmoud@hpe.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ye Ting <ting.ye@intel.com> Reviewed-by: Fu siyuan <siyuan.fu@intel.com> Reviewed-by: Wu Jiaxin <jiaxin.wu@intel.com> Reviewed-by: El-Haj-Mahmoud Samer <samer.el-haj-mahmoud@hpe.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19367 6f19259b-4bc3-4df7-8a09-765794883524
* NetworkPkg:Fix iSCSI driver issue to work with iSCSI LIO targetYe Ting2015-09-251-2/+2
| | | | | | | | | | | | | | | | The patch fixes iSCSI driver can't reinstate itself when configured in AutoConfigure mode and IPv6 stack is actually used. The issue occurs when iSCSI driver communicates with iSCSI LIO target in IPv6 path and the target sends back TCP FIN packets randomly. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ye Ting <ting.ye@intel.com> Reviewed-by: Fu siyuan <siyuan.fu@intel.com> Reviewed-by: Wu jiaxin <jiaxin.wu@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18546 6f19259b-4bc3-4df7-8a09-765794883524
* Open default Tcp child via BY_CHILD_CONTROLLER.Wu Jiaxin2015-02-051-2/+34
| | | | | | | | | 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@16774 6f19259b-4bc3-4df7-8a09-765794883524
* Remove ASSERT when failed to Get/Set “AttemptOrder” and “ClientId” ↵Fu Siyuan2014-03-171-2/+6
| | | | | | | | | | | | variable. Removes RT attribute for “AttemptOrder” variable. Signed-off-by: Fu Siyuan <siyuan.fu@intel.com> Reviewed-by: Dong, Guo <guo.dong@intel.com> Reviewed-by: Yao, Jiewen <jiewen.yao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15328 6f19259b-4bc3-4df7-8a09-765794883524
* Fix bug in unload function: Check if component name protocol exist, only ↵Fu Siyuan2014-01-101-47/+169
| | | | | | | | | | uninstall it when it really exists. Signed-off-by: Fu Siyuan <siyuan.fu@intel.com> Reviewed-by: Tian, Feng <feng.tian@intel.com> Reviewed-by: Jin, Eric <eric.jin@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15092 6f19259b-4bc3-4df7-8a09-765794883524
* Fix a bug about the iSCSI DHCP dependency issue.Wu Jiaxin2013-10-251-9/+28
| | | | | | | | | | Create rules to determine whether iSCSI need DHCP protocol in current configuration by examining user’s configuration data in DriverBindingSupported(). 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@14803 6f19259b-4bc3-4df7-8a09-765794883524
* Update dual network stack drivers to produce multiple Driver Binding Protocol.sfu52013-04-251-183/+432
| | | | | | | | | | Signed-off-by: Fu Siyuan <siyuan.fu@intel.com> Reviewed-by: Ye Ting <ting.ye@intel.com> Reviewed-by: Ouyang Qian <qian.ouyang@intel.com> git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14315 6f19259b-4bc3-4df7-8a09-765794883524
* 1. Add EFI_COMPONENT_NAME2_PROTOCOL.GetControllerName() support.sfu52012-12-131-9/+14
| | | | | | | | | | | | 2. Fix the driver binding Stop() hang issue in the network stack. 3. Add Ip4 raw data support. 4. Add iSCSI Dhcp option 60 support. Signed-off-by: Fu Siyuan <siyuan.fu@intel.com> Reviewed-by: Ye Ting <ting.ye@intel.com> Reviewed-by: Ouyang Qian <qian.ouyang@intel.com> git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13995 6f19259b-4bc3-4df7-8a09-765794883524
* Clean up the private GUID definition in module Level.lgao42011-09-181-1/+1
| | | | | | | | | | | | | 0. Remove the unused private GUID from module source files. 1. Use gEfiCallerIdGuid replace of the private module GUID. 2. Add the public header files to define HII FormSet and PackageList GUID used in every HII driver. Signed-off-by: lgao4 Reviewed-by: ydong10 gdong1 tye jfan12 wli12 rsun3 jyao1 ftian git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12376 6f19259b-4bc3-4df7-8a09-765794883524
* Add IScsiDxe driver to NetworkPkg in order to support iSCSI over IPv6 stack ↵tye12011-08-171-0/+1216
and iSCSI MPIO. Signed-off-by: tye1 Reviewed-by: hhuan13 Reviewed-by: eric_tian git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12149 6f19259b-4bc3-4df7-8a09-765794883524