linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] aerdrv: Enable AER completion notice
@ 2012-07-19 19:19 Lance Ortiz
  2012-07-30 17:37 ` Bjorn Helgaas
  0 siblings, 1 reply; 2+ messages in thread
From: Lance Ortiz @ 2012-07-19 19:19 UTC (permalink / raw)
  To: bhelgaas, ying.huang, jbarnes, rusty, mchehab
  Cc: linux-kernel, linux-pci, lance.ortiz

When an AER event occurs not all of the print notifications are at the
same log level.  This can cause an incomplete AER log from the users
point of view when monitoring the console output.

The completion message in do_recovery() is currently set to KERN_DEBUG
(log level 7) while the starting message in aer_port_info() uses
KERN_INFO(log level 6). The completion message should be set to
KERN_INFO so it is consistent with the starting message in the log.

The message has also been re-worded to make it more clear.  This patch 
will enable the AER log on the console output to be book-ended by a
clear and consistent starting and completion message.

Signed-off-by: Lance Ortiz <lance.ortiz@hp.com>
---
 drivers/pci/pcie/aer/aerdrv_core.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/pci/pcie/aer/aerdrv_core.c b/drivers/pci/pcie/aer/aerdrv_core.c
index 0ca0535..164bab5 100644
--- a/drivers/pci/pcie/aer/aerdrv_core.c
+++ b/drivers/pci/pcie/aer/aerdrv_core.c
@@ -540,14 +540,14 @@ static void do_recovery(struct pci_dev *dev, int severity)
 				"resume",
 				report_resume);
 
-	dev_printk(KERN_DEBUG, &dev->dev,
-		"AER driver successfully recovered\n");
+	dev_printk(KERN_INFO, &dev->dev,
+		"AER: Device recovery successful\n");
 	return;
 
 failed:
 	/* TODO: Should kernel panic here? */
-	dev_printk(KERN_DEBUG, &dev->dev,
-		"AER driver didn't recover\n");
+	dev_printk(KERN_INFO, &dev->dev,
+		"AER: Device recovery failed\n");
 }
 
 /**
-- 
1.7.7.6


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

* Re: [PATCH] aerdrv: Enable AER completion notice
  2012-07-19 19:19 [PATCH] aerdrv: Enable AER completion notice Lance Ortiz
@ 2012-07-30 17:37 ` Bjorn Helgaas
  0 siblings, 0 replies; 2+ messages in thread
From: Bjorn Helgaas @ 2012-07-30 17:37 UTC (permalink / raw)
  To: Lance Ortiz; +Cc: ying.huang, jbarnes, rusty, mchehab, linux-kernel, linux-pci

On Thu, Jul 19, 2012 at 1:19 PM, Lance Ortiz <lance.ortiz@hp.com> wrote:
> When an AER event occurs not all of the print notifications are at the
> same log level.  This can cause an incomplete AER log from the users
> point of view when monitoring the console output.
>
> The completion message in do_recovery() is currently set to KERN_DEBUG
> (log level 7) while the starting message in aer_port_info() uses
> KERN_INFO(log level 6). The completion message should be set to
> KERN_INFO so it is consistent with the starting message in the log.
>
> The message has also been re-worded to make it more clear.  This patch
> will enable the AER log on the console output to be book-ended by a
> clear and consistent starting and completion message.
>
> Signed-off-by: Lance Ortiz <lance.ortiz@hp.com>
> ---
>  drivers/pci/pcie/aer/aerdrv_core.c |    8 ++++----
>  1 files changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/pci/pcie/aer/aerdrv_core.c b/drivers/pci/pcie/aer/aerdrv_core.c
> index 0ca0535..164bab5 100644
> --- a/drivers/pci/pcie/aer/aerdrv_core.c
> +++ b/drivers/pci/pcie/aer/aerdrv_core.c
> @@ -540,14 +540,14 @@ static void do_recovery(struct pci_dev *dev, int severity)
>                                 "resume",
>                                 report_resume);
>
> -       dev_printk(KERN_DEBUG, &dev->dev,
> -               "AER driver successfully recovered\n");
> +       dev_printk(KERN_INFO, &dev->dev,
> +               "AER: Device recovery successful\n");
>         return;
>
>  failed:
>         /* TODO: Should kernel panic here? */
> -       dev_printk(KERN_DEBUG, &dev->dev,
> -               "AER driver didn't recover\n");
> +       dev_printk(KERN_INFO, &dev->dev,
> +               "AER: Device recovery failed\n");
>  }
>
>  /**

I applied this with minor tweaks (using dev_info() rather than
dev_printk(KERN_INFO)).

It won't appear in my "next" branch until I rebuild it after the merge
window closes.

Thanks!

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

end of thread, other threads:[~2012-07-30 17:37 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-07-19 19:19 [PATCH] aerdrv: Enable AER completion notice Lance Ortiz
2012-07-30 17:37 ` Bjorn Helgaas

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).