|
@@ -57,6 +57,7 @@
|
|
#include <asm/irq.h>
|
|
#include <asm/irq.h>
|
|
#include <linux/interrupt.h>
|
|
#include <linux/interrupt.h>
|
|
#include <linux/rcupdate.h>
|
|
#include <linux/rcupdate.h>
|
|
|
|
+#include <linux/ipmi.h>
|
|
#include <linux/ipmi_smi.h>
|
|
#include <linux/ipmi_smi.h>
|
|
#include <asm/io.h>
|
|
#include <asm/io.h>
|
|
#include "ipmi_si_sm.h"
|
|
#include "ipmi_si_sm.h"
|
|
@@ -107,10 +108,6 @@ enum si_type {
|
|
};
|
|
};
|
|
static char *si_to_str[] = { "kcs", "smic", "bt" };
|
|
static char *si_to_str[] = { "kcs", "smic", "bt" };
|
|
|
|
|
|
-enum ipmi_addr_src {
|
|
|
|
- SI_INVALID = 0, SI_HOTMOD, SI_HARDCODED, SI_SPMI, SI_ACPI, SI_SMBIOS,
|
|
|
|
- SI_PCI, SI_DEVICETREE, SI_DEFAULT
|
|
|
|
-};
|
|
|
|
static char *ipmi_addr_src_to_str[] = { NULL, "hotmod", "hardcoded", "SPMI",
|
|
static char *ipmi_addr_src_to_str[] = { NULL, "hotmod", "hardcoded", "SPMI",
|
|
"ACPI", "SMBIOS", "PCI",
|
|
"ACPI", "SMBIOS", "PCI",
|
|
"device-tree", "default" };
|
|
"device-tree", "default" };
|
|
@@ -291,6 +288,7 @@ struct smi_info {
|
|
struct task_struct *thread;
|
|
struct task_struct *thread;
|
|
|
|
|
|
struct list_head link;
|
|
struct list_head link;
|
|
|
|
+ union ipmi_smi_info_union addr_info;
|
|
};
|
|
};
|
|
|
|
|
|
#define smi_inc_stat(smi, stat) \
|
|
#define smi_inc_stat(smi, stat) \
|
|
@@ -1186,6 +1184,18 @@ static int smi_start_processing(void *send_info,
|
|
return 0;
|
|
return 0;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+static int get_smi_info(void *send_info, struct ipmi_smi_info *data)
|
|
|
|
+{
|
|
|
|
+ struct smi_info *smi = send_info;
|
|
|
|
+
|
|
|
|
+ data->addr_src = smi->addr_source;
|
|
|
|
+ data->dev = smi->dev;
|
|
|
|
+ data->addr_info = smi->addr_info;
|
|
|
|
+ get_device(smi->dev);
|
|
|
|
+
|
|
|
|
+ return 0;
|
|
|
|
+}
|
|
|
|
+
|
|
static void set_maintenance_mode(void *send_info, int enable)
|
|
static void set_maintenance_mode(void *send_info, int enable)
|
|
{
|
|
{
|
|
struct smi_info *smi_info = send_info;
|
|
struct smi_info *smi_info = send_info;
|
|
@@ -1197,6 +1207,7 @@ static void set_maintenance_mode(void *send_info, int enable)
|
|
static struct ipmi_smi_handlers handlers = {
|
|
static struct ipmi_smi_handlers handlers = {
|
|
.owner = THIS_MODULE,
|
|
.owner = THIS_MODULE,
|
|
.start_processing = smi_start_processing,
|
|
.start_processing = smi_start_processing,
|
|
|
|
+ .get_smi_info = get_smi_info,
|
|
.sender = sender,
|
|
.sender = sender,
|
|
.request_events = request_events,
|
|
.request_events = request_events,
|
|
.set_maintenance_mode = set_maintenance_mode,
|
|
.set_maintenance_mode = set_maintenance_mode,
|
|
@@ -2156,6 +2167,7 @@ static int __devinit ipmi_pnp_probe(struct pnp_dev *dev,
|
|
printk(KERN_INFO PFX "probing via ACPI\n");
|
|
printk(KERN_INFO PFX "probing via ACPI\n");
|
|
|
|
|
|
handle = acpi_dev->handle;
|
|
handle = acpi_dev->handle;
|
|
|
|
+ info->addr_info.acpi_info.acpi_handle = handle;
|
|
|
|
|
|
/* _IFT tells us the interface type: KCS, BT, etc */
|
|
/* _IFT tells us the interface type: KCS, BT, etc */
|
|
status = acpi_evaluate_integer(handle, "_IFT", NULL, &tmp);
|
|
status = acpi_evaluate_integer(handle, "_IFT", NULL, &tmp);
|