qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Stefan Hajnoczi <stefanha@redhat.com>
To: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Cc: kwolf@redhat.com, Stefan Hajnoczi <stefanha@gmail.com>,
	qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH 5/5] cmd646: synchronise UDMA interrupt status with DMA interrupt status
Date: Tue, 12 Aug 2014 09:47:16 +0100	[thread overview]
Message-ID: <20140812084716.GA19977@stefanha-thinkpad.redhat.com> (raw)
In-Reply-To: <53E8E22D.3040001@ilande.co.uk>

[-- Attachment #1: Type: text/plain, Size: 1592 bytes --]

On Mon, Aug 11, 2014 at 04:33:01PM +0100, Mark Cave-Ayland wrote:
> On 11/08/14 16:12, Stefan Hajnoczi wrote:
> 
> >On Fri, Aug 08, 2014 at 05:23:36PM +0100, Mark Cave-Ayland wrote:
> >>@@ -322,6 +342,10 @@ static int pci_cmd646_ide_initfn(PCIDevice *dev)
> >>      }
> >>
> >>      /* Set write-to-clear interrupt bits */
> >>+    dev->wmask[CFR] = 0x0;
> >>+    dev->w1cmask[CFR] = CFR_INTR_CH0;
> >>+    dev->wmask[ARTTIM23] = 0x0;
> >>+    dev->w1cmask[ARTTIM23] = ARTTIM23_INTR_CH1;
> >>      dev->wmask[MRDMODE] = 0x0;
> >>      dev->w1cmask[MRDMODE] = MRDMODE_INTR_CH0 | MRDMODE_INTR_CH1;
> >
> >It is not clear to me why the mask for MRDMODE has both Channel 0 and 1
> >but the ARTTIM23 and CFR masks only have one channel each.
> >
> >Please post a link to the datasheet.
> 
> Hi Stefan,
> 
> Thanks for the review. You can find a copy of the 646U2 datasheet at
> http://gkernel.sourceforge.net/specs/sii/PCI0646U2Specr030399.PDF.bz2.
> 
> My understanding from the datasheet is that CFR is the primary channel
> interrupt whilst ARTTIM23 is the secondary channel interrupt, and the note
> on page 28 explains that these bits are also accessible via the relevant
> bits of the MRDMODE register.
> 
> This fixes cmd646 under NetBSD since it programs UDMA via MRDMODE but clears
> the interrupts via CFR and ARTTIM23, so without this patchset the driver
> hangs because the interrupt isn't properly cleared across both registers.
> And I can also verify that Linux experiences no regressions with this
> patchset applied.

Great, thanks!

Stefan

[-- Attachment #2: Type: application/pgp-signature, Size: 473 bytes --]

  reply	other threads:[~2014-08-12  8:47 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-08 16:23 [Qemu-devel] [PATCH 0/5] cmd646 tidy-up and interrupt status fixes Mark Cave-Ayland
2014-08-08 16:23 ` [Qemu-devel] [PATCH 1/5] cmd646: add constants for CNTRL register access Mark Cave-Ayland
2014-08-08 16:23 ` [Qemu-devel] [PATCH 2/5] cmd646: synchronise DMA interrupt status with UDMA interrupt status Mark Cave-Ayland
2014-08-08 16:23 ` [Qemu-devel] [PATCH 3/5] cmd646: switch cmd646_update_irq() to accept PCIDevice instead of PCIIDEState Mark Cave-Ayland
2014-08-08 16:23 ` [Qemu-devel] [PATCH 4/5] cmd646: allow MRDMODE interrupt status bits clearing from PCI config space Mark Cave-Ayland
2014-08-08 16:23 ` [Qemu-devel] [PATCH 5/5] cmd646: synchronise UDMA interrupt status with DMA interrupt status Mark Cave-Ayland
2014-08-11 15:12   ` Stefan Hajnoczi
2014-08-11 15:33     ` Mark Cave-Ayland
2014-08-12  8:47       ` Stefan Hajnoczi [this message]
2014-08-11 15:13 ` [Qemu-devel] [PATCH 0/5] cmd646 tidy-up and interrupt status fixes Stefan Hajnoczi
2014-08-12  8:53 ` Stefan Hajnoczi

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=20140812084716.GA19977@stefanha-thinkpad.redhat.com \
    --to=stefanha@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=mark.cave-ayland@ilande.co.uk \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@gmail.com \
    /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).