# HG changeset patch # User Florian Pose # Date 1154445551 0 # Node ID 64e20e6e9d0b276486a7eedb8b9286806aade173 # Parent 71d559ec66d7e71d51c3a77e2e663845c916a462 Renamed master parameter ec_eoe_devices to ec_eoeif_count. diff -r 71d559ec66d7 -r 64e20e6e9d0b master/master.c --- a/master/master.c Tue Aug 01 14:15:33 2006 +0000 +++ b/master/master.c Tue Aug 01 15:19:11 2006 +0000 @@ -100,7 +100,7 @@ int ec_master_init(ec_master_t *master, /**< EtherCAT master */ unsigned int index, /**< master index */ - unsigned int eoe_devices /**< number of EoE devices */ + unsigned int eoeif_count /**< number of EoE interfaces */ ) { ec_eoe_t *eoe, *next_eoe; @@ -130,7 +130,7 @@ } // create EoE handlers - for (i = 0; i < eoe_devices; i++) { + for (i = 0; i < eoeif_count; i++) { if (!(eoe = (ec_eoe_t *) kmalloc(sizeof(ec_eoe_t), GFP_KERNEL))) { EC_ERR("Failed to allocate EoE-Object.\n"); goto out_clear_eoe; diff -r 71d559ec66d7 -r 64e20e6e9d0b master/module.c --- a/master/module.c Tue Aug 01 14:15:33 2006 +0000 +++ b/master/module.c Tue Aug 01 15:19:11 2006 +0000 @@ -67,7 +67,7 @@ /*****************************************************************************/ static int ec_master_count = 1; /**< parameter value, number of masters */ -static int ec_eoe_devices = 0; /**< parameter value, number of EoE interf. */ +static int ec_eoeif_count = 0; /**< parameter value, number of EoE interf. */ static struct list_head ec_masters; /**< list of masters */ /*****************************************************************************/ @@ -75,14 +75,14 @@ /** \cond */ module_param(ec_master_count, int, S_IRUGO); -module_param(ec_eoe_devices, int, S_IRUGO); +module_param(ec_eoeif_count, int, S_IRUGO); MODULE_AUTHOR("Florian Pose "); MODULE_DESCRIPTION("EtherCAT master driver module"); MODULE_LICENSE("GPL"); MODULE_VERSION(COMPILE_INFO); MODULE_PARM_DESC(ec_master_count, "number of EtherCAT masters to initialize"); -MODULE_PARM_DESC(ec_eoe_devices, "number of EoE devices per master"); +MODULE_PARM_DESC(ec_eoeif_count, "number of EoE interfaces per master"); /** \endcond */ @@ -117,7 +117,7 @@ goto out_free; } - if (ec_master_init(master, i, ec_eoe_devices)) + if (ec_master_init(master, i, ec_eoeif_count)) goto out_free; if (kobject_add(&master->kobj)) { diff -r 71d559ec66d7 -r 64e20e6e9d0b script/ethercat.sh --- a/script/ethercat.sh Tue Aug 01 14:15:33 2006 +0000 +++ b/script/ethercat.sh Tue Aug 01 15:19:11 2006 +0000 @@ -65,7 +65,7 @@ build_eoe_bridge() { if [ -z "$EOE_BRIDGE" ]; then return; fi - EOE_INTERFACES=`/sbin/ifconfig -a | grep -o -E "^eoe[0-9]+ "` + EOEIF=`/sbin/ifconfig -a | grep -o -E "^eoe[0-9]+ "` # add bridge, if it does not already exist if ! /sbin/brctl show | grep -E -q "^$EOE_BRIDGE"; then @@ -76,8 +76,8 @@ fi fi - # check if specified interfaces are bridged - for interf in $EOE_INTERFACES $EOE_EXTRA_INTERFACES; do + # check if specified interfaces are bridged + for interf in $EOEIF $EOE_EXTRA_INTERFACES; do # interface is already part of the bridge if /sbin/brctl show $EOE_BRIDGE | grep -E -q $interf then continue @@ -147,8 +147,12 @@ rc_exit fi - if [ -z "$EOE_DEVICES" ]; then - EOE_DEVICES=0 + if [ -z "$EOE_INTERFACES" ]; then + if [ -n "$EOE_DEVICES"]; then # support legacy sysconfig files + EOE_INTERFACES=$EOE_DEVICES + else + EOE_INTERFACES=0 + fi fi # unload conflicting modules at first @@ -163,7 +167,7 @@ done # load master module - if ! modprobe ec_master ec_eoe_devices=$EOE_DEVICES; then + if ! modprobe ec_master ec_eoeif_count=$EOE_INTERFACES; then /bin/false rc_status -v rc_exit diff -r 71d559ec66d7 -r 64e20e6e9d0b script/sysconfig --- a/script/sysconfig Tue Aug 01 14:15:33 2006 +0000 +++ b/script/sysconfig Tue Aug 01 15:19:11 2006 +0000 @@ -13,10 +13,10 @@ #DEVICE_INDEX=99 # -# Number of Ethernet-over-EtherCAT devices every master shall create +# Number of Ethernet-over-EtherCAT interfaces every master shall create # on startup. Default is 0. # -#EOE_DEVICES=0 +#EOE_INTERFACES=0 # # Bridge all EoE interfaces after master startup