linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH V2] ata: Disabling the async PM for JMicron chips
@ 2014-09-24  7:22 Chuansheng Liu
  2014-09-28  5:54 ` Aaron Lu
       [not found] ` <27240C0AC20F114CBF8149A2696CBE4A01EB378D@SHSMSX101.ccr.corp.intel.com>
  0 siblings, 2 replies; 3+ messages in thread
From: Chuansheng Liu @ 2014-09-24  7:22 UTC (permalink / raw)
  To: tj, rjw; +Cc: linux-ide, linux-kernel, mister.freeman, rui.zhang,
	chuansheng.liu

Like the commit e6b7e41cdd8c ("ata: Disabling the async PM for JMicron chip 363/361"),
Barto found the similar issue for JMicron chip 368, that 363/368 has no
parent-children relationship, but they have the power dependency.

So here we can exclude the JMicron chips out of pm_async method directly,
to avoid further similar issues.

Details in:
https://bugzilla.kernel.org/show_bug.cgi?id=84861

Reported-and-tested-by: Barto <mister.freeman@laposte.net>
Signed-off-by: Chuansheng Liu <chuansheng.liu@intel.com>
---
 drivers/ata/ahci.c         |   11 +++++------
 drivers/ata/pata_jmicron.c |   11 +++++------
 2 files changed, 10 insertions(+), 12 deletions(-)

diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c
index a0cc0ed..85aa6ec 100644
--- a/drivers/ata/ahci.c
+++ b/drivers/ata/ahci.c
@@ -1340,15 +1340,14 @@ static int ahci_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
 		ahci_pci_bar = AHCI_PCI_BAR_ENMOTUS;
 
 	/*
-	 * The JMicron chip 361/363 contains one SATA controller and one
+	 * The JMicron chip 361/363/368 contains one SATA controller and one
 	 * PATA controller,for powering on these both controllers, we must
 	 * follow the sequence one by one, otherwise one of them can not be
-	 * powered on successfully, so here we disable the async suspend
-	 * method for these chips.
+	 * powered on successfully.
+	 * Here we can exclude the Jmicron family directly out of pm_async
+	 * method to follow the power-on sequence.
 	 */
-	if (pdev->vendor == PCI_VENDOR_ID_JMICRON &&
-		(pdev->device == PCI_DEVICE_ID_JMICRON_JMB363 ||
-		pdev->device == PCI_DEVICE_ID_JMICRON_JMB361))
+	if (pdev->vendor == PCI_VENDOR_ID_JMICRON)
 		device_disable_async_suspend(&pdev->dev);
 
 	/* acquire resources */
diff --git a/drivers/ata/pata_jmicron.c b/drivers/ata/pata_jmicron.c
index 47e418b..1d685b6 100644
--- a/drivers/ata/pata_jmicron.c
+++ b/drivers/ata/pata_jmicron.c
@@ -144,15 +144,14 @@ static int jmicron_init_one (struct pci_dev *pdev, const struct pci_device_id *i
 	const struct ata_port_info *ppi[] = { &info, NULL };
 
 	/*
-	 * The JMicron chip 361/363 contains one SATA controller and one
+	 * The JMicron chip 361/363/368 contains one SATA controller and one
 	 * PATA controller,for powering on these both controllers, we must
 	 * follow the sequence one by one, otherwise one of them can not be
-	 * powered on successfully, so here we disable the async suspend
-	 * method for these chips.
+	 * powered on successfully.
+	 * Here we can exclude the Jmicron family directly out of pm_async
+	 * method to follow the power-on sequence.
 	 */
-	if (pdev->vendor == PCI_VENDOR_ID_JMICRON &&
-		(pdev->device == PCI_DEVICE_ID_JMICRON_JMB363 ||
-		pdev->device == PCI_DEVICE_ID_JMICRON_JMB361))
+	if (pdev->vendor == PCI_VENDOR_ID_JMICRON)
 		device_disable_async_suspend(&pdev->dev);
 
 	return ata_pci_bmdma_init_one(pdev, ppi, &jmicron_sht, NULL, 0);
-- 
1.7.9.5


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH V2] ata: Disabling the async PM for JMicron chips
  2014-09-24  7:22 [PATCH V2] ata: Disabling the async PM for JMicron chips Chuansheng Liu
@ 2014-09-28  5:54 ` Aaron Lu
       [not found] ` <27240C0AC20F114CBF8149A2696CBE4A01EB378D@SHSMSX101.ccr.corp.intel.com>
  1 sibling, 0 replies; 3+ messages in thread
From: Aaron Lu @ 2014-09-28  5:54 UTC (permalink / raw)
  To: Chuansheng Liu, Tejun Heo, Rafael J. Wysocki
  Cc: linux-ide, linux-kernel, mister.freeman, rui.zhang, Linux PCI

