[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-id: <56459A89.30209@samsung.com>
Date: Fri, 13 Nov 2015 09:08:41 +0100
From: Robert Baldyga <r.baldyga@...sung.com>
To: "Felipe F. Tonello" <eu@...ipetonello.com>,
linux-usb@...r.kernel.org
Cc: linux-kernel@...r.kernel.org, Felipe Balbi <balbi@...com>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Clemens Ladisch <clemens@...isch.de>
Subject: Re: [PATCH v5 1/7] usb: gadget: f_midi: Transmit data only when IN ep
is enabled
On 11/10/2015 06:52 PM, Felipe F. Tonello wrote:
> This makes sure f_midi doesn't try to enqueue data when the IN endpoint is
> disabled, ie, USB cable is disconnected.
>
> Signed-off-by: Felipe F. Tonello <eu@...ipetonello.com>
Reviewed-by: Robert Baldyga <r.baldyga@...sung.com>
> ---
> drivers/usb/gadget/function/f_midi.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/usb/gadget/function/f_midi.c b/drivers/usb/gadget/function/f_midi.c
> index ce3c8a6..eeb989d 100644
> --- a/drivers/usb/gadget/function/f_midi.c
> +++ b/drivers/usb/gadget/function/f_midi.c
> @@ -545,7 +545,7 @@ static void f_midi_transmit(struct f_midi *midi, struct usb_request *req)
> }
> }
>
> - if (req->length > 0) {
> + if (req->length > 0 && ep->enabled) {
> int err;
>
> err = usb_ep_queue(ep, req, GFP_ATOMIC);
>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists