aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ata
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/ata')
-rw-r--r--drivers/ata/ahci.c15
1 files changed, 12 insertions, 3 deletions
diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c
index e49c32d51fda..189b97c9f0ec 100644
--- a/drivers/ata/ahci.c
+++ b/drivers/ata/ahci.c
@@ -1359,7 +1359,6 @@ static int ahci_deinit_port(struct ata_port *ap, const char **emsg)
1359 1359
1360static int ahci_reset_controller(struct ata_host *host) 1360static int ahci_reset_controller(struct ata_host *host)
1361{ 1361{
1362 struct pci_dev *pdev = to_pci_dev(host->dev);
1363 struct ahci_host_priv *hpriv = host->private_data; 1362 struct ahci_host_priv *hpriv = host->private_data;
1364 void __iomem *mmio = hpriv->mmio; 1363 void __iomem *mmio = hpriv->mmio;
1365 u32 tmp; 1364 u32 tmp;
@@ -1403,7 +1402,17 @@ static int ahci_reset_controller(struct ata_host *host)
1403 dev_printk(KERN_INFO, host->dev, 1402 dev_printk(KERN_INFO, host->dev,
1404 "skipping global host reset\n"); 1403 "skipping global host reset\n");
1405 1404
1405 return 0;
1406}
1407
1408static int ahci_pci_reset_controller(struct ata_host *host)
1409{
1410 struct pci_dev *pdev = to_pci_dev(host->dev);
1411
1412 ahci_reset_controller(host);
1413
1406 if (pdev->vendor == PCI_VENDOR_ID_INTEL) { 1414 if (pdev->vendor == PCI_VENDOR_ID_INTEL) {
1415 struct ahci_host_priv *hpriv = host->private_data;
1407 u16 tmp16; 1416 u16 tmp16;
1408 1417
1409 /* configure PCS */ 1418 /* configure PCS */
@@ -2697,7 +2706,7 @@ static int ahci_pci_device_resume(struct pci_dev *pdev)
2697 return rc; 2706 return rc;
2698 2707
2699 if (pdev->dev.power.power_state.event == PM_EVENT_SUSPEND) { 2708 if (pdev->dev.power.power_state.event == PM_EVENT_SUSPEND) {
2700 rc = ahci_reset_controller(host); 2709 rc = ahci_pci_reset_controller(host);
2701 if (rc) 2710 if (rc)
2702 return rc; 2711 return rc;
2703 2712
@@ -3437,7 +3446,7 @@ static int ahci_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
3437 if (rc) 3446 if (rc)
3438 return rc; 3447 return rc;
3439 3448
3440 rc = ahci_reset_controller(host); 3449 rc = ahci_pci_reset_controller(host);
3441 if (rc) 3450 if (rc)
3442 return rc; 3451 return rc;
3443 3452