public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: Ard Biesheuvel <ard.biesheuvel@linaro.org>
To: Marcin Wojtas <mw@semihalf.com>
Cc: "edk2-devel@lists.01.org" <edk2-devel@lists.01.org>,
	"Leif Lindholm" <leif.lindholm@linaro.org>,
	"Jan Dąbroś" <jsd@semihalf.com>, "Hua Jing" <jinghua@marvell.com>,
	"Grzegorz Jaszczyk" <jaz@semihalf.com>,
	"Nadav Haklai" <nadavh@marvell.com>
Subject: Re: [platforms PATCH 1/1] Marvell/Drivers: Pp2Dxe: Fix cleaning of the BM pools
Date: Thu, 7 Jun 2018 15:03:52 +0200	[thread overview]
Message-ID: <CAKv+Gu_ifUCLydiOTHbp6L6qA2CZLL9srNZGL0+VnL-rj9pdNw@mail.gmail.com> (raw)
In-Reply-To: <1528376118-19690-1-git-send-email-mw@semihalf.com>

On 7 June 2018 at 14:55, Marcin Wojtas <mw@semihalf.com> wrote:
> Hitherto mechanism of using static flag indicating
> Buffer Manager disabled state was wrong and resulted
> in cleaning only one controller's pools. This caused
> bad page state when OS booted and attempted to
> use the buffers.
>
> This patch implements a fix, ensuring all controllers
> will clean the Buffer Manager during ExitBootServices.
>
> Contributed-under: TianoCore Contribution Agreement 1.1
> Signed-off-by: Marcin Wojtas <mw@semihalf.com>

Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>

Pushed as 1e918658459577c6c6a865b835fa9fb460045b6d

> ---
>  Silicon/Marvell/Drivers/Net/Pp2Dxe/Pp2Dxe.c | 7 ++++---
>  Silicon/Marvell/Drivers/Net/Pp2Dxe/Pp2Dxe.h | 1 +
>  2 files changed, 5 insertions(+), 3 deletions(-)
>
> diff --git a/Silicon/Marvell/Drivers/Net/Pp2Dxe/Pp2Dxe.c b/Silicon/Marvell/Drivers/Net/Pp2Dxe/Pp2Dxe.c
> index b0a38b3..3ed10f6 100644
> --- a/Silicon/Marvell/Drivers/Net/Pp2Dxe/Pp2Dxe.c
> +++ b/Silicon/Marvell/Drivers/Net/Pp2Dxe/Pp2Dxe.c
> @@ -258,6 +258,8 @@ Pp2DxeBmStart (
>      }
>    }
>
> +  Mvpp2Shared->BmEnabled = TRUE;
> +
>    return EFI_SUCCESS;
>  }
>
> @@ -669,15 +671,14 @@ Pp2DxeHalt (
>    PP2DXE_CONTEXT *Pp2Context = Context;
>    PP2DXE_PORT *Port = &Pp2Context->Port;
>    MVPP2_SHARED *Mvpp2Shared = Pp2Context->Port.Priv;
> -  STATIC BOOLEAN CommonPartHalted = FALSE;
>    INTN Index;
>
> -  if (!CommonPartHalted) {
> +  if (Mvpp2Shared->BmEnabled) {
>      for (Index = 0; Index < MVPP2_MAX_PORT; Index++) {
>        Mvpp2BmStop(Mvpp2Shared, Index);
>      }
>
> -    CommonPartHalted = TRUE;
> +    Mvpp2Shared->BmEnabled = FALSE;
>    }
>
>    Mvpp2TxqDrainSet(Port, 0, TRUE);
> diff --git a/Silicon/Marvell/Drivers/Net/Pp2Dxe/Pp2Dxe.h b/Silicon/Marvell/Drivers/Net/Pp2Dxe/Pp2Dxe.h
> index 60f40be..b8a5dae 100644
> --- a/Silicon/Marvell/Drivers/Net/Pp2Dxe/Pp2Dxe.h
> +++ b/Silicon/Marvell/Drivers/Net/Pp2Dxe/Pp2Dxe.h
> @@ -290,6 +290,7 @@ typedef struct {
>
>    /* BM pools */
>    MVPP2_BMS_POOL *BmPools[MVPP2_MAX_PORT];
> +  BOOLEAN BmEnabled;
>
>    /* PRS shadow table */
>    MVPP2_PRS_SHADOW *PrsShadow;
> --
> 2.7.4
>


      reply	other threads:[~2018-06-07 13:03 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-07 12:55 [platforms PATCH 1/1] Marvell/Drivers: Pp2Dxe: Fix cleaning of the BM pools Marcin Wojtas
2018-06-07 13:03 ` Ard Biesheuvel [this message]

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=CAKv+Gu_ifUCLydiOTHbp6L6qA2CZLL9srNZGL0+VnL-rj9pdNw@mail.gmail.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