# HG changeset patch
# User Florian Pose <fp@igh-essen.com>
# Date 1326186680 -3600
# Node ID 3f2a4f9ff7867f54f9ba7a9f9688d2aae24e6968
# Parent  ecaff0d1d16509cc9999fe446289c08f62cd12f5
Copy missing slave_info data in kernel space.

diff -r ecaff0d1d165 -r 3f2a4f9ff786 master/master.c
--- a/master/master.c	Tue Jan 10 10:10:58 2012 +0100
+++ b/master/master.c	Tue Jan 10 10:11:20 2012 +0100
@@ -2407,6 +2407,7 @@
         ec_slave_info_t *slave_info)
 {
     const ec_slave_t *slave;
+    unsigned int i;
 
     if (down_interruptible(&master->master_sem)) {
         return -EINTR;
@@ -2421,6 +2422,25 @@
     slave_info->serial_number = slave->sii.serial_number;
     slave_info->alias = slave->effective_alias;
     slave_info->current_on_ebus = slave->sii.current_on_ebus;
+
+    for (i = 0; i < EC_MAX_PORTS; i++) {
+        slave_info->ports[i].desc = slave->ports[i].desc;
+        slave_info->ports[i].link.link_up = slave->ports[i].link.link_up;
+        slave_info->ports[i].link.loop_closed =
+            slave->ports[i].link.loop_closed;
+        slave_info->ports[i].link.signal_detected =
+            slave->ports[i].link.signal_detected;
+        slave_info->ports[i].receive_time = slave->ports[i].receive_time;
+        if (slave->ports[i].next_slave) {
+            slave_info->ports[i].next_slave =
+                slave->ports[i].next_slave->ring_position;
+        } else {
+            slave_info->ports[i].next_slave = 0xffff;
+        }
+        slave_info->ports[i].delay_to_next_dc =
+            slave->ports[i].delay_to_next_dc;
+    }
+
     slave_info->al_state = slave->current_state;
     slave_info->error_flag = slave->error_flag;
     slave_info->sync_count = slave->sii.sync_count;