qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Anthony Liguori <anthony@codemonkey.ws>
To: Jan Kiszka <jan.kiszka@siemens.com>
Cc: qemu-devel <qemu-devel@nongnu.org>, Gerd Hoffmann <kraxel@redhat.com>
Subject: Re: [Qemu-devel] [PATCH v2 1/2] lsi: Purge request queue on soft reset
Date: Mon, 03 May 2010 12:14:36 -0500	[thread overview]
Message-ID: <4BDF047C.5010402@codemonkey.ws> (raw)
In-Reply-To: <4BDAC7B4.2040006@siemens.com>

On 04/30/2010 07:06 AM, Jan Kiszka wrote:
> Avoid keeping zombie requests across controller reset by purging the
> queue and also dropping the currently active request.
>
> Signed-off-by: Jan Kiszka<jan.kiszka@siemens.com>
>    

Applied all.  Thanks.

Regards,

Anthony Liguori
> ---
>   hw/lsi53c895a.c |   11 +++++++++++
>   1 files changed, 11 insertions(+), 0 deletions(-)
>
> diff --git a/hw/lsi53c895a.c b/hw/lsi53c895a.c
> index 98b7f54..ad23ece 100644
> --- a/hw/lsi53c895a.c
> +++ b/hw/lsi53c895a.c
> @@ -283,6 +283,8 @@ static inline int lsi_irq_on_rsl(LSIState *s)
>
>   static void lsi_soft_reset(LSIState *s)
>   {
> +    lsi_request *p;
> +
>       DPRINTF("Reset\n");
>       s->carry = 0;
>
> @@ -345,6 +347,15 @@ static void lsi_soft_reset(LSIState *s)
>       s->sbc = 0;
>       s->csbc = 0;
>       s->sbr = 0;
> +    while (!QTAILQ_EMPTY(&s->queue)) {
> +        p = QTAILQ_FIRST(&s->queue);
> +        QTAILQ_REMOVE(&s->queue, p, next);
> +        qemu_free(p);
> +    }
> +    if (s->current) {
> +        qemu_free(s->current);
> +        s->current = NULL;
> +    }
>   }
>
>   static int lsi_dma_40bit(LSIState *s)
>
>
>
>    

      reply	other threads:[~2010-05-03 17:14 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-04-30 12:06 [Qemu-devel] [PATCH v2 1/2] lsi: Purge request queue on soft reset Jan Kiszka
2010-05-03 17:14 ` Anthony Liguori [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-all 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=4BDF047C.5010402@codemonkey.ws \
    --to=anthony@codemonkey.ws \
    --cc=jan.kiszka@siemens.com \
    --cc=kraxel@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /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;
as well as URLs for NNTP newsgroup(s).