qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Andreas Färber" <afaerber@suse.de>
To: "Hervé Poussineau" <hpoussin@reactos.org>
Cc: qemu-ppc@nongnu.org, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH 1/6] i82378/i82374: do not create DMA controller twice
Date: Mon, 19 Mar 2012 12:03:11 +0100	[thread overview]
Message-ID: <4F67126F.20402@suse.de> (raw)
In-Reply-To: <1331995186-18507-2-git-send-email-hpoussin@reactos.org>

Am 17.03.2012 15:39, schrieb Hervé Poussineau:
> This fixes a crash in PReP emulation when using DMA controller to access floppy drive.
> 
> Signed-off-by: Hervé Poussineau <hpoussin@reactos.org>

Reviewed-by: Andreas Färber <afaerber@suse.de>

Andreas

> ---
>  hw/i82374.c |    5 ++++-
>  hw/i82378.c |    5 +++--
>  2 files changed, 7 insertions(+), 3 deletions(-)
> 
> diff --git a/hw/i82374.c b/hw/i82374.c
> index 67298a3..4a922c3 100644
> --- a/hw/i82374.c
> +++ b/hw/i82374.c
> @@ -38,6 +38,7 @@ do { fprintf(stderr, "i82374 ERROR: " fmt , ## __VA_ARGS__); } while (0)
>  
>  typedef struct I82374State {
>      uint8_t commands[8];
> +    qemu_irq out;
>  } I82374State;
>  
>  static const VMStateDescription vmstate_i82374 = {
> @@ -99,7 +100,7 @@ static uint32_t i82374_read_descriptor(void *opaque, uint32_t nport)
>  
>  static void i82374_init(I82374State *s)
>  {
> -    DMA_init(1, NULL);
> +    DMA_init(1, &s->out);
>      memset(s->commands, 0, sizeof(s->commands));
>  }
>  
> @@ -132,6 +133,8 @@ static int i82374_isa_init(ISADevice *dev)
>  
>      i82374_init(s);
>  
> +    qdev_init_gpio_out(&dev->qdev, &s->out, 1);
> +
>      return 0;
>  }
>  
> diff --git a/hw/i82378.c b/hw/i82378.c
> index faad1a3..9b11d90 100644
> --- a/hw/i82378.c
> +++ b/hw/i82378.c
> @@ -170,6 +170,7 @@ static void i82378_init(DeviceState *dev, I82378State *s)
>  {
>      ISABus *isabus = DO_UPCAST(ISABus, qbus, qdev_get_child_bus(dev, "isa.0"));
>      ISADevice *pit;
> +    ISADevice *isa;
>      qemu_irq *out0_irq;
>  
>      /* This device has:
> @@ -199,8 +200,8 @@ static void i82378_init(DeviceState *dev, I82378State *s)
>      pcspk_init(isabus, pit);
>  
>      /* 2 82C37 (dma) */
> -    DMA_init(1, &s->out[1]);
> -    isa_create_simple(isabus, "i82374");
> +    isa = isa_create_simple(isabus, "i82374");
> +    qdev_connect_gpio_out(&isa->qdev, 0, s->out[1]);
>  
>      /* timer */
>      isa_create_simple(isabus, "mc146818rtc");

-- 
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg

  reply	other threads:[~2012-03-19 11:03 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-17 14:39 [Qemu-devel] [PATCH 0/6] prep: some fixes and Super I/O emulation Hervé Poussineau
2012-03-17 14:39 ` [Qemu-devel] [PATCH 1/6] i82378/i82374: do not create DMA controller twice Hervé Poussineau
2012-03-19 11:03   ` Andreas Färber [this message]
2012-03-19 11:23     ` [Qemu-devel] [Qemu-ppc] " Alexander Graf
2012-03-19 12:19       ` Andreas Färber
2012-03-19 12:21         ` Alexander Graf
2012-03-17 14:39 ` [Qemu-devel] [PATCH 2/6] prep: change default cpu to '7448' Hervé Poussineau
2012-03-19 12:53   ` Andreas Färber
2012-03-19 21:01     ` Hervé Poussineau
2012-03-19 21:02     ` Hervé Poussineau
2012-03-17 14:39 ` [Qemu-devel] [PATCH 3/6] isa: add isa_bus_from_device() method Hervé Poussineau
2012-03-17 14:39 ` [Qemu-devel] [PATCH 4/6] fdc: Parametrize ISA base, IRQ and DMA Hervé Poussineau
2012-03-21 17:22   ` Markus Armbruster
2012-03-17 14:39 ` [Qemu-devel] [PATCH 5/6] prep: add pc87312 Super I/O emulation Hervé Poussineau
2012-03-19 13:15   ` Andreas Färber
2012-03-19 18:26     ` Hervé Poussineau
2012-03-17 14:39 ` [Qemu-devel] [PATCH 6/6] prep: use pc87312 Super I/O chip instead of collection of random ISA devices Hervé Poussineau
2012-03-17 17:33   ` Paolo Bonzini
2012-06-01 14:22 ` [Qemu-devel] [PATCH 0/6] prep: some fixes and Super I/O emulation Artyom Tarasenko
2012-06-01 19:38   ` Hervé Poussineau

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=4F67126F.20402@suse.de \
    --to=afaerber@suse.de \
    --cc=hpoussin@reactos.org \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-ppc@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).