On 09/24/2014 03:22 PM, Chuansheng Liu wrote:
> Like the commit e6b7e41cdd8c ("ata: Disabling the async PM for JMicron chip 363/361"),
> Barto found the similar issue for JMicron chip 368, that 363/368 has no
> parent-children relationship, but they have the power dependency.
> 
> So here we can exclude the JMicron chips out of pm_async method directly,
> to avoid further similar issues.
> 
> Details in:
> https://bugzilla.kernel.org/show_bug.cgi?id=84861

I think we can disable the async PM for JMicron chips in PCI subsystem:
pci_pm_init, check if it is JMicron chip and then enable_async
accordingly. The problem doesn't have much to do with ATA, so move them
to PCI may be more appropriate.

Thanks,
Aaron

> 
> Reported-and-tested-by: Barto <mister.freeman@laposte.net>
> Signed-off-by: Chuansheng Liu <chuansheng.liu@intel.com>
> ---
>  drivers/ata/ahci.c         |   11 +++++------
>  drivers/ata/pata_jmicron.c |   11 +++++------
>  2 files changed, 10 insertions(+), 12 deletions(-)
> 
> diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c
> index a0cc0ed..85aa6ec 100644
> --- a/drivers/ata/ahci.c
> +++ b/drivers/ata/ahci.c
> @@ -1340,15 +1340,14 @@ static int ahci_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
>  		ahci_pci_bar = AHCI_PCI_BAR_ENMOTUS;
>  
>  	/*
> -	 * The JMicron chip 361/363 contains one SATA controller and one
> +	 * The JMicron chip 361/363/368 contains one SATA controller and one
>  	 * PATA controller,for powering on these both controllers, we must
>  	 * follow the sequence one by one, otherwise one of them can not be
> -	 * powered on successfully, so here we disable the async suspend
> -	 * method for these chips.
> +	 * powered on successfully.
> +	 * Here we can exclude the Jmicron family directly out of pm_async
> +	 * method to follow the power-on sequence.
>  	 */
> -	if (pdev->vendor == PCI_VENDOR_ID_JMICRON &&
> -		(pdev->device == PCI_DEVICE_ID_JMICRON_JMB363 ||
> -		pdev->device == PCI_DEVICE_ID_JMICRON_JMB361))
> +	if (pdev->vendor == PCI_VENDOR_ID_JMICRON)
>  		device_disable_async_suspend(&pdev->dev);
>  
>  	/* acquire resources */
> diff --git a/drivers/ata/pata_jmicron.c b/drivers/ata/pata_jmicron.c
> index 47e418b..1d685b6 100644
> --- a/drivers/ata/pata_jmicron.c
> +++ b/drivers/ata/pata_jmicron.c
> @@ -144,15 +144,14 @@ static int jmicron_init_one (struct pci_dev *pdev, const struct pci_device_id *i
>  	const struct ata_port_info *ppi[] = { &info, NULL };
>  
>  	/*
> -	 * The JMicron chip 361/363 contains one SATA controller and one
> +	 * The JMicron chip 361/363/368 contains one SATA controller and one
>  	 * PATA controller,for powering on these both controllers, we must
>  	 * follow the sequence one by one, otherwise one of them can not be
> -	 * powered on successfully, so here we disable the async suspend
> -	 * method for these chips.
> +	 * powered on successfully.
> +	 * Here we can exclude the Jmicron family directly out of pm_async
> +	 * method to follow the power-on sequence.
>  	 */
> -	if (pdev->vendor == PCI_VENDOR_ID_JMICRON &&
> -		(pdev->device == PCI_DEVICE_ID_JMICRON_JMB363 ||
> -		pdev->device == PCI_DEVICE_ID_JMICRON_JMB361))
> +	if (pdev->vendor == PCI_VENDOR_ID_JMICRON)
>  		device_disable_async_suspend(&pdev->dev);
>  
>  	return ata_pci_bmdma_init_one(pdev, ppi, &jmicron_sht, NULL, 0);
> 


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: FW: [PATCH V2] ata: Disabling the async PM for JMicron chips
       [not found] ` <27240C0AC20F114CBF8149A2696CBE4A01EB378D@SHSMSX101.ccr.corp.intel.com>
@ 2014-11-03 10:34   ` Barto
  0 siblings, 0 replies; 3+ messages in thread
From: Barto @ 2014-11-03 10:34 UTC (permalink / raw)
  To: Liu, Chuansheng, tj, rjw

Hello,

yes I confirm that this patch solves the problem with JMicron JMB363-368
sata/ide controlers,

I have tested this patch with kernel 3.17.2 and kernel 3.18rc3, my
JMicron JMB363/368 can now work after a standby mode,

so I hope that this patch will be merged


Le 03/11/2014 10:13, Liu, Chuansheng a écrit :
> Hello Mister,
> You should have received this email, please reply to all with your test result, which will help the patch merged, thanks.
> 
> Best Regards
> Chuansheng
> 
> -----Original Message-----
> From: Liu, Chuansheng 
> Sent: Wednesday, September 24, 2014 3:22 PM
> To: tj@kernel.org; rjw@rjwysocki.net
> Cc: linux-ide@vger.kernel.org; linux-kernel@vger.kernel.org; mister.freeman@laposte.net; Zhang, Rui; Liu, Chuansheng
> Subject: [PATCH V2] ata: Disabling the async PM for JMicron chips
> 
> Like the commit e6b7e41cdd8c ("ata: Disabling the async PM for JMicron chip 363/361"),
> Barto found the similar issue for JMicron chip 368, that 363/368 has no
> parent-children relationship, but they have the power dependency.
> 
> So here we can exclude the JMicron chips out of pm_async method directly,
> to avoid further similar issues.
> 
> Details in:
> https://bugzilla.kernel.org/show_bug.cgi?id=84861
> 
> Reported-and-tested-by: Barto <mister.freeman@laposte.net>
> Signed-off-by: Chuansheng Liu <chuansheng.liu@intel.com>
> ---
>  drivers/ata/ahci.c         |   11 +++++------
>  drivers/ata/pata_jmicron.c |   11 +++++------
>  2 files changed, 10 insertions(+), 12 deletions(-)
> 
> diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c
> index a0cc0ed..85aa6ec 100644
> --- a/drivers/ata/ahci.c
> +++ b/drivers/ata/ahci.c
> @@ -1340,15 +1340,14 @@ static int ahci_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
>  		ahci_pci_bar = AHCI_PCI_BAR_ENMOTUS;
>  
>  	/*
> -	 * The JMicron chip 361/363 contains one SATA controller and one
> +	 * The JMicron chip 361/363/368 contains one SATA controller and one
>  	 * PATA controller,for powering on these both controllers, we must
>  	 * follow the sequence one by one, otherwise one of them can not be
> -	 * powered on successfully, so here we disable the async suspend
> -	 * method for these chips.
> +	 * powered on successfully.
> +	 * Here we can exclude the Jmicron family directly out of pm_async
> +	 * method to follow the power-on sequence.
>  	 */
> -	if (pdev->vendor == PCI_VENDOR_ID_JMICRON &&
> -		(pdev->device == PCI_DEVICE_ID_JMICRON_JMB363 ||
> -		pdev->device == PCI_DEVICE_ID_JMICRON_JMB361))
> +	if (pdev->vendor == PCI_VENDOR_ID_JMICRON)
>  		device_disable_async_suspend(&pdev->dev);
>  
>  	/* acquire resources */
> diff --git a/drivers/ata/pata_jmicron.c b/drivers/ata/pata_jmicron.c
> index 47e418b..1d685b6 100644
> --- a/drivers/ata/pata_jmicron.c
> +++ b/drivers/ata/pata_jmicron.c
> @@ -144,15 +144,14 @@ static int jmicron_init_one (struct pci_dev *pdev, const struct pci_device_id *i
>  	const struct ata_port_info *ppi[] = { &info, NULL };
>  
>  	/*
> -	 * The JMicron chip 361/363 contains one SATA controller and one
> +	 * The JMicron chip 361/363/368 contains one SATA controller and one
>  	 * PATA controller,for powering on these both controllers, we must
>  	 * follow the sequence one by one, otherwise one of them can not be
> -	 * powered on successfully, so here we disable the async suspend
> -	 * method for these chips.
> +	 * powered on successfully.
> +	 * Here we can exclude the Jmicron family directly out of pm_async
> +	 * method to follow the power-on sequence.
>  	 */
> -	if (pdev->vendor == PCI_VENDOR_ID_JMICRON &&
> -		(pdev->device == PCI_DEVICE_ID_JMICRON_JMB363 ||
> -		pdev->device == PCI_DEVICE_ID_JMICRON_JMB361))
> +	if (pdev->vendor == PCI_VENDOR_ID_JMICRON)
>  		device_disable_async_suspend(&pdev->dev);
>  
>  	return ata_pci_bmdma_init_one(pdev, ppi, &jmicron_sht, NULL, 0);
> 

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-11-03 10:34 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-09-24  7:22 [PATCH V2] ata: Disabling the async PM for JMicron chips Chuansheng Liu
2014-09-28  5:54 ` Aaron Lu
     [not found] ` <27240C0AC20F114CBF8149A2696CBE4A01EB378D@SHSMSX101.ccr.corp.intel.com>
2014-11-03 10:34   ` FW: " Barto

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).