Created
December 12, 2011 22:32
-
-
Save jiixyj/1469455 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- ../linux-2.6-3.1.5/drivers/ata/ahci.c 2011-12-09 17:57:05.000000000 +0100 | |
+++ ahci.c 2011-12-12 23:21:48.655875372 +0100 | |
@@ -570,6 +570,7 @@ | |
struct ahci_host_priv *hpriv = host->private_data; | |
void __iomem *mmio = hpriv->mmio; | |
u32 ctl; | |
+ int rc; | |
if (mesg.event & PM_EVENT_SUSPEND && | |
hpriv->flags & AHCI_HFLAG_NO_SUSPEND) { | |
@@ -589,7 +590,11 @@ | |
readl(mmio + HOST_CTL); /* flush */ | |
} | |
- return ata_pci_device_suspend(pdev, mesg); | |
+ msleep(500); | |
+ rc = ata_pci_device_suspend(pdev, mesg); | |
+ msleep(500); | |
+ | |
+ return rc; | |
} | |
static int ahci_pci_device_resume(struct pci_dev *pdev) | |
@@ -597,6 +602,8 @@ | |
struct ata_host *host = dev_get_drvdata(&pdev->dev); | |
int rc; | |
+ msleep(500); | |
+ | |
rc = ata_pci_device_do_resume(pdev); | |
if (rc) | |
return rc; | |
@@ -609,7 +616,9 @@ | |
ahci_pci_init_controller(host); | |
} | |
+ msleep(500); | |
ata_host_resume(host); | |
+ msleep(500); | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment