提交 aad20cab 编写于 作者: K Kenji Kaneshige 提交者: Greg Kroah-Hartman

[PATCH] acpi_pcihp: Remove improper error message about OSHP

This patch converts the improper error message about OSHP evaluation
to debug message which is displayed only when pci_hotplug.ko is loaded
with debugging mode enabled. To do this, this patch adds a new module
parameter "debug_acpi" to pci_hotplug.ko for enabling/disabling debug
messages in acpi_pcihp.c.
Signed-off-by: NKenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
Cc: Kristen Accardi <kristen.c.accardi@intel.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
上级 7430e34c
...@@ -25,6 +25,7 @@ ...@@ -25,6 +25,7 @@
*/ */
#include <linux/module.h> #include <linux/module.h>
#include <linux/moduleparam.h>
#include <linux/kernel.h> #include <linux/kernel.h>
#include <linux/types.h> #include <linux/types.h>
#include <linux/pci.h> #include <linux/pci.h>
...@@ -33,10 +34,19 @@ ...@@ -33,10 +34,19 @@
#include <acpi/actypes.h> #include <acpi/actypes.h>
#include "pci_hotplug.h" #include "pci_hotplug.h"
#define MY_NAME "acpi_pcihp"
#define dbg(fmt, arg...) do { if (debug_acpi) printk(KERN_DEBUG "%s: %s: " fmt , MY_NAME , __FUNCTION__ , ## arg); } while (0)
#define err(format, arg...) printk(KERN_ERR "%s: " format , MY_NAME , ## arg)
#define info(format, arg...) printk(KERN_INFO "%s: " format , MY_NAME , ## arg)
#define warn(format, arg...) printk(KERN_WARNING "%s: " format , MY_NAME , ## arg)
#define METHOD_NAME__SUN "_SUN" #define METHOD_NAME__SUN "_SUN"
#define METHOD_NAME__HPP "_HPP" #define METHOD_NAME__HPP "_HPP"
#define METHOD_NAME_OSHP "OSHP" #define METHOD_NAME_OSHP "OSHP"
static int debug_acpi;
static acpi_status static acpi_status
acpi_run_hpp(acpi_handle handle, struct hotplug_params *hpp) acpi_run_hpp(acpi_handle handle, struct hotplug_params *hpp)
...@@ -130,8 +140,12 @@ acpi_status acpi_run_oshp(acpi_handle handle) ...@@ -130,8 +140,12 @@ acpi_status acpi_run_oshp(acpi_handle handle)
/* run OSHP */ /* run OSHP */
status = acpi_evaluate_object(handle, METHOD_NAME_OSHP, NULL, NULL); status = acpi_evaluate_object(handle, METHOD_NAME_OSHP, NULL, NULL);
if (ACPI_FAILURE(status)) if (ACPI_FAILURE(status))
printk(KERN_ERR "%s:%s OSHP fails=0x%x\n", __FUNCTION__, if (status != AE_NOT_FOUND)
(char *)string.pointer, status); printk(KERN_ERR "%s:%s OSHP fails=0x%x\n",
__FUNCTION__, (char *)string.pointer, status);
else
dbg("%s:%s OSHP not found\n",
__FUNCTION__, (char *)string.pointer);
else else
pr_debug("%s:%s OSHP passes\n", __FUNCTION__, pr_debug("%s:%s OSHP passes\n", __FUNCTION__,
(char *)string.pointer); (char *)string.pointer);
...@@ -223,3 +237,6 @@ int acpi_root_bridge(acpi_handle handle) ...@@ -223,3 +237,6 @@ int acpi_root_bridge(acpi_handle handle)
return 0; return 0;
} }
EXPORT_SYMBOL_GPL(acpi_root_bridge); EXPORT_SYMBOL_GPL(acpi_root_bridge);
module_param(debug_acpi, bool, 0644);
MODULE_PARM_DESC(debug_acpi, "Debugging mode for ACPI enabled or not");
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册