brcm2708: update patches to latest version
[openwrt.git] / target / linux / brcm2708 / patches-4.4 / 0174-vchiq_arm-Tweak-the-logging-output.patch
1 From 48f3f7707a43b019e14216cec7376eba21972f9b Mon Sep 17 00:00:00 2001
2 From: Phil Elwell <phil@raspberrypi.org>
3 Date: Mon, 7 Mar 2016 15:05:11 +0000
4 Subject: [PATCH 174/180] vchiq_arm: Tweak the logging output
5
6 Signed-off-by: Phil Elwell <phil@raspberrypi.org>
7 ---
8  .../vc04_services/interface/vchiq_arm/vchiq_core.c | 31 +++++++++-------------
9  1 file changed, 13 insertions(+), 18 deletions(-)
10
11 --- a/drivers/misc/vc04_services/interface/vchiq_arm/vchiq_core.c
12 +++ b/drivers/misc/vc04_services/interface/vchiq_arm/vchiq_core.c
13 @@ -891,16 +891,14 @@ queue_message(VCHIQ_STATE_T *state, VCHI
14                                                 error_count);
15                                         return VCHIQ_ERROR;
16                                 }
17 -                               if (i == 0) {
18 -                                       if (SRVTRACE_ENABLED(service,
19 -                                                       VCHIQ_LOG_INFO))
20 -                                               vchiq_log_dump_mem("Sent", 0,
21 -                                                       header->data + pos,
22 -                                                       min(64u,
23 -                                                       elements[0].size));
24 -                               }
25                         }
26  
27 +               if (SRVTRACE_ENABLED(service,
28 +                               VCHIQ_LOG_INFO))
29 +                       vchiq_log_dump_mem("Sent", 0,
30 +                               header->data,
31 +                               min(16, pos));
32 +
33                 spin_lock(&quota_spinlock);
34                 service_quota->message_use_count++;
35  
36 @@ -1039,16 +1037,13 @@ queue_message_sync(VCHIQ_STATE_T *state,
37                                                 error_count);
38                                         return VCHIQ_ERROR;
39                                 }
40 -                               if (i == 0) {
41 -                                       if (vchiq_sync_log_level >=
42 -                                               VCHIQ_LOG_TRACE)
43 -                                               vchiq_log_dump_mem("Sent Sync",
44 -                                                       0, header->data + pos,
45 -                                                       min(64u,
46 -                                                       elements[0].size));
47 -                               }
48                         }
49  
50 +               if (vchiq_sync_log_level >= VCHIQ_LOG_TRACE)
51 +                       vchiq_log_dump_mem("Sent Sync",
52 +                               0, header->data,
53 +                               min(16, pos));
54 +
55                 VCHIQ_SERVICE_STATS_INC(service, ctrl_tx_count);
56                 VCHIQ_SERVICE_STATS_ADD(service, ctrl_tx_bytes, size);
57         } else {
58 @@ -1720,7 +1715,7 @@ parse_rx_slots(VCHIQ_STATE_T *state)
59                                 remoteport, localport, size);
60                         if (size > 0)
61                                 vchiq_log_dump_mem("Rcvd", 0, header->data,
62 -                                       min(64, size));
63 +                                       min(16, size));
64                 }
65  
66                 if (((unsigned int)header & VCHIQ_SLOT_MASK) + calc_stride(size)
67 @@ -2187,7 +2182,7 @@ sync_func(void *v)
68                                 remoteport, localport, size);
69                         if (size > 0)
70                                 vchiq_log_dump_mem("Rcvd", 0, header->data,
71 -                                       min(64, size));
72 +                                       min(16, size));
73                 }
74  
75                 switch (type) {