lkml.org 
[lkml]   [2020]   [Jul]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH] usb: gadget: f_acm: don't disable disabled EP
Date
Michał Mirosław <mirq-linux@rere.qmqm.pl> writes:

> On Sat, May 30, 2020 at 01:03:17AM +0000, Peter Chen wrote:
>>
>> > > > @@ -425,9 +425,11 @@ static int acm_set_alt(struct usb_function *f, unsigned
>> > intf, unsigned alt)
>> > > > /* we know alt == 0, so this is an activation or a reset */
>> > > >
>> > > > if (intf == acm->ctrl_id) {
>> > > > - dev_vdbg(&cdev->gadget->dev,
>> > > > - "reset acm control interface %d\n", intf);
>> > > > - usb_ep_disable(acm->notify);
>> > > > + if (acm->notify->enabled) {
>> > > > + dev_vdbg(&cdev->gadget->dev,
>> > > > + "reset acm control interface %d\n", intf);
>> > > > + usb_ep_disable(acm->notify);
>> > > > + }
>> > >
>> > > But it does not fix any issues, the usb_ep_disable checks 'enabled' flag.
>> >
>> > It generates spurious trace events if you enable them.
>> You mean the trace events from core.c? If it is, we could try to improve it
>> and indicate it is already enabled or disabled.
>
> It is indicated in return code, but the problem is that this generates
> noise and wastes debugging time. The problem I was seeing manifested
> itself as disabling disabled EPs and desync of EP state between core
> and UDC driver. The patch avoids the noise and makes the code obvious.
> (This check was there at some point in time, BTW.)

I agree with this as well. But still, $subject doesn't look like a
candidate for the -rc :-) I'll apply it for the next merge window.

--
balbi
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2020-07-01 08:55    [W:0.173 / U:0.532 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site