From: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
To: Olivier Danet <odanet@caramail.com>
Cc: Blue Swirl <blauwirbel@gmail.com>,
qemu-devel <qemu-devel@nongnu.org>,
Artyom Tarasenko <atar4qemu@gmail.com>
Subject: Re: [Qemu-devel] [PATCH] Sun4m : SCSI ESP controller
Date: Thu, 20 Feb 2014 08:58:26 +0000 [thread overview]
Message-ID: <5305C3B2.7020800@ilande.co.uk> (raw)
In-Reply-To: <53014626.20009@caramail.com>
[-- Attachment #1: Type: text/plain, Size: 1727 bytes --]
On 16/02/14 23:13, Olivier Danet wrote:
> Two small fixes for the ESP (AM53C94) SCSI controller
>
> * Signal the end of the DMA transfer after a SCSI command.
>
> * The status register (RSTAT) is cleared after reading the interrupt
> status register (RINTR), except for the TC bit (=Count To Zero) and the
> scsi phase bits, which mirror SCSI signals levels.
>
> Fixes the bug "esp0: !TC on DATA XFER" with NetBSD
> https://bugs.launchpad.net/qemu/+bug/1055090
>
> Signed-off-by: Olivier Danet <odanet@caramail.com>
> ---
> hw/scsi/esp.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/hw/scsi/esp.c b/hw/scsi/esp.c
> index 2d150bf..5e91077 100644
> --- a/hw/scsi/esp.c
> +++ b/hw/scsi/esp.c
> @@ -246,6 +246,7 @@ static void esp_do_dma(ESPState *s)
> s->cmdlen = 0;
> s->do_cmd = 0;
> do_cmd(s, s->cmdbuf);
> + esp_dma_done(s);
> return;
> }
> if (s->async_len == 0) {
> @@ -417,10 +418,9 @@ uint64_t esp_reg_read(ESPState *s, uint32_t saddr)
> except TC */
> old_val = s->rregs[ESP_RINTR];
> s->rregs[ESP_RINTR] = 0;
> - s->rregs[ESP_RSTAT] &= ~STAT_TC;
> s->rregs[ESP_RSEQ] = SEQ_CD;
> esp_lower_irq(s);
> -
> + s->rregs[ESP_RSTAT] &= STAT_TC | STAT_MI;
> return old_val;
> default:
> break;
Hi Olivier,
I've applied the non-whitespace damaged patch (attached) but
unfortunately I still see the "!TC on DATA XFER" bug with my NetBSD 5
ISO under qemu-system-sparc :/ Note that the second part of the patch
showed some fuzz so I'm wondering if this patch is complete or whether
part of it is still missing?
Also ESP patches should have an esp or scsi/esp prefix in the subject
line and should CC the current SCSI maintainer (see MAINTAINERS file)
which is currently Paolo.
HTH,
Mark.
[-- Attachment #2: esp.patch --]
[-- Type: text/x-diff, Size: 5033 bytes --]
Return-Path: <qemu-devel-bounces+mark.cave-ayland=ilande.co.uk@nongnu.org>
Delivered-To: unknown
Received: from mail.ilande.co.uk (82.165.15.123:995) by mca-desktop with
POP3-SSL; 16 Feb 2014 23:15:04 -0000
Envelope-to: mark.cave-ayland@ilande.co.uk
Delivery-date: Sun, 16 Feb 2014 23:13:20 +0000
Received: from lists.gnu.org ([208.118.235.17])
by s16892447.onlinehome-server.info with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32)
(Exim 4.76)
(envelope-from <qemu-devel-bounces+mark.cave-ayland=ilande.co.uk@nongnu.org>)
id 1WFAth-0002KD-0Y
for mark.cave-ayland@ilande.co.uk; Sun, 16 Feb 2014 23:13:19 +0000
Received: from localhost ([::1]:35381 helo=lists.gnu.org)
by lists.gnu.org with esmtp (Exim 4.71)
(envelope-from <qemu-devel-bounces+mark.cave-ayland=ilande.co.uk@nongnu.org>)
id 1WFAtZ-0005sM-EF
for mark.cave-ayland@ilande.co.uk; Sun, 16 Feb 2014 18:13:09 -0500
Received: from eggs.gnu.org ([2001:4830:134:3::10]:45790)
by lists.gnu.org with esmtp (Exim 4.71)
(envelope-from <odanet@caramail.com>) id 1WFAsk-0004o1-Ca
for qemu-devel@nongnu.org; Sun, 16 Feb 2014 18:12:23 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
(envelope-from <odanet@caramail.com>) id 1WFAsf-0004UU-4E
for qemu-devel@nongnu.org; Sun, 16 Feb 2014 18:12:18 -0500
Received: from mout.gmx.net ([212.227.15.18]:50241)
by eggs.gnu.org with esmtp (Exim 4.71)
(envelope-from <odanet@caramail.com>) id 1WFAse-0004UQ-RR
for qemu-devel@nongnu.org; Sun, 16 Feb 2014 18:12:13 -0500
Received: from [192.168.1.24] ([90.38.117.132]) by mail.gmx.com (mrgmx102)
with ESMTPSA (Nemesis) id 0MZwYd-1WaHhN2a3L-00LpC4 for
<qemu-devel@nongnu.org>; Mon, 17 Feb 2014 00:12:11 +0100
Message-ID: <53014626.20009@caramail.com>
Date: Mon, 17 Feb 2014 00:13:42 +0100
From: Olivier Danet <odanet@caramail.com>
User-Agent: Mozilla/5.0 (X11; Linux x86_64;
rv:24.0) Gecko/20100101 Thunderbird/24.3.0
MIME-Version: 1.0
To: qemu-devel <qemu-devel@nongnu.org>, Blue Swirl <blauwirbel@gmail.com>,
Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>,
Artyom Tarasenko <atar4qemu@gmail.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Provags-ID: V03:K0:dTf3Ng2SR2hoC84GUEPPGIG7swVLITC+kwoZJU1NPn1G0hz/d99
GriJbXlzO8YZlcJk/hIKyyMkLyqBI/uXSxagybTB2BdC/cgkZgFCe0O8RnMpUvEsp+MzL7W
YmHmlDOhgAWB8zqJK+AYngRp3AnDmHxUdIXdO7Qi506pLWUotz5BlBBls4TfBbIvA5WbFpz
XbbXBYD0tM0RA5iD8LA4A==
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic]
X-Received-From: 212.227.15.18
X-BeenThere: qemu-devel@nongnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: <qemu-devel.nongnu.org>
List-Unsubscribe: <https://lists.nongnu.org/mailman/options/qemu-devel>,
<mailto:qemu-devel-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://lists.nongnu.org/archive/html/qemu-devel>
List-Post: <mailto:qemu-devel@nongnu.org>
List-Help: <mailto:qemu-devel-request@nongnu.org?subject=help>
List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/qemu-devel>,
<mailto:qemu-devel-request@nongnu.org?subject=subscribe>
X-Mailman-Copy: yes
Errors-To: qemu-devel-bounces+mark.cave-ayland=ilande.co.uk@nongnu.org
Sender: qemu-devel-bounces+mark.cave-ayland=ilande.co.uk@nongnu.org
X-SA-Exim-Connect-IP: 208.118.235.17
X-SA-Exim-Mail-From: qemu-devel-bounces+mark.cave-ayland=ilande.co.uk@nongnu.org
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on
s16892447.onlinehome-server.info
X-Spam-Level:
X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM,
RCVD_IN_DNSWL_HI,SPF_PASS autolearn=ham version=3.3.2
Subject: [Qemu-devel] [PATCH] Sun4m : SCSI ESP controller
X-SA-Exim-Version: 4.2.1 (built Sun, 08 Jan 2012 02:45:44 +0000)
X-SA-Exim-Scanned: Yes (on s16892447.onlinehome-server.info)
Two small fixes for the ESP (AM53C94) SCSI controller
* Signal the end of the DMA transfer after a SCSI command.
* The status register (RSTAT) is cleared after reading the interrupt
status register (RINTR), except for the TC bit (=Count To Zero) and the
scsi phase bits, which mirror SCSI signals levels.
Fixes the bug "esp0: !TC on DATA XFER" with NetBSD
https://bugs.launchpad.net/qemu/+bug/1055090
Signed-off-by: Olivier Danet <odanet@caramail.com>
---
hw/scsi/esp.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/hw/scsi/esp.c b/hw/scsi/esp.c
index 2d150bf..5e91077 100644
--- a/hw/scsi/esp.c
+++ b/hw/scsi/esp.c
@@ -246,6 +246,7 @@ static void esp_do_dma(ESPState *s)
s->cmdlen = 0;
s->do_cmd = 0;
do_cmd(s, s->cmdbuf);
+ esp_dma_done(s);
return;
}
if (s->async_len == 0) {
@@ -417,10 +418,9 @@ uint64_t esp_reg_read(ESPState *s, uint32_t saddr)
except TC */
old_val = s->rregs[ESP_RINTR];
s->rregs[ESP_RINTR] = 0;
- s->rregs[ESP_RSTAT] &= ~STAT_TC;
s->rregs[ESP_RSEQ] = SEQ_CD;
esp_lower_irq(s);
-
+ s->rregs[ESP_RSTAT] &= STAT_TC | STAT_MI;
return old_val;
default:
break;
--
1.8.1.5
next prev parent reply other threads:[~2014-02-20 9:00 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-16 23:13 [Qemu-devel] [PATCH] Sun4m : SCSI ESP controller Olivier Danet
2014-02-20 8:58 ` Mark Cave-Ayland [this message]
2014-02-20 11:13 ` Paolo Bonzini
2014-02-23 17:25 ` Mark Cave-Ayland
2014-02-21 22:03 ` Olivier Danet
2014-02-23 16:50 ` Mark Cave-Ayland
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=5305C3B2.7020800@ilande.co.uk \
--to=mark.cave-ayland@ilande.co.uk \
--cc=atar4qemu@gmail.com \
--cc=blauwirbel@gmail.com \
--cc=odanet@caramail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.