[PATCH v2 1/4] USB: HCD: support giveback of URB in tasklet context

Ming Lei ming.lei at canonical.com
Mon Jun 24 07:49:42 EDT 2013


On Mon, Jun 24, 2013 at 5:42 PM, Ming Lei <ming.lei at canonical.com> wrote:
> +
> +static void init_giveback_urb_bh(struct usb_hcd *hcd)
> +{
> +       if (!hcd_giveback_urb_in_bh(hcd))
> +               return;

Sorry, the above check isn't needed, and the below check isn't
needed too. I will fix it in V3.

> +
> +       __init_giveback_urb_bh(&hcd->high_prio_bh);
> +       __init_giveback_urb_bh(&hcd->low_prio_bh);
> +}
> +
> +static void exit_giveback_urb_bh(struct usb_hcd *hcd)
> +{
> +       if (!hcd_giveback_urb_in_bh(hcd))
> +               return;
> +
> +       /*
> +        * tasklet_kill() isn't needed here because:
> +        * - driver's disconnec() called from usb_disconnect() should
> +        *   make sure its URBs are completed during the disconnect()
> +        *   callback
> +        *
> +        * - it is too late to run complete() here since driver may have
> +        *   been removed already now
> +        *
> +        * Using tasklet to run URB's complete() doesn't change this
> +        * behavior of usbcore.
> +        */
> +}
> +


Thanks,
--
Ming Lei



More information about the linux-arm-kernel mailing list