]> git.baikalelectronics.ru Git - kernel.git/commit
[PATCH] usbcore support for root-hub IRQ instead of polling
authorAlan Stern <stern@rowland.harvard.edu>
Thu, 21 Apr 2005 19:56:37 +0000 (15:56 -0400)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 27 Jun 2005 21:43:45 +0000 (14:43 -0700)
commitd5cf840bf2461ecb0de895906a04d9ecd549c6d3
treee5c63a32abfff5d504e4201d93ab593427c5e810
parentf6fa119be31d59066db6b96595bdf74ecb55e3d6
[PATCH] usbcore support for root-hub IRQ instead of polling

This is a revised version of an earlier patch to add support to usbcore
for driving root hubs by interrupts rather than polling.

There's a temporary flag added to struct usb_hcd, marking devices whose
drivers are aware of the new mechanism.  By default that flag doesn't get
set so drivers will continue to see the same polling behavior as before.
This way we can convert the HCDs one by one to use interrupt-based event
reporting, and the temporary flag can be removed when they're all done.

Also included is a small change to the hcd_disable_endpoint routine.
Although endpoints normally shouldn't be disabled while a controller is
suspended, it's legal to do so when the controller's driver is being
rmmod'ed.

Lastly the patch adds a new callback, .hub_irq_enable, for use by HCDs
where the root hub's port-change interrupts are level-triggered rather
than edge-triggered.  The callback is invoked each time khubd has finished
processing a root hub, to let the HCD know that the interrupt can safely
be re-enabled.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/usb/core/hcd.c
drivers/usb/core/hcd.h
drivers/usb/core/hub.c