Lines Matching refs:ep
108 struct mon_text_ptr *p, const struct mon_event_text *ep);
110 struct mon_text_ptr *p, const struct mon_event_text *ep);
112 struct mon_text_ptr *p, const struct mon_event_text *ep);
114 struct mon_text_ptr *p, const struct mon_event_text *ep);
116 struct mon_text_ptr *p, const struct mon_event_text *ep);
118 struct mon_text_ptr *p, const struct mon_event_text *ep);
120 struct mon_text_ptr *p, const struct mon_event_text *ep);
131 static inline char mon_text_get_setup(struct mon_event_text *ep, in mon_text_get_setup() argument
135 if (ep->xfertype != USB_ENDPOINT_XFER_CONTROL || ev_type != 'S') in mon_text_get_setup()
141 memcpy(ep->setup, urb->setup_packet, SETUP_MAX); in mon_text_get_setup()
145 static inline char mon_text_get_data(struct mon_event_text *ep, struct urb *urb, in mon_text_get_data() argument
155 if (ep->is_in) { in mon_text_get_data()
178 memcpy(ep->data, src, len); in mon_text_get_data()
196 struct mon_event_text *ep; in mon_text_event() local
205 (ep = kmem_cache_alloc(rp->e_slab, GFP_ATOMIC)) == NULL) { in mon_text_event()
210 ep->type = ev_type; in mon_text_event()
211 ep->id = (unsigned long) urb; in mon_text_event()
212 ep->busnum = urb->dev->bus->busnum; in mon_text_event()
213 ep->devnum = urb->dev->devnum; in mon_text_event()
214 ep->epnum = usb_endpoint_num(&urb->ep->desc); in mon_text_event()
215 ep->xfertype = usb_endpoint_type(&urb->ep->desc); in mon_text_event()
216 ep->is_in = usb_urb_dir_in(urb); in mon_text_event()
217 ep->tstamp = stamp; in mon_text_event()
218 ep->length = (ev_type == 'S') ? in mon_text_event()
221 ep->status = status; in mon_text_event()
223 if (ep->xfertype == USB_ENDPOINT_XFER_INT) { in mon_text_event()
224 ep->interval = urb->interval; in mon_text_event()
225 } else if (ep->xfertype == USB_ENDPOINT_XFER_ISOC) { in mon_text_event()
226 ep->interval = urb->interval; in mon_text_event()
227 ep->start_frame = urb->start_frame; in mon_text_event()
228 ep->error_count = urb->error_count; in mon_text_event()
230 ep->numdesc = urb->number_of_packets; in mon_text_event()
231 if (ep->xfertype == USB_ENDPOINT_XFER_ISOC && in mon_text_event()
236 dp = ep->isodesc; in mon_text_event()
247 ep->length = urb->transfer_buffer_length; in mon_text_event()
250 ep->setup_flag = mon_text_get_setup(ep, urb, ev_type, rp->r.m_bus); in mon_text_event()
251 ep->data_flag = mon_text_get_data(ep, urb, ep->length, ev_type, in mon_text_event()
255 list_add_tail(&ep->e_link, &rp->e_list); in mon_text_event()
274 struct mon_event_text *ep; in mon_text_error() local
277 (ep = kmem_cache_alloc(rp->e_slab, GFP_ATOMIC)) == NULL) { in mon_text_error()
282 ep->type = 'E'; in mon_text_error()
283 ep->id = (unsigned long) urb; in mon_text_error()
284 ep->busnum = urb->dev->bus->busnum; in mon_text_error()
285 ep->devnum = urb->dev->devnum; in mon_text_error()
286 ep->epnum = usb_endpoint_num(&urb->ep->desc); in mon_text_error()
287 ep->xfertype = usb_endpoint_type(&urb->ep->desc); in mon_text_error()
288 ep->is_in = usb_urb_dir_in(urb); in mon_text_error()
289 ep->tstamp = mon_get_timestamp(); in mon_text_error()
290 ep->length = 0; in mon_text_error()
291 ep->status = error; in mon_text_error()
293 ep->setup_flag = '-'; in mon_text_error()
294 ep->data_flag = 'E'; in mon_text_error()
297 list_add_tail(&ep->e_link, &rp->e_list); in mon_text_error()
398 struct mon_event_text *ep; in mon_text_read_t() local
406 ep = mon_text_read_wait(rp, file); in mon_text_read_t()
407 if (IS_ERR(ep)) { in mon_text_read_t()
409 return PTR_ERR(ep); in mon_text_read_t()
415 mon_text_read_head_t(rp, &ptr, ep); in mon_text_read_t()
416 mon_text_read_statset(rp, &ptr, ep); in mon_text_read_t()
418 " %d", ep->length); in mon_text_read_t()
419 mon_text_read_data(rp, &ptr, ep); in mon_text_read_t()
424 kmem_cache_free(rp->e_slab, ep); in mon_text_read_t()
437 struct mon_event_text *ep; in mon_text_read_u() local
445 ep = mon_text_read_wait(rp, file); in mon_text_read_u()
446 if (IS_ERR(ep)) { in mon_text_read_u()
448 return PTR_ERR(ep); in mon_text_read_u()
454 mon_text_read_head_u(rp, &ptr, ep); in mon_text_read_u()
455 if (ep->type == 'E') { in mon_text_read_u()
456 mon_text_read_statset(rp, &ptr, ep); in mon_text_read_u()
457 } else if (ep->xfertype == USB_ENDPOINT_XFER_ISOC) { in mon_text_read_u()
458 mon_text_read_isostat(rp, &ptr, ep); in mon_text_read_u()
459 mon_text_read_isodesc(rp, &ptr, ep); in mon_text_read_u()
460 } else if (ep->xfertype == USB_ENDPOINT_XFER_INT) { in mon_text_read_u()
461 mon_text_read_intstat(rp, &ptr, ep); in mon_text_read_u()
463 mon_text_read_statset(rp, &ptr, ep); in mon_text_read_u()
466 " %d", ep->length); in mon_text_read_u()
467 mon_text_read_data(rp, &ptr, ep); in mon_text_read_u()
472 kmem_cache_free(rp->e_slab, ep); in mon_text_read_u()
485 struct mon_event_text *ep; in mon_text_read_wait() local
489 while ((ep = mon_text_fetch(rp, mbus)) == NULL) { in mon_text_read_wait()
508 return ep; in mon_text_read_wait()
512 struct mon_text_ptr *p, const struct mon_event_text *ep) in mon_text_read_head_t() argument
516 udir = (ep->is_in ? 'i' : 'o'); in mon_text_read_head_t()
517 switch (ep->xfertype) { in mon_text_read_head_t()
525 ep->id, ep->tstamp, ep->type, in mon_text_read_head_t()
526 utype, udir, ep->devnum, ep->epnum); in mon_text_read_head_t()
530 struct mon_text_ptr *p, const struct mon_event_text *ep) in mon_text_read_head_u() argument
534 udir = (ep->is_in ? 'i' : 'o'); in mon_text_read_head_u()
535 switch (ep->xfertype) { in mon_text_read_head_u()
543 ep->id, ep->tstamp, ep->type, in mon_text_read_head_u()
544 utype, udir, ep->busnum, ep->devnum, ep->epnum); in mon_text_read_head_u()
548 struct mon_text_ptr *p, const struct mon_event_text *ep) in mon_text_read_statset() argument
551 if (ep->setup_flag == 0) { /* Setup packet is present and captured */ in mon_text_read_statset()
554 ep->setup[0], in mon_text_read_statset()
555 ep->setup[1], in mon_text_read_statset()
556 (ep->setup[3] << 8) | ep->setup[2], in mon_text_read_statset()
557 (ep->setup[5] << 8) | ep->setup[4], in mon_text_read_statset()
558 (ep->setup[7] << 8) | ep->setup[6]); in mon_text_read_statset()
559 } else if (ep->setup_flag != '-') { /* Unable to capture setup packet */ in mon_text_read_statset()
561 " %c __ __ ____ ____ ____", ep->setup_flag); in mon_text_read_statset()
564 " %d", ep->status); in mon_text_read_statset()
569 struct mon_text_ptr *p, const struct mon_event_text *ep) in mon_text_read_intstat() argument
572 " %d:%d", ep->status, ep->interval); in mon_text_read_intstat()
576 struct mon_text_ptr *p, const struct mon_event_text *ep) in mon_text_read_isostat() argument
578 if (ep->type == 'S') { in mon_text_read_isostat()
580 " %d:%d:%d", ep->status, ep->interval, ep->start_frame); in mon_text_read_isostat()
584 ep->status, ep->interval, ep->start_frame, ep->error_count); in mon_text_read_isostat()
589 struct mon_text_ptr *p, const struct mon_event_text *ep) in mon_text_read_isodesc() argument
596 " %d", ep->numdesc); in mon_text_read_isodesc()
597 ndesc = ep->numdesc; in mon_text_read_isodesc()
602 dp = ep->isodesc; in mon_text_read_isodesc()
611 struct mon_text_ptr *p, const struct mon_event_text *ep) in mon_text_read_data() argument
615 if ((data_len = ep->length) > 0) { in mon_text_read_data()
616 if (ep->data_flag == 0) { in mon_text_read_data()
629 "%02x", ep->data[i]); in mon_text_read_data()
635 " %c\n", ep->data_flag); in mon_text_read_data()
648 struct mon_event_text *ep; in mon_text_release() local
670 ep = list_entry(p, struct mon_event_text, e_link); in mon_text_release()
673 kmem_cache_free(rp->e_slab, ep); in mon_text_release()