Re: [PATCH v3] net: mvneta: support suspend and resume

2017-03-16 Thread Jane Li
On 03/16/2017 03:48 PM, Jisheng Zhang wrote: On Thu, 16 Mar 2017 15:11:48 +0800 Jane Li wrote: Add basic support for handling suspend and resume. Signed-off-by: Jane Li <j...@marvell.com> --- Since v2: - use SIMPLE_DEV_PM_OPS instead of SET_LATE_SYSTEM_SLEEP_PM_OPS Since v1:

Re: [PATCH v3] net: mvneta: support suspend and resume

2017-03-16 Thread Jane Li
On 03/16/2017 03:48 PM, Jisheng Zhang wrote: On Thu, 16 Mar 2017 15:11:48 +0800 Jane Li wrote: Add basic support for handling suspend and resume. Signed-off-by: Jane Li --- Since v2: - use SIMPLE_DEV_PM_OPS instead of SET_LATE_SYSTEM_SLEEP_PM_OPS Since v1: - add mvneta_conf_mbus_windows

[PATCH v4] net: mvneta: support suspend and resume

2017-03-16 Thread Jane Li
Add basic support for handling suspend and resume. Signed-off-by: Jane Li <j...@marvell.com> Reviewed-by: Jisheng Zhang <jszh...@marvell.com> --- Since v3: - check clk_bus before enabling it during resume Since v2: - use SIMPLE_DEV_PM_OPS instead of SET_LATE_SYSTEM_SLEEP_PM_OPS Sin

[PATCH v4] net: mvneta: support suspend and resume

2017-03-16 Thread Jane Li
Add basic support for handling suspend and resume. Signed-off-by: Jane Li Reviewed-by: Jisheng Zhang --- Since v3: - check clk_bus before enabling it during resume Since v2: - use SIMPLE_DEV_PM_OPS instead of SET_LATE_SYSTEM_SLEEP_PM_OPS Since v1: - add mvneta_conf_mbus_windows

Re: [PATCH v2] net: mvneta: support suspend and resume

2017-03-16 Thread Jane Li
On 03/16/2017 11:37 AM, Jisheng Zhang wrote: On Thu, 16 Mar 2017 11:19:10 +0800 Jane Li wrote: Add basic support for handling suspend and resume. Signed-off-by: Jane Li <j...@marvell.com> --- Since v1: - add mvneta_conf_mbus_windows() and mvneta_bm_port_init() in mvneta_resume() d

Re: [PATCH v2] net: mvneta: support suspend and resume

2017-03-16 Thread Jane Li
On 03/16/2017 11:37 AM, Jisheng Zhang wrote: On Thu, 16 Mar 2017 11:19:10 +0800 Jane Li wrote: Add basic support for handling suspend and resume. Signed-off-by: Jane Li --- Since v1: - add mvneta_conf_mbus_windows() and mvneta_bm_port_init() in mvneta_resume() drivers/net/ethernet

[PATCH v3] net: mvneta: support suspend and resume

2017-03-16 Thread Jane Li
Add basic support for handling suspend and resume. Signed-off-by: Jane Li <j...@marvell.com> --- Since v2: - use SIMPLE_DEV_PM_OPS instead of SET_LATE_SYSTEM_SLEEP_PM_OPS Since v1: - add mvneta_conf_mbus_windows() and mvneta_bm_port_init() in mvneta_resume() drivers/net/ethernet/m

[PATCH v3] net: mvneta: support suspend and resume

2017-03-16 Thread Jane Li
Add basic support for handling suspend and resume. Signed-off-by: Jane Li --- Since v2: - use SIMPLE_DEV_PM_OPS instead of SET_LATE_SYSTEM_SLEEP_PM_OPS Since v1: - add mvneta_conf_mbus_windows() and mvneta_bm_port_init() in mvneta_resume() drivers/net/ethernet/marvell/mvneta.c | 60

[PATCH v2] net: mvneta: support suspend and resume

2017-03-15 Thread Jane Li
Add basic support for handling suspend and resume. Signed-off-by: Jane Li <j...@marvell.com> --- Since v1: - add mvneta_conf_mbus_windows() and mvneta_bm_port_init() in mvneta_resume() drivers/net/ethernet/marvell/mvneta.c | 62 --- 1 file changed, 58 inse

[PATCH v2] net: mvneta: support suspend and resume

2017-03-15 Thread Jane Li
Add basic support for handling suspend and resume. Signed-off-by: Jane Li --- Since v1: - add mvneta_conf_mbus_windows() and mvneta_bm_port_init() in mvneta_resume() drivers/net/ethernet/marvell/mvneta.c | 62 --- 1 file changed, 58 insertions(+), 4 deletions

Re: [PATCH] net: mvneta: support suspend and resume

2017-03-15 Thread Jane Li
Hi Jisheng, On 2017年03月15日 15:18, Jisheng Zhang wrote: Hi Jane, On Wed, 15 Mar 2017 15:08:34 +0800 Jane Li wrote: Add basic support for handling suspend and resume. Signed-off-by: Jane Li <j...@marvell.com> --- drivers/net/ethernet/marvell/mvneta.

Re: [PATCH] net: mvneta: support suspend and resume

2017-03-15 Thread Jane Li
Hi Jisheng, On 2017年03月15日 15:18, Jisheng Zhang wrote: Hi Jane, On Wed, 15 Mar 2017 15:08:34 +0800 Jane Li wrote: Add basic support for handling suspend and resume. Signed-off-by: Jane Li --- drivers/net/ethernet/marvell/mvneta.c | 44 +++ 1 file

[PATCH] net: mvneta: support suspend and resume

2017-03-15 Thread Jane Li
Add basic support for handling suspend and resume. Signed-off-by: Jane Li <j...@marvell.com> --- drivers/net/ethernet/marvell/mvneta.c | 44 +++ 1 file changed, 44 insertions(+) diff --git a/drivers/net/ethernet/marvell/mvneta.c b/drivers/net/ethernet/m

[PATCH] net: mvneta: support suspend and resume

2017-03-15 Thread Jane Li
Add basic support for handling suspend and resume. Signed-off-by: Jane Li --- drivers/net/ethernet/marvell/mvneta.c | 44 +++ 1 file changed, 44 insertions(+) diff --git a/drivers/net/ethernet/marvell/mvneta.c b/drivers/net/ethernet/marvell/mvneta.c index

Re: [PATCH] printk: fix one circular lockdep warning about console_lock

2014-03-20 Thread Jane Li
On 03/19/2014 06:00 PM, Jan Kara wrote: > On Wed 19-03-14 11:08:08, Jane Li wrote: >> On 02/12/2014 05:19 AM, Andrew Morton wrote: >>> On Tue, 11 Feb 2014 14:50:00 +0800 wrote: > Umm, I disagree with the patch. What I proposed in my answer to your patch > is someth

Re: [PATCH] printk: fix one circular lockdep warning about console_lock

2014-03-20 Thread Jane Li
On 03/19/2014 06:00 PM, Jan Kara wrote: On Wed 19-03-14 11:08:08, Jane Li wrote: On 02/12/2014 05:19 AM, Andrew Morton wrote: On Tue, 11 Feb 2014 14:50:00 +0800j...@marvell.com wrote: Umm, I disagree with the patch. What I proposed in my answer to your patch is something like the patch

Re: [PATCH] printk: fix one circular lockdep warning about console_lock

2014-03-18 Thread Jane Li
On 02/12/2014 05:19 AM, Andrew Morton wrote: On Tue, 11 Feb 2014 14:50:00 +0800 wrote: From: Jane Li This patch tries to fix a warning about possible circular locking dependency. If do in following sequence: enter suspend -> resume -> plug-out CPUx (echo 0 > cpux/online

Re: [PATCH] printk: fix one circular lockdep warning about console_lock

2014-03-18 Thread Jane Li
On 02/12/2014 05:19 AM, Andrew Morton wrote: On Tue, 11 Feb 2014 14:50:00 +0800j...@marvell.com wrote: From: Jane Lij...@marvell.com This patch tries to fix a warning about possible circular locking dependency. If do in following sequence: enter suspend - resume - plug-out CPUx

Re: [PATCH] printk: fix one circular lockdep warning about console_lock

2014-02-13 Thread Jane Li
On 02/12/2014 05:19 AM, Andrew Morton wrote: There are three locks involved in two sequence: a) pm suspend: console_lock (@suspend_console()) cpu_add_remove_lock (@disable_nonboot_cpus()) cpu_hotplug.lock (@_cpu_down()) But but but. suspend_console() releases

Re: [PATCH] printk: fix one circular lockdep warning about console_lock

2014-02-13 Thread Jane Li
On 02/12/2014 05:19 AM, Andrew Morton wrote: There are three locks involved in two sequence: a) pm suspend: console_lock (@suspend_console()) cpu_add_remove_lock (@disable_nonboot_cpus()) cpu_hotplug.lock (@_cpu_down()) But but but. suspend_console() releases

