From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: Alan Cox <alan@redhat.com>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: Linux 2.4.21-pre3-ac4
Date: 13 Jan 2003 17:56:06 +0100 [thread overview]
Message-ID: <1042476966.30833.11.camel@zion.wanadoo.fr> (raw)
In-Reply-To: <1042404682.16288.34.camel@irongate.swansea.linux.org.uk>
On Sun, 2003-01-12 at 21:51, Alan Cox wrote:
> On Sun, 2003-01-12 at 19:57, Benjamin Herrenschmidt wrote:
> > Actually, do we really need that delay as we are waiting for an
> > interrupt anyway ? my understanding is that this delay is the required
> > before we start polling for BSY bit (that is the max time the drive may
> > take to assert BSY after getting the command), but in our case, unless
> > we have other bugs, we shall have the channel marked busy, so nobody
> > will tap it, except the actual interrupt coming in. Or will the case of
> > shared interrupt potentially cause a read of status at the wrong time ?
>
> Precisely. Or a random IRQ from a drive power change or hotplug that
> passed our command in the other direction.
>
> We could actually address this another way which might even be easier,
> that is in the IRQ path to wait the 400nS if BSY isnt asserted. I need
> to go reread the spec to check if we can poll it before the timeout
> but not trust the data, or cannot poll it.
Now I think that would be bad as that would mean waiting in the normal
case. But if you look at the various access patterns, I think there is
no real problem in fact, though I beleive only Andre can confirm.
We have 3 cases to deal with:
1 - Command with no data transfer. Here, there should be no problem
just doing a read from status or alt_status, right ? now, reading status
might clear the IRQ if we are slow enough, so we may want alt_status
instead. (We can probably safely ignore controllers that have no alt
status here, or route them via some hwif->IOSYNC() macro). Or maybe just
re-read the select register for making everybody happy.
2 - Command with a data transfer not using DMA (that is either PIO or
the command part of an ATAPI command in ide-cd). I don't think there's
any problem reading alt status or select here, is there andre ? So we
can also safely do that before waiting and thus make sure the bus path
to the controller is ok
3 - Command with a data transfer using DMA (new ide-scsi, ide-hd with
dma, etc...). Here, I beleive there is just no problem, we don't need to
wait at all, since the interrupt handler will check for the DMA
controller to have completed via hwif->ide_dma_test_irq before reading
the status reg at all, right ?
Ben.
next prev parent reply other threads:[~2003-01-13 16:44 UTC|newest]
Thread overview: 41+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-01-12 18:07 Linux 2.4.21-pre3-ac4 Alan Cox
2003-01-12 19:29 ` Benjamin Herrenschmidt
[not found] ` <1042403235.16288.14.camel@irongate.swansea.linux.org.uk>
2003-01-12 19:51 ` Benjamin Herrenschmidt
2003-01-12 19:57 ` Benjamin Herrenschmidt
2003-01-12 20:51 ` Alan Cox
2003-01-13 16:56 ` Benjamin Herrenschmidt [this message]
2003-01-12 20:40 ` Alan Cox
2003-01-12 20:02 ` Benjamin Herrenschmidt
2003-01-13 18:49 ` Ross Biro
2003-01-13 19:03 ` Benjamin Herrenschmidt
2003-01-13 19:19 ` Ross Biro
2003-01-13 19:32 ` Ross Biro
2003-01-13 21:05 ` Alan Cox
2003-01-13 20:36 ` Ross Biro
2003-01-13 19:46 ` Alan Cox
2003-01-14 17:38 ` Benjamin Herrenschmidt
2003-01-14 17:49 ` Ross Biro
2003-01-14 17:52 ` Benjamin Herrenschmidt
2003-01-14 21:17 ` Andre Hedrick
2003-01-15 0:23 ` Benjamin Herrenschmidt
2003-01-15 5:07 ` Andre Hedrick
[not found] ` <1043105473.12609.5.camel@dhcp22.swansea.linux.org.uk>
2003-01-21 17:07 ` Benjamin Herrenschmidt
2003-01-13 20:56 ` Benjamin Herrenschmidt
2003-01-13 21:36 ` Ross Biro
2003-01-14 1:35 ` Ross Biro
2003-01-14 1:44 ` Andre Hedrick
2003-01-14 9:18 ` Benjamin Herrenschmidt
2003-01-20 6:13 ` Alan Cox
2003-01-13 19:34 ` John Alvord
2003-01-13 19:48 ` Ross Biro
2003-01-13 21:24 ` Jeff Garzik
2003-01-13 21:40 ` Richard B. Johnson
2003-01-13 22:02 ` Benjamin Herrenschmidt
2003-01-13 22:07 ` Benjamin Herrenschmidt
2003-01-14 1:20 ` Richard B. Johnson
2003-01-14 9:06 ` Benjamin Herrenschmidt
2003-01-14 14:04 ` Richard B. Johnson
2003-01-14 14:35 ` Benjamin Herrenschmidt
2003-01-21 11:15 ` Linux 2.4.21-pre3-ac4 [PATCH] Paul Gortmaker
2003-01-21 13:21 ` Hugh Dickins
2003-01-21 11:46 ` small patch for Via Pro 266T agp-support Jurriaan
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=1042476966.30833.11.camel@zion.wanadoo.fr \
--to=benh@kernel.crashing.org \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=alan@redhat.com \
--cc=linux-kernel@vger.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;
as well as URLs for NNTP newsgroup(s).