diff options
author | Sarah Sharp <sarah.a.sharp@intel.com> | 2007-10-03 14:56:03 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2007-10-12 14:55:30 -0700 |
commit | 4d59d8a11383ebf0e0260ee481a4e766959fd7d9 (patch) | |
tree | 240cf81cc56896a69c1467b7c8bc4f3f4022c3fd /drivers/usb/core/usb.c | |
parent | 437f375f262417b484f28007c3e8d21bd01d0e01 (diff) | |
download | op-kernel-dev-4d59d8a11383ebf0e0260ee481a4e766959fd7d9.zip op-kernel-dev-4d59d8a11383ebf0e0260ee481a4e766959fd7d9.tar.gz |
USB: Export URB statistics for powertop
powertop currently tracks interrupts generated by uhci, ehci, and ohci,
but it has no way of telling which USB device to blame USB bus activity on.
This patch exports the number of URBs that are submitted for a given device.
Cat the file 'urbnum' in /sys/bus/usb/devices/.../
Signed-off-by: Sarah Sharp <sarah.a.sharp@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/core/usb.c')
-rw-r--r-- | drivers/usb/core/usb.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/usb/core/usb.c b/drivers/usb/core/usb.c index 8121edb..c99938d 100644 --- a/drivers/usb/core/usb.c +++ b/drivers/usb/core/usb.c @@ -266,6 +266,7 @@ usb_alloc_dev(struct usb_device *parent, struct usb_bus *bus, unsigned port1) dev->dev.dma_mask = bus->controller->dma_mask; set_dev_node(&dev->dev, dev_to_node(bus->controller)); dev->state = USB_STATE_ATTACHED; + atomic_set(&dev->urbnum, 0); INIT_LIST_HEAD(&dev->ep0.urb_list); dev->ep0.desc.bLength = USB_DT_ENDPOINT_SIZE; |