[etherlab-dev] EC_FIND_SLAVE when alias != 0 is incorrect

Raz raziebe at gmail.com
Mon Apr 27 11:01:59 CEST 2015


when alias is used EC_FIND_SLAVE fails to find slave at position greater
than 0

>From 1349cabe197e84208a196d9186111551f24e25f5 Mon Sep 17 00:00:00 2001
From: raz <raziebe at gmail.com>
Date: Mon, 27 Apr 2015 11:51:23 +0300
Subject: [PATCH] alias search incorrect

---
 drivers/misc/ethercat_master/master/master.c | 6 +++---

diff --git a/drivers/misc/ethercat_master/master/master.c
b/drivers/misc/ethercat_master/master/master.c
index 34cc1b5..d9ec5b3 100644
--- a/drivers/misc/ethercat_master/master/master.c
+++ b/drivers/misc/ethercat_master/master/master.c
@@ -1569,9 +1569,9 @@ void ec_master_attach_slave_configs(
             } \
             if (slave == master->slaves + master->slave_count) \
             return NULL; \
-        } \
-        \
-        slave += position; \
+        } else{ \
+               slave += position; \
+       } \
         if (slave < master->slaves + master->slave_count) { \
             return slave; \
         } else { \
-- 
1.9.1


-- 
https://sites.google.com/site/ironspeedlinux/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.etherlab.org/pipermail/etherlab-dev/attachments/20150427/fc2a3ff7/attachment-0001.htm>


More information about the Etherlab-dev mailing list