From: Mark Lord <liml@rtr.ca>
To: Jeff Garzik <jgarzik@pobox.com>, Tejun Heo <htejun@gmail.com>
Cc: Alan Cox <alan@redhat.com>,
IDE/ATA development list <linux-ide@vger.kernel.org>
Subject: [PATCH 04/04] sata_mv async notify for genIIe only
Date: Wed, 14 May 2008 09:24:39 -0400 [thread overview]
Message-ID: <482AE817.2020809@rtr.ca> (raw)
In-Reply-To: <482AE767.8090103@rtr.ca>
Now that we handle the FIS_IRQ_CAUSE register correctly,
we can also now handle SATA asynchronous notification events.
So enable them, but only for the more modern GenIIe chips.
(older chips have unaddressed errata issues related to this).
This fixes hot plug/unplug for port-muliplier ports.
Signed-off-by: Mark Lord <mlord@pobox.com>
--- old/drivers/ata/sata_mv.c 2008-05-14 09:00:36.000000000 -0400
+++ linux/drivers/ata/sata_mv.c 2008-05-14 09:04:38.000000000 -0400
@@ -133,7 +133,7 @@
MV_GENIIE_FLAGS = MV_COMMON_FLAGS | MV_6XXX_FLAGS |
ATA_FLAG_PMP | ATA_FLAG_ACPI_SATA |
- ATA_FLAG_NCQ,
+ ATA_FLAG_NCQ | ATA_FLAG_AN,
CRQB_FLAG_READ = (1 << 0),
CRQB_TAG_SHIFT = 1,
@@ -226,6 +226,7 @@
SATA_STATUS_OFS = 0x300, /* ctrl, err regs follow status */
SATA_ACTIVE_OFS = 0x350,
SATA_FIS_IRQ_CAUSE_OFS = 0x364,
+ SATA_FIS_IRQ_AN = (1 << 9), /* async notification */
LTMODE_OFS = 0x30c,
LTMODE_BIT8 = (1 << 8), /* unknown, but necessary */
@@ -1849,8 +1850,17 @@
ata_ehi_push_desc(ehi, "edma_err_cause=%08x pp_flags=%08x",
edma_err_cause, pp->pp_flags);
- if (IS_GEN_IIE(hpriv) && (edma_err_cause & EDMA_ERR_TRANS_IRQ_7))
+ if (IS_GEN_IIE(hpriv) && (edma_err_cause & EDMA_ERR_TRANS_IRQ_7)) {
ata_ehi_push_desc(ehi, "fis_cause=%08x", fis_cause);
+ if (fis_cause & SATA_FIS_IRQ_AN) {
+ u32 ec = edma_err_cause &
+ ~(EDMA_ERR_TRANS_IRQ_7 | EDMA_ERR_IRQ_TRANSIENT);
+ sata_async_notification(ap);
+ if (!ec)
+ return; /* Just an AN; no need for the nukes */
+ ata_ehi_push_desc(ehi, "SDB notify");
+ }
+ }
/*
* All generations share these EDMA error cause bits:
*/
next prev parent reply other threads:[~2008-05-14 13:24 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-05-14 13:18 [PATCH 01/04] sata_mv always do softreset Mark Lord
2008-05-14 13:19 ` [PATCH 02/04] sata_mv fis irq register fixes Mark Lord
2008-05-14 13:21 ` [PATCH 03/04] sata_mv group genIIe flags Mark Lord
2008-05-14 13:24 ` Mark Lord [this message]
2008-05-17 17:34 ` [PATCH 05/09] sata_mv don't blindly enable IRQs Mark Lord
2008-05-17 17:35 ` [PATCH 06/09] sata_mv consolidate main_irq_mask updates Mark Lord
2008-05-17 17:36 ` [PATCH 07/09] sata_mv fix pmp drives not found Mark Lord
2008-05-17 17:37 ` [PATCH 08/09] sata_mv disregard masked irqs Mark Lord
2008-05-17 17:38 ` [PATCH 09/09] sata_mv cache main_irq_mask register in hpriv Mark Lord
2008-05-19 13:01 ` [PATCH 10/10] sata_mv: ensure empty request queue for FBS-NCQ EH Mark Lord
2008-05-19 21:41 ` Jeff Garzik
2008-05-19 21:42 ` Jeff Garzik
2008-05-19 18:27 ` [PATCH 09/09] sata_mv cache main_irq_mask register in hpriv Grant Grundler
2008-05-17 17:41 ` [PATCH 05/09] sata_mv don't blindly enable IRQs Jeff Garzik
2008-05-17 17:45 ` Mark Lord
2008-05-17 17: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=482AE817.2020809@rtr.ca \
--to=liml@rtr.ca \
--cc=alan@redhat.com \
--cc=htejun@gmail.com \
--cc=jgarzik@pobox.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).