aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@g5.osdl.org>2006-02-01 00:22:45 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2006-02-01 00:22:45 -0500
commit2f4c5416b36a5601d57f09e87a514a171390d5e0 (patch)
treefbb6ac70b008e5929e2fdcf371ee860c86c54216 /drivers
parentd20e6336ea4250e51081e4b2924b9ef4dfa45909 (diff)
parent9220a2d0daa1e6782f02d47303340d7b5ca62ac0 (diff)
Merge branch 'upstream-fixes' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/libata-dev
Diffstat (limited to 'drivers')
-rw-r--r--drivers/scsi/ahci.c19
1 files changed, 15 insertions, 4 deletions
diff --git a/drivers/scsi/ahci.c b/drivers/scsi/ahci.c
index 19bd346951dd..a800fb51168b 100644
--- a/drivers/scsi/ahci.c
+++ b/drivers/scsi/ahci.c
@@ -286,6 +286,10 @@ static const struct pci_device_id ahci_pci_tbl[] = {
286 board_ahci }, /* ICH8M */ 286 board_ahci }, /* ICH8M */
287 { PCI_VENDOR_ID_INTEL, 0x282a, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 287 { PCI_VENDOR_ID_INTEL, 0x282a, PCI_ANY_ID, PCI_ANY_ID, 0, 0,
288 board_ahci }, /* ICH8M */ 288 board_ahci }, /* ICH8M */
289 { 0x197b, 0x2360, PCI_ANY_ID, PCI_ANY_ID, 0, 0,
290 board_ahci }, /* JMicron JMB360 */
291 { 0x197b, 0x2363, PCI_ANY_ID, PCI_ANY_ID, 0, 0,
292 board_ahci }, /* JMicron JMB363 */
289 { } /* terminate list */ 293 { } /* terminate list */
290}; 294};
291 295
@@ -802,7 +806,6 @@ static int ahci_host_init(struct ata_probe_ent *probe_ent)
802 struct pci_dev *pdev = to_pci_dev(probe_ent->dev); 806 struct pci_dev *pdev = to_pci_dev(probe_ent->dev);
803 void __iomem *mmio = probe_ent->mmio_base; 807 void __iomem *mmio = probe_ent->mmio_base;
804 u32 tmp, cap_save; 808 u32 tmp, cap_save;
805 u16 tmp16;
806 unsigned int i, j, using_dac; 809 unsigned int i, j, using_dac;
807 int rc; 810 int rc;
808 void __iomem *port_mmio; 811 void __iomem *port_mmio;
@@ -836,9 +839,13 @@ static int ahci_host_init(struct ata_probe_ent *probe_ent)
836 writel(0xf, mmio + HOST_PORTS_IMPL); 839 writel(0xf, mmio + HOST_PORTS_IMPL);
837 (void) readl(mmio + HOST_PORTS_IMPL); /* flush */ 840 (void) readl(mmio + HOST_PORTS_IMPL); /* flush */
838 841
839 pci_read_config_word(pdev, 0x92, &tmp16); 842 if (pdev->vendor == PCI_VENDOR_ID_INTEL) {
840 tmp16 |= 0xf; 843 u16 tmp16;
841 pci_write_config_word(pdev, 0x92, tmp16); 844
845 pci_read_config_word(pdev, 0x92, &tmp16);
846 tmp16 |= 0xf;
847 pci_write_config_word(pdev, 0x92, tmp16);
848 }
842 849
843 hpriv->cap = readl(mmio + HOST_CAP); 850 hpriv->cap = readl(mmio + HOST_CAP);
844 hpriv->port_map = readl(mmio + HOST_PORTS_IMPL); 851 hpriv->port_map = readl(mmio + HOST_PORTS_IMPL);
@@ -1082,6 +1089,10 @@ static int ahci_init_one (struct pci_dev *pdev, const struct pci_device_id *ent)
1082 if (have_msi) 1089 if (have_msi)
1083 hpriv->flags |= AHCI_FLAG_MSI; 1090 hpriv->flags |= AHCI_FLAG_MSI;
1084 1091
1092 /* JMicron-specific fixup: make sure we're in AHCI mode */
1093 if (pdev->vendor == 0x197b)
1094 pci_write_config_byte(pdev, 0x41, 0xa1);
1095
1085 /* initialize adapter */ 1096 /* initialize adapter */
1086 rc = ahci_host_init(probe_ent); 1097 rc = ahci_host_init(probe_ent);
1087 if (rc) 1098 if (rc)