[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CADiBU38wk825SqtFRAiYqqV47Wwi43AuWKut19qeTbGBZFqPow@mail.gmail.com>
Date: Tue, 6 Oct 2020 12:37:06 +0800
From: ChiYuan Huang <u0084500@...il.com>
To: Guenter Roeck <linux@...ck-us.net>
Cc: Greg KH <gregkh@...uxfoundation.org>,
Heikki Krogerus <heikki.krogerus@...ux.intel.com>,
linux-usb@...r.kernel.org, linux-kernel@...r.kernel.org,
cy_huang <cy_huang@...htek.com>
Subject: Re: [PATCH] usb: typec: tcpm: Fix if vbus before cc, hard_reset_count
not reset issue
Guenter Roeck <linux@...ck-us.net> 於 2020年10月5日 週一 下午11:30寫道:
>
> On 10/5/20 4:08 AM, Greg KH wrote:
> [ ... ]
> >>> What ever happened with this patch, is there still disagreement?
> >>>
> >>
> >> Yes, there is. I wouldn't have added the conditional without reason,
> >> and I am concerned that removing it entirely will open another problem.
> >> Feel free to apply, though - I can't prove that my concern is valid,
> >> and after all we'll get reports from the field later if it is.
> >
> > Ok, can I get an ack so I know who to come back to in the future if
> > there are issues? :)
> >
>
> Not from me, for the reasons I stated. I would be ok with something like:
>
> - if (tcpm_port_is_disconnected(port))
> + if (tcpm_port_is_disconnected(port) ||
> + (tcpm_cc_is_open(port->cc1) && tcpm_cc_is_open(port->cc2)))
>
> to narrow down the condition.
I have tried the above comment and It doesn't work.
How about to change the judgement like as below
- if (tcpm_port_is_disconnected(port))
+ if (tcpm_port_is_disconnected(port) || !port->vbus_present)
The hard_reset_count not reset issue is following by the below order
1. VBUS off ( at the same time, cc is still detected as attached)
port->attached become false and cc is not open
2. After that, cc detached.
due to port->attached is false, tcpm_detach() directly return.
And that's why hard_reset_count is not reset to 0.
>
> Guenter
Powered by blists - more mailing lists