aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorChuansheng Liu <chuansheng.liu@intel.com>2014-08-31 20:38:03 -0400
committerTejun Heo <tj@kernel.org>2014-09-01 08:38:06 -0400
commite6b7e41cdd8cae0591e04d9519b65470110e2d44 (patch)
tree4d16561fd3405bdbab3c0391a6f2b0e86fd1a5b3 /drivers
parent6cad1376954e591c3c41500c4e586e183e7ffe6d (diff)
ata: Disabling the async PM for JMicron chip 363/361
After enabled the PM feature that supporting async noirq(76569faa62 (PM / sleep: Asynchronous threads for resume_noirq)), Jay hit the system resuming issue, that one of the JMicron controller can not be powered up. His device tree is like below: +-1c.4-[02]--+-00.0 JMicron Technology Corp. JMB363 SATA/IDE Controller | \-00.1 JMicron Technology Corp. JMB363 SATA/IDE Controller After investigation, we found the the Micron chip 363 included one SATA controller(0000:02:00.0) and one PATA controller(0000:02:00.1), these two controllers do not have parent-children relationship, but the PATA controller only can be powered on after the SATA controller has finished the powering on. If we enabled the async noirq(), then the below error is hit during noirq phase: pata_jmicron 0000:02:00.1: Refused to change power state, currently in D3 Here for JMicron chip 363/361, we need forcedly to disable the async method. Bug detail: https://bugzilla.kernel.org/show_bug.cgi?id=81551 Reported-by: Jay <MyMailClone@t-online.de> Signed-off-by: Chuansheng Liu <chuansheng.liu@intel.com> Acked-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Signed-off-by: Tejun Heo <tj@kernel.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/ata/ahci.c12
-rw-r--r--drivers/ata/pata_jmicron.c12
2 files changed, 24 insertions, 0 deletions
diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c
index bca3d64d47e0..f7da21b0d157 100644
--- a/drivers/ata/ahci.c
+++ b/drivers/ata/ahci.c
@@ -1337,6 +1337,18 @@ static int ahci_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
1337 else if (pdev->vendor == 0x1c44 && pdev->device == 0x8000) 1337 else if (pdev->vendor == 0x1c44 && pdev->device == 0x8000)
1338 ahci_pci_bar = AHCI_PCI_BAR_ENMOTUS; 1338 ahci_pci_bar = AHCI_PCI_BAR_ENMOTUS;
1339 1339
1340 /*
1341 * The JMicron chip 361/363 contains one SATA controller and one
1342 * PATA controller,for powering on these both controllers, we must
1343 * follow the sequence one by one, otherwise one of them can not be
1344 * powered on successfully, so here we disable the async suspend
1345 * method for these chips.
1346 */
1347 if (pdev->vendor == PCI_VENDOR_ID_JMICRON &&
1348 (pdev->device == PCI_DEVICE_ID_JMICRON_JMB363 ||
1349 pdev->device == PCI_DEVICE_ID_JMICRON_JMB361))
1350 device_disable_async_suspend(&pdev->dev);
1351
1340 /* acquire resources */ 1352 /* acquire resources */
1341 rc = pcim_enable_device(pdev); 1353 rc = pcim_enable_device(pdev);
1342 if (rc) 1354 if (rc)
diff --git a/drivers/ata/pata_jmicron.c b/drivers/ata/pata_jmicron.c
index 4d1a5d2c4287..47e418b8c8ba 100644
--- a/drivers/ata/pata_jmicron.c
+++ b/drivers/ata/pata_jmicron.c
@@ -143,6 +143,18 @@ static int jmicron_init_one (struct pci_dev *pdev, const struct pci_device_id *i
143 }; 143 };
144 const struct ata_port_info *ppi[] = { &info, NULL }; 144 const struct ata_port_info *ppi[] = { &info, NULL };
145 145
146 /*
147 * The JMicron chip 361/363 contains one SATA controller and one
148 * PATA controller,for powering on these both controllers, we must
149 * follow the sequence one by one, otherwise one of them can not be
150 * powered on successfully, so here we disable the async suspend
151 * method for these chips.
152 */
153 if (pdev->vendor == PCI_VENDOR_ID_JMICRON &&
154 (pdev->device == PCI_DEVICE_ID_JMICRON_JMB363 ||
155 pdev->device == PCI_DEVICE_ID_JMICRON_JMB361))
156 device_disable_async_suspend(&pdev->dev);
157
146 return ata_pci_bmdma_init_one(pdev, ppi, &jmicron_sht, NULL, 0); 158 return ata_pci_bmdma_init_one(pdev, ppi, &jmicron_sht, NULL, 0);
147} 159}
148 160