Linux-USB Archive on lore.kernel.org
 help / color / Atom feed
From: Minas Harutyunyan <Minas.Harutyunyan@synopsys.com>
To: Otavio Salvador <otavio.salvador@ossystems.com.br>,
	Minas Harutyunyan <Minas.Harutyunyan@synopsys.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	"linux-usb@vger.kernel.org" <linux-usb@vger.kernel.org>,
	Felipe Balbi <balbi@kernel.org>, Heiko Stuebner <heiko@sntech.de>,
	"linux-rockchip@lists.infradead.org" 
	<linux-rockchip@lists.infradead.org>,
	Johan Hovold <johan@kernel.org>
Subject: Re: USB DWC2 stops responding when insert/remove cable multiple times
Date: Mon, 17 Feb 2020 13:26:30 +0000
Message-ID: <ee47be28-ba9f-750f-65d2-51a722ce291d@synopsys.com> (raw)
In-Reply-To: <CAP9ODKoUH=Cc=uuhfaUy7fkSVdfBHhX-6oS9_hi3Wd6GgDiZYw@mail.gmail.com>

Hi Otavio,

On 2/17/2020 4:30 PM, Otavio Salvador wrote:
> Hello Minas,
> 
> On Mon, Feb 17, 2020 at 5:58 AM Minas Harutyunyan
> <Minas.Harutyunyan@synopsys.com> wrote:
>> On 2/14/2020 5:40 PM, Otavio Salvador wrote:
> ...
>>>       [  312.967867] g_serial gadget: high-speed config #2: CDC ACM config
>>>       [  314.828173] dwc2 30180000.usb: new device is high-speed
>>>       [  314.866943] dwc2 30180000.usb: new address 16
>>>       [  314.889550] g_serial gadget: high-speed config #2: CDC ACM config
>>>
>>
>> I assume here you few time disconnected and then connected cable and
>> after last connection even when g_serial seen in last line it stop work.
>> Correct?
> 
> Yes. It stops responding.
> 
>>> The "[  314.889550] g_serial gadget: high-speed config #2: CDC ACM
>>> config" message is the last time it is detected. As mentioned, to
>>> restore the port to work, we need to reload the g_serial module.
>>>
>>> When we reload it, following exception happens:
>>>
>>
>> Actually exception happen in g_serial not dwc2. Why you assume that it
>> because of dwc2?
> 
> Indeed. After reporting this, it does sounds it is two decouple
> issues. The tty seems to be not properly cleaned up and it seems to
> have a resource not properly cleaned up.
> 
Enable debug prints to get full dwc2 debug prints to see what happen 
with dwc2.

> ...
>>> So, I am a bit lost how to debug this so I'd like to know what kind of
>>> information might be useful to find the root cause of it?
>>
>> And despite of above exception, g_serial enumerated it works fine?
> 
> If reloaded the USB is detected but tty seems to not work. It seems it
> fails to free the ttyGS0 previously used and thus it cannot properly
> create the new device.
> 
>> Please provide me dump of follow dwc2 debugfs's: regdump, hw_params, params.
> 
> Do you want this on working and failing state or just the failing one?
> 
After failing.


Thanks,
Minas

  reply index

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-14 13:40 Otavio Salvador
2020-02-17  8:58 ` Minas Harutyunyan
2020-02-17 12:30   ` Otavio Salvador
2020-02-17 13:26     ` Minas Harutyunyan [this message]
2020-02-17 19:53       ` Otavio Salvador
2020-02-19 12:26         ` Minas Harutyunyan
2020-02-19 15:10           ` Otavio Salvador
2020-02-20  6:59             ` Minas Harutyunyan
2020-02-20 13:16               ` Otavio Salvador
2020-02-21  6:52                 ` Minas Harutyunyan
2020-02-21 14:06                   ` Otavio Salvador
     [not found]                     ` <CAP9ODKoRuB-nyjr1ksGU61PVMjFTMMWKwgpHQ=e7bChAu5Okhg@mail.gmail.com>
2020-02-28  9:01                       ` Minas Harutyunyan
2020-02-28 17:35                         ` Otavio Salvador
2020-03-05  6:45                           ` Minas Harutyunyan

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=ee47be28-ba9f-750f-65d2-51a722ce291d@synopsys.com \
    --to=minas.harutyunyan@synopsys.com \
    --cc=balbi@kernel.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=heiko@sntech.de \
    --cc=johan@kernel.org \
    --cc=linux-rockchip@lists.infradead.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=otavio.salvador@ossystems.com.br \
    /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

Linux-USB Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-usb/0 linux-usb/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-usb linux-usb/ https://lore.kernel.org/linux-usb \
		linux-usb@vger.kernel.org
	public-inbox-index linux-usb

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-usb


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git