34 #ifndef __LINUX_IPMI_SMI_H
35 #define __LINUX_IPMI_SMI_H
40 #include <linux/ipmi.h>
151 #define ipmi_version_major(v) ((v)->ipmi_version & 0xf)
152 #define ipmi_version_minor(v) ((v)->ipmi_version >> 4)
159 static inline int ipmi_demangle_device_id(
const unsigned char *
data,
175 id->device_id = data[0];
176 id->device_revision = data[1];
177 id->firmware_revision_1 = data[2];
178 id->firmware_revision_2 = data[3];
179 id->ipmi_version = data[4];
180 id->additional_device_support = data[5];
181 if (data_len >= 11) {
182 id->manufacturer_id = (data[6] | (data[7] << 8) |
184 id->product_id = data[9] | (data[10] << 8);
186 id->manufacturer_id = 0;
189 if (data_len >= 15) {
191 id->aux_firmware_revision_set = 1;
193 id->aux_firmware_revision_set = 0;
208 const char *sysfs_name,