diff options
Diffstat (limited to 'drivers/ata/ahci.c')
-rw-r--r-- | drivers/ata/ahci.c | 55 |
1 files changed, 27 insertions, 28 deletions
diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c index 6d932409aadd..1539734bbbad 100644 --- a/drivers/ata/ahci.c +++ b/drivers/ata/ahci.c | |||
@@ -200,6 +200,7 @@ struct ahci_port_priv { | |||
200 | /* for NCQ spurious interrupt analysis */ | 200 | /* for NCQ spurious interrupt analysis */ |
201 | unsigned int ncq_saw_d2h:1; | 201 | unsigned int ncq_saw_d2h:1; |
202 | unsigned int ncq_saw_dmas:1; | 202 | unsigned int ncq_saw_dmas:1; |
203 | unsigned int ncq_saw_sdb:1; | ||
203 | }; | 204 | }; |
204 | 205 | ||
205 | static u32 ahci_scr_read (struct ata_port *ap, unsigned int sc_reg); | 206 | static u32 ahci_scr_read (struct ata_port *ap, unsigned int sc_reg); |
@@ -384,12 +385,9 @@ static const struct pci_device_id ahci_pci_tbl[] = { | |||
384 | { PCI_VDEVICE(INTEL, 0x294d), board_ahci_pi }, /* ICH9 */ | 385 | { PCI_VDEVICE(INTEL, 0x294d), board_ahci_pi }, /* ICH9 */ |
385 | { PCI_VDEVICE(INTEL, 0x294e), board_ahci_pi }, /* ICH9M */ | 386 | { PCI_VDEVICE(INTEL, 0x294e), board_ahci_pi }, /* ICH9M */ |
386 | 387 | ||
387 | /* JMicron */ | 388 | /* JMicron 360/1/3/5/6, match class to avoid IDE function */ |
388 | { PCI_VDEVICE(JMICRON, 0x2360), board_ahci_ign_iferr }, /* JMB360 */ | 389 | { PCI_VENDOR_ID_JMICRON, PCI_ANY_ID, PCI_ANY_ID, PCI_ANY_ID, |
389 | { PCI_VDEVICE(JMICRON, 0x2361), board_ahci_ign_iferr }, /* JMB361 */ | 390 | PCI_CLASS_STORAGE_SATA_AHCI, 0xffffff, board_ahci_ign_iferr }, |
390 | { PCI_VDEVICE(JMICRON, 0x2363), board_ahci_ign_iferr }, /* JMB363 */ | ||
391 | { PCI_VDEVICE(JMICRON, 0x2365), board_ahci_ign_iferr }, /* JMB365 */ | ||
392 | { PCI_VDEVICE(JMICRON, 0x2366), board_ahci_ign_iferr }, /* JMB366 */ | ||
393 | 391 | ||
394 | /* ATI */ | 392 | /* ATI */ |
395 | { PCI_VDEVICE(ATI, 0x4380), board_ahci }, /* ATI SB600 non-raid */ | 393 | { PCI_VDEVICE(ATI, 0x4380), board_ahci }, /* ATI SB600 non-raid */ |
@@ -1160,23 +1158,31 @@ static void ahci_host_intr(struct ata_port *ap) | |||
1160 | } | 1158 | } |
1161 | 1159 | ||
1162 | if (status & PORT_IRQ_SDB_FIS) { | 1160 | if (status & PORT_IRQ_SDB_FIS) { |
1163 | /* SDB FIS containing spurious completions might be | ||
1164 | * dangerous, whine and fail commands with HSM | ||
1165 | * violation. EH will turn off NCQ after several such | ||
1166 | * failures. | ||
1167 | */ | ||
1168 | const __le32 *f = pp->rx_fis + RX_FIS_SDB; | 1161 | const __le32 *f = pp->rx_fis + RX_FIS_SDB; |
1169 | 1162 | ||
1170 | ata_ehi_push_desc(ehi, "spurious completion during NCQ " | 1163 | if (le32_to_cpu(f[1])) { |
1171 | "issue=0x%x SAct=0x%x FIS=%08x:%08x", | 1164 | /* SDB FIS containing spurious completions |
1172 | readl(port_mmio + PORT_CMD_ISSUE), | 1165 | * might be dangerous, whine and fail commands |
1173 | readl(port_mmio + PORT_SCR_ACT), | 1166 | * with HSM violation. EH will turn off NCQ |
1174 | le32_to_cpu(f[0]), le32_to_cpu(f[1])); | 1167 | * after several such failures. |
1175 | 1168 | */ | |
1176 | ehi->err_mask |= AC_ERR_HSM; | 1169 | ata_ehi_push_desc(ehi, |
1177 | ehi->action |= ATA_EH_SOFTRESET; | 1170 | "spurious completions during NCQ " |
1178 | ata_port_freeze(ap); | 1171 | "issue=0x%x SAct=0x%x FIS=%08x:%08x", |
1179 | 1172 | readl(port_mmio + PORT_CMD_ISSUE), | |
1173 | readl(port_mmio + PORT_SCR_ACT), | ||
1174 | le32_to_cpu(f[0]), le32_to_cpu(f[1])); | ||
1175 | ehi->err_mask |= AC_ERR_HSM; | ||
1176 | ehi->action |= ATA_EH_SOFTRESET; | ||
1177 | ata_port_freeze(ap); | ||
1178 | } else { | ||
1179 | if (!pp->ncq_saw_sdb) | ||
1180 | ata_port_printk(ap, KERN_INFO, | ||
1181 | "spurious SDB FIS %08x:%08x during NCQ, " | ||
1182 | "this message won't be printed again\n", | ||
1183 | le32_to_cpu(f[0]), le32_to_cpu(f[1])); | ||
1184 | pp->ncq_saw_sdb = 1; | ||
1185 | } | ||
1180 | known_irq = 1; | 1186 | known_irq = 1; |
1181 | } | 1187 | } |
1182 | 1188 | ||
@@ -1665,13 +1671,6 @@ static int ahci_init_one(struct pci_dev *pdev, const struct pci_device_id *ent) | |||
1665 | if (!printed_version++) | 1671 | if (!printed_version++) |
1666 | dev_printk(KERN_DEBUG, &pdev->dev, "version " DRV_VERSION "\n"); | 1672 | dev_printk(KERN_DEBUG, &pdev->dev, "version " DRV_VERSION "\n"); |
1667 | 1673 | ||
1668 | if (pdev->vendor == PCI_VENDOR_ID_JMICRON) { | ||
1669 | /* Function 1 is the PATA controller except on the 368, where | ||
1670 | we are not AHCI anyway */ | ||
1671 | if (PCI_FUNC(pdev->devfn)) | ||
1672 | return -ENODEV; | ||
1673 | } | ||
1674 | |||
1675 | rc = pcim_enable_device(pdev); | 1674 | rc = pcim_enable_device(pdev); |
1676 | if (rc) | 1675 | if (rc) |
1677 | return rc; | 1676 | return rc; |