summaryrefslogtreecommitdiff
path: root/drivers/usb/mon/mon_text.c
diff options
context:
space:
mode:
authorPete Zaitcev <zaitcev@redhat.com>2010-01-05 11:50:07 -0700
committerGreg Kroah-Hartman <gregkh@suse.de>2010-03-02 14:53:30 -0800
commit2bc0d109326e9f2b25fa1dfcc9de2489e1e00e36 (patch)
tree1c76c6d4218ccabb61767953cf53ed3eca260753 /drivers/usb/mon/mon_text.c
parent7ed069c12c866c5c06e4e05d26878797e3731829 (diff)
downloadlinux-rt-2bc0d109326e9f2b25fa1dfcc9de2489e1e00e36.tar.gz
usbmon: add bus number to text API
Due to a simple oversight when bus zero was added, the text API fails to deliver the bus number in 'E' messages (which are equivalent of 'C' messages, only for error case). This makes it harder, for instance, use a search-and-highlight in a text editor. So fix it. Also, Alan Stern requested adding timestamps to 'E' messages. This is purely cosmetic, but makes it easier to read the trace. This is done for both text and binary APIs. Signed-off-by: Pete Zaitcev <zaitcev@redhat.com> Cc: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/mon/mon_text.c')
-rw-r--r--drivers/usb/mon/mon_text.c4
1 files changed, 2 insertions, 2 deletions
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)
ep->type = 'E';
ep->id = (unsigned long) urb;
- ep->busnum = 0;
+ ep->busnum = urb->dev->bus->busnum;
ep->devnum = urb->dev->devnum;
ep->epnum = usb_endpoint_num(&urb->ep->desc);
ep->xfertype = usb_endpoint_type(&urb->ep->desc);
ep->is_in = usb_urb_dir_in(urb);
- ep->tstamp = 0;
+ ep->tstamp = mon_get_timestamp();
ep->length = 0;
ep->status = error;