Removed EoE workqueue option.
--- a/master/master.c Tue May 16 11:57:06 2006 +0000
+++ b/master/master.c Tue May 16 13:03:09 2006 +0000
@@ -46,11 +46,7 @@
/*****************************************************************************/
void ec_master_freerun(void *);
-#ifdef EOE_TIMER
void ec_master_run_eoe(unsigned long);
-#else
-void ec_master_run_eoe(void *);
-#endif
ssize_t ec_show_master_attribute(struct kobject *, struct attribute *, char *);
void ec_master_process_watch_command(ec_master_t *);
@@ -109,15 +105,9 @@
INIT_LIST_HEAD(&master->eoe_slaves);
ec_command_init(&master->simple_command);
INIT_WORK(&master->freerun_work, ec_master_freerun, (void *) master);
-
- // init eoe timer
-#ifdef EOE_TIMER
init_timer(&master->eoe_timer);
master->eoe_timer.function = ec_master_run_eoe;
master->eoe_timer.data = (unsigned long) master;
-#else
- INIT_WORK(&master->eoe_work, ec_master_run_eoe, (void *) master);
-#endif
// init kobject and add it to the hierarchy
memset(&master->kobj, 0x00, sizeof(struct kobject));
@@ -180,13 +170,7 @@
ec_eoe_t *eoe, *next_eoe;
// stop EoE processing
-#ifdef EOE_TIMER
del_timer_sync(&master->eoe_timer);
-#else
- if (!cancel_delayed_work(&master->eoe_work)) {
- flush_workqueue(master->eoe_workqueue);
- }
-#endif
// stop free-run mode
ec_master_freerun_stop(master);
@@ -808,11 +792,7 @@
Does the Ethernet-over-EtherCAT processing.
*/
-#ifdef EOE_TIMER
void ec_master_run_eoe(unsigned long data /**< master pointer */)
-#else
-void ec_master_run_eoe(void *data /**< master pointer */)
-#endif
{
ec_master_t *master = (ec_master_t *) data;
ec_eoe_t *eoe;
@@ -834,13 +814,8 @@
master->release_cb(master->cb_data);
}
-#ifdef EOE_TIMER
master->eoe_timer.expires += HZ / EC_EOE_FREQUENCY;
add_timer(&master->eoe_timer);
-#else
- queue_delayed_work(master->eoe_workqueue, &master->eoe_work,
- HZ / EC_EOE_FREQUENCY);
-#endif
}
/******************************************************************************
@@ -1448,12 +1423,8 @@
}
// start EoE processing
-#ifdef EOE_TIMER
master->eoe_timer.expires = jiffies + 10;
add_timer(&master->eoe_timer);
-#else
- queue_work(master->eoe_workqueue, &master->eoe_work);
-#endif
return 0;
}
--- a/master/master.h Tue May 16 11:57:06 2006 +0000
+++ b/master/master.h Tue May 16 13:03:09 2006 +0000
@@ -41,13 +41,6 @@
/*****************************************************************************/
-// Uncomment this to do EoE within a kernel timer. Otherwise, it will be
-// done in a working queue.
-
-#define EOE_TIMER
-
-/*****************************************************************************/
-
/**
EtherCAT master mode.
*/
@@ -107,11 +100,7 @@
int (*request_cb)(void *); /**< lock request callback */
void (*release_cb)(void *); /**< lock release callback */
void *cb_data; /**< data parameter of locking callbacks */
-#ifdef EOE_TIMER
struct timer_list eoe_timer; /** EoE timer object */
-#else
- struct work_struct eoe_work; /**< work structure for EoE workqueue */
-#endif
};
/*****************************************************************************/