changeset 48:616f63f3e501 default tip

fixed bug in etm_pkt_send() dealing with max-sized packets: this fix is needed for fc-fsio cpout command to work like it does with Pirelli's firmware (they must have made the same fix)
author Mychaela Falconia <falcon@ivan.Harhan.ORG>
date Fri, 13 Nov 2015 19:11:07 +0000
parents 3cc7897a6582
children
files chipsetsw/services/etm/etm_api.c
diffstat 1 files changed, 5 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/chipsetsw/services/etm/etm_api.c	Thu Nov 12 06:03:27 2015 +0000
+++ b/chipsetsw/services/etm/etm_api.c	Fri Nov 13 19:11:07 2015 +0000
@@ -264,11 +264,12 @@
 int etm_pkt_send(T_ETM_PKT *pkt)
 {
     extern unsigned char etm_trace_user_id; 
-    uint8 *buf, cksum = 0, sendsize, size;
+    uint8 *buf, cksum = 0;
+    uint16 sendsize, size;
     int error = ETM_OK;
 
     buf = (uint8 *) &pkt->mid;
-    sendsize = size = pkt->size + 2; //one for mid, one for status  
+    sendsize = size = pkt->size + 2; //one for mid, one for status
 
     tr_etm(TgTrEtmLow, "ETM API: _pkt_send: size(%d)", sendsize);
 
@@ -280,8 +281,8 @@
     sendsize += 1; // one for checksum
 
     tr_etm_hexdump(TgTrEtmLow, &pkt->mid, sendsize);
-   
-    error = rvt_send_trace_cpy((uint8 *) &pkt->mid, etm_trace_user_id, 
+
+    error = rvt_send_trace_cpy((uint8 *) &pkt->mid, etm_trace_user_id,
                                sendsize, RVT_BINARY_FORMAT);
     if(error < 0)
         tr_etm(TgTrFatal, "ETM API: _pkt_send: ERROR(%d)", error);