Re: [PATCH 09/11] soundwire: intel: add dynamic debug trace for clock-stop invalid configs
On 9/1/20 6:07 AM, Vinod Koul wrote: On 31-08-20, 10:15, Pierre-Louis Bossart wrote: Detect cases where the clock is assumed to be stopped but the IP is not in the relevant state, and add a dynamic debug trace. you meant a debug print..and it looks like error print below (also in title). I don't understand the comment. Is the 'trace' confusing and are you asking to e.g. change the commit message to 'add dynamic debug log'? Question is what is dynamic about this? dev_dbg() is part of the kernel dynamic debug capability... https://www.kernel.org/doc/html/latest/admin-guide/dynamic-debug-howto.html Not sure what you are asking here? :-| where is dev_dbg() ? See [1] [1] + dev_err(dev, "%s invalid configuration, clock was not stopped", __func__); ^^^ it's still a log using the "dynamic debug" framework. Again, what are you asking us to fix? Ah you are really testing my patience! I was asking a question, not making a statement. There is no need to blow a fuse or yell via exclamation marks at people who provide 90% of the patches for the subsystem you maintain, or provide fixes for your own patches. The title says "dynamic debug" and then you use a dev_err which is *not* part of dynamic debug as it is printed always and cannot be dynamically enabled and disabled! I accept the argument, I just didn't understand what the issue was. See Documentation/admin-guide/dynamic-debug-howto.rst: "Dynamic debug is designed to allow you to dynamically enable/disable kernel code to obtain additional kernel information. Currently, if ``CONFIG_DYNAMIC_DEBUG`` is set, then all ``pr_debug()``/``dev_dbg()`` and ``print_hex_dump_debug()``/``print_hex_dump_bytes()`` calls can be dynamically enabled per-callsite." No dev_err here! ok, so we will change the title to 'soundwire: intel: add error log for clock-stop invalid config'. Thanks -Pierre
Re: [PATCH 09/11] soundwire: intel: add dynamic debug trace for clock-stop invalid configs
On 31-08-20, 10:15, Pierre-Louis Bossart wrote: > > > > > > > > Detect cases where the clock is assumed to be stopped but the IP > > > > > > > is > > > > > > > not in the relevant state, and add a dynamic debug trace. > > > > > > > > > > > > you meant a debug print..and it looks like error print below (also > > > > > > in title). > > > > > > > > > > I don't understand the comment. Is the 'trace' confusing and are you > > > > > asking > > > > > to e.g. change the commit message to 'add dynamic debug log'? > > > > > > > > Question is what is dynamic about this? > > > dev_dbg() is part of the kernel dynamic debug capability... > > > > > > https://www.kernel.org/doc/html/latest/admin-guide/dynamic-debug-howto.html > > > > > > Not sure what you are asking here? > > > > :-| where is dev_dbg() ? > > > > See [1] > > > > > [1] > > > > > + dev_err(dev, "%s invalid configuration, clock was not > > > stopped", __func__); > > > > ^^^ > > it's still a log using the "dynamic debug" framework. > > Again, what are you asking us to fix? Ah you are really testing my patience! The title says "dynamic debug" and then you use a dev_err which is *not* part of dynamic debug as it is printed always and cannot be dynamically enabled and disabled! See Documentation/admin-guide/dynamic-debug-howto.rst: "Dynamic debug is designed to allow you to dynamically enable/disable kernel code to obtain additional kernel information. Currently, if ``CONFIG_DYNAMIC_DEBUG`` is set, then all ``pr_debug()``/``dev_dbg()`` and ``print_hex_dump_debug()``/``print_hex_dump_bytes()`` calls can be dynamically enabled per-callsite." No dev_err here! -- ~Vinod
Re: [PATCH 09/11] soundwire: intel: add dynamic debug trace for clock-stop invalid configs
Detect cases where the clock is assumed to be stopped but the IP is not in the relevant state, and add a dynamic debug trace. you meant a debug print..and it looks like error print below (also in title). I don't understand the comment. Is the 'trace' confusing and are you asking to e.g. change the commit message to 'add dynamic debug log'? Question is what is dynamic about this? dev_dbg() is part of the kernel dynamic debug capability... https://www.kernel.org/doc/html/latest/admin-guide/dynamic-debug-howto.html Not sure what you are asking here? :-| where is dev_dbg() ? See [1] [1] + dev_err(dev, "%s invalid configuration, clock was not stopped", __func__); ^^^ it's still a log using the "dynamic debug" framework. Again, what are you asking us to fix?
Re: [PATCH 09/11] soundwire: intel: add dynamic debug trace for clock-stop invalid configs
On 28-08-20, 09:54, Pierre-Louis Bossart wrote: > > > > > > Detect cases where the clock is assumed to be stopped but the IP is > > > > > not in the relevant state, and add a dynamic debug trace. > > > > > > > > you meant a debug print..and it looks like error print below (also in > > > > title). > > > > > > I don't understand the comment. Is the 'trace' confusing and are you > > > asking > > > to e.g. change the commit message to 'add dynamic debug log'? > > > > Question is what is dynamic about this? > dev_dbg() is part of the kernel dynamic debug capability... > > https://www.kernel.org/doc/html/latest/admin-guide/dynamic-debug-howto.html > > Not sure what you are asking here? :-| where is dev_dbg() ? See [1] On 18-08-20, 10:41, Bard Liao wrote: > From: Pierre-Louis Bossart > > Detect cases where the clock is assumed to be stopped but the IP is > not in the relevant state, and add a dynamic debug trace. > > Signed-off-by: Pierre-Louis Bossart > Signed-off-by: Bard Liao > --- > drivers/soundwire/intel.c | 5 + > 1 file changed, 5 insertions(+) > > diff --git a/drivers/soundwire/intel.c b/drivers/soundwire/intel.c > index 7c63581270fd..b82d02af3c4f 100644 > --- a/drivers/soundwire/intel.c > +++ b/drivers/soundwire/intel.c > @@ -1964,6 +1964,11 @@ static int intel_resume_runtime(struct device *dev) > } > } > } else if (!clock_stop_quirks) { > + > + clock_stop0 = sdw_cdns_is_clock_stop(>cdns); > + if (!clock_stop0) [1] > + dev_err(dev, "%s invalid configuration, clock was not > stopped", __func__); ^^^ > + > ret = intel_init(sdw); > if (ret) { > dev_err(dev, "%s failed: %d", __func__, ret); > -- > 2.17.1 -- ~Vinod
Re: [PATCH 09/11] soundwire: intel: add dynamic debug trace for clock-stop invalid configs
Detect cases where the clock is assumed to be stopped but the IP is not in the relevant state, and add a dynamic debug trace. you meant a debug print..and it looks like error print below (also in title). I don't understand the comment. Is the 'trace' confusing and are you asking to e.g. change the commit message to 'add dynamic debug log'? Question is what is dynamic about this? dev_dbg() is part of the kernel dynamic debug capability... https://www.kernel.org/doc/html/latest/admin-guide/dynamic-debug-howto.html Not sure what you are asking here?
Re: [PATCH 09/11] soundwire: intel: add dynamic debug trace for clock-stop invalid configs
On 26-08-20, 09:38, Pierre-Louis Bossart wrote: > > > On 8/26/20 4:48 AM, Vinod Koul wrote: > > On 18-08-20, 10:41, Bard Liao wrote: > > > From: Pierre-Louis Bossart > > > > > > Detect cases where the clock is assumed to be stopped but the IP is > > > not in the relevant state, and add a dynamic debug trace. > > > > you meant a debug print..and it looks like error print below (also in > > title). > > I don't understand the comment. Is the 'trace' confusing and are you asking > to e.g. change the commit message to 'add dynamic debug log'? Question is what is dynamic about this? -- ~Vinod
Re: [PATCH 09/11] soundwire: intel: add dynamic debug trace for clock-stop invalid configs
On 8/26/20 4:48 AM, Vinod Koul wrote: On 18-08-20, 10:41, Bard Liao wrote: From: Pierre-Louis Bossart Detect cases where the clock is assumed to be stopped but the IP is not in the relevant state, and add a dynamic debug trace. you meant a debug print..and it looks like error print below (also in title). I don't understand the comment. Is the 'trace' confusing and are you asking to e.g. change the commit message to 'add dynamic debug log'? Signed-off-by: Pierre-Louis Bossart Signed-off-by: Bard Liao --- drivers/soundwire/intel.c | 5 + 1 file changed, 5 insertions(+) diff --git a/drivers/soundwire/intel.c b/drivers/soundwire/intel.c index 7c63581270fd..b82d02af3c4f 100644 --- a/drivers/soundwire/intel.c +++ b/drivers/soundwire/intel.c @@ -1964,6 +1964,11 @@ static int intel_resume_runtime(struct device *dev) } } } else if (!clock_stop_quirks) { + + clock_stop0 = sdw_cdns_is_clock_stop(>cdns); + if (!clock_stop0) + dev_err(dev, "%s invalid configuration, clock was not stopped", __func__); + ret = intel_init(sdw); if (ret) { dev_err(dev, "%s failed: %d", __func__, ret); -- 2.17.1
Re: [PATCH 09/11] soundwire: intel: add dynamic debug trace for clock-stop invalid configs
On 18-08-20, 10:41, Bard Liao wrote: > From: Pierre-Louis Bossart > > Detect cases where the clock is assumed to be stopped but the IP is > not in the relevant state, and add a dynamic debug trace. you meant a debug print..and it looks like error print below (also in title). > > Signed-off-by: Pierre-Louis Bossart > Signed-off-by: Bard Liao > --- > drivers/soundwire/intel.c | 5 + > 1 file changed, 5 insertions(+) > > diff --git a/drivers/soundwire/intel.c b/drivers/soundwire/intel.c > index 7c63581270fd..b82d02af3c4f 100644 > --- a/drivers/soundwire/intel.c > +++ b/drivers/soundwire/intel.c > @@ -1964,6 +1964,11 @@ static int intel_resume_runtime(struct device *dev) > } > } > } else if (!clock_stop_quirks) { > + > + clock_stop0 = sdw_cdns_is_clock_stop(>cdns); > + if (!clock_stop0) > + dev_err(dev, "%s invalid configuration, clock was not > stopped", __func__); > + > ret = intel_init(sdw); > if (ret) { > dev_err(dev, "%s failed: %d", __func__, ret); > -- > 2.17.1 -- ~Vinod
[PATCH 09/11] soundwire: intel: add dynamic debug trace for clock-stop invalid configs
From: Pierre-Louis Bossart Detect cases where the clock is assumed to be stopped but the IP is not in the relevant state, and add a dynamic debug trace. Signed-off-by: Pierre-Louis Bossart Signed-off-by: Bard Liao --- drivers/soundwire/intel.c | 5 + 1 file changed, 5 insertions(+) diff --git a/drivers/soundwire/intel.c b/drivers/soundwire/intel.c index 7c63581270fd..b82d02af3c4f 100644 --- a/drivers/soundwire/intel.c +++ b/drivers/soundwire/intel.c @@ -1964,6 +1964,11 @@ static int intel_resume_runtime(struct device *dev) } } } else if (!clock_stop_quirks) { + + clock_stop0 = sdw_cdns_is_clock_stop(>cdns); + if (!clock_stop0) + dev_err(dev, "%s invalid configuration, clock was not stopped", __func__); + ret = intel_init(sdw); if (ret) { dev_err(dev, "%s failed: %d", __func__, ret); -- 2.17.1