From: Jeff Garzik <jgarzik@pobox.com>
To: Tejun Heo <htejun@gmail.com>
Cc: albertcc@tw.ibm.com, linux-ide@vger.kernel.org
Subject: Re: [PATCH libata-dev-2.6:upstream 00/02] atapi: packet task vs. intr race fix
Date: Sun, 21 Aug 2005 17:59:31 -0400 [thread overview]
Message-ID: <4308F943.9090706@pobox.com> (raw)
In-Reply-To: <4308F450.4050402@gmail.com>
Tejun Heo wrote:
> Now I see what you're saying. We should be able to know/clear
> interrupt by reading ATA_STATUS. So, not having explicit interrupt
> pending bit can be compensated by following changes in ATA_STATUS (so
> the state machine), right? Thanks a lot for putting up with my ignorance.
Correct. Just never forget there is a side effect to reading the Status
register -- it clears any interrupt event it also signals.
> So, how about a port status bit to tell interrupt handler whether or
> not we are expecting an interrupt currently? That would solve the race
> from I tried to fix in the first patchset. If that's okay with you,
> I'll redo all four patches accordingly.
I'm a bit skeptical, TBH. I would prefer some sort of approach whereby
the code knows where the port is, inside the host state machine, and may
deduce from that "location" whether or not an interrupt is expected.
That's precisely how the code functions now with ATA DMA and non-data,
at least (or should...).
If we find out where the bug in the "I know when I expect an interrupt"
logic is, then your race should be easy to fix. Currently, I can see
that (a) ATAPI interrupt can race with called-immediately EH, and (b)
ATAPI may throw an interrupt to indicate CDB is ready to be sent [see
ATA-4], and libata doesn't yet support such a state in its host state
machine (HSM) implementation.
That said, if you still wish to send such a patch, I will give it an
open and honest review.
Maybe your bit flag approach plugs the hole in the existing HSM -- I
would just like to know _where_ this hole is. So far I don't see it,
except for (a) and (b) ATAPI examples above.
Jeff
next prev parent reply other threads:[~2005-08-21 21:59 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-08-20 9:17 [PATCH libata-dev-2.6:upstream 00/02] atapi: packet task vs. intr race fix Tejun Heo
2005-08-20 9:17 ` [PATCH libata-dev-2.6:upstream 01/02] atapi: update ata_irq_on Tejun Heo
2005-08-20 9:17 ` [PATCH libata-dev-2.6:upstream 02/02] atapi: fix atapi_packet_task vs. ata_host_intr race Tejun Heo
2005-08-21 19:47 ` [PATCH libata-dev-2.6:upstream 00/02] atapi: packet task vs. intr race fix Jeff Garzik
2005-08-21 20:17 ` Tejun Heo
2005-08-21 20:23 ` Jeff Garzik
2005-08-21 20:40 ` Tejun Heo
2005-08-21 21:24 ` Jeff Garzik
2005-08-21 21:38 ` Tejun Heo
2005-08-21 21:59 ` Jeff Garzik [this message]
2005-08-21 23:51 ` Tejun Heo
2005-08-22 0:27 ` Jeff Garzik
2005-08-22 3:57 ` Tejun Heo
2005-08-22 4:01 ` Jeff Garzik
2005-08-22 3:59 ` [PATCH libata:upstream] fix atapi_packet_task vs. intr race Tejun Heo
2005-08-22 4:15 ` Jeff Garzik
2005-08-22 5:59 ` [PATCH libata:upstream] fix atapi_packet_task vs. intr race (take 2) Tejun Heo
2005-08-22 6:54 ` Jeff Garzik
2005-08-22 7:06 ` Tejun Heo
2005-08-23 5:06 ` Jeff Garzik
2005-08-21 20:25 ` [PATCH libata-dev-2.6:upstream 00/02] atapi: packet task vs. intr race fix Jeff Garzik
2005-08-22 14:48 ` Mark Lord
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=4308F943.9090706@pobox.com \
--to=jgarzik@pobox.com \
--cc=albertcc@tw.ibm.com \
--cc=htejun@gmail.com \
--cc=linux-ide@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).