aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/mon/mon_bin.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb/mon/mon_bin.c')
-rw-r--r--drivers/usb/mon/mon_bin.c7
1 files changed, 6 insertions, 1 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 = '-';