public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [PATCH v2] ArmPlatformPkg/ArmJunoPkg/Drivers/ArmJunoDxe: Fixed crash on Juno R0
@ 2017-01-24  2:01 Daniil Egranov
  2017-01-24 11:07 ` Ryan Harkin
  0 siblings, 1 reply; 3+ messages in thread
From: Daniil Egranov @ 2017-01-24  2:01 UTC (permalink / raw)
  To: edk2-devel; +Cc: leif.lindholm, ryan.harkin, Daniil Egranov

The Marvell Yukon MAC address load supported only on Juno R1 and R2.
It disabled for Juno R0 due to PCI issues on this board.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Daniil Egranov <daniil.egranov@arm.com>
---
Changelog:

v2
Replaced ASSERT with the error message in case Marvell MAC address
set has failed

 ArmPlatformPkg/ArmJunoPkg/Drivers/ArmJunoDxe/ArmJunoDxe.c | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/ArmPlatformPkg/ArmJunoPkg/Drivers/ArmJunoDxe/ArmJunoDxe.c b/ArmPlatformPkg/ArmJunoPkg/Drivers/ArmJunoDxe/ArmJunoDxe.c
index 47ff587..0193b98 100644
--- a/ArmPlatformPkg/ArmJunoPkg/Drivers/ArmJunoDxe/ArmJunoDxe.c
+++ b/ArmPlatformPkg/ArmJunoPkg/Drivers/ArmJunoDxe/ArmJunoDxe.c
@@ -378,6 +378,7 @@ OnEndOfDxe (
   EFI_DEVICE_PATH_PROTOCOL* PciRootComplexDevicePath;
   EFI_HANDLE                Handle;
   EFI_STATUS                Status;
+  UINT32                    JunoRevision;
 
   //
   // PCI Root Complex initialization
@@ -393,8 +394,14 @@ OnEndOfDxe (
   Status = gBS->ConnectController (Handle, NULL, PciRootComplexDevicePath, FALSE);
   ASSERT_EFI_ERROR (Status);
 
-  Status = ArmJunoSetNicMacAddress ();
-  ASSERT_EFI_ERROR (Status);
+  GetJunoRevision (JunoRevision);
+
+  if (JunoRevision != JUNO_REVISION_R0) {
+    Status = ArmJunoSetNicMacAddress ();
+    if (EFI_ERROR (Status)) {
+      DEBUG ((DEBUG_ERROR, "ArmJunoDxe: Failed to set Marvell Yukon NIC MAC address\n"));
+    }
+  }
 }
 
 STATIC
-- 
2.7.4



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

* Re: [PATCH v2] ArmPlatformPkg/ArmJunoPkg/Drivers/ArmJunoDxe: Fixed crash on Juno R0
  2017-01-24  2:01 [PATCH v2] ArmPlatformPkg/ArmJunoPkg/Drivers/ArmJunoDxe: Fixed crash on Juno R0 Daniil Egranov
@ 2017-01-24 11:07 ` Ryan Harkin
  2017-01-25 13:42   ` Leif Lindholm
  0 siblings, 1 reply; 3+ messages in thread
From: Ryan Harkin @ 2017-01-24 11:07 UTC (permalink / raw)
  To: Daniil Egranov; +Cc: edk2-devel@lists.01.org, Leif Lindholm

On 24 January 2017 at 02:01, Daniil Egranov <daniil.egranov@arm.com> wrote:
> The Marvell Yukon MAC address load supported only on Juno R1 and R2.
> It disabled for Juno R0 due to PCI issues on this board.
>
> Contributed-under: TianoCore Contribution Agreement 1.0
> Signed-off-by: Daniil Egranov <daniil.egranov@arm.com>

Tested-by: Ryan Harkin <ryan.harkin@linaro.org>

> ---
> Changelog:
>
> v2
> Replaced ASSERT with the error message in case Marvell MAC address
> set has failed
>

^ Thanks for doing that, it's much more usable in my setup now.


>  ArmPlatformPkg/ArmJunoPkg/Drivers/ArmJunoDxe/ArmJunoDxe.c | 11 +++++++++--
>  1 file changed, 9 insertions(+), 2 deletions(-)
>
> diff --git a/ArmPlatformPkg/ArmJunoPkg/Drivers/ArmJunoDxe/ArmJunoDxe.c b/ArmPlatformPkg/ArmJunoPkg/Drivers/ArmJunoDxe/ArmJunoDxe.c
> index 47ff587..0193b98 100644
> --- a/ArmPlatformPkg/ArmJunoPkg/Drivers/ArmJunoDxe/ArmJunoDxe.c
> +++ b/ArmPlatformPkg/ArmJunoPkg/Drivers/ArmJunoDxe/ArmJunoDxe.c
> @@ -378,6 +378,7 @@ OnEndOfDxe (
>    EFI_DEVICE_PATH_PROTOCOL* PciRootComplexDevicePath;
>    EFI_HANDLE                Handle;
>    EFI_STATUS                Status;
> +  UINT32                    JunoRevision;
>
>    //
>    // PCI Root Complex initialization
> @@ -393,8 +394,14 @@ OnEndOfDxe (
>    Status = gBS->ConnectController (Handle, NULL, PciRootComplexDevicePath, FALSE);
>    ASSERT_EFI_ERROR (Status);
>
> -  Status = ArmJunoSetNicMacAddress ();
> -  ASSERT_EFI_ERROR (Status);
> +  GetJunoRevision (JunoRevision);
> +
> +  if (JunoRevision != JUNO_REVISION_R0) {
> +    Status = ArmJunoSetNicMacAddress ();
> +    if (EFI_ERROR (Status)) {
> +      DEBUG ((DEBUG_ERROR, "ArmJunoDxe: Failed to set Marvell Yukon NIC MAC address\n"));
> +    }
> +  }
>  }
>
>  STATIC
> --
> 2.7.4
>
> _______________________________________________
> edk2-devel mailing list
> edk2-devel@lists.01.org
> https://lists.01.org/mailman/listinfo/edk2-devel


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

* Re: [PATCH v2] ArmPlatformPkg/ArmJunoPkg/Drivers/ArmJunoDxe: Fixed crash on Juno R0
  2017-01-24 11:07 ` Ryan Harkin
