diff options
author | Jeff Garzik <jeff@garzik.org> | 2007-02-25 04:19:45 -0500 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2007-02-26 05:42:39 -0500 |
commit | fb621e2fde735abab854586d52c96c5624bcb5b8 (patch) | |
tree | 327cd1775d5d8903908c840f61ca433b63132ab4 /drivers/ata | |
parent | e728eabea110da90e69c05855e3a11174edb77ef (diff) |
[libata] sata_mv: Fix 50xx irq mask
IRQ mask bits assumed a 60xx or newer generation chip, which is very
wrong for the 50xx series. Luckily both generations shared the per-port
interrupt mask bits, leaving only the "misc chip features" bits to be
completely mismatched.
Fix 50xx by ensuring we only program bits that exist.
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/ata')
-rw-r--r-- | drivers/ata/sata_mv.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/drivers/ata/sata_mv.c b/drivers/ata/sata_mv.c index cc59aca12d42..144b2274706c 100644 --- a/drivers/ata/sata_mv.c +++ b/drivers/ata/sata_mv.c | |||
@@ -137,14 +137,19 @@ enum { | |||
137 | PCI_ERR = (1 << 18), | 137 | PCI_ERR = (1 << 18), |
138 | TRAN_LO_DONE = (1 << 19), /* 6xxx: IRQ coalescing */ | 138 | TRAN_LO_DONE = (1 << 19), /* 6xxx: IRQ coalescing */ |
139 | TRAN_HI_DONE = (1 << 20), /* 6xxx: IRQ coalescing */ | 139 | TRAN_HI_DONE = (1 << 20), /* 6xxx: IRQ coalescing */ |
140 | PORTS_0_3_COAL_DONE = (1 << 8), | ||
141 | PORTS_4_7_COAL_DONE = (1 << 17), | ||
140 | PORTS_0_7_COAL_DONE = (1 << 21), /* 6xxx: IRQ coalescing */ | 142 | PORTS_0_7_COAL_DONE = (1 << 21), /* 6xxx: IRQ coalescing */ |
141 | GPIO_INT = (1 << 22), | 143 | GPIO_INT = (1 << 22), |
142 | SELF_INT = (1 << 23), | 144 | SELF_INT = (1 << 23), |
143 | TWSI_INT = (1 << 24), | 145 | TWSI_INT = (1 << 24), |
144 | HC_MAIN_RSVD = (0x7f << 25), /* bits 31-25 */ | 146 | HC_MAIN_RSVD = (0x7f << 25), /* bits 31-25 */ |
147 | HC_MAIN_RSVD_5 = (0x1fff << 19), /* bits 31-19 */ | ||
145 | HC_MAIN_MASKED_IRQS = (TRAN_LO_DONE | TRAN_HI_DONE | | 148 | HC_MAIN_MASKED_IRQS = (TRAN_LO_DONE | TRAN_HI_DONE | |
146 | PORTS_0_7_COAL_DONE | GPIO_INT | TWSI_INT | | 149 | PORTS_0_7_COAL_DONE | GPIO_INT | TWSI_INT | |
147 | HC_MAIN_RSVD), | 150 | HC_MAIN_RSVD), |
151 | HC_MAIN_MASKED_IRQS_5 = (PORTS_0_3_COAL_DONE | PORTS_4_7_COAL_DONE | | ||
152 | HC_MAIN_RSVD_5), | ||
148 | 153 | ||
149 | /* SATAHC registers */ | 154 | /* SATAHC registers */ |
150 | HC_CFG_OFS = 0, | 155 | HC_CFG_OFS = 0, |
@@ -2244,7 +2249,11 @@ static int mv_init_host(struct pci_dev *pdev, struct ata_probe_ent *probe_ent, | |||
2244 | 2249 | ||
2245 | /* and unmask interrupt generation for host regs */ | 2250 | /* and unmask interrupt generation for host regs */ |
2246 | writelfl(PCI_UNMASK_ALL_IRQS, mmio + PCI_IRQ_MASK_OFS); | 2251 | writelfl(PCI_UNMASK_ALL_IRQS, mmio + PCI_IRQ_MASK_OFS); |
2247 | writelfl(~HC_MAIN_MASKED_IRQS, mmio + HC_MAIN_IRQ_MASK_OFS); | 2252 | |
2253 | if (IS_50XX(hpriv)) | ||
2254 | writelfl(~HC_MAIN_MASKED_IRQS_5, mmio + HC_MAIN_IRQ_MASK_OFS); | ||
2255 | else | ||
2256 | writelfl(~HC_MAIN_MASKED_IRQS, mmio + HC_MAIN_IRQ_MASK_OFS); | ||
2248 | 2257 | ||
2249 | VPRINTK("HC MAIN IRQ cause/mask=0x%08x/0x%08x " | 2258 | VPRINTK("HC MAIN IRQ cause/mask=0x%08x/0x%08x " |
2250 | "PCI int cause/mask=0x%08x/0x%08x\n", | 2259 | "PCI int cause/mask=0x%08x/0x%08x\n", |