Avoid zeroing mailbox datagram because of VoE handlers.
authorFlorian Pose <fp@igh-essen.com>
Wed, 28 Oct 2009 13:47:39 +0100
changeset 1550 81a16ba13ae6
parent 1549 68d2af150381
child 1551 82a9eaba8a8b
Avoid zeroing mailbox datagram because of VoE handlers.
master/fsm_coe.c
master/mailbox.c
master/voe_handler.c
--- a/master/fsm_coe.c	Wed Oct 28 13:18:07 2009 +0100
+++ b/master/fsm_coe.c	Wed Oct 28 13:47:39 2009 +0100
@@ -1526,6 +1526,7 @@
     EC_WRITE_U16(data, 0x2 << 12); // SDO request
     EC_WRITE_U8 (data + 2, (fsm->toggle << 4 // toggle
                 | 0x3 << 5)); // upload segment request
+    memset(data + 3, 0x00, 7);
 
     if (fsm->slave->master->debug_level) {
         EC_DBG("Upload segment request:\n");
--- a/master/mailbox.c	Wed Oct 28 13:18:07 2009 +0100
+++ b/master/mailbox.c	Wed Oct 28 13:47:39 2009 +0100
@@ -71,7 +71,6 @@
         return ERR_PTR(-EOVERFLOW);
     }
 
-    ec_datagram_zero(datagram);
     ret = ec_datagram_fpwr(datagram, slave->station_address,
             slave->configured_rx_mailbox_offset,
             slave->configured_rx_mailbox_size);
--- a/master/voe_handler.c	Wed Oct 28 13:18:07 2009 +0100
+++ b/master/voe_handler.c	Wed Oct 28 13:47:39 2009 +0100
@@ -234,6 +234,7 @@
 
     EC_WRITE_U32(data,     voe->vendor_id);
     EC_WRITE_U16(data + 4, voe->vendor_type);
+    /* data already in datagram */
 
     voe->retries = EC_FSM_RETRIES;
     voe->jiffies_start = jiffies;