Revision: 14422
http://sourceforge.net/p/edk2/code/14422
Author: tye1
Date: 2013-06-14 08:18:34 +0000 (Fri, 14 Jun 2013)
Log Message:
-----------
Fixed the issue that IPv6 network stack assert infrequently ?\226?\128?\147
assert once every 300~400 PXE boots.
Signed-off-by: Ye Ting <[email protected]>
Reviewed-by: Fu Siyuan <[email protected]>
Reviewed-by: Ouyang Qian <[email protected]>
Modified Paths:
--------------
trunk/edk2/NetworkPkg/Ip6Dxe/Ip6Driver.c
Modified: trunk/edk2/NetworkPkg/Ip6Dxe/Ip6Driver.c
===================================================================
--- trunk/edk2/NetworkPkg/Ip6Dxe/Ip6Driver.c 2013-06-14 07:41:13 UTC (rev
14421)
+++ trunk/edk2/NetworkPkg/Ip6Dxe/Ip6Driver.c 2013-06-14 08:18:34 UTC (rev
14422)
@@ -1,7 +1,7 @@
/** @file
The driver binding and service binding protocol for IP6 driver.
- Copyright (c) 2009 - 2012, Intel Corporation. All rights reserved.<BR>
+ Copyright (c) 2009 - 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
@@ -412,22 +412,21 @@
goto ON_ERROR;
}
- //
- // The timer expires every 100 (IP6_TIMER_INTERVAL_IN_MS) milliseconds.
- //
- Status = gBS->SetTimer (IpSb->FasterTimer, TimerPeriodic, TICKS_PER_MS *
IP6_TIMER_INTERVAL_IN_MS);
+ Status = NetLibGetMacString (IpSb->Controller, IpSb->Image,
&IpSb->MacString);
if (EFI_ERROR (Status)) {
goto ON_ERROR;
}
- //
- // The timer expires every 1000 (IP6_ONE_SECOND_IN_MS) milliseconds.
- //
- Status = gBS->SetTimer (IpSb->Timer, TimerPeriodic, TICKS_PER_MS *
IP6_ONE_SECOND_IN_MS);
+ Status = Ip6ConfigInitInstance (&IpSb->Ip6ConfigInstance);
if (EFI_ERROR (Status)) {
goto ON_ERROR;
}
+ IpSb->DefaultInterface = Ip6CreateInterface (IpSb, TRUE);
+ if (IpSb->DefaultInterface == NULL) {
+ Status = EFI_DEVICE_ERROR;
+ goto ON_ERROR;
+ }
Status = gBS->CreateEvent (
EVT_NOTIFY_SIGNAL,
@@ -440,27 +439,6 @@
goto ON_ERROR;
}
- Status = Ip6ReceiveFrame (Ip6AcceptFrame, IpSb);
- if (EFI_ERROR (Status)) {
- goto ON_ERROR;
- }
-
- Status = NetLibGetMacString (IpSb->Controller, IpSb->Image,
&IpSb->MacString);
- if (EFI_ERROR (Status)) {
- goto ON_ERROR;
- }
-
- Status = Ip6ConfigInitInstance (&IpSb->Ip6ConfigInstance);
- if (EFI_ERROR (Status)) {
- goto ON_ERROR;
- }
-
- IpSb->DefaultInterface = Ip6CreateInterface (IpSb, TRUE);
- if (IpSb->DefaultInterface == NULL) {
- Status = EFI_DEVICE_ERROR;
- goto ON_ERROR;
- }
-
//
// If there is any manual address, set it.
//
@@ -557,19 +535,52 @@
NULL
);
- if (EFI_ERROR (Status)) {
+ if (!EFI_ERROR (Status)) {
+ //
+ // ready to go: start the receiving and timer
+ //
+ Status = Ip6ReceiveFrame (Ip6AcceptFrame, IpSb);
+ if (EFI_ERROR (Status)) {
+ goto ON_ERROR;
+ }
- Ip6CleanService (IpSb);
- FreePool (IpSb);
- } else {
//
+ // The timer expires every 100 (IP6_TIMER_INTERVAL_IN_MS) milliseconds.
+ //
+ Status = gBS->SetTimer (
+ IpSb->FasterTimer,
+ TimerPeriodic,
+ TICKS_PER_MS * IP6_TIMER_INTERVAL_IN_MS
+ );
+ if (EFI_ERROR (Status)) {
+ goto ON_ERROR;
+ }
+
+ //
+ // The timer expires every 1000 (IP6_ONE_SECOND_IN_MS) milliseconds.
+ //
+ Status = gBS->SetTimer (
+ IpSb->Timer,
+ TimerPeriodic,
+ TICKS_PER_MS * IP6_ONE_SECOND_IN_MS
+ );
+ if (EFI_ERROR (Status)) {
+ goto ON_ERROR;
+ }
+
+ //
// Initialize the IP6 ID
//
mIp6Id = NET_RANDOM (NetRandomInitSeed ());
Ip6SetVariableData (IpSb);
+
+ return EFI_SUCCESS;
}
+ON_ERROR:
+ Ip6CleanService (IpSb);
+ FreePool (IpSb);
return Status;
}
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
This SF.net email is sponsored by Windows:
Build for Windows Store.
http://p.sf.net/sfu/windows-dev2dev
_______________________________________________
edk2-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-commits