From: Jeff Garzik <jgarzik@pobox.com>
To: James Courtier-Dutton <James@superbug.demon.co.uk>
Cc: andersen@codepoet.org, Greg Stark <gsstark@mit.edu>,
linux-kernel@vger.kernel.org, linux-ide@vger.kernel.org,
linux-scsi@vger.kernel.org, mplayer@jburgess.uklinux.net
Subject: Re: Serial ATA (SATA) for Linux status report
Date: Wed, 14 Jan 2004 19:41:56 -0500 [thread overview]
Message-ID: <4005E1D4.6040807@pobox.com> (raw)
In-Reply-To: <4005D141.7050408@superbug.demon.co.uk>
[-- Attachment #1: Type: text/plain, Size: 407 bytes --]
I'm pretty sure the "excessive interrupts" issue was successfully
tracked down by Jon Burgess (thanks!). He found this post describing an
ICH5 hardware issue,
http://www.mail-archive.com/freebsd-stable@freebsd.org/msg58421.html
and he also submitted the attached patch.
I've been meaning to rewrite his patch to isolate it more to ata_piix,
but in the meantime maybe folks could test this?
Jeff
[-- Attachment #2: libata-spurious2.diff --]
[-- Type: text/plain, Size: 1322 bytes --]
--- libata-core.c-orig 2003-12-07 01:54:19.000000000 +0000
+++ libata-core.c 2003-12-07 16:25:11.961806872 +0000
@@ -2386,6 +2386,37 @@
}
/**
+ * ata_chk_spurious_int - Check for spurious interrupts
+ * @ap: port to which command is being issued
+ *
+ * Examines the DMA status registers and clears
+ * unexpected interrupts
+ *
+ * LOCKING:
+ */
+static inline void ata_chk_spurious_int(struct ata_port *ap) {
+ int host_stat;
+
+ if (ap->flags & ATA_FLAG_MMIO) {
+ void *mmio = (void *) ap->ioaddr.bmdma_addr;
+ host_stat = readb(mmio + ATA_DMA_STATUS);
+ } else
+ host_stat = inb(ap->ioaddr.bmdma_addr + ATA_DMA_STATUS);
+
+ if ((host_stat & (ATA_DMA_INTR | ATA_DMA_ERR | ATA_DMA_ACTIVE)) == ATA_DMA_INTR) {
+ if (ap->flags & ATA_FLAG_MMIO) {
+ void *mmio = (void *) ap->ioaddr.bmdma_addr;
+ writeb(host_stat & ~ATA_DMA_ERR, mmio + ATA_DMA_STATUS);
+ } else
+ outb(host_stat & ~ATA_DMA_ERR, ap->ioaddr.bmdma_addr + ATA_DMA_STATUS);
+
+ DPRINTK("ata%u: Caught spurious interrupt, status 0x%X\n", ap->id, host_stat);
+ udelay(1);
+ }
+}
+
+
+/**
* ata_interrupt -
* @irq:
* @dev_instance:
@@ -2417,6 +2448,7 @@
qc = ata_qc_from_tag(ap, ap->active_tag);
if (qc && ((qc->flags & ATA_QCFLAG_POLL) == 0))
handled += ata_host_intr(ap, qc);
+ ata_chk_spurious_int(ap);
}
}
next prev parent reply other threads:[~2004-01-15 0:41 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-12-03 20:44 Serial ATA (SATA) for Linux status report Jeff Garzik
2003-12-03 23:27 ` Andre Tomt
2003-12-03 23:36 ` Jeff Garzik
2003-12-03 23:49 ` Othmar Pasteka
2003-12-03 23:51 ` Jeff Garzik
2003-12-04 0:59 ` Samuel Flory
2003-12-04 1:02 ` Andre Tomt
2003-12-04 13:38 ` Justin Cormack
2003-12-04 14:54 ` Jeff Garzik
2003-12-04 8:17 ` Arnaud Launay
2003-12-04 15:01 ` Jeff Garzik
[not found] ` <200312051842.26599.marchand@kde.org>
[not found] ` <3FD0C4B0.8020106@pobox.com>
[not found] ` <200312051907.13727.marchand@kde.org>
2003-12-09 18:22 ` [PATCH] Silicon image 3114 SATA link (really basic support) Aron Rubin
2003-12-09 18:54 ` Mickael Marchand
2003-12-09 20:14 ` Bartlomiej Zolnierkiewicz
2003-12-12 0:07 ` Mickael Marchand
2003-12-09 19:59 ` Serial ATA (SATA) for Linux status report J. Ryan Earl
2004-01-14 22:18 ` Greg Stark
2004-01-14 22:56 ` Erik Andersen
2004-01-14 23:31 ` James Courtier-Dutton
2004-01-15 0:41 ` Jeff Garzik [this message]
2004-01-15 2:38 ` Erik Andersen
2004-01-18 12:34 ` Martin Schlemmer
2004-01-14 23:12 ` Erik Steffl
2004-01-18 13:32 ` Witold Krecicki
2004-01-18 18:00 ` Jeff Garzik
2004-01-18 20:33 ` Craig Bradney
-- strict thread matches above, loose matches on Subject: below --
2004-08-24 19:49 Jeff Garzik
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=4005E1D4.6040807@pobox.com \
--to=jgarzik@pobox.com \
--cc=James@superbug.demon.co.uk \
--cc=andersen@codepoet.org \
--cc=gsstark@mit.edu \
--cc=linux-ide@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=mplayer@jburgess.uklinux.net \
/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).