30 #include <linux/module.h>
34 #include <linux/string.h>
35 #include <linux/slab.h>
36 #include <linux/sched.h>
37 #include <asm/param.h>
40 #define OSM_NAME "exec-osm"
88 INIT_LIST_HEAD(&wait->
list);
131 wait = i2o_exec_wait_alloc();
137 if (tcntxt == 0xffffffff)
157 list_add(&wait->
list, &i2o_exec_wait_list);
163 i2o_msg_post(c, msg);
187 spin_unlock_irqrestore(&wait->
lock, flags);
190 i2o_flush_reply(c, wait->
m);
191 i2o_exec_wait_free(wait);
231 if (wait->
tcntxt == context) {
245 spin_unlock_irqrestore(&wait->
lock, flags);
252 pr_debug(
"%s: timedout reply received!\n",
255 i2o_exec_wait_free(wait);
263 osm_warn(
"%s: Bogus reply in POST WAIT (tr-context: %08x)!\n", c->
name,
327 static int i2o_exec_probe(
struct device *dev)
333 if (rc)
goto err_out;
336 if (rc)
goto err_evtreg;
338 if (rc)
goto err_vid;
340 i2o_dev->
iop->exec = i2o_dev;
360 static int i2o_exec_remove(
struct device *dev)
370 #ifdef CONFIG_I2O_LCT_NOTIFY_ON_CHANGES
413 i2o_msg_post(c, msg);
429 static void i2o_exec_lct_modified(
struct work_struct *_work)
441 #ifdef CONFIG_I2O_LCT_NOTIFY_ON_CHANGES
442 i2o_exec_lct_notify(c, change_ind);
475 pmsg = i2o_msg_in_to_virt(c, pm);
476 context =
readl(&pmsg->
u.
s.tcntxt);
481 i2o_msg_nop_mfa(c, pm);
485 if (context & 0x80000000)
486 return i2o_msg_post_wait_complete(c, m, msg, context);
511 "Message dumped to syslog\n", c->
name);
524 static void i2o_exec_event(
struct work_struct *work)
529 osm_debug(
"Event received from device: %d\n",
580 .reply = i2o_exec_reply,
581 .event = i2o_exec_event,
582 .classes = i2o_exec_class_id,
584 .probe = i2o_exec_probe,
585 .remove = i2o_exec_remove,