lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 24 Sep 2014 16:00:01 -0500
From:	Felipe Balbi <balbi@...com>
To:	Michal Sojka <sojka@...ica.cz>
CC:	<linux-usb@...r.kernel.org>,
	Alan Stern <stern@...land.harvard.edu>,
	Bryan Wu <cooloney@...il.com>, Felipe Balbi <balbi@...com>,
	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	Linux LED Subsystem <linux-leds@...r.kernel.org>,
	<linux-kernel@...r.kernel.org>, <michal.vokac@...ap.cz>
Subject: Re: [PATCH v6 1/4] usb: gadget: Introduce
 usb_gadget_giveback_request()

On Wed, Sep 24, 2014 at 10:43:18PM +0200, Michal Sojka wrote:
> All USB peripheral controller drivers call completion routines directly.
> This patch adds usb_gadget_giveback_request() which will be used instead
> of direct invocation in the next patch. The goal here is to have a place
> where common functionality can be added.
> 
> Signed-off-by: Michal Sojka <sojka@...ica.cz>
> ---
>  drivers/usb/gadget/udc/udc-core.c | 16 ++++++++++++++++
>  include/linux/usb/gadget.h        |  8 ++++++++
>  2 files changed, 24 insertions(+)
> 
> diff --git a/drivers/usb/gadget/udc/udc-core.c b/drivers/usb/gadget/udc/udc-core.c
> index b0d9817..f7b3151 100644
> --- a/drivers/usb/gadget/udc/udc-core.c
> +++ b/drivers/usb/gadget/udc/udc-core.c
> @@ -106,6 +106,22 @@ EXPORT_SYMBOL_GPL(usb_gadget_unmap_request);
>  
>  /* ------------------------------------------------------------------------- */
>  
> +/**
> + * usb_gadget_giveback_request - give the request back to the gadget layer
> + * Context: in_interrupt()
> + *
> + * This is called by device controller drivers in order to return the
> + * completed request back to the gadget layer.
> + */
> +void usb_gadget_giveback_request(struct usb_ep *ep,
> +		struct usb_request *req)
> +{
> +	req->complete(ep, req);
> +}
> +EXPORT_SYMBOL_GPL(usb_gadget_giveback_request);
> +
> +/* ------------------------------------------------------------------------- */
> +
>  static void usb_gadget_state_work(struct work_struct *work)
>  {
>  	struct usb_gadget	*gadget = work_to_gadget(work);
> diff --git a/include/linux/usb/gadget.h b/include/linux/usb/gadget.h
> index c3a6185..f795e95 100644
> --- a/include/linux/usb/gadget.h
> +++ b/include/linux/usb/gadget.h
> @@ -1013,6 +1013,14 @@ extern void usb_gadget_set_state(struct usb_gadget *gadget,
>  
>  /*-------------------------------------------------------------------------*/
>  
> +/* utility to give requests back to the gadget layer */
> +
> +extern void usb_gadget_giveback_request(struct usb_ep *ep,
> +		struct usb_request *req);
> +
> +

minot nit: one blank line only, other than that

Acked-by: Felipe Balbi <balbi@...com>

-- 
balbi

Download attachment "signature.asc" of type "application/pgp-signature" (820 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