Re: Question about console_lock lockdep after involving console_lock_dep_map

2014-02-10 Thread Jane Li
On 02/09/2014 11:45 PM, Daniel Vetter wrote: Adding many more people and lkml to the cc list. Please don't poke people in private, but always cc a relevant mailing list. On Sat, Feb 8, 2014 at 6:24 AM, Jane Li wrote: Hi Danial Vetter, I found you had added console_lock_dep_map in commit

Re: Question about console_lock lockdep after involving console_lock_dep_map

2014-02-10 Thread Jane Li
On 02/09/2014 11:45 PM, Daniel Vetter wrote: Adding many more people and lkml to the cc list. Please don't poke people in private, but always cc a relevant mailing list. On Sat, Feb 8, 2014 at 6:24 AM, Jane Li j...@marvell.com wrote: Hi Danial Vetter, I found you had added

Re: [PATCH v3] cpufreq: Fix timer/workqueue corruption by protecting reading governor_enabled

2014-01-03 Thread Jane Li
On 01/03/2014 02:50 PM, Viresh Kumar wrote: On 3 January 2014 12:14, wrote: diff --git a/include/linux/cpufreq.h b/include/linux/cpufreq.h index dc196bb..15c62df 100644 --- a/include/linux/cpufreq.h +++ b/include/linux/cpufreq.h @@ -389,6 +389,7 @@ int __cpufreq_driver_target(struct

Re: [PATCH v3] cpufreq: Fix timer/workqueue corruption by protecting reading governor_enabled

2014-01-03 Thread Jane Li
On 01/03/2014 02:50 PM, Viresh Kumar wrote: On 3 January 2014 12:14, j...@marvell.com wrote: diff --git a/include/linux/cpufreq.h b/include/linux/cpufreq.h index dc196bb..15c62df 100644 --- a/include/linux/cpufreq.h +++ b/include/linux/cpufreq.h @@ -389,6 +389,7 @@ int

Re: [PATCH v2] cpufreq: Fix timer/workqueue corruption by protecting reading governor_enabled

2014-01-02 Thread Jane Li
On 01/03/2014 07:26 AM, Dmitry Torokhov wrote Unlocking in different branches is not the best practice IMO, I'd recommend doing: mutex_lock(_governor_lock); if (!policy->governor_enabled) goto out_unlock; ... out_unlock:

Re: [PATCH v2] cpufreq: Fix timer/workqueue corruption by protecting reading governor_enabled

2014-01-02 Thread Jane Li
On 01/03/2014 07:26 AM, Dmitry Torokhov wrote Unlocking in different branches is not the best practice IMO, I'd recommend doing: mutex_lock(cpufreq_governor_lock); if (!policy-governor_enabled) goto out_unlock; ... out_unlock:

Re: [PATCH] cpufreq: Fix timer/workqueue corruption by protecting reading governor_enabled

2014-01-01 Thread Jane Li
Yes, I test it. After adding cpufreq_governor_lock in gov_queue_work() and running same test, there is no debugobjects warning. But it really can't work at all.. There should be a separate copy of lock in every file that includes cpufreq.h.. And so this shouldn't have worked. Oh.. I understand

Re: [PATCH] cpufreq: Fix timer/workqueue corruption by protecting reading governor_enabled

2014-01-01 Thread Jane Li
Yes, I test it. After adding cpufreq_governor_lock in gov_queue_work() and running same test, there is no debugobjects warning. But it really can't work at all.. There should be a separate copy of lock in every file that includes cpufreq.h.. And so this shouldn't have worked. Oh.. I understand

Re: [PATCH] cpufreq: Fix timer/workqueue corruption by protecting reading governor_enabled

2013-12-29 Thread Jane Li
On 12/27/2013 05:40 PM, Viresh Kumar wrote: On 27 December 2013 15:00, wrote: diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c -static DEFINE_MUTEX(cpufreq_governor_lock); diff --git a/include/linux/cpufreq.h b/include/linux/cpufreq.h index dc196bb..4faafe7 100644 ---

Re: [PATCH] cpufreq: Fix timer/workqueue corruption by protecting reading governor_enabled

2013-12-29 Thread Jane Li
On 12/27/2013 05:40 PM, Viresh Kumar wrote: On 27 December 2013 15:00, j...@marvell.com wrote: diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c -static DEFINE_MUTEX(cpufreq_governor_lock); diff --git a/include/linux/cpufreq.h b/include/linux/cpufreq.h index dc196bb..4faafe7