On Mon, 19 Aug 2013, Ming Lei wrote:

> This patch introduces ehci_disable_event(), which is applied on
> IAA_WATCHDOG and START_UNLINK_INTR events in case that the two
> events needn't to be handled, so that we may avoid unnecessary CPU
> wakeup.

> @@ -100,6 +100,20 @@ static void ehci_enable_event(struct ehci_hcd *ehci, 
> unsigned event,
>  }
>  
>  

Only one blank line here, please.

> +/* Warning: don't call this function from hrtimer handler context */
> +static void ehci_disable_event(struct ehci_hcd *ehci, unsigned event)
> +{
> +     ehci->enabled_hrtimer_events &= ~(1 << event);
> +     if (!ehci->enabled_hrtimer_events) {
> +             ehci->next_hrtimer_event = EHCI_HRTIMER_NO_EVENT;
> +             hrtimer_cancel(&ehci->hrtimer);
> +     } else if (ehci->next_hrtimer_event == event) {
> +             ehci->next_hrtimer_event =
> +                             ffs(ehci->enabled_hrtimer_events) - 1;

Should the timer be rescheduled here?  It's hard to say without seeing 
some test results.

Alan Stern

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to