From: Tejun Heo <htejun@gmail.com>
To: Bjorn Wesen <bjorn.wesen@axis.com>
Cc: linux-ide@vger.kernel.org
Subject: Re: 2.6.20-rc3 IRQ race upon resume? => killing SATA IRQ
Date: Thu, 04 Jan 2007 13:37:49 +0900 [thread overview]
Message-ID: <459C849D.4070904@gmail.com> (raw)
In-Reply-To: <Pine.LNX.4.64.0701040244300.15167@localhost.localdomain>
Bjorn Wesen wrote:
> Just adding some info here!
>
> I added this to the bottom of ata_interrupt in libata-core.c which fixed
> the problem:
>
> if(!handled) {
> printk("ata_interrupt nobody cared. Trying to clear irq src\n");
> for (i = 0; i < host->n_ports; i++) {
> struct ata_port *ap;
>
> ap = host->ports[i];
>
> ata_bmdma_irq_clear(ap);
> }
> handled = 1;
> }
>
> The result was that the above message comes 3 times in a row during
> resume, then it silences and everything works. Also, I noticed that
> ata_host_intr is not called in these cases, so when the interrupt
> reaches the driver after the resume, it ignores it probably because it
> thinks it has no QC active (correctly probably). Question is, where is
> the irq coming from then.
>
> Obviously this is a horribly wrong fix, since if the interrupt is
> shared, we will shadow the other interrupt so it never gets run (and
> corrupt our own BM DMA operations).
It is not that horribly wrong. The only problem you'll cause by
returning spurious non-zero handled is defeating 'nobody cared'
detection logic. So, if the other device sharing interrupt was raising
spurious interrupt (not likely, most modern controllers have irq pending
bit and drivers can reliably tell whether it is raising interrupt or
not, IDE interface is just ooooold), the machine will lock up hard.
I'll investigate deeper when when I get some spare time but for the time
being, you solution should suffice. Another solution would be switching
the controller into ahci mode which is much better.
--
tejun
next prev parent reply other threads:[~2007-01-04 4:38 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-01-03 23:26 2.6.20-rc3 IRQ race upon resume? => killing SATA IRQ Bjorn Wesen
2007-01-04 1:55 ` Bjorn Wesen
2007-01-04 4:37 ` Tejun Heo [this message]
2007-01-04 10:13 ` Alan
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=459C849D.4070904@gmail.com \
--to=htejun@gmail.com \
--cc=bjorn.wesen@axis.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).