mirror of
https://gitlab.com/etherlab.org/ethercat.git
synced 2026-09-24 11:03:49 +08:00
New master module parameter sii_caching.
This commit is contained in:
+4
-2
@@ -1,6 +1,6 @@
|
||||
/*****************************************************************************
|
||||
*
|
||||
* Copyright (C) 2006-2020 Florian Pose, Ingenieurgemeinschaft IgH
|
||||
* Copyright (C) 2006-2026 Florian Pose, Ingenieurgemeinschaft IgH
|
||||
*
|
||||
* This file is part of the IgH EtherCAT Master.
|
||||
*
|
||||
@@ -162,7 +162,8 @@ int ec_master_init(ec_master_t *master, /**< EtherCAT master */
|
||||
dev_t device_number, /**< Character device number. */
|
||||
struct class *class, /**< Device class. */
|
||||
unsigned int debug_level, /**< Debug level (module parameter). */
|
||||
unsigned int run_on_cpu /**< bind created kernel threads to a cpu */
|
||||
unsigned int run_on_cpu, /**< Bind created kernel threads to a cpu. */
|
||||
unsigned int sii_caching /**< SII caching mode. */
|
||||
)
|
||||
{
|
||||
int ret;
|
||||
@@ -242,6 +243,7 @@ int ec_master_init(ec_master_t *master, /**< EtherCAT master */
|
||||
|
||||
master->debug_level = debug_level;
|
||||
master->run_on_cpu = run_on_cpu;
|
||||
master->sii_caching = sii_caching;
|
||||
master->stats.timeouts = 0;
|
||||
master->stats.corrupted = 0;
|
||||
master->stats.unmatched = 0;
|
||||
|
||||
+5
-3
@@ -1,6 +1,6 @@
|
||||
/*****************************************************************************
|
||||
*
|
||||
* Copyright (C) 2006-2024 Florian Pose, Ingenieurgemeinschaft IgH
|
||||
* Copyright (C) 2006-2026 Florian Pose, Ingenieurgemeinschaft IgH
|
||||
*
|
||||
* This file is part of the IgH EtherCAT Master.
|
||||
*
|
||||
@@ -273,7 +273,8 @@ struct ec_master {
|
||||
unsigned int fsm_exec_count; /**< Number of entries in execution list. */
|
||||
|
||||
unsigned int debug_level; /**< Master debug level. */
|
||||
unsigned int run_on_cpu; /**< bind kernel threads to this cpu */
|
||||
unsigned int run_on_cpu; /**< Bind kernel threads to this cpu. */
|
||||
unsigned int sii_caching; /**< SII caching mode. */
|
||||
ec_stats_t stats; /**< Cyclic statistics. */
|
||||
|
||||
struct task_struct *thread; /**< Master thread. */
|
||||
@@ -312,7 +313,8 @@ void ec_master_init_static(void);
|
||||
|
||||
// master creation/deletion
|
||||
int ec_master_init(ec_master_t *, unsigned int, const uint8_t *,
|
||||
const uint8_t *, dev_t, struct class *, unsigned int, unsigned int);
|
||||
const uint8_t *, dev_t, struct class *, unsigned int, unsigned int,
|
||||
unsigned int);
|
||||
void ec_master_clear(ec_master_t *);
|
||||
|
||||
/** Number of Ethernet devices.
|
||||
|
||||
+8
-4
@@ -1,6 +1,6 @@
|
||||
/*****************************************************************************
|
||||
*
|
||||
* Copyright (C) 2006-2008 Florian Pose, Ingenieurgemeinschaft IgH
|
||||
* Copyright (C) 2006-2026 Florian Pose, Ingenieurgemeinschaft IgH
|
||||
*
|
||||
* This file is part of the IgH EtherCAT Master.
|
||||
*
|
||||
@@ -56,6 +56,7 @@ static unsigned int debug_level; /**< Debug level parameter. */
|
||||
static unsigned int run_on_cpu = 0xffffffff; /**< Bind created kernel threads
|
||||
to a cpu. Default do not bind.
|
||||
*/
|
||||
static unsigned int sii_caching; /**< SII Caching mode. */
|
||||
|
||||
static ec_master_t *masters; /**< Array of masters. */
|
||||
static struct semaphore master_sem; /**< Master semaphore. */
|
||||
@@ -80,10 +81,12 @@ module_param_array(main_devices, charp, &master_count, S_IRUGO);
|
||||
MODULE_PARM_DESC(main_devices, "MAC addresses of main devices");
|
||||
module_param_array(backup_devices, charp, &backup_count, S_IRUGO);
|
||||
MODULE_PARM_DESC(backup_devices, "MAC addresses of backup devices");
|
||||
module_param_named(debug_level, debug_level, uint, S_IRUGO);
|
||||
module_param(debug_level, uint, S_IRUGO);
|
||||
MODULE_PARM_DESC(debug_level, "Debug level");
|
||||
module_param_named(run_on_cpu, run_on_cpu, uint, S_IRUGO);
|
||||
module_param(run_on_cpu, uint, S_IRUGO);
|
||||
MODULE_PARM_DESC(run_on_cpu, "Bind kthreads to a specific cpu");
|
||||
module_param(sii_caching, uint, S_IRUGO);
|
||||
MODULE_PARM_DESC(sii_caching, "SII caching mode (default=0=off)");
|
||||
|
||||
/** \endcond */
|
||||
|
||||
@@ -153,7 +156,8 @@ int __init ec_init_module(void)
|
||||
|
||||
for (i = 0; i < master_count; i++) {
|
||||
ret = ec_master_init(&masters[i], i, macs[i][0], macs[i][1],
|
||||
device_number, class, debug_level, run_on_cpu);
|
||||
device_number, class, debug_level, run_on_cpu,
|
||||
sii_caching);
|
||||
if (ret)
|
||||
goto out_free_masters;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user