qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Philippe Mathieu-Daudé" <philmd@linaro.org>
To: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>,
	pbonzini@redhat.com, fam@euphon.net, qemu-devel@nongnu.org
Subject: Re: [PATCH 1/3] esp: use correct type for esp_dma_enable() in sysbus_esp_gpio_demux()
Date: Thu, 14 Sep 2023 08:43:26 +0200	[thread overview]
Message-ID: <8fe21876-be8c-22ba-ac91-78e8d014acf7@linaro.org> (raw)
In-Reply-To: <20230913204410.65650-2-mark.cave-ayland@ilande.co.uk>

On 13/9/23 22:44, Mark Cave-Ayland wrote:
> The call to esp_dma_enable() was being made with the SYSBUS_ESP type instead of
> the ESP type. This meant that when GPIO 1 was being used to trigger a DMA
> request from an external DMA controller, the setting of ESPState's dma_enabled
> field would clobber unknown memory whilst the dma_cb callback pointer would
> typically return NULL so the DMA request would never start.
> 

Cc: qemu-stable@nongnu.org
Fixes: a391fdbc7f ("esp: split esp code into generic chip emulation and 
sysbus layer")
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>

> Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
> ---
>   hw/scsi/esp.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/hw/scsi/esp.c b/hw/scsi/esp.c
> index e52188d022..4218a6a960 100644
> --- a/hw/scsi/esp.c
> +++ b/hw/scsi/esp.c
> @@ -1395,7 +1395,7 @@ static void sysbus_esp_gpio_demux(void *opaque, int irq, int level)
>           parent_esp_reset(s, irq, level);
>           break;
>       case 1:
> -        esp_dma_enable(opaque, irq, level);
> +        esp_dma_enable(s, irq, level);
>           break;
>       }
>   }



  reply	other threads:[~2023-09-14  6:44 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-13 20:44 [PATCH 0/3] esp/scsi: minor fixes Mark Cave-Ayland
2023-09-13 20:44 ` [PATCH 1/3] esp: use correct type for esp_dma_enable() in sysbus_esp_gpio_demux() Mark Cave-Ayland
2023-09-14  6:43   ` Philippe Mathieu-Daudé [this message]
2023-09-27  8:28   ` Thomas Huth
2023-09-13 20:44 ` [PATCH 2/3] esp: restrict non-DMA transfer length to that of available data Mark Cave-Ayland
2023-09-27  8:20   ` Thomas Huth
2023-09-13 20:44 ` [PATCH 3/3] scsi-disk: ensure that FORMAT UNIT commands are terminated Mark Cave-Ayland
2023-09-27  8:26   ` Thomas Huth

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=8fe21876-be8c-22ba-ac91-78e8d014acf7@linaro.org \
    --to=philmd@linaro.org \
    --cc=fam@euphon.net \
    --cc=mark.cave-ayland@ilande.co.uk \
    --cc=pbonzini@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).