diff options
author | Pete Zaitcev <zaitcev@redhat.com> | 2007-04-11 13:47:26 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2007-04-27 13:28:39 -0700 |
commit | ecb658d387dc09f344b3d755e8674076072032c7 (patch) | |
tree | b24067478554d5514db22ca6b107b8258e22b7e3 /drivers/usb/mon/usb_mon.h | |
parent | 35d07fd58f47284adecf219d3b73e4ea197cf29f (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.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/usb/mon/usb_mon.h b/drivers/usb/mon/usb_mon.h index a1e2b8e9d77..13d63255283 100644 --- a/drivers/usb/mon/usb_mon.h +++ b/drivers/usb/mon/usb_mon.h @@ -23,7 +23,6 @@ struct mon_bus { struct dentry *dent_s; /* Debugging file */ struct dentry *dent_t; /* Text interface file */ struct dentry *dent_u; /* Second text interface file */ - int uses_dma; /* Ref */ int nreaders; /* Under mon_lock AND mbus->lock */ @@ -53,7 +52,7 @@ void mon_reader_del(struct mon_bus *mbus, struct mon_reader *r); struct mon_bus *mon_bus_lookup(unsigned int num); -int /*bool*/ mon_text_add(struct mon_bus *mbus, const struct usb_bus *ubus); +int /*bool*/ mon_text_add(struct mon_bus *mbus, int busnum); void mon_text_del(struct mon_bus *mbus); // void mon_bin_add(struct mon_bus *); @@ -82,4 +81,6 @@ extern struct mutex mon_lock; extern const struct file_operations mon_fops_stat; +extern struct mon_bus mon_bus0; /* Only for redundant checks */ + #endif /* __USB_MON_H */ |