From: Tejun Heo <htejun@gmail.com>
To: jeff@garzik.org, alan@lxorguk.ukuu.org.uk, ric@emc.com,
edmudama@gmail.com, linux-ide@vger.kernel.org
Cc: Tejun Heo <htejun@gmail.com>
Subject: [PATCH 5/5] ahci: consider SDB FIS containing spurious NCQ completions HSM violation
Date: Fri, 2 Feb 2007 16:09:31 +0900 [thread overview]
Message-ID: <1170400171608-git-send-email-htejun@gmail.com> (raw)
In-Reply-To: <11704001701015-git-send-email-htejun@gmail.com>
SDB FIS containing spurious NCQ completions is a clear protocol
violation. Currently, only some Maxtors with early firmware revisions
are showing this problem. Those firmwares have other NCQ related
problems including buggy NCQ error reporting and occasional lock up
after NCQ errors.
Consider spurious NCQ completions HSM violation and freeze the port
after it. EH will turn off NCQ after this happens several times.
Eventually drives which show this behavior should be blacklisted for
NCQ.
Signed-off-by: Tejun Heo <htejun@gmail.com>
---
drivers/ata/ahci.c | 26 +++++++++++++-------------
1 files changed, 13 insertions(+), 13 deletions(-)
diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c
index 8f1d753..1d8d377 100644
--- a/drivers/ata/ahci.c
+++ b/drivers/ata/ahci.c
@@ -199,7 +199,6 @@ struct ahci_port_priv {
void *rx_fis;
dma_addr_t rx_fis_dma;
/* for NCQ spurious interrupt analysis */
- int ncq_saw_spurious_sdb_cnt;
unsigned int ncq_saw_d2h:1;
unsigned int ncq_saw_dmas:1;
};
@@ -1157,23 +1156,24 @@ static void ahci_host_intr(struct ata_port *ap)
known_irq = 1;
}
- if (status & PORT_IRQ_SDB_FIS &&
- pp->ncq_saw_spurious_sdb_cnt < 10) {
+ if (status & PORT_IRQ_SDB_FIS) {
/* SDB FIS containing spurious completions might be
- * dangerous, we need to know more about them. Print
- * more of it.
+ * dangerous, whine and fail commands with HSM
+ * violation. EH will turn off NCQ after several such
+ * failures.
*/
const u32 *f = pp->rx_fis + RX_FIS_SDB;
- ata_port_printk(ap, KERN_INFO, "Spurious SDB FIS during NCQ "
- "issue=0x%x SAct=0x%x FIS=%08x:%08x%s\n",
- readl(port_mmio + PORT_CMD_ISSUE),
- readl(port_mmio + PORT_SCR_ACT),
- le32_to_cpu(f[0]), le32_to_cpu(f[1]),
- pp->ncq_saw_spurious_sdb_cnt < 10 ?
- "" : ", shutting up");
+ ata_ehi_push_desc(ehi, "spurious completion during NCQ "
+ "issue=0x%x SAct=0x%x FIS=%08x:%08x",
+ readl(port_mmio + PORT_CMD_ISSUE),
+ readl(port_mmio + PORT_SCR_ACT),
+ le32_to_cpu(f[0]), le32_to_cpu(f[1]));
+
+ ehi->err_mask |= AC_ERR_HSM;
+ ehi->action |= ATA_EH_SOFTRESET;
+ ata_port_freeze(ap);
- pp->ncq_saw_spurious_sdb_cnt++;
known_irq = 1;
}
--
1.4.4.4
next prev parent reply other threads:[~2007-02-02 7:09 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-02-02 7:09 [PATCHSET] ata_piix: improve combined mode handling Tejun Heo
2007-02-02 7:09 ` [PATCH 2/5] libata: improve probe failure handling Tejun Heo
2007-02-02 7:09 ` [PATCH 1/5] libata: improve ata_down_xfermask_limit() Tejun Heo
2007-02-02 7:09 ` [PATCH 3/5] libata: put some intelligence into EH speed down sequence Tejun Heo
2007-02-02 7:09 ` Tejun Heo [this message]
2007-02-02 7:09 ` [PATCH 4/5] libata: kill ATA_DNXFER_ANY Tejun Heo
2007-02-02 7:10 ` Subject should be [PATCHSET] put some intelligence into speed down sequence Tejun Heo
2007-02-02 7:12 ` Please ignore this thread. I'll resend Tejun Heo
-- strict thread matches above, loose matches on Subject: below --
2007-02-02 7:22 asdf Tejun Heo
2007-02-02 7:22 ` [PATCH 5/5] ahci: consider SDB FIS containing spurious NCQ completions HSM violation Tejun Heo
2007-02-20 15:46 ` 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=1170400171608-git-send-email-htejun@gmail.com \
--to=htejun@gmail.com \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=edmudama@gmail.com \
--cc=jeff@garzik.org \
--cc=linux-ide@vger.kernel.org \
--cc=ric@emc.com \
/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).