aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/mon/usb_mon.h
diff options
context:
space:
mode:
authorPete Zaitcev <zaitcev@redhat.com>2007-04-11 16:47:26 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2007-04-27 16:28:39 -0400
commitecb658d387dc09f344b3d755e8674076072032c7 (patch)
treeb24067478554d5514db22ca6b107b8258e22b7e3 /drivers/usb/mon/usb_mon.h
parent35d07fd58f47284adecf219d3b73e4ea197cf29f (diff)
usbmon: bus zero
Add the "bus zero" feature to the usbmon. If a user process specifies bus with number zero, it receives events from all buses. This is useful when we wish to see initial enumeration when a bus is created, typically after a modprobe. Until now, an application had to loop until a new bus could be open, then start capturing on it. This procedure was cumbersome and could lose initial events. Also, often it's too bothersome to find exactly to which bus a specific device is attached. Paolo Albeni provided the original concept implementation. I added the handling of "bus->monitored" flag and generally fixed it up. Signed-off-by: Pete Zaitcev <zaitcev@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/mon/usb_mon.h')
-rw-r--r--drivers/usb/mon/usb_mon.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/usb/mon/usb_mon.h b/drivers/usb/mon/usb_mon.h
index a1e2b8e9d777..13d63255283e 100644
--- a/drivers/usb/mon/usb_mon.h
+++ b/drivers/usb/mon/usb_mon.h
@@ -23,7 +23,6 @@ struct mon_bus {
23 struct dentry *dent_s; /* Debugging file */ 23 struct dentry *dent_s; /* Debugging file */
24 struct dentry *dent_t; /* Text interface file */ 24 struct dentry *dent_t; /* Text interface file */
25 struct dentry *dent_u; /* Second text interface file */ 25 struct dentry *dent_u; /* Second text interface file */
26 int uses_dma;
27 26
28 /* Ref */ 27 /* Ref */
29 int nreaders; /* Under mon_lock AND mbus->lock */ 28 int nreaders; /* Under mon_lock AND mbus->lock */
@@ -53,7 +52,7 @@ void mon_reader_del(struct mon_bus *mbus, struct mon_reader *r);
53 52
54struct mon_bus *mon_bus_lookup(unsigned int num); 53struct mon_bus *mon_bus_lookup(unsigned int num);
55 54
56int /*bool*/ mon_text_add(struct mon_bus *mbus, const struct usb_bus *ubus); 55int /*bool*/ mon_text_add(struct mon_bus *mbus, int busnum);
57void mon_text_del(struct mon_bus *mbus); 56void mon_text_del(struct mon_bus *mbus);
58// void mon_bin_add(struct mon_bus *); 57// void mon_bin_add(struct mon_bus *);
59 58
@@ -82,4 +81,6 @@ extern struct mutex mon_lock;
82 81
83extern const struct file_operations mon_fops_stat; 82extern const struct file_operations mon_fops_stat;
84 83
84extern struct mon_bus mon_bus0; /* Only for redundant checks */
85
85#endif /* __USB_MON_H */ 86#endif /* __USB_MON_H */