@ 2017-01-25 13:42   ` Leif Lindholm
  0 siblings, 0 replies; 3+ messages in thread
From: Leif Lindholm @ 2017-01-25 13:42 UTC (permalink / raw)
  To: Ryan Harkin; +Cc: Daniil Egranov, edk2-devel@lists.01.org

On Tue, Jan 24, 2017 at 11:07:12AM +0000, Ryan Harkin wrote:
> On 24 January 2017 at 02:01, Daniil Egranov <daniil.egranov@arm.com> wrote:
> > The Marvell Yukon MAC address load supported only on Juno R1 and R2.
> > It disabled for Juno R0 due to PCI issues on this board.
> >
> > Contributed-under: TianoCore Contribution Agreement 1.0
> > Signed-off-by: Daniil Egranov <daniil.egranov@arm.com>
> 
> Tested-by: Ryan Harkin <ryan.harkin@linaro.org>

Thanks, Ryan.

Pushed as 2bdfb11df9.

/
    Leif

> 
> > ---
> > Changelog:
> >
> > v2
> > Replaced ASSERT with the error message in case Marvell MAC address
> > set has failed
> >
> 
> ^ Thanks for doing that, it's much more usable in my setup now.
> 
> 
> >  ArmPlatformPkg/ArmJunoPkg/Drivers/ArmJunoDxe/ArmJunoDxe.c | 11 +++++++++--
> >  1 file changed, 9 insertions(+), 2 deletions(-)
> >
> > diff --git a/ArmPlatformPkg/ArmJunoPkg/Drivers/ArmJunoDxe/ArmJunoDxe.c b/ArmPlatformPkg/ArmJunoPkg/Drivers/ArmJunoDxe/ArmJunoDxe.c
> > index 47ff587..0193b98 100644
> > --- a/ArmPlatformPkg/ArmJunoPkg/Drivers/ArmJunoDxe/ArmJunoDxe.c
> > +++ b/ArmPlatformPkg/ArmJunoPkg/Drivers/ArmJunoDxe/ArmJunoDxe.c
> > @@ -378,6 +378,7 @@ OnEndOfDxe (
> >    EFI_DEVICE_PATH_PROTOCOL* PciRootComplexDevicePath;
> >    EFI_HANDLE                Handle;
> >    EFI_STATUS                Status;
> > +  UINT32                    JunoRevision;
> >
> >    //
> >    // PCI Root Complex initialization
> > @@ -393,8 +394,14 @@ OnEndOfDxe (
> >    Status = gBS->ConnectController (Handle, NULL, PciRootComplexDevicePath, FALSE);
> >    ASSERT_EFI_ERROR (Status);
> >
> > -  Status = ArmJunoSetNicMacAddress ();
> > -  ASSERT_EFI_ERROR (Status);
> > +  GetJunoRevision (JunoRevision);
> > +
> > +  if (JunoRevision != JUNO_REVISION_R0) {
> > +    Status = ArmJunoSetNicMacAddress ();
> > +    if (EFI_ERROR (Status)) {
> > +      DEBUG ((DEBUG_ERROR, "ArmJunoDxe: Failed to set Marvell Yukon NIC MAC address\n"));
> > +    }
> > +  }
> >  }
> >
> >  STATIC
> > --
> > 2.7.4
> >
> > _______________________________________________
> > edk2-devel mailing list
> > edk2-devel@lists.01.org
> > https://lists.01.org/mailman/listinfo/edk2-devel


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

end of thread, other threads:[~2017-01-25 13:42 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-01-24  2:01 [PATCH v2] ArmPlatformPkg/ArmJunoPkg/Drivers/ArmJunoDxe: Fixed crash on Juno R0 Daniil Egranov
2017-01-24 11:07 ` Ryan Harkin
2017-01-25 13:42   ` Leif Lindholm

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