All of lore.kernel.org
 help / color / mirror / Atom feed
From: Felipe Balbi <balbi@kernel.org>
To: "Michał Mirosław" <mirq-linux@rere.qmqm.pl>,
	"Peter Chen" <peter.chen@nxp.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	"linux-usb\@vger.kernel.org" <linux-usb@vger.kernel.org>,
	"linux-kernel\@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] usb: gadget: f_acm: don't disable disabled EP
Date: Wed, 01 Jul 2020 09:54:42 +0300	[thread overview]
Message-ID: <87wo3n7mj1.fsf@kernel.org> (raw)
In-Reply-To: <20200530171552.GC16333@qmqm.qmqm.pl>

[-- Attachment #1: Type: text/plain, Size: 1493 bytes --]

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

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]

  parent reply	other threads:[~2020-07-01  6:54 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-28 18:30 [PATCH] usb: gadget: f_acm: don't disable disabled EP Michał Mirosław
2020-05-29  8:10 ` Peter Chen
2020-05-29 13:55   ` Michał Mirosław
2020-05-30  1:03     ` Peter Chen
2020-05-30 17:15       ` Michał Mirosław
2020-06-01  3:53         ` Peter Chen
2020-07-01  6:54         ` Felipe Balbi [this message]
2020-07-01  6:53       ` Felipe Balbi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87wo3n7mj1.fsf@kernel.org \
    --to=balbi@kernel.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=mirq-linux@rere.qmqm.pl \
    --cc=peter.chen@nxp.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.