Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1266675 > unrolled thread

[PATCH v5 1/7] usb: gadget: f_midi: Transmit data only when IN ep is enabled

Started by"Felipe F. Tonello" <eu@felipetonello.com>
First post2015-11-10 19:00 +0100
Last post2015-11-13 09:10 +0100
Articles 2 — 2 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH v5 1/7] usb: gadget: f_midi: Transmit data only when IN ep is enabled "Felipe F. Tonello" <eu@felipetonello.com> - 2015-11-10 19:00 +0100
    Re: [PATCH v5 1/7] usb: gadget: f_midi: Transmit data only when IN ep  is enabled Robert Baldyga <r.baldyga@samsung.com> - 2015-11-13 09:10 +0100

#1266675 — [PATCH v5 1/7] usb: gadget: f_midi: Transmit data only when IN ep is enabled

From"Felipe F. Tonello" <eu@felipetonello.com>
Date2015-11-10 19:00 +0100
Subject[PATCH v5 1/7] usb: gadget: f_midi: Transmit data only when IN ep is enabled
Message-ID<qtln4-8aF-17@gated-at.bofh.it>
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@felipetonello.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);
-- 
2.5.0

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [next] | [standalone]


#1268673 — Re: [PATCH v5 1/7] usb: gadget: f_midi: Transmit data only when IN ep is enabled

FromRobert Baldyga <r.baldyga@samsung.com>
Date2015-11-13 09:10 +0100
SubjectRe: [PATCH v5 1/7] usb: gadget: f_midi: Transmit data only when IN ep is enabled
Message-ID<quhAJ-3Rt-3@gated-at.bofh.it>
In reply to#1266675
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@felipetonello.com>

Reviewed-by: Robert Baldyga <r.baldyga@samsung.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@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web