aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/usb/mon/mon_bin.c7
-rw-r--r--drivers/usb/mon/mon_text.c4
2 files changed, 8 insertions, 3 deletions
diff --git a/drivers/usb/mon/mon_bin.c b/drivers/usb/mon/mon_bin.c
index 385ec0520167..6dd44bc1f5ff 100644
--- a/drivers/usb/mon/mon_bin.c
+++ b/drivers/usb/mon/mon_bin.c
@@ -460,8 +460,8 @@ static void mon_bin_event(struct mon_reader_bin *rp, struct urb *urb,
460 char ev_type, int status) 460 char ev_type, int status)
461{ 461{
462 const struct usb_endpoint_descriptor *epd = &urb->ep->desc; 462 const struct usb_endpoint_descriptor *epd = &urb->ep->desc;
463 unsigned long flags;
464 struct timeval ts; 463 struct timeval ts;
464 unsigned long flags;
465 unsigned int urb_length; 465 unsigned int urb_length;
466 unsigned int offset; 466 unsigned int offset;
467 unsigned int length; 467 unsigned int length;
@@ -600,10 +600,13 @@ static void mon_bin_complete(void *data, struct urb *urb, int status)
600static void mon_bin_error(void *data, struct urb *urb, int error) 600static void mon_bin_error(void *data, struct urb *urb, int error)
601{ 601{
602 struct mon_reader_bin *rp = data; 602 struct mon_reader_bin *rp = data;
603 struct timeval ts;
603 unsigned long flags; 604 unsigned long flags;
604 unsigned int offset; 605 unsigned int offset;
605 struct mon_bin_hdr *ep; 606 struct mon_bin_hdr *ep;
606 607
608 do_gettimeofday(&ts);
609
607 spin_lock_irqsave(&rp->b_lock, flags); 610 spin_lock_irqsave(&rp->b_lock, flags);
608 611
609 offset = mon_buff_area_alloc(rp, PKT_SIZE); 612 offset = mon_buff_area_alloc(rp, PKT_SIZE);
@@ -623,6 +626,8 @@ static void mon_bin_error(void *data, struct urb *urb, int error)
623 ep->devnum = urb->dev->devnum; 626 ep->devnum = urb->dev->devnum;
624 ep->busnum = urb->dev->bus->busnum; 627 ep->busnum = urb->dev->bus->busnum;
625 ep->id = (unsigned long) urb; 628 ep->id = (unsigned long) urb;
629 ep->ts_sec = ts.tv_sec;
630 ep->ts_usec = ts.tv_usec;
626 ep->status = error; 631 ep->status = error;
627 632
628 ep->flag_setup = '-'; 633 ep->flag_setup = '-';
diff --git a/drivers/usb/mon/mon_text.c b/drivers/usb/mon/mon_text.c
index 047568ff223d..16bfb61d24f9 100644
--- a/drivers/usb/mon/mon_text.c
+++ b/drivers/usb/mon/mon_text.c
@@ -273,12 +273,12 @@ static void mon_text_error(void *data, struct urb *urb, int error)
273 273
274 ep->type = 'E'; 274 ep->type = 'E';
275 ep->id = (unsigned long) urb; 275 ep->id = (unsigned long) urb;
276 ep->busnum = 0; 276 ep->busnum = urb->dev->bus->busnum;
277 ep->devnum = urb->dev->devnum; 277 ep->devnum = urb->dev->devnum;
278 ep->epnum = usb_endpoint_num(&urb->ep->desc); 278 ep->epnum = usb_endpoint_num(&urb->ep->desc);
279 ep->xfertype = usb_endpoint_type(&urb->ep->desc); 279 ep->xfertype = usb_endpoint_type(&urb->ep->desc);
280 ep->is_in = usb_urb_dir_in(urb); 280 ep->is_in = usb_urb_dir_in(urb);
281 ep->tstamp = 0; 281 ep->tstamp = mon_get_timestamp();
282 ep->length = 0; 282 ep->length = 0;
283 ep->status = error; 283 ep->status = error;
284 284