aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorJeff Garzik <jgarzik@pobox.com>2006-01-29 02:47:18 -0500
committerJeff Garzik <jgarzik@pobox.com>2006-01-29 02:47:18 -0500
commitb1d917739acd44e14eb13813e4c94dc4b6831ca3 (patch)
treed666684748522c31356d04f8243f6bcd7203dc8b /drivers
parentc893a3ae49279a4ab6aa6cf594a2ec6d286e1187 (diff)
parentbd12097c7415c13aff53aed473eec92acd15712a (diff)
Merge branch 'upstream-fixes'
Diffstat (limited to 'drivers')
-rw-r--r--drivers/scsi/ahci.c17
1 files changed, 13 insertions, 4 deletions
diff --git a/drivers/scsi/ahci.c b/drivers/scsi/ahci.c
index 5caf6dec1d40..f65a00fe81d9 100644
--- a/drivers/scsi/ahci.c
+++ b/drivers/scsi/ahci.c
@@ -290,6 +290,8 @@ static const struct pci_device_id ahci_pci_tbl[] = {
290 board_ahci }, /* ICH8M */ 290 board_ahci }, /* ICH8M */
291 { PCI_VENDOR_ID_INTEL, 0x282a, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 291 { PCI_VENDOR_ID_INTEL, 0x282a, PCI_ANY_ID, PCI_ANY_ID, 0, 0,
292 board_ahci }, /* ICH8M */ 292 board_ahci }, /* ICH8M */
293 { 0x197b, 0x2360, PCI_ANY_ID, PCI_ANY_ID, 0, 0,
294 board_ahci }, /* JMicron JMB360 */
293 { } /* terminate list */ 295 { } /* terminate list */
294}; 296};
295 297
@@ -830,7 +832,6 @@ static int ahci_host_init(struct ata_probe_ent *probe_ent)
830 struct pci_dev *pdev = to_pci_dev(probe_ent->dev); 832 struct pci_dev *pdev = to_pci_dev(probe_ent->dev);
831 void __iomem *mmio = probe_ent->mmio_base; 833 void __iomem *mmio = probe_ent->mmio_base;
832 u32 tmp, cap_save; 834 u32 tmp, cap_save;
833 u16 tmp16;
834 unsigned int i, j, using_dac; 835 unsigned int i, j, using_dac;
835 int rc; 836 int rc;
836 void __iomem *port_mmio; 837 void __iomem *port_mmio;
@@ -864,9 +865,13 @@ static int ahci_host_init(struct ata_probe_ent *probe_ent)
864 writel(0xf, mmio + HOST_PORTS_IMPL); 865 writel(0xf, mmio + HOST_PORTS_IMPL);
865 (void) readl(mmio + HOST_PORTS_IMPL); /* flush */ 866 (void) readl(mmio + HOST_PORTS_IMPL); /* flush */
866 867
867 pci_read_config_word(pdev, 0x92, &tmp16); 868 if (pdev->vendor == PCI_VENDOR_ID_INTEL) {
868 tmp16 |= 0xf; 869 u16 tmp16;
869 pci_write_config_word(pdev, 0x92, tmp16); 870
871 pci_read_config_word(pdev, 0x92, &tmp16);
872 tmp16 |= 0xf;
873 pci_write_config_word(pdev, 0x92, tmp16);
874 }
870 875
871 hpriv->cap = readl(mmio + HOST_CAP); 876 hpriv->cap = readl(mmio + HOST_CAP);
872 hpriv->port_map = readl(mmio + HOST_PORTS_IMPL); 877 hpriv->port_map = readl(mmio + HOST_PORTS_IMPL);
@@ -1110,6 +1115,10 @@ static int ahci_init_one (struct pci_dev *pdev, const struct pci_device_id *ent)
1110 if (have_msi) 1115 if (have_msi)
1111 hpriv->flags |= AHCI_FLAG_MSI; 1116 hpriv->flags |= AHCI_FLAG_MSI;
1112 1117
1118 /* JMicron-specific fixup: make sure we're in AHCI mode */
1119 if (pdev->vendor == 0x197b)
1120 pci_write_config_byte(pdev, 0x41, 0xa1);
1121
1113 /* initialize adapter */ 1122 /* initialize adapter */
1114 rc = ahci_host_init(probe_ent); 1123 rc = ahci_host_init(probe_ent);
1115 if (rc) 1124 if (rc)