Commit 11a61345 authored by Corey Minyard's avatar Corey Minyard Committed by Linus Torvalds

[PATCH] Minor IPMI driver updates

This patch fixes counting of unhandled messages.  Messages that were
handled internally by the driver (to the NULL user) were miscounted as
unhanlded responses.  This counts them properly.

This patch also fixes the DMI 16-byte setting, which was set as a 16-bit
setting.

It also uses the right value to initilize the address memory when using a
memory-based interface.
Signed-off-by: default avatarCorey Minyard <minyard@acm.org>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent ed0c6345
...@@ -2301,12 +2301,17 @@ static int handle_bmc_rsp(ipmi_smi_t intf, ...@@ -2301,12 +2301,17 @@ static int handle_bmc_rsp(ipmi_smi_t intf,
if (!found) { if (!found) {
/* Special handling for NULL users. */ /* Special handling for NULL users. */
if (!recv_msg->user && intf->null_user_handler) if (!recv_msg->user && intf->null_user_handler){
intf->null_user_handler(intf, msg); intf->null_user_handler(intf, msg);
spin_lock_irqsave(&intf->counter_lock, flags);
intf->handled_local_responses++;
spin_unlock_irqrestore(&intf->counter_lock, flags);
}else{
/* The user for the message went away, so give up. */ /* The user for the message went away, so give up. */
spin_lock_irqsave(&intf->counter_lock, flags); spin_lock_irqsave(&intf->counter_lock, flags);
intf->unhandled_local_responses++; intf->unhandled_local_responses++;
spin_unlock_irqrestore(&intf->counter_lock, flags); spin_unlock_irqrestore(&intf->counter_lock, flags);
}
ipmi_free_recv_msg(recv_msg); ipmi_free_recv_msg(recv_msg);
} else { } else {
struct ipmi_system_interface_addr *smi_addr; struct ipmi_system_interface_addr *smi_addr;
......
...@@ -1299,7 +1299,7 @@ static int try_init_mem(int intf_num, struct smi_info **new_info) ...@@ -1299,7 +1299,7 @@ static int try_init_mem(int intf_num, struct smi_info **new_info)
memset(info, 0, sizeof(*info)); memset(info, 0, sizeof(*info));
info->io_setup = mem_setup; info->io_setup = mem_setup;
info->io.info = (void *) addrs[intf_num]; info->io.info = &addrs[intf_num];
info->io.addr = NULL; info->io.addr = NULL;
info->io.regspacing = regspacings[intf_num]; info->io.regspacing = regspacings[intf_num];
if (!info->io.regspacing) if (!info->io.regspacing)
...@@ -1587,8 +1587,9 @@ static int decode_dmi(dmi_header_t *dm, dmi_ipmi_data_t *ipmi_data) ...@@ -1587,8 +1587,9 @@ static int decode_dmi(dmi_header_t *dm, dmi_ipmi_data_t *ipmi_data)
case 0x01: /* 32-bit boundaries */ case 0x01: /* 32-bit boundaries */
ipmi_data->offset = 4; ipmi_data->offset = 4;
break; break;
case 0x02: /* 16-bit boundaries */ case 0x02: /* 16-byte boundaries */
ipmi_data->offset = 2; ipmi_data->offset = 16;
break;
default: default:
printk("ipmi_si: Unknown SMBIOS IPMI Base Addr" printk("ipmi_si: Unknown SMBIOS IPMI Base Addr"
" Modifier: 0x%x\n", reg_spacing); " Modifier: 0x%x\n", reg_spacing);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment