[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <562F420F.1030307@felipetonello.com>
Date: Tue, 27 Oct 2015 09:21:19 +0000
From: Felipe Ferreri Tonello <eu@...ipetonello.com>
To: Robert Baldyga <r.baldyga@...sung.com>,
Robert Baldyga <r.baldyga@...kerion.com>
Cc: USB list <linux-usb@...r.kernel.org>,
Kernel development list <linux-kernel@...r.kernel.org>,
Felipe Balbi <balbi@...com>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Andrzej Pietrasiewicz <andrzej.p@...sung.com>,
Clemens Ladisch <clemens@...isch.de>
Subject: Re: [PATCH v4 1/7] usb: gadget: f_midi: Transmit data only when IN ep
is enabled
Hi Robert,
On 27/10/15 06:41, Robert Baldyga wrote:
> On 10/26/2015 11:49 PM, Felipe Tonello wrote:
>> Hi Robert,
>>
>> On Mon, Oct 26, 2015 at 10:13 PM, Robert Baldyga
>> <r.baldyga@...kerion.com> wrote:
>>> Hi Felipe,
>>>
>>> On 10/26/2015 05:55 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>
>>>> ---
>>>> drivers/usb/gadget/function/f_midi.c | 7 ++++++-
>>>> 1 file changed, 6 insertions(+), 1 deletion(-)
>>>>
>>>> diff --git a/drivers/usb/gadget/function/f_midi.c b/drivers/usb/gadget/function/f_midi.c
>>>> index edb84ca..e08f365 100644
>>>> --- a/drivers/usb/gadget/function/f_midi.c
>>>> +++ b/drivers/usb/gadget/function/f_midi.c
>>>> @@ -87,6 +87,7 @@ struct f_midi {
>>>> int index;
>>>> char *id;
>>>> unsigned int buflen, qlen;
>>>> + bool in_ep_enabled;
>>>
>>> It's not necessary, you can use ep->enabled flag instead.
>>
>> There is no such flag in usb_ep struct[1].
>>
>> [1] http://lxr.free-electrons.com/source/include/linux/usb/gadget.h#L170
>
> It's already in next branch of Felipe Balbi's tree.
>
> Look here:
> https://git.kernel.org/cgit/linux/kernel/git/balbi/usb.git/
Cool. Thanks.
I though that this flag would be very useful, but didn't want to add to
the main struct as it seems no other driver cared about this flag. But
it is good to see that it is been merged now.
--
Felipe
--
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