From 99aa01a94bdd4680df0e1f18b96e1004b2e24a0c Mon Sep 17 00:00:00 2001 From: Anton Vorontsov Date: Wed, 3 Mar 2010 20:17:39 +0300 Subject: [PATCH] --- yaml --- r: 192585 b: refs/heads/master c: 3303040d8ba2dc0090ff172627df44d284c893e7 h: refs/heads/master i: 192583: 121d32e6c6a9cd9bffeb268007bbcc4a8b62e1d2 v: v3 --- [refs] | 2 +- trunk/drivers/ata/ahci.c | 15 ++++++++++++--- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/[refs] b/[refs] index 0fddfc2e0b45..c22a3b55643f 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 1d5133587366ee0cbd0be8f10b57a2636b628f9b +refs/heads/master: 3303040d8ba2dc0090ff172627df44d284c893e7 diff --git a/trunk/drivers/ata/ahci.c b/trunk/drivers/ata/ahci.c index e49c32d51fda..189b97c9f0ec 100644 --- a/trunk/drivers/ata/ahci.c +++ b/trunk/drivers/ata/ahci.c @@ -1359,7 +1359,6 @@ static int ahci_deinit_port(struct ata_port *ap, const char **emsg) static int ahci_reset_controller(struct ata_host *host) { - struct pci_dev *pdev = to_pci_dev(host->dev); struct ahci_host_priv *hpriv = host->private_data; void __iomem *mmio = hpriv->mmio; u32 tmp; @@ -1403,7 +1402,17 @@ static int ahci_reset_controller(struct ata_host *host) dev_printk(KERN_INFO, host->dev, "skipping global host reset\n"); + return 0; +} + +static int ahci_pci_reset_controller(struct ata_host *host) +{ + struct pci_dev *pdev = to_pci_dev(host->dev); + + ahci_reset_controller(host); + if (pdev->vendor == PCI_VENDOR_ID_INTEL) { + struct ahci_host_priv *hpriv = host->private_data; u16 tmp16; /* configure PCS */ @@ -2697,7 +2706,7 @@ static int ahci_pci_device_resume(struct pci_dev *pdev) return rc; if (pdev->dev.power.power_state.event == PM_EVENT_SUSPEND) { - rc = ahci_reset_controller(host); + rc = ahci_pci_reset_controller(host); if (rc) return rc; @@ -3437,7 +3446,7 @@ static int ahci_init_one(struct pci_dev *pdev, const struct pci_device_id *ent) if (rc) return rc; - rc = ahci_reset_controller(host); + rc = ahci_pci_reset_controller(host); if (rc) return rc;