Skip to content

Commit

Permalink
[PATCH] USB: Let usbmon collect less garbage
Browse files Browse the repository at this point in the history
Alan Stern pointed out that (in 2.6 kernel) one successful submission results
in one callback, even for ISO-out transfers. Thus, the silly check can be
removed from usbmon. This reduces the amount of garbage printed in case
of ISO and Interrupt transfers.

Signed-off-by: Pete Zaitcev <zaitcev@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
  • Loading branch information
Pete Zaitcev authored and Greg Kroah-Hartman committed Jan 4, 2006
1 parent 687f5f3 commit b9b0942
Showing 1 changed file with 6 additions and 13 deletions.
19 changes: 6 additions & 13 deletions drivers/usb/mon/mon_text.c
Original file line number Diff line number Diff line change
Expand Up @@ -97,19 +97,12 @@ static inline char mon_text_get_data(struct mon_event_text *ep, struct urb *urb,
if (len >= DATA_MAX)
len = DATA_MAX;

/*
* Bulk is easy to shortcut reliably.
* XXX Other pipe types need consideration. Currently, we overdo it
* and collect garbage for them: better more than less.
*/
if (usb_pipebulk(pipe) || usb_pipecontrol(pipe)) {
if (usb_pipein(pipe)) {
if (ev_type == 'S')
return '<';
} else {
if (ev_type == 'C')
return '>';
}
if (usb_pipein(pipe)) {
if (ev_type == 'S')
return '<';
} else {
if (ev_type == 'C')
return '>';
}

/*
Expand Down

0 comments on commit b9b0942

Please sign in to comment.