aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMark Lord <liml@rtr.ca>2008-05-14 09:24:39 -0400
committerJeff Garzik <jgarzik@redhat.com>2008-05-19 17:28:17 -0400
commitc443c5002b24ff5d2f4efcc25a861f0cb835130a (patch)
tree25f1afa9f47123fa59603e2a9a437a48557da12e
parentad3aef51e17b9c6a90a9014805f1645e8e441c17 (diff)
sata_mv: async notify for genIIe only
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> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
-rw-r--r--drivers/ata/sata_mv.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/drivers/ata/sata_mv.c b/drivers/ata/sata_mv.c
index 52e992ce59a4..239ea4778c56 100644
--- a/drivers/ata/sata_mv.c
+++ b/drivers/ata/sata_mv.c
@@ -133,7 +133,7 @@ enum {
133 133
134 MV_GENIIE_FLAGS = MV_COMMON_FLAGS | MV_6XXX_FLAGS | 134 MV_GENIIE_FLAGS = MV_COMMON_FLAGS | MV_6XXX_FLAGS |
135 ATA_FLAG_PMP | ATA_FLAG_ACPI_SATA | 135 ATA_FLAG_PMP | ATA_FLAG_ACPI_SATA |
136 ATA_FLAG_NCQ, 136 ATA_FLAG_NCQ | ATA_FLAG_AN,
137 137
138 CRQB_FLAG_READ = (1 << 0), 138 CRQB_FLAG_READ = (1 << 0),
139 CRQB_TAG_SHIFT = 1, 139 CRQB_TAG_SHIFT = 1,
@@ -226,6 +226,7 @@ enum {
226 SATA_STATUS_OFS = 0x300, /* ctrl, err regs follow status */ 226 SATA_STATUS_OFS = 0x300, /* ctrl, err regs follow status */
227 SATA_ACTIVE_OFS = 0x350, 227 SATA_ACTIVE_OFS = 0x350,
228 SATA_FIS_IRQ_CAUSE_OFS = 0x364, 228 SATA_FIS_IRQ_CAUSE_OFS = 0x364,
229 SATA_FIS_IRQ_AN = (1 << 9), /* async notification */
229 230
230 LTMODE_OFS = 0x30c, 231 LTMODE_OFS = 0x30c,
231 LTMODE_BIT8 = (1 << 8), /* unknown, but necessary */ 232 LTMODE_BIT8 = (1 << 8), /* unknown, but necessary */
@@ -1849,8 +1850,17 @@ static void mv_err_intr(struct ata_port *ap)
1849 ata_ehi_push_desc(ehi, "edma_err_cause=%08x pp_flags=%08x", 1850 ata_ehi_push_desc(ehi, "edma_err_cause=%08x pp_flags=%08x",
1850 edma_err_cause, pp->pp_flags); 1851 edma_err_cause, pp->pp_flags);
1851 1852
1852 if (IS_GEN_IIE(hpriv) && (edma_err_cause & EDMA_ERR_TRANS_IRQ_7)) 1853 if (IS_GEN_IIE(hpriv) && (edma_err_cause & EDMA_ERR_TRANS_IRQ_7)) {
1853 ata_ehi_push_desc(ehi, "fis_cause=%08x", fis_cause); 1854 ata_ehi_push_desc(ehi, "fis_cause=%08x", fis_cause);
1855 if (fis_cause & SATA_FIS_IRQ_AN) {
1856 u32 ec = edma_err_cause &
1857 ~(EDMA_ERR_TRANS_IRQ_7 | EDMA_ERR_IRQ_TRANSIENT);
1858 sata_async_notification(ap);
1859 if (!ec)
1860 return; /* Just an AN; no need for the nukes */
1861 ata_ehi_push_desc(ehi, "SDB notify");
1862 }
1863 }
1854 /* 1864 /*
1855 * All generations share these EDMA error cause bits: 1865 * All generations share these EDMA error cause bits:
1856 */ 1866 */