Skip to content

Commit

Permalink
Merge branch 'upstream-linus' of master.kernel.org:/pub/scm/linux/ker…
Browse files Browse the repository at this point in the history
…nel/git/jgarzik/libata-dev

* 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/libata-dev:
  [PCI] Add JMicron PCI ID constants
  [PATCH] ahci: Ensure that we don't grab both functions
  [PATCH] libata-core.c: restore configuration boot messages in ata_dev_configure(), v2
  [PATCH] sata_sil24: add suspend/sleep support
  [PATCH] sata_sil24: separate out sil24_init_controller()
  [PATCH] sata_sil: add suspend/sleep support
  [PATCH] sata_sil: separate out sil_init_controller()
  [PATCH] libata: reimplement controller-wide PM
  [PATCH] libata: reimplement per-dev PM
  [PATCH] libata: implement PM EH actions
  [PATCH] libata: separate out __ata_ehi_hotplugged()
  [PATCH] libata: implement ATA_EHI_NO_AUTOPSY and QUIET
  [PATCH] libata: clean up debounce parameters and improve parameter selection
  [PATCH] libata: implement ATA_EHI_RESUME_LINK
  [PATCH] libata: replace ap_lock w/ ap->lock in ata_scsi_error()
  [PATCH] libata: fix ehc->i.action setting in ata_eh_autopsy()
  [PATCH] libata: add ap->pflags and move core dynamic flags to it
  [PATCH] libata: Conditionally set host->max_cmd_len
  [PATCH] sata_vsc: data_xfer should use mmio
  • Loading branch information
Linus Torvalds committed Jul 6, 2006
2 parents a942b57 + 309bade commit 66337da
Show file tree
Hide file tree
Showing 9 changed files with 897 additions and 271 deletions.
17 changes: 12 additions & 5 deletions drivers/scsi/ahci.c
Expand Up @@ -1052,7 +1052,7 @@ static void ahci_thaw(struct ata_port *ap)

static void ahci_error_handler(struct ata_port *ap)
{
if (!(ap->flags & ATA_FLAG_FROZEN)) {
if (!(ap->pflags & ATA_PFLAG_FROZEN)) {
/* restart engine */
ahci_stop_engine(ap);
ahci_start_engine(ap);
Expand Down Expand Up @@ -1323,6 +1323,17 @@ static int ahci_init_one (struct pci_dev *pdev, const struct pci_device_id *ent)
if (!printed_version++)
dev_printk(KERN_DEBUG, &pdev->dev, "version " DRV_VERSION "\n");

/* JMicron-specific fixup: make sure we're in AHCI mode */
/* This is protected from races with ata_jmicron by the pci probe
locking */
if (pdev->vendor == PCI_VENDOR_ID_JMICRON) {
/* AHCI enable, AHCI on function 0 */
pci_write_config_byte(pdev, 0x41, 0xa1);
/* Function 1 is the PATA controller */
if (PCI_FUNC(pdev->devfn))
return -ENODEV;
}

rc = pci_enable_device(pdev);
if (rc)
return rc;
Expand Down Expand Up @@ -1378,10 +1389,6 @@ 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 66337da

Please sign in to comment.