aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRupesh Gujare <rupesh.gujare@atmel.com>2013-06-12 09:00:52 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-06-17 17:48:12 -0400
commit255ece7c4d9e63e2a5e784247bc2e7b639cae4dd (patch)
treebb0b614292be8569b411d3ab2563db2adc8c2d02
parent9acd5b654dc33cf6ecf3965bf46b47901919fd43 (diff)
staging: ozwpan: remove event tracing code.
Removes event tracing code as it can be replaced by in-kernel tracing infrastructure. Signed-off-by: Rupesh Gujare <rupesh.gujare@atmel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/staging/ozwpan/Kbuild3
-rw-r--r--drivers/staging/ozwpan/ozappif.h2
-rw-r--r--drivers/staging/ozwpan/ozcdev.c5
-rw-r--r--drivers/staging/ozwpan/ozconfig.h1
-rw-r--r--drivers/staging/ozwpan/ozevent.c195
-rw-r--r--drivers/staging/ozwpan/ozevent.h32
-rw-r--r--drivers/staging/ozwpan/ozeventdef.h40
-rw-r--r--drivers/staging/ozwpan/ozhcd.c47
-rw-r--r--drivers/staging/ozwpan/ozmain.c9
-rw-r--r--drivers/staging/ozwpan/ozpd.c23
-rw-r--r--drivers/staging/ozwpan/ozproto.c17
-rw-r--r--drivers/staging/ozwpan/ozusbsvc.c5
-rw-r--r--drivers/staging/ozwpan/ozusbsvc1.c5
13 files changed, 4 insertions, 380 deletions
diff --git a/drivers/staging/ozwpan/Kbuild b/drivers/staging/ozwpan/Kbuild
index 6cc84cb3f0a6..1766a268d5f6 100644
--- a/drivers/staging/ozwpan/Kbuild
+++ b/drivers/staging/ozwpan/Kbuild
@@ -13,7 +13,6 @@ ozwpan-y := \
13 ozproto.o \ 13 ozproto.o \
14 ozcdev.o \ 14 ozcdev.o \
15 ozurbparanoia.o \ 15 ozurbparanoia.o \
16 oztrace.o \ 16 oztrace.o
17 ozevent.o
18 17
19 18
diff --git a/drivers/staging/ozwpan/ozappif.h b/drivers/staging/ozwpan/ozappif.h
index 449a6ba82337..ea1b271fdcda 100644
--- a/drivers/staging/ozwpan/ozappif.h
+++ b/drivers/staging/ozwpan/ozappif.h
@@ -6,8 +6,6 @@
6#ifndef _OZAPPIF_H 6#ifndef _OZAPPIF_H
7#define _OZAPPIF_H 7#define _OZAPPIF_H
8 8
9#include "ozeventdef.h"
10
11#define OZ_IOCTL_MAGIC 0xf4 9#define OZ_IOCTL_MAGIC 0xf4
12 10
13struct oz_mac_addr { 11struct oz_mac_addr {
diff --git a/drivers/staging/ozwpan/ozcdev.c b/drivers/staging/ozwpan/ozcdev.c
index 8dc24ea26bf5..374fdc398641 100644
--- a/drivers/staging/ozwpan/ozcdev.c
+++ b/drivers/staging/ozwpan/ozcdev.c
@@ -18,7 +18,6 @@
18#include "ozeltbuf.h" 18#include "ozeltbuf.h"
19#include "ozpd.h" 19#include "ozpd.h"
20#include "ozproto.h" 20#include "ozproto.h"
21#include "ozevent.h"
22#include "ozcdev.h" 21#include "ozcdev.h"
23/*------------------------------------------------------------------------------ 22/*------------------------------------------------------------------------------
24 */ 23 */
@@ -390,7 +389,6 @@ int oz_cdev_deregister(void)
390 */ 389 */
391int oz_cdev_init(void) 390int oz_cdev_init(void)
392{ 391{
393 oz_event_log(OZ_EVT_SERVICE, 1, OZ_APPID_SERIAL, NULL, 0);
394 oz_app_enable(OZ_APPID_SERIAL, 1); 392 oz_app_enable(OZ_APPID_SERIAL, 1);
395 return 0; 393 return 0;
396} 394}
@@ -399,7 +397,6 @@ int oz_cdev_init(void)
399 */ 397 */
400void oz_cdev_term(void) 398void oz_cdev_term(void)
401{ 399{
402 oz_event_log(OZ_EVT_SERVICE, 2, OZ_APPID_SERIAL, NULL, 0);
403 oz_app_enable(OZ_APPID_SERIAL, 0); 400 oz_app_enable(OZ_APPID_SERIAL, 0);
404} 401}
405/*------------------------------------------------------------------------------ 402/*------------------------------------------------------------------------------
@@ -409,7 +406,6 @@ int oz_cdev_start(struct oz_pd *pd, int resume)
409{ 406{
410 struct oz_serial_ctx *ctx; 407 struct oz_serial_ctx *ctx;
411 struct oz_serial_ctx *old_ctx; 408 struct oz_serial_ctx *old_ctx;
412 oz_event_log(OZ_EVT_SERVICE, 3, OZ_APPID_SERIAL, NULL, resume);
413 if (resume) { 409 if (resume) {
414 oz_trace("Serial service resumed.\n"); 410 oz_trace("Serial service resumed.\n");
415 return 0; 411 return 0;
@@ -445,7 +441,6 @@ int oz_cdev_start(struct oz_pd *pd, int resume)
445void oz_cdev_stop(struct oz_pd *pd, int pause) 441void oz_cdev_stop(struct oz_pd *pd, int pause)
446{ 442{
447 struct oz_serial_ctx *ctx; 443 struct oz_serial_ctx *ctx;
448 oz_event_log(OZ_EVT_SERVICE, 4, OZ_APPID_SERIAL, NULL, pause);
449 if (pause) { 444 if (pause) {
450 oz_trace("Serial service paused.\n"); 445 oz_trace("Serial service paused.\n");
451 return; 446 return;
diff --git a/drivers/staging/ozwpan/ozconfig.h b/drivers/staging/ozwpan/ozconfig.h
index 43e6373a009c..087c322d2de0 100644
--- a/drivers/staging/ozwpan/ozconfig.h
+++ b/drivers/staging/ozwpan/ozconfig.h
@@ -12,7 +12,6 @@
12/* #define WANT_URB_PARANOIA */ 12/* #define WANT_URB_PARANOIA */
13 13
14/* #define WANT_PRE_2_6_39 */ 14/* #define WANT_PRE_2_6_39 */
15#define WANT_EVENT_TRACE
16 15
17/* These defines determine what verbose trace is displayed. */ 16/* These defines determine what verbose trace is displayed. */
18#ifdef WANT_VERBOSE_TRACE 17#ifdef WANT_VERBOSE_TRACE
diff --git a/drivers/staging/ozwpan/ozevent.c b/drivers/staging/ozwpan/ozevent.c
deleted file mode 100644
index 77e86753610d..000000000000
--- a/drivers/staging/ozwpan/ozevent.c
+++ /dev/null
@@ -1,195 +0,0 @@
1/* -----------------------------------------------------------------------------
2 * Copyright (c) 2011 Ozmo Inc
3 * Released under the GNU General Public License Version 2 (GPLv2).
4 * -----------------------------------------------------------------------------
5 */
6#include "ozconfig.h"
7#ifdef WANT_EVENT_TRACE
8#include <linux/module.h>
9#include <linux/debugfs.h>
10#include <linux/jiffies.h>
11#include <linux/uaccess.h>
12#include "oztrace.h"
13#include "ozevent.h"
14#include "ozappif.h"
15/*------------------------------------------------------------------------------
16 * Although the event mask is logically part of the oz_evtdev structure, it is
17 * needed outside of this file so define it separately to avoid the need to
18 * export definition of struct oz_evtdev.
19 */
20u32 g_evt_mask;
21/*------------------------------------------------------------------------------
22 */
23#define OZ_MAX_EVTS 2048 /* Must be power of 2 */
24struct oz_evtdev {
25 struct dentry *root_dir;
26 int evt_in;
27 int evt_out;
28 int missed_events;
29 int present;
30 atomic_t users;
31 spinlock_t lock;
32 struct oz_event evts[OZ_MAX_EVTS];
33};
34
35static struct oz_evtdev g_evtdev;
36
37/*------------------------------------------------------------------------------
38 * Context: process
39 */
40void oz_event_init(void)
41{
42 /* Because g_evtdev is static external all fields initially zero so no
43 * need to reinitialized those.
44 */
45 oz_trace("Event tracing initialized\n");
46 spin_lock_init(&g_evtdev.lock);
47 atomic_set(&g_evtdev.users, 0);
48}
49/*------------------------------------------------------------------------------
50 * Context: process
51 */
52void oz_event_term(void)
53{
54 oz_trace("Event tracing terminated\n");
55}
56/*------------------------------------------------------------------------------
57 * Context: any
58 */
59void oz_event_log2(u8 evt, u8 ctx1, u16 ctx2, void *ctx3, unsigned ctx4)
60{
61 unsigned long irqstate;
62 int ix;
63 spin_lock_irqsave(&g_evtdev.lock, irqstate);
64 ix = (g_evtdev.evt_in + 1) & (OZ_MAX_EVTS - 1);
65 if (ix != g_evtdev.evt_out) {
66 struct oz_event *e = &g_evtdev.evts[g_evtdev.evt_in];
67 e->jiffies = jiffies;
68 e->evt = evt;
69 e->ctx1 = ctx1;
70 e->ctx2 = ctx2;
71 e->ctx3 = (__u32)(unsigned long)ctx3;
72 e->ctx4 = ctx4;
73 g_evtdev.evt_in = ix;
74 } else {
75 g_evtdev.missed_events++;
76 }
77 spin_unlock_irqrestore(&g_evtdev.lock, irqstate);
78}
79/*------------------------------------------------------------------------------
80 * Context: process
81 */
82#ifdef CONFIG_DEBUG_FS
83static void oz_events_clear(struct oz_evtdev *dev)
84{
85 unsigned long irqstate;
86 oz_trace("Clearing events\n");
87 spin_lock_irqsave(&dev->lock, irqstate);
88 dev->evt_in = dev->evt_out = 0;
89 dev->missed_events = 0;
90 spin_unlock_irqrestore(&dev->lock, irqstate);
91}
92/*------------------------------------------------------------------------------
93 * Context: process
94 */
95static int oz_events_open(struct inode *inode, struct file *filp)
96{
97 oz_trace("oz_evt_open()\n");
98 oz_trace("Open flags: 0x%x\n", filp->f_flags);
99 if (atomic_add_return(1, &g_evtdev.users) == 1) {
100 oz_events_clear(&g_evtdev);
101 return nonseekable_open(inode, filp);
102 } else {
103 atomic_dec(&g_evtdev.users);
104 return -EBUSY;
105 }
106}
107/*------------------------------------------------------------------------------
108 * Context: process
109 */
110static int oz_events_release(struct inode *inode, struct file *filp)
111{
112 oz_events_clear(&g_evtdev);
113 atomic_dec(&g_evtdev.users);
114 g_evt_mask = 0;
115 oz_trace("oz_evt_release()\n");
116 return 0;
117}
118/*------------------------------------------------------------------------------
119 * Context: process
120 */
121static ssize_t oz_events_read(struct file *filp, char __user *buf, size_t count,
122 loff_t *fpos)
123{
124 struct oz_evtdev *dev = &g_evtdev;
125 int rc = 0;
126 int nb_evts = count / sizeof(struct oz_event);
127 int n;
128 int sz;
129
130 n = dev->evt_in - dev->evt_out;
131 if (n < 0)
132 n += OZ_MAX_EVTS;
133 if (nb_evts > n)
134 nb_evts = n;
135 if (nb_evts == 0)
136 goto out;
137 n = OZ_MAX_EVTS - dev->evt_out;
138 if (n > nb_evts)
139 n = nb_evts;
140 sz = n * sizeof(struct oz_event);
141 if (copy_to_user(buf, &dev->evts[dev->evt_out], sz)) {
142 rc = -EFAULT;
143 goto out;
144 }
145 if (n == nb_evts)
146 goto out2;
147 n = nb_evts - n;
148 if (copy_to_user(buf + sz, dev->evts, n * sizeof(struct oz_event))) {
149 rc = -EFAULT;
150 goto out;
151 }
152out2:
153 dev->evt_out = (dev->evt_out + nb_evts) & (OZ_MAX_EVTS - 1);
154 rc = nb_evts * sizeof(struct oz_event);
155out:
156 return rc;
157}
158/*------------------------------------------------------------------------------
159 */
160static const struct file_operations oz_events_fops = {
161 .owner = THIS_MODULE,
162 .open = oz_events_open,
163 .release = oz_events_release,
164 .read = oz_events_read,
165};
166/*------------------------------------------------------------------------------
167 * Context: process
168 */
169void oz_debugfs_init(void)
170{
171 struct dentry *parent;
172
173 parent = debugfs_create_dir("ozwpan", NULL);
174 if (parent == NULL) {
175 oz_trace("Failed to create debugfs directory ozmo\n");
176 return;
177 } else {
178 g_evtdev.root_dir = parent;
179 if (debugfs_create_file("events", S_IRUSR, parent, NULL,
180 &oz_events_fops) == NULL)
181 oz_trace("Failed to create file ozmo/events\n");
182 if (debugfs_create_x32("event_mask", S_IRUSR | S_IWUSR, parent,
183 &g_evt_mask) == NULL)
184 oz_trace("Failed to create file ozmo/event_mask\n");
185 }
186}
187/*------------------------------------------------------------------------------
188 * Context: process
189 */
190void oz_debugfs_remove(void)
191{
192 debugfs_remove_recursive(g_evtdev.root_dir);
193}
194#endif /* CONFIG_DEBUG_FS */
195#endif /* WANT_EVENT_TRACE */
diff --git a/drivers/staging/ozwpan/ozevent.h b/drivers/staging/ozwpan/ozevent.h
deleted file mode 100644
index 32f6f9859c41..000000000000
--- a/drivers/staging/ozwpan/ozevent.h
+++ /dev/null
@@ -1,32 +0,0 @@
1/* -----------------------------------------------------------------------------
2 * Copyright (c) 2011 Ozmo Inc
3 * Released under the GNU General Public License Version 2 (GPLv2).
4 * -----------------------------------------------------------------------------
5 */
6#ifndef _OZEVENT_H
7#define _OZEVENT_H
8#include "ozconfig.h"
9#include "ozeventdef.h"
10
11#ifdef WANT_EVENT_TRACE
12extern u32 g_evt_mask;
13void oz_event_init(void);
14void oz_event_term(void);
15void oz_event_log2(u8 evt, u8 ctx1, u16 ctx2, void *ctx3, unsigned ctx4);
16void oz_debugfs_init(void);
17void oz_debugfs_remove(void);
18#define oz_event_log(__evt, __ctx1, __ctx2, __ctx3, __ctx4) \
19 do { \
20 if ((1<<(__evt)) & g_evt_mask) \
21 oz_event_log2(__evt, __ctx1, __ctx2, __ctx3, __ctx4); \
22 } while (0)
23
24#else
25#define oz_event_init()
26#define oz_event_term()
27#define oz_event_log(__evt, __ctx1, __ctx2, __ctx3, __ctx4)
28#define oz_debugfs_init()
29#define oz_debugfs_remove()
30#endif /* WANT_EVENT_TRACE */
31
32#endif /* _OZEVENT_H */
diff --git a/drivers/staging/ozwpan/ozeventdef.h b/drivers/staging/ozwpan/ozeventdef.h
deleted file mode 100644
index 4b938981671a..000000000000
--- a/drivers/staging/ozwpan/ozeventdef.h
+++ /dev/null
@@ -1,40 +0,0 @@
1/* -----------------------------------------------------------------------------
2 * Copyright (c) 2011 Ozmo Inc
3 * Released under the GNU General Public License Version 2 (GPLv2).
4 * -----------------------------------------------------------------------------
5 */
6#ifndef _OZEVENTDEF_H
7#define _OZEVENTDEF_H
8
9#define OZ_EVT_RX_FRAME 0
10#define OZ_EVT_RX_PROCESS 1
11#define OZ_EVT_TX_FRAME 2
12#define OZ_EVT_TX_ISOC 3
13#define OZ_EVT_URB_SUBMIT 4
14#define OZ_EVT_URB_DONE 5
15#define OZ_EVT_URB_CANCEL 6
16#define OZ_EVT_CTRL_REQ 7
17#define OZ_EVT_CTRL_CNF 8
18#define OZ_EVT_CTRL_LOCAL 9
19#define OZ_EVT_CONNECT_REQ 10
20#define OZ_EVT_CONNECT_RSP 11
21#define OZ_EVT_EP_CREDIT 12
22#define OZ_EVT_EP_BUFFERING 13
23#define OZ_EVT_TX_ISOC_DONE 14
24#define OZ_EVT_TX_ISOC_DROP 15
25#define OZ_EVT_TIMER_CTRL 16
26#define OZ_EVT_TIMER 17
27#define OZ_EVT_PD_STATE 18
28#define OZ_EVT_SERVICE 19
29#define OZ_EVT_DEBUG 20
30
31struct oz_event {
32 __u32 jiffies;
33 __u8 evt;
34 __u8 ctx1;
35 __u16 ctx2;
36 __u32 ctx3;
37 __u32 ctx4;
38};
39
40#endif /* _OZEVENTDEF_H */
diff --git a/drivers/staging/ozwpan/ozhcd.c b/drivers/staging/ozwpan/ozhcd.c
index 5487a3a8d577..d68d63a2e683 100644
--- a/drivers/staging/ozwpan/ozhcd.c
+++ b/drivers/staging/ozwpan/ozhcd.c
@@ -35,7 +35,6 @@
35#include "ozusbif.h" 35#include "ozusbif.h"
36#include "oztrace.h" 36#include "oztrace.h"
37#include "ozurbparanoia.h" 37#include "ozurbparanoia.h"
38#include "ozevent.h"
39#include "ozhcd.h" 38#include "ozhcd.h"
40/*------------------------------------------------------------------------------ 39/*------------------------------------------------------------------------------
41 * Number of units of buffering to capture for an isochronous IN endpoint before 40 * Number of units of buffering to capture for an isochronous IN endpoint before
@@ -381,7 +380,6 @@ static void oz_complete_urb(struct usb_hcd *hcd, struct urb *urb,
381 jiffies, urb, status, jiffies-submit_jiffies, 380 jiffies, urb, status, jiffies-submit_jiffies,
382 jiffies-last_time, atomic_read(&g_pending_urbs)); 381 jiffies-last_time, atomic_read(&g_pending_urbs));
383 last_time = jiffies; 382 last_time = jiffies;
384 oz_event_log(OZ_EVT_URB_DONE, 0, 0, urb, status);
385 usb_hcd_giveback_urb(hcd, urb, status); 383 usb_hcd_giveback_urb(hcd, urb, status);
386 } 384 }
387 spin_lock(&g_tasklet_lock); 385 spin_lock(&g_tasklet_lock);
@@ -508,8 +506,6 @@ static int oz_enqueue_ep_urb(struct oz_port *port, u8 ep_addr, int in_dir,
508 if (!in_dir && ep_addr && (ep->credit < 0)) { 506 if (!in_dir && ep_addr && (ep->credit < 0)) {
509 ep->last_jiffies = jiffies; 507 ep->last_jiffies = jiffies;
510 ep->credit = 0; 508 ep->credit = 0;
511 oz_event_log(OZ_EVT_EP_CREDIT, ep->ep_num,
512 0, NULL, ep->credit);
513 } 509 }
514 } else { 510 } else {
515 err = -EPIPE; 511 err = -EPIPE;
@@ -766,7 +762,6 @@ void oz_hcd_get_desc_cnf(void *hport, u8 req_id, int status, const u8 *desc,
766 struct urb *urb; 762 struct urb *urb;
767 int err = 0; 763 int err = 0;
768 764
769 oz_event_log(OZ_EVT_CTRL_CNF, 0, req_id, NULL, status);
770 oz_trace("oz_hcd_get_desc_cnf length = %d offs = %d tot_size = %d\n", 765 oz_trace("oz_hcd_get_desc_cnf length = %d offs = %d tot_size = %d\n",
771 length, offset, total_size); 766 length, offset, total_size);
772 urb = oz_find_urb_by_id(port, 0, req_id); 767 urb = oz_find_urb_by_id(port, 0, req_id);
@@ -905,7 +900,6 @@ void oz_hcd_control_cnf(void *hport, u8 req_id, u8 rcode, const u8 *data,
905 unsigned windex; 900 unsigned windex;
906 unsigned wvalue; 901 unsigned wvalue;
907 902
908 oz_event_log(OZ_EVT_CTRL_CNF, 0, req_id, NULL, rcode);
909 oz_trace("oz_hcd_control_cnf rcode=%u len=%d\n", rcode, data_len); 903 oz_trace("oz_hcd_control_cnf rcode=%u len=%d\n", rcode, data_len);
910 urb = oz_find_urb_by_id(port, 0, req_id); 904 urb = oz_find_urb_by_id(port, 0, req_id);
911 if (!urb) { 905 if (!urb) {
@@ -1059,8 +1053,6 @@ int oz_hcd_heartbeat(void *hport)
1059 ep->credit += jiffies_to_msecs(now - ep->last_jiffies); 1053 ep->credit += jiffies_to_msecs(now - ep->last_jiffies);
1060 if (ep->credit > ep->credit_ceiling) 1054 if (ep->credit > ep->credit_ceiling)
1061 ep->credit = ep->credit_ceiling; 1055 ep->credit = ep->credit_ceiling;
1062 oz_event_log(OZ_EVT_EP_CREDIT, ep->ep_num, 0, NULL,
1063 ep->credit);
1064 ep->last_jiffies = now; 1056 ep->last_jiffies = now;
1065 while (ep->credit && !list_empty(&ep->urb_list)) { 1057 while (ep->credit && !list_empty(&ep->urb_list)) {
1066 urbl = list_first_entry(&ep->urb_list, 1058 urbl = list_first_entry(&ep->urb_list,
@@ -1069,8 +1061,6 @@ int oz_hcd_heartbeat(void *hport)
1069 if ((ep->credit + 1) < urb->number_of_packets) 1061 if ((ep->credit + 1) < urb->number_of_packets)
1070 break; 1062 break;
1071 ep->credit -= urb->number_of_packets; 1063 ep->credit -= urb->number_of_packets;
1072 oz_event_log(OZ_EVT_EP_CREDIT, ep->ep_num, 0, NULL,
1073 ep->credit);
1074 list_move_tail(&urbl->link, &xfr_list); 1064 list_move_tail(&urbl->link, &xfr_list);
1075 } 1065 }
1076 } 1066 }
@@ -1098,19 +1088,12 @@ int oz_hcd_heartbeat(void *hport)
1098 if (ep->buffered_units >= OZ_IN_BUFFERING_UNITS) { 1088 if (ep->buffered_units >= OZ_IN_BUFFERING_UNITS) {
1099 ep->flags &= ~OZ_F_EP_BUFFERING; 1089 ep->flags &= ~OZ_F_EP_BUFFERING;
1100 ep->credit = 0; 1090 ep->credit = 0;
1101 oz_event_log(OZ_EVT_EP_CREDIT,
1102 ep->ep_num | USB_DIR_IN,
1103 0, NULL, ep->credit);
1104 ep->last_jiffies = now; 1091 ep->last_jiffies = now;
1105 ep->start_frame = 0; 1092 ep->start_frame = 0;
1106 oz_event_log(OZ_EVT_EP_BUFFERING,
1107 ep->ep_num | USB_DIR_IN, 0, NULL, 0);
1108 } 1093 }
1109 continue; 1094 continue;
1110 } 1095 }
1111 ep->credit += jiffies_to_msecs(now - ep->last_jiffies); 1096 ep->credit += jiffies_to_msecs(now - ep->last_jiffies);
1112 oz_event_log(OZ_EVT_EP_CREDIT, ep->ep_num | USB_DIR_IN,
1113 0, NULL, ep->credit);
1114 ep->last_jiffies = now; 1097 ep->last_jiffies = now;
1115 while (!list_empty(&ep->urb_list)) { 1098 while (!list_empty(&ep->urb_list)) {
1116 struct oz_urb_link *urbl = 1099 struct oz_urb_link *urbl =
@@ -1154,8 +1137,6 @@ int oz_hcd_heartbeat(void *hport)
1154 ep->start_frame += urb->number_of_packets; 1137 ep->start_frame += urb->number_of_packets;
1155 list_move_tail(&urbl->link, &xfr_list); 1138 list_move_tail(&urbl->link, &xfr_list);
1156 ep->credit -= urb->number_of_packets; 1139 ep->credit -= urb->number_of_packets;
1157 oz_event_log(OZ_EVT_EP_CREDIT, ep->ep_num | USB_DIR_IN,
1158 0, NULL, ep->credit);
1159 } 1140 }
1160 } 1141 }
1161 if (!list_empty(&port->isoc_out_ep) || !list_empty(&port->isoc_in_ep)) 1142 if (!list_empty(&port->isoc_out_ep) || !list_empty(&port->isoc_in_ep))
@@ -1247,8 +1228,6 @@ static int oz_build_endpoints_for_interface(struct usb_hcd *hcd,
1247 ep->credit_ceiling = 200; 1228 ep->credit_ceiling = 200;
1248 if (ep_addr & USB_ENDPOINT_DIR_MASK) { 1229 if (ep_addr & USB_ENDPOINT_DIR_MASK) {
1249 ep->flags |= OZ_F_EP_BUFFERING; 1230 ep->flags |= OZ_F_EP_BUFFERING;
1250 oz_event_log(OZ_EVT_EP_BUFFERING,
1251 ep->ep_num | USB_DIR_IN, 1, NULL, 0);
1252 } else { 1231 } else {
1253 ep->flags |= OZ_F_EP_HAVE_STREAM; 1232 ep->flags |= OZ_F_EP_HAVE_STREAM;
1254 if (oz_usb_stream_create(port->hpd, ep_num)) 1233 if (oz_usb_stream_create(port->hpd, ep_num))
@@ -1455,8 +1434,6 @@ static void oz_process_ep0_urb(struct oz_hcd *ozhcd, struct urb *urb,
1455 oz_trace("USB_REQ_GET_DESCRIPTOR - req\n"); 1434 oz_trace("USB_REQ_GET_DESCRIPTOR - req\n");
1456 break; 1435 break;
1457 case USB_REQ_SET_ADDRESS: 1436 case USB_REQ_SET_ADDRESS:
1458 oz_event_log(OZ_EVT_CTRL_LOCAL, setup->bRequest,
1459 0, NULL, setup->bRequestType);
1460 oz_trace("USB_REQ_SET_ADDRESS - req\n"); 1437 oz_trace("USB_REQ_SET_ADDRESS - req\n");
1461 oz_trace("Port %d address is 0x%x\n", ozhcd->conn_port, 1438 oz_trace("Port %d address is 0x%x\n", ozhcd->conn_port,
1462 (u8)le16_to_cpu(setup->wValue)); 1439 (u8)le16_to_cpu(setup->wValue));
@@ -1477,8 +1454,6 @@ static void oz_process_ep0_urb(struct oz_hcd *ozhcd, struct urb *urb,
1477 /* We short circuit this case and reply directly since 1454 /* We short circuit this case and reply directly since
1478 * we have the selected configuration number cached. 1455 * we have the selected configuration number cached.
1479 */ 1456 */
1480 oz_event_log(OZ_EVT_CTRL_LOCAL, setup->bRequest, 0,
1481 NULL, setup->bRequestType);
1482 oz_trace("USB_REQ_GET_CONFIGURATION - reply now\n"); 1457 oz_trace("USB_REQ_GET_CONFIGURATION - reply now\n");
1483 if (urb->transfer_buffer_length >= 1) { 1458 if (urb->transfer_buffer_length >= 1) {
1484 urb->actual_length = 1; 1459 urb->actual_length = 1;
@@ -1493,8 +1468,6 @@ static void oz_process_ep0_urb(struct oz_hcd *ozhcd, struct urb *urb,
1493 /* We short circuit this case and reply directly since 1468 /* We short circuit this case and reply directly since
1494 * we have the selected interface alternative cached. 1469 * we have the selected interface alternative cached.
1495 */ 1470 */
1496 oz_event_log(OZ_EVT_CTRL_LOCAL, setup->bRequest, 0,
1497 NULL, setup->bRequestType);
1498 oz_trace("USB_REQ_GET_INTERFACE - reply now\n"); 1471 oz_trace("USB_REQ_GET_INTERFACE - reply now\n");
1499 if (urb->transfer_buffer_length >= 1) { 1472 if (urb->transfer_buffer_length >= 1) {
1500 urb->actual_length = 1; 1473 urb->actual_length = 1;
@@ -1744,20 +1717,6 @@ static void oz_hcd_shutdown(struct usb_hcd *hcd)
1744 oz_trace("oz_hcd_shutdown()\n"); 1717 oz_trace("oz_hcd_shutdown()\n");
1745} 1718}
1746/*------------------------------------------------------------------------------ 1719/*------------------------------------------------------------------------------
1747 * Context: any
1748 */
1749#ifdef WANT_EVENT_TRACE
1750static u8 oz_get_irq_ctx(void)
1751{
1752 u8 irq_info = 0;
1753 if (in_interrupt())
1754 irq_info |= 1;
1755 if (in_irq())
1756 irq_info |= 2;
1757 return irq_info;
1758}
1759#endif /* WANT_EVENT_TRACE */
1760/*------------------------------------------------------------------------------
1761 * Called to queue an urb for the device. 1720 * Called to queue an urb for the device.
1762 * This function should return a non-zero error code if it fails the urb but 1721 * This function should return a non-zero error code if it fails the urb but
1763 * should not call usb_hcd_giveback_urb(). 1722 * should not call usb_hcd_giveback_urb().
@@ -1774,8 +1733,6 @@ static int oz_hcd_urb_enqueue(struct usb_hcd *hcd, struct urb *urb,
1774 struct oz_urb_link *urbl; 1733 struct oz_urb_link *urbl;
1775 oz_trace2(OZ_TRACE_URB, "%lu: oz_hcd_urb_enqueue(%p)\n", 1734 oz_trace2(OZ_TRACE_URB, "%lu: oz_hcd_urb_enqueue(%p)\n",
1776 jiffies, urb); 1735 jiffies, urb);
1777 oz_event_log(OZ_EVT_URB_SUBMIT, oz_get_irq_ctx(),
1778 (u16)urb->number_of_packets, urb, urb->pipe);
1779 if (unlikely(ozhcd == NULL)) { 1736 if (unlikely(ozhcd == NULL)) {
1780 oz_trace2(OZ_TRACE_URB, "%lu: Refused urb(%p) not ozhcd.\n", 1737 oz_trace2(OZ_TRACE_URB, "%lu: Refused urb(%p) not ozhcd.\n",
1781 jiffies, urb); 1738 jiffies, urb);
@@ -1835,10 +1792,6 @@ static struct oz_urb_link *oz_remove_urb(struct oz_endpoint *ep,
1835 ep->credit -= urb->number_of_packets; 1792 ep->credit -= urb->number_of_packets;
1836 if (ep->credit < 0) 1793 if (ep->credit < 0)
1837 ep->credit = 0; 1794 ep->credit = 0;
1838 oz_event_log(OZ_EVT_EP_CREDIT,
1839 usb_pipein(urb->pipe) ?
1840 (ep->ep_num | USB_DIR_IN) : ep->ep_num,
1841 0, NULL, ep->credit);
1842 } 1795 }
1843 return urbl; 1796 return urbl;
1844 } 1797 }
diff --git a/drivers/staging/ozwpan/ozmain.c b/drivers/staging/ozwpan/ozmain.c
index 57a0cbd58551..51fe9e98c351 100644
--- a/drivers/staging/ozwpan/ozmain.c
+++ b/drivers/staging/ozwpan/ozmain.c
@@ -15,7 +15,6 @@
15#include "ozproto.h" 15#include "ozproto.h"
16#include "ozcdev.h" 16#include "ozcdev.h"
17#include "oztrace.h" 17#include "oztrace.h"
18#include "ozevent.h"
19/*------------------------------------------------------------------------------ 18/*------------------------------------------------------------------------------
20 * The name of the 802.11 mac device. Empty string is the default value but a 19 * The name of the 802.11 mac device. Empty string is the default value but a
21 * value can be supplied as a parameter to the module. An empty string means 20 * value can be supplied as a parameter to the module. An empty string means
@@ -28,14 +27,10 @@ static char *g_net_dev = "";
28 */ 27 */
29static int __init ozwpan_init(void) 28static int __init ozwpan_init(void)
30{ 29{
31 oz_event_init();
32 oz_cdev_register(); 30 oz_cdev_register();
33 oz_protocol_init(g_net_dev); 31 oz_protocol_init(g_net_dev);
34 oz_app_enable(OZ_APPID_USB, 1); 32 oz_app_enable(OZ_APPID_USB, 1);
35 oz_apps_init(); 33 oz_apps_init();
36#ifdef CONFIG_DEBUG_FS
37 oz_debugfs_init();
38#endif
39 return 0; 34 return 0;
40} 35}
41/*------------------------------------------------------------------------------ 36/*------------------------------------------------------------------------------
@@ -46,10 +41,6 @@ static void __exit ozwpan_exit(void)
46 oz_protocol_term(); 41 oz_protocol_term();
47 oz_apps_term(); 42 oz_apps_term();
48 oz_cdev_deregister(); 43 oz_cdev_deregister();
49 oz_event_term();
50#ifdef CONFIG_DEBUG_FS
51 oz_debugfs_remove();
52#endif
53} 44}
54/*------------------------------------------------------------------------------ 45/*------------------------------------------------------------------------------
55 */ 46 */
diff --git a/drivers/staging/ozwpan/ozpd.c b/drivers/staging/ozwpan/ozpd.c
index f8b9da080c4b..d67dff2430ad 100644
--- a/drivers/staging/ozwpan/ozpd.c
+++ b/drivers/staging/ozwpan/ozpd.c
@@ -15,7 +15,6 @@
15#include "ozpd.h" 15#include "ozpd.h"
16#include "ozproto.h" 16#include "ozproto.h"
17#include "oztrace.h" 17#include "oztrace.h"
18#include "ozevent.h"
19#include "ozcdev.h" 18#include "ozcdev.h"
20#include "ozusbsvc.h" 19#include "ozusbsvc.h"
21#include <asm/unaligned.h> 20#include <asm/unaligned.h>
@@ -121,7 +120,6 @@ static void oz_def_app_rx(struct oz_pd *pd, struct oz_elt *elt)
121void oz_pd_set_state(struct oz_pd *pd, unsigned state) 120void oz_pd_set_state(struct oz_pd *pd, unsigned state)
122{ 121{
123 pd->state = state; 122 pd->state = state;
124 oz_event_log(OZ_EVT_PD_STATE, 0, 0, NULL, state);
125#ifdef WANT_TRACE 123#ifdef WANT_TRACE
126 switch (state) { 124 switch (state) {
127 case OZ_PD_S_IDLE: 125 case OZ_PD_S_IDLE:
@@ -544,7 +542,6 @@ static int oz_send_next_queued_frame(struct oz_pd *pd, int more_data)
544 if (dev_queue_xmit(skb) < 0) { 542 if (dev_queue_xmit(skb) < 0) {
545 oz_trace2(OZ_TRACE_TX_FRAMES, 543 oz_trace2(OZ_TRACE_TX_FRAMES,
546 "Dropping ISOC Frame\n"); 544 "Dropping ISOC Frame\n");
547 oz_event_log(OZ_EVT_TX_ISOC_DROP, 0, 0, NULL, 0);
548 return -1; 545 return -1;
549 } 546 }
550 atomic_inc(&g_submitted_isoc); 547 atomic_inc(&g_submitted_isoc);
@@ -555,7 +552,6 @@ static int oz_send_next_queued_frame(struct oz_pd *pd, int more_data)
555 } else { 552 } else {
556 kfree_skb(skb); 553 kfree_skb(skb);
557 oz_trace2(OZ_TRACE_TX_FRAMES, "Dropping ISOC Frame>\n"); 554 oz_trace2(OZ_TRACE_TX_FRAMES, "Dropping ISOC Frame>\n");
558 oz_event_log(OZ_EVT_TX_ISOC_DROP, 0, 0, NULL, 0);
559 return -1; 555 return -1;
560 } 556 }
561 } 557 }
@@ -567,10 +563,6 @@ static int oz_send_next_queued_frame(struct oz_pd *pd, int more_data)
567 oz_set_more_bit(skb); 563 oz_set_more_bit(skb);
568 oz_trace2(OZ_TRACE_TX_FRAMES, "TX frame PN=0x%x\n", f->hdr.pkt_num); 564 oz_trace2(OZ_TRACE_TX_FRAMES, "TX frame PN=0x%x\n", f->hdr.pkt_num);
569 if (skb) { 565 if (skb) {
570 oz_event_log(OZ_EVT_TX_FRAME,
571 0,
572 (((u16)f->hdr.control)<<8)|f->hdr.last_pkt_num,
573 NULL, f->hdr.pkt_num);
574 if (dev_queue_xmit(skb) < 0) 566 if (dev_queue_xmit(skb) < 0)
575 return -1; 567 return -1;
576 568
@@ -659,7 +651,6 @@ static int oz_send_isoc_frame(struct oz_pd *pd)
659 memcpy(elt, ei->data, ei->length); 651 memcpy(elt, ei->data, ei->length);
660 elt = oz_next_elt(elt); 652 elt = oz_next_elt(elt);
661 } 653 }
662 oz_event_log(OZ_EVT_TX_ISOC, 0, 0, NULL, 0);
663 dev_queue_xmit(skb); 654 dev_queue_xmit(skb);
664 oz_elt_info_free_chain(&pd->elt_buff, &list); 655 oz_elt_info_free_chain(&pd->elt_buff, &list);
665 return 0; 656 return 0;
@@ -768,8 +759,6 @@ int oz_isoc_stream_delete(struct oz_pd *pd, u8 ep_num)
768static void oz_isoc_destructor(struct sk_buff *skb) 759static void oz_isoc_destructor(struct sk_buff *skb)
769{ 760{
770 atomic_dec(&g_submitted_isoc); 761 atomic_dec(&g_submitted_isoc);
771 oz_event_log(OZ_EVT_TX_ISOC_DONE, atomic_read(&g_submitted_isoc),
772 0, skb, 0);
773} 762}
774/*------------------------------------------------------------------------------ 763/*------------------------------------------------------------------------------
775 * Context: softirq 764 * Context: softirq
@@ -863,25 +852,19 @@ int oz_send_isoc_unit(struct oz_pd *pd, u8 ep_num, const u8 *data, int len)
863 oz_trace2(OZ_TRACE_TX_FRAMES, 852 oz_trace2(OZ_TRACE_TX_FRAMES,
864 "Added ISOC Frame to Tx Queue isoc_nb= %d, nb= %d\n", 853 "Added ISOC Frame to Tx Queue isoc_nb= %d, nb= %d\n",
865 pd->nb_queued_isoc_frames, pd->nb_queued_frames); 854 pd->nb_queued_isoc_frames, pd->nb_queued_frames);
866 oz_event_log(OZ_EVT_TX_ISOC, nb_units, iso.frame_number,
867 skb, atomic_read(&g_submitted_isoc));
868 return 0; 855 return 0;
869 } 856 }
870 857
871 /*In ANYTIME mode Xmit unit immediately*/ 858 /*In ANYTIME mode Xmit unit immediately*/
872 if (atomic_read(&g_submitted_isoc) < OZ_MAX_SUBMITTED_ISOC) { 859 if (atomic_read(&g_submitted_isoc) < OZ_MAX_SUBMITTED_ISOC) {
873 atomic_inc(&g_submitted_isoc); 860 atomic_inc(&g_submitted_isoc);
874 oz_event_log(OZ_EVT_TX_ISOC, nb_units, iso.frame_number, 861 if (dev_queue_xmit(skb) < 0)
875 skb, atomic_read(&g_submitted_isoc));
876 if (dev_queue_xmit(skb) < 0) {
877 oz_event_log(OZ_EVT_TX_ISOC_DROP, 0, 0, NULL, 0);
878 return -1; 862 return -1;
879 } else 863 else
880 return 0; 864 return 0;
881 } 865 }
882 866
883out: oz_event_log(OZ_EVT_TX_ISOC_DROP, 0, 0, NULL, 0); 867out: kfree_skb(skb);
884 kfree_skb(skb);
885 return -1; 868 return -1;
886 869
887 } 870 }
diff --git a/drivers/staging/ozwpan/ozproto.c b/drivers/staging/ozwpan/ozproto.c
index 3badf1537adb..79ac7b51d5b2 100644
--- a/drivers/staging/ozwpan/ozproto.c
+++ b/drivers/staging/ozwpan/ozproto.c
@@ -18,7 +18,6 @@
18#include "ozusbsvc.h" 18#include "ozusbsvc.h"
19#include "oztrace.h" 19#include "oztrace.h"
20#include "ozappif.h" 20#include "ozappif.h"
21#include "ozevent.h"
22#include <asm/unaligned.h> 21#include <asm/unaligned.h>
23#include <linux/uaccess.h> 22#include <linux/uaccess.h>
24#include <net/psnap.h> 23#include <net/psnap.h>
@@ -116,7 +115,6 @@ static void oz_send_conn_rsp(struct oz_pd *pd, u8 status)
116 oz_hdr->control = (OZ_PROTOCOL_VERSION<<OZ_VERSION_SHIFT); 115 oz_hdr->control = (OZ_PROTOCOL_VERSION<<OZ_VERSION_SHIFT);
117 oz_hdr->last_pkt_num = 0; 116 oz_hdr->last_pkt_num = 0;
118 put_unaligned(0, &oz_hdr->pkt_num); 117 put_unaligned(0, &oz_hdr->pkt_num);
119 oz_event_log(OZ_EVT_CONNECT_RSP, 0, 0, NULL, 0);
120 elt->type = OZ_ELT_CONNECT_RSP; 118 elt->type = OZ_ELT_CONNECT_RSP;
121 elt->length = sizeof(struct oz_elt_connect_rsp); 119 elt->length = sizeof(struct oz_elt_connect_rsp);
122 memset(body, 0, sizeof(struct oz_elt_connect_rsp)); 120 memset(body, 0, sizeof(struct oz_elt_connect_rsp));
@@ -345,9 +343,6 @@ static void oz_rx_frame(struct sk_buff *skb)
345 int dup = 0; 343 int dup = 0;
346 u32 pkt_num; 344 u32 pkt_num;
347 345
348 oz_event_log(OZ_EVT_RX_PROCESS, 0,
349 (((u16)oz_hdr->control)<<8)|oz_hdr->last_pkt_num,
350 NULL, oz_hdr->pkt_num);
351 oz_trace2(OZ_TRACE_RX_FRAMES, 346 oz_trace2(OZ_TRACE_RX_FRAMES,
352 "RX frame PN=0x%x LPN=0x%x control=0x%x\n", 347 "RX frame PN=0x%x LPN=0x%x control=0x%x\n",
353 oz_hdr->pkt_num, oz_hdr->last_pkt_num, oz_hdr->control); 348 oz_hdr->pkt_num, oz_hdr->last_pkt_num, oz_hdr->control);
@@ -402,7 +397,6 @@ static void oz_rx_frame(struct sk_buff *skb)
402 break; 397 break;
403 switch (elt->type) { 398 switch (elt->type) {
404 case OZ_ELT_CONNECT_REQ: 399 case OZ_ELT_CONNECT_REQ:
405 oz_event_log(OZ_EVT_CONNECT_REQ, 0, 0, NULL, 0);
406 oz_trace("RX: OZ_ELT_CONNECT_REQ\n"); 400 oz_trace("RX: OZ_ELT_CONNECT_REQ\n");
407 pd = oz_connect_req(pd, elt, src_addr, skb->dev); 401 pd = oz_connect_req(pd, elt, src_addr, skb->dev);
408 break; 402 break;
@@ -534,7 +528,6 @@ static void oz_protocol_timer(unsigned long arg)
534 /* This happens if we remove the current timer but can't stop 528 /* This happens if we remove the current timer but can't stop
535 * the timer from firing. In this case just get out. 529 * the timer from firing. In this case just get out.
536 */ 530 */
537 oz_event_log(OZ_EVT_TIMER, 0, 0, NULL, 0);
538 spin_unlock_bh(&g_polling_lock); 531 spin_unlock_bh(&g_polling_lock);
539 return; 532 return;
540 } 533 }
@@ -545,7 +538,6 @@ static void oz_protocol_timer(unsigned long arg)
545 spin_unlock_bh(&g_polling_lock); 538 spin_unlock_bh(&g_polling_lock);
546 do { 539 do {
547 pd = t->pd; 540 pd = t->pd;
548 oz_event_log(OZ_EVT_TIMER, 0, t->type, NULL, 0);
549 oz_pd_handle_timer(pd, t->type); 541 oz_pd_handle_timer(pd, t->type);
550 spin_lock_bh(&g_polling_lock); 542 spin_lock_bh(&g_polling_lock);
551 if (g_timer_pool_count < OZ_MAX_TIMER_POOL_SIZE) { 543 if (g_timer_pool_count < OZ_MAX_TIMER_POOL_SIZE) {
@@ -582,14 +574,8 @@ static void oz_protocol_timer_start(void)
582 g_cur_timer = 574 g_cur_timer =
583 container_of(g_timer_list.next, struct oz_timer, link); 575 container_of(g_timer_list.next, struct oz_timer, link);
584 if (g_timer_state == OZ_TIMER_SET) { 576 if (g_timer_state == OZ_TIMER_SET) {
585 oz_event_log(OZ_EVT_TIMER_CTRL, 3,
586 (u16)g_cur_timer->type, NULL,
587 (unsigned)g_cur_timer->due_time);
588 mod_timer(&g_timer, g_cur_timer->due_time); 577 mod_timer(&g_timer, g_cur_timer->due_time);
589 } else { 578 } else {
590 oz_event_log(OZ_EVT_TIMER_CTRL, 4,
591 (u16)g_cur_timer->type, NULL,
592 (unsigned)g_cur_timer->due_time);
593 g_timer.expires = g_cur_timer->due_time; 579 g_timer.expires = g_cur_timer->due_time;
594 g_timer.function = oz_protocol_timer; 580 g_timer.function = oz_protocol_timer;
595 g_timer.data = 0; 581 g_timer.data = 0;
@@ -610,7 +596,6 @@ void oz_timer_add(struct oz_pd *pd, int type, unsigned long due_time,
610 struct list_head *e; 596 struct list_head *e;
611 struct oz_timer *t = NULL; 597 struct oz_timer *t = NULL;
612 int restart_needed = 0; 598 int restart_needed = 0;
613 oz_event_log(OZ_EVT_TIMER_CTRL, 1, (u16)type, NULL, (unsigned)due_time);
614 spin_lock(&g_polling_lock); 599 spin_lock(&g_polling_lock);
615 if (remove) { 600 if (remove) {
616 list_for_each(e, &g_timer_list) { 601 list_for_each(e, &g_timer_list) {
@@ -673,7 +658,6 @@ void oz_timer_delete(struct oz_pd *pd, int type)
673 struct oz_timer *n; 658 struct oz_timer *n;
674 int restart_needed = 0; 659 int restart_needed = 0;
675 int release = 0; 660 int release = 0;
676 oz_event_log(OZ_EVT_TIMER_CTRL, 2, (u16)type, NULL, 0);
677 spin_lock(&g_polling_lock); 661 spin_lock(&g_polling_lock);
678 list_for_each_entry_safe(t, n, &g_timer_list, link) { 662 list_for_each_entry_safe(t, n, &g_timer_list, link) {
679 if ((t->pd == pd) && ((type == 0) || (t->type == type))) { 663 if ((t->pd == pd) && ((type == 0) || (t->type == type))) {
@@ -770,7 +754,6 @@ void oz_app_enable(int app_id, int enable)
770static int oz_pkt_recv(struct sk_buff *skb, struct net_device *dev, 754static int oz_pkt_recv(struct sk_buff *skb, struct net_device *dev,
771 struct packet_type *pt, struct net_device *orig_dev) 755 struct packet_type *pt, struct net_device *orig_dev)
772{ 756{
773 oz_event_log(OZ_EVT_RX_FRAME, 0, 0, NULL, 0);
774 skb = skb_share_check(skb, GFP_ATOMIC); 757 skb = skb_share_check(skb, GFP_ATOMIC);
775 if (skb == NULL) 758 if (skb == NULL)
776 return 0; 759 return 0;
diff --git a/drivers/staging/ozwpan/ozusbsvc.c b/drivers/staging/ozwpan/ozusbsvc.c
index 543a9415975c..167632878249 100644
--- a/drivers/staging/ozwpan/ozusbsvc.c
+++ b/drivers/staging/ozwpan/ozusbsvc.c
@@ -27,14 +27,12 @@
27#include "ozhcd.h" 27#include "ozhcd.h"
28#include "oztrace.h" 28#include "oztrace.h"
29#include "ozusbsvc.h" 29#include "ozusbsvc.h"
30#include "ozevent.h"
31/*------------------------------------------------------------------------------ 30/*------------------------------------------------------------------------------
32 * This is called once when the driver is loaded to initialise the USB service. 31 * This is called once when the driver is loaded to initialise the USB service.
33 * Context: process 32 * Context: process
34 */ 33 */
35int oz_usb_init(void) 34int oz_usb_init(void)
36{ 35{
37 oz_event_log(OZ_EVT_SERVICE, 1, OZ_APPID_USB, NULL, 0);
38 return oz_hcd_init(); 36 return oz_hcd_init();
39} 37}
40/*------------------------------------------------------------------------------ 38/*------------------------------------------------------------------------------
@@ -43,7 +41,6 @@ int oz_usb_init(void)
43 */ 41 */
44void oz_usb_term(void) 42void oz_usb_term(void)
45{ 43{
46 oz_event_log(OZ_EVT_SERVICE, 2, OZ_APPID_USB, NULL, 0);
47 oz_hcd_term(); 44 oz_hcd_term();
48} 45}
49/*------------------------------------------------------------------------------ 46/*------------------------------------------------------------------------------
@@ -55,7 +52,6 @@ int oz_usb_start(struct oz_pd *pd, int resume)
55 int rc = 0; 52 int rc = 0;
56 struct oz_usb_ctx *usb_ctx; 53 struct oz_usb_ctx *usb_ctx;
57 struct oz_usb_ctx *old_ctx; 54 struct oz_usb_ctx *old_ctx;
58 oz_event_log(OZ_EVT_SERVICE, 3, OZ_APPID_USB, NULL, resume);
59 if (resume) { 55 if (resume) {
60 oz_trace("USB service resumed.\n"); 56 oz_trace("USB service resumed.\n");
61 return 0; 57 return 0;
@@ -117,7 +113,6 @@ int oz_usb_start(struct oz_pd *pd, int resume)
117void oz_usb_stop(struct oz_pd *pd, int pause) 113void oz_usb_stop(struct oz_pd *pd, int pause)
118{ 114{
119 struct oz_usb_ctx *usb_ctx; 115 struct oz_usb_ctx *usb_ctx;
120 oz_event_log(OZ_EVT_SERVICE, 4, OZ_APPID_USB, NULL, pause);
121 if (pause) { 116 if (pause) {
122 oz_trace("USB service paused.\n"); 117 oz_trace("USB service paused.\n");
123 return; 118 return;
diff --git a/drivers/staging/ozwpan/ozusbsvc1.c b/drivers/staging/ozwpan/ozusbsvc1.c
index 4e4b650fee3f..16e607875c38 100644
--- a/drivers/staging/ozwpan/ozusbsvc1.c
+++ b/drivers/staging/ozwpan/ozusbsvc1.c
@@ -22,7 +22,6 @@
22#include "ozhcd.h" 22#include "ozhcd.h"
23#include "oztrace.h" 23#include "oztrace.h"
24#include "ozusbsvc.h" 24#include "ozusbsvc.h"
25#include "ozevent.h"
26/*------------------------------------------------------------------------------ 25/*------------------------------------------------------------------------------
27 */ 26 */
28#define MAX_ISOC_FIXED_DATA (253-sizeof(struct oz_isoc_fixed)) 27#define MAX_ISOC_FIXED_DATA (253-sizeof(struct oz_isoc_fixed))
@@ -190,10 +189,6 @@ int oz_usb_control_req(void *hpd, u8 req_id, struct usb_ctrlrequest *setup,
190 unsigned windex = le16_to_cpu(setup->wIndex); 189 unsigned windex = le16_to_cpu(setup->wIndex);
191 unsigned wlength = le16_to_cpu(setup->wLength); 190 unsigned wlength = le16_to_cpu(setup->wLength);
192 int rc = 0; 191 int rc = 0;
193 oz_event_log(OZ_EVT_CTRL_REQ, setup->bRequest, req_id,
194 (void *)(((unsigned long)(setup->wValue))<<16 |
195 ((unsigned long)setup->wIndex)),
196 setup->bRequestType);
197 if ((setup->bRequestType & USB_TYPE_MASK) == USB_TYPE_STANDARD) { 192 if ((setup->bRequestType & USB_TYPE_MASK) == USB_TYPE_STANDARD) {
198 switch (setup->bRequest) { 193 switch (setup->bRequest) {
199 case USB_REQ_GET_DESCRIPTOR: 194 case USB_REQ_GET_DESCRIPTOR: