aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char/ipmi/ipmi_msghandler.c
diff options
context:
space:
mode:
authorDavid Woodhouse <dwmw2@infradead.org>2006-12-01 04:56:43 -0500
committerDavid Woodhouse <dwmw2@infradead.org>2006-12-01 04:56:43 -0500
commitbd3c97a7c718bfb9f1e4f31c16c383a5c6f815eb (patch)
tree3f56594e813c6f35cbacbdb3e137ba5bfd0b3069 /drivers/char/ipmi/ipmi_msghandler.c
parent6c33cafc794d07c9254c160789120a0e98c088c9 (diff)
parent0215ffb08ce99e2bb59eca114a99499a4d06e704 (diff)
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
Diffstat (limited to 'drivers/char/ipmi/ipmi_msghandler.c')
-rw-r--r--drivers/char/ipmi/ipmi_msghandler.c22
1 files changed, 17 insertions, 5 deletions
diff --git a/drivers/char/ipmi/ipmi_msghandler.c b/drivers/char/ipmi/ipmi_msghandler.c
index 34a4fd13fa81..c47add8e47df 100644
--- a/drivers/char/ipmi/ipmi_msghandler.c
+++ b/drivers/char/ipmi/ipmi_msghandler.c
@@ -376,13 +376,23 @@ static void free_recv_msg_list(struct list_head *q)
376 } 376 }
377} 377}
378 378
379static void free_smi_msg_list(struct list_head *q)
380{
381 struct ipmi_smi_msg *msg, *msg2;
382
383 list_for_each_entry_safe(msg, msg2, q, link) {
384 list_del(&msg->link);
385 ipmi_free_smi_msg(msg);
386 }
387}
388
379static void clean_up_interface_data(ipmi_smi_t intf) 389static void clean_up_interface_data(ipmi_smi_t intf)
380{ 390{
381 int i; 391 int i;
382 struct cmd_rcvr *rcvr, *rcvr2; 392 struct cmd_rcvr *rcvr, *rcvr2;
383 struct list_head list; 393 struct list_head list;
384 394
385 free_recv_msg_list(&intf->waiting_msgs); 395 free_smi_msg_list(&intf->waiting_msgs);
386 free_recv_msg_list(&intf->waiting_events); 396 free_recv_msg_list(&intf->waiting_events);
387 397
388 /* Wholesale remove all the entries from the list in the 398 /* Wholesale remove all the entries from the list in the
@@ -1844,7 +1854,7 @@ static ssize_t provides_dev_sdrs_show(struct device *dev,
1844 struct bmc_device *bmc = dev_get_drvdata(dev); 1854 struct bmc_device *bmc = dev_get_drvdata(dev);
1845 1855
1846 return snprintf(buf, 10, "%u\n", 1856 return snprintf(buf, 10, "%u\n",
1847 bmc->id.device_revision && 0x80 >> 7); 1857 (bmc->id.device_revision & 0x80) >> 7);
1848} 1858}
1849 1859
1850static ssize_t revision_show(struct device *dev, struct device_attribute *attr, 1860static ssize_t revision_show(struct device *dev, struct device_attribute *attr,
@@ -1853,7 +1863,7 @@ static ssize_t revision_show(struct device *dev, struct device_attribute *attr,
1853 struct bmc_device *bmc = dev_get_drvdata(dev); 1863 struct bmc_device *bmc = dev_get_drvdata(dev);
1854 1864
1855 return snprintf(buf, 20, "%u\n", 1865 return snprintf(buf, 20, "%u\n",
1856 bmc->id.device_revision && 0x0F); 1866 bmc->id.device_revision & 0x0F);
1857} 1867}
1858 1868
1859static ssize_t firmware_rev_show(struct device *dev, 1869static ssize_t firmware_rev_show(struct device *dev,
@@ -2108,7 +2118,7 @@ static int ipmi_bmc_register(ipmi_smi_t intf)
2108 dev_set_drvdata(&bmc->dev->dev, bmc); 2118 dev_set_drvdata(&bmc->dev->dev, bmc);
2109 kref_init(&bmc->refcount); 2119 kref_init(&bmc->refcount);
2110 2120
2111 rv = platform_device_register(bmc->dev); 2121 rv = platform_device_add(bmc->dev);
2112 mutex_unlock(&ipmidriver_mutex); 2122 mutex_unlock(&ipmidriver_mutex);
2113 if (rv) { 2123 if (rv) {
2114 printk(KERN_ERR 2124 printk(KERN_ERR
@@ -3232,7 +3242,9 @@ void ipmi_smi_msg_received(ipmi_smi_t intf,
3232 report the error immediately. */ 3242 report the error immediately. */
3233 if ((msg->rsp_size >= 3) && (msg->rsp[2] != 0) 3243 if ((msg->rsp_size >= 3) && (msg->rsp[2] != 0)
3234 && (msg->rsp[2] != IPMI_NODE_BUSY_ERR) 3244 && (msg->rsp[2] != IPMI_NODE_BUSY_ERR)
3235 && (msg->rsp[2] != IPMI_LOST_ARBITRATION_ERR)) 3245 && (msg->rsp[2] != IPMI_LOST_ARBITRATION_ERR)
3246 && (msg->rsp[2] != IPMI_BUS_ERR)
3247 && (msg->rsp[2] != IPMI_NAK_ON_WRITE_ERR))
3236 { 3248 {
3237 int chan = msg->rsp[3] & 0xf; 3249 int chan = msg->rsp[3] & 0xf;
3238 3250