Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 21806
b: refs/heads/master
c: b1d9177
h: refs/heads/master
v: v3
  • Loading branch information
Jeff Garzik committed Jan 29, 2006
1 parent 357d533 commit d9bd768
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: c893a3ae49279a4ab6aa6cf594a2ec6d286e1187
refs/heads/master: b1d917739acd44e14eb13813e4c94dc4b6831ca3
17 changes: 13 additions & 4 deletions trunk/drivers/scsi/ahci.c
Original file line number Diff line number Diff line change
Expand Up @@ -290,6 +290,8 @@ static const struct pci_device_id ahci_pci_tbl[] = {
board_ahci }, /* ICH8M */
{ PCI_VENDOR_ID_INTEL, 0x282a, PCI_ANY_ID, PCI_ANY_ID, 0, 0,
board_ahci }, /* ICH8M */
{ 0x197b, 0x2360, PCI_ANY_ID, PCI_ANY_ID, 0, 0,
board_ahci }, /* JMicron JMB360 */
{ } /* terminate list */
};

Expand Down Expand Up @@ -830,7 +832,6 @@ static int ahci_host_init(struct ata_probe_ent *probe_ent)
struct pci_dev *pdev = to_pci_dev(probe_ent->dev);
void __iomem *mmio = probe_ent->mmio_base;
u32 tmp, cap_save;
u16 tmp16;
unsigned int i, j, using_dac;
int rc;
void __iomem *port_mmio;
Expand Down Expand Up @@ -864,9 +865,13 @@ static int ahci_host_init(struct ata_probe_ent *probe_ent)
writel(0xf, mmio + HOST_PORTS_IMPL);
(void) readl(mmio + HOST_PORTS_IMPL); /* flush */

pci_read_config_word(pdev, 0x92, &tmp16);
tmp16 |= 0xf;
pci_write_config_word(pdev, 0x92, tmp16);
if (pdev->vendor == PCI_VENDOR_ID_INTEL) {
u16 tmp16;

pci_read_config_word(pdev, 0x92, &tmp16);
tmp16 |= 0xf;
pci_write_config_word(pdev, 0x92, tmp16);
}

hpriv->cap = readl(mmio + HOST_CAP);
hpriv->port_map = readl(mmio + HOST_PORTS_IMPL);
Expand Down Expand Up @@ -1110,6 +1115,10 @@ static int ahci_init_one (struct pci_dev *pdev, const struct pci_device_id *ent)
if (have_msi)
hpriv->flags |= AHCI_FLAG_MSI;

/* JMicron-specific fixup: make sure we're in AHCI mode */
if (pdev->vendor == 0x197b)
pci_write_config_byte(pdev, 0x41, 0xa1);

/* initialize adapter */
rc = ahci_host_init(probe_ent);
if (rc)
Expand Down

0 comments on commit d9bd768

Please sign in to comment.