From: Finn Thain <fthain@telegraphics.com.au>
To: Michael Schmitz <schmitzmic@gmail.com>
Cc: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>,
Tejun Heo <tj@kernel.org>,
Geert Uytterhoeven <geert@linux-m68k.org>,
linux-ide@vger.kernel.org,
Linux/m68k <linux-m68k@lists.linux-m68k.org>,
Linux Kernel Development <linux-kernel@vger.kernel.org>,
Andreas Schwab <schwab@linux-m68k.org>
Subject: Re: [PATCH 0/3] ata: add m68k/Atari Falcon PATA support
Date: Fri, 13 Jan 2017 13:33:17 +1100 (AEDT) [thread overview]
Message-ID: <alpine.LNX.2.00.1701111053340.22260@nippy.intranet> (raw)
In-Reply-To: <CAOmrzkJfQu6PuCpyyRJL8PNvSYxYO42F-k8jEYf2d1-5C28A_A@mail.gmail.com>
On Wed, 11 Jan 2017, Michael Schmitz wrote:
> What is still correct is that the IDE driver does use the interrupt
> only, not the ST-DMA chip. And a single IDE interrupt can be correctly
> assigned to IDE by looking at the status register.
>
> With the SCSI (and IIRC also floppy) interrupts, we don't have direct
> access to the status registers without disturbing the state of the DMA
> though. Unless we know for definite that either chips have raised the
> interrupt (and DMA ops are in flight), we must not touch the DMA chip at
> all.
>
> The case I'm worried about is both IDE and SCSI raising an interrupt. We
> don't currently mask the IDE/ST-DMA interrupt so a stacked interrupt
> must be processed in the same pass as the initial interrupt or it will
> get dropped. We'd have to peek at the DMA registers to check the SCSI or
> floppy interrupt status, and we just can't safely do that. So races of
> this kind are currently prevented by including IDE in the IRQ locking
> process.
>
> Whether it's possible to mask the interrupt, do one pass, unmask and
> process the second interrupt I don't know.
Would that require handling the SCSI DMA interrupt in the first pass? Or
handling IDE first, and ensuring that the IDE handler does not access
ST-DMA registers? What about FDC?
The atari_scsi handler accesses the ST-DMA registers; it can do so because
it knows that any DMA must have completed -- it can infer this because a
simultaneous pending interrupt from FDC or IDE is impossible due to
stdma_lock().
Your suggestion would seem to allow other pending interrupts, hence the
atari_scsi interrupt handler logic has to be tossed out. What logic would
replace it?
If all else fails, perhaps we could inhibit DMA entirely when the new ATA
driver is loaded. Then we can just dispatch the ST-DMA irq like a shared
irq. I'm sure that atari_scsi can work without DMA. No idea about the FDC
driver though (ataflop.c).
Another solution would be to dedicate the DMA function to atari_scsi, and
then mask the FDC and IDE interrupts during each DMA transfer. But once
again, this would mean changing the FDC driver to eliminate DMA, if that
is possible. From the schematic it looks the the FDC chip, "AJAX", is
another custom ...
http://dev-docs.atariforge.org/files/Falcon030_Schematic.pdf
Unfortunately my grasp of the ST hardware reflects my inability to read
German; those who can may want to take a look at "ATARI Profibuch
ST-STE-TT.pdf".
--
> Maybe Andreas does?
>
> Cheers,
>
> Michael
>
>
> > it should be okay to use IDE at the same time as SCSI/Floppy which is
> > what the new driver does (the old one is serialized operations by
> > ST-DMA related IRQ handling magic).
> >
> > Also the comment itself may need some fixups as on Falcon it is SCSI
> > not ACSI (according to the earlier comment in same file) and the old
> > IDE host driver name is not falhd.c but falconide.c.
> >
> > Best regards,
> > --
> > Bartlomiej Zolnierkiewicz
> > Samsung R&D Institute Poland
> > Samsung Electronics
> >
> --
> To unsubscribe from this list: send the line "unsubscribe linux-m68k" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
next prev parent reply other threads:[~2017-01-13 2:33 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CGME20161230140139epcas5p160eda5a6a77be084e21f12002c85cc2a@epcas5p1.samsung.com>
2016-12-30 14:01 ` [PATCH 0/3] ata: add m68k/Atari Falcon PATA support Bartlomiej Zolnierkiewicz
2016-12-30 14:01 ` [PATCH 1/3] ata: allow subsystem to be used on m68k arch Bartlomiej Zolnierkiewicz
2016-12-30 14:12 ` Christoph Hellwig
2016-12-30 17:14 ` Bartlomiej Zolnierkiewicz
2017-01-08 10:08 ` Christoph Hellwig
2017-01-09 16:01 ` Bartlomiej Zolnierkiewicz
2017-01-09 16:15 ` Geert Uytterhoeven
2016-12-30 14:01 ` [PATCH 2/3] ata: pass queued command to ->sff_data_xfer method Bartlomiej Zolnierkiewicz
2016-12-30 14:01 ` [PATCH 3/3] ata: add Atari Falcon PATA controller driver Bartlomiej Zolnierkiewicz
2017-01-03 10:49 ` [PATCH 0/3] ata: add m68k/Atari Falcon PATA support Geert Uytterhoeven
2017-01-09 16:11 ` Bartlomiej Zolnierkiewicz
2017-01-10 16:09 ` Tejun Heo
2017-01-05 21:01 ` Michael Schmitz
2017-01-10 12:53 ` Bartlomiej Zolnierkiewicz
2017-01-10 20:02 ` Michael Schmitz
2017-01-13 2:33 ` Finn Thain [this message]
2017-01-14 8:55 ` Michael Schmitz
2017-01-14 23:47 ` Finn Thain
2017-01-15 1:48 ` Michael Schmitz
2017-01-15 4:42 ` Finn Thain
2017-01-20 7:49 ` Michael Schmitz
2017-01-21 7:37 ` Finn Thain
2017-01-23 8:04 ` Michael Schmitz
2017-01-26 8:47 ` Finn Thain
2017-01-26 9:03 ` Geert Uytterhoeven
2017-01-27 1:41 ` Finn Thain
2017-01-27 4:28 ` Michael Schmitz
2017-02-01 8:40 ` Finn Thain
2017-02-01 8:45 ` Geert Uytterhoeven
2017-02-02 7:48 ` Michael Schmitz
2017-01-10 16:11 ` Tejun Heo
2017-02-15 8:45 ` Geert Uytterhoeven
2017-02-20 18:15 ` Bartlomiej Zolnierkiewicz
2017-02-21 22:18 ` Tejun Heo
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=alpine.LNX.2.00.1701111053340.22260@nippy.intranet \
--to=fthain@telegraphics.com.au \
--cc=b.zolnierkie@samsung.com \
--cc=geert@linux-m68k.org \
--cc=linux-ide@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-m68k@lists.linux-m68k.org \
--cc=schmitzmic@gmail.com \
--cc=schwab@linux-m68k.org \
--cc=tj@kernel.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