mbox series

[v5,0/3] AMS, Collision Avoidance, and Protocol Error

Message ID 20210105163927.1376770-1-kyletso@google.com (mailing list archive)
Headers show
Series AMS, Collision Avoidance, and Protocol Error | expand

Message

Kyle Tso Jan. 5, 2021, 4:39 p.m. UTC
This series include previous patch "[v4] AMS and Collision Avoidance"
https://lore.kernel.org/r/20201217030632.903718-1-kyletso@google.com
and two more patches "Protocol Error handling" and "Respond Wait if...".

The patch "AMS and Collision Avoidance" in [v5] is the same as the one
in [v4] (only rebased to ToT).

The patch "Protocol Error handling" is based on PD3 6.8.1 to fix the
wrong handling.

The patch "Respond Wait if..." is to fix a conflict when 
DR/PR/VCONN_SWAP occurs just after the state machine enters Ready State.

Kyle Tso (3):
  usb: typec: tcpm: AMS and Collision Avoidance
  usb: typec: tcpm: Protocol Error handling
  usb: typec: tcpm: Respond Wait if VDM state machine is running

 drivers/usb/typec/tcpm/tcpm.c | 925 +++++++++++++++++++++++++++++-----
 include/linux/usb/pd.h        |   2 +
 include/linux/usb/tcpm.h      |   4 +
 3 files changed, 792 insertions(+), 139 deletions(-)

Comments

Greg Kroah-Hartman Jan. 12, 2021, 11:53 a.m. UTC | #1
On Wed, Jan 06, 2021 at 12:39:24AM +0800, Kyle Tso wrote:
> This series include previous patch "[v4] AMS and Collision Avoidance"
> https://lore.kernel.org/r/20201217030632.903718-1-kyletso@google.com
> and two more patches "Protocol Error handling" and "Respond Wait if...".
> 
> The patch "AMS and Collision Avoidance" in [v5] is the same as the one
> in [v4] (only rebased to ToT).
> 
> The patch "Protocol Error handling" is based on PD3 6.8.1 to fix the
> wrong handling.
> 
> The patch "Respond Wait if..." is to fix a conflict when 
> DR/PR/VCONN_SWAP occurs just after the state machine enters Ready State.
> 
> Kyle Tso (3):
>   usb: typec: tcpm: AMS and Collision Avoidance
>   usb: typec: tcpm: Protocol Error handling
>   usb: typec: tcpm: Respond Wait if VDM state machine is running
> 
>  drivers/usb/typec/tcpm/tcpm.c | 925 +++++++++++++++++++++++++++++-----
>  include/linux/usb/pd.h        |   2 +
>  include/linux/usb/tcpm.h      |   4 +
>  3 files changed, 792 insertions(+), 139 deletions(-)

Heikki, any thoughts about this series?

thanks,

greg k-h
Hans de Goede Jan. 12, 2021, 11:57 a.m. UTC | #2
Hi,

On 1/12/21 12:53 PM, Greg KH wrote:
> On Wed, Jan 06, 2021 at 12:39:24AM +0800, Kyle Tso wrote:
>> This series include previous patch "[v4] AMS and Collision Avoidance"
>> https://lore.kernel.org/r/20201217030632.903718-1-kyletso@google.com
>> and two more patches "Protocol Error handling" and "Respond Wait if...".
>>
>> The patch "AMS and Collision Avoidance" in [v5] is the same as the one
>> in [v4] (only rebased to ToT).
>>
>> The patch "Protocol Error handling" is based on PD3 6.8.1 to fix the
>> wrong handling.
>>
>> The patch "Respond Wait if..." is to fix a conflict when 
>> DR/PR/VCONN_SWAP occurs just after the state machine enters Ready State.
>>
>> Kyle Tso (3):
>>   usb: typec: tcpm: AMS and Collision Avoidance
>>   usb: typec: tcpm: Protocol Error handling
>>   usb: typec: tcpm: Respond Wait if VDM state machine is running
>>
>>  drivers/usb/typec/tcpm/tcpm.c | 925 +++++++++++++++++++++++++++++-----
>>  include/linux/usb/pd.h        |   2 +
>>  include/linux/usb/tcpm.h      |   4 +
>>  3 files changed, 792 insertions(+), 139 deletions(-)
> 
> Heikki, any thoughts about this series?

Note I plan to test this series on a device with a fusb302 Type-C
controller, where it broke role-swappings in a previous version of
this series. This is supposed to be fixed now but I would like to
confirm this.

I've had this on my todo list for a while now. I've
now put this in my calendar as a task for tomorrow. So please wait
till you hear back from me (hopefully with a Tested-by) with
merging this, thanks.

Regards,

Hans
Heikki Krogerus Jan. 12, 2021, 11:59 a.m. UTC | #3
On Tue, Jan 12, 2021 at 12:53:56PM +0100, Greg KH wrote:
> On Wed, Jan 06, 2021 at 12:39:24AM +0800, Kyle Tso wrote:
> > This series include previous patch "[v4] AMS and Collision Avoidance"
> > https://lore.kernel.org/r/20201217030632.903718-1-kyletso@google.com
> > and two more patches "Protocol Error handling" and "Respond Wait if...".
> > 
> > The patch "AMS and Collision Avoidance" in [v5] is the same as the one
> > in [v4] (only rebased to ToT).
> > 
> > The patch "Protocol Error handling" is based on PD3 6.8.1 to fix the
> > wrong handling.
> > 
> > The patch "Respond Wait if..." is to fix a conflict when 
> > DR/PR/VCONN_SWAP occurs just after the state machine enters Ready State.
> > 
> > Kyle Tso (3):
> >   usb: typec: tcpm: AMS and Collision Avoidance
> >   usb: typec: tcpm: Protocol Error handling
> >   usb: typec: tcpm: Respond Wait if VDM state machine is running
> > 
> >  drivers/usb/typec/tcpm/tcpm.c | 925 +++++++++++++++++++++++++++++-----
> >  include/linux/usb/pd.h        |   2 +
> >  include/linux/usb/tcpm.h      |   4 +
> >  3 files changed, 792 insertions(+), 139 deletions(-)
> 
> Heikki, any thoughts about this series?

Sorry, I did yet go over these yet. I'll review them now.

Guenter, have you had time to take a look at these?

Br,
Greg Kroah-Hartman Jan. 12, 2021, 12:06 p.m. UTC | #4
On Tue, Jan 12, 2021 at 12:57:28PM +0100, Hans de Goede wrote:
> Hi,
> 
> On 1/12/21 12:53 PM, Greg KH wrote:
> > On Wed, Jan 06, 2021 at 12:39:24AM +0800, Kyle Tso wrote:
> >> This series include previous patch "[v4] AMS and Collision Avoidance"
> >> https://lore.kernel.org/r/20201217030632.903718-1-kyletso@google.com
> >> and two more patches "Protocol Error handling" and "Respond Wait if...".
> >>
> >> The patch "AMS and Collision Avoidance" in [v5] is the same as the one
> >> in [v4] (only rebased to ToT).
> >>
> >> The patch "Protocol Error handling" is based on PD3 6.8.1 to fix the
> >> wrong handling.
> >>
> >> The patch "Respond Wait if..." is to fix a conflict when 
> >> DR/PR/VCONN_SWAP occurs just after the state machine enters Ready State.
> >>
> >> Kyle Tso (3):
> >>   usb: typec: tcpm: AMS and Collision Avoidance
> >>   usb: typec: tcpm: Protocol Error handling
> >>   usb: typec: tcpm: Respond Wait if VDM state machine is running
> >>
> >>  drivers/usb/typec/tcpm/tcpm.c | 925 +++++++++++++++++++++++++++++-----
> >>  include/linux/usb/pd.h        |   2 +
> >>  include/linux/usb/tcpm.h      |   4 +
> >>  3 files changed, 792 insertions(+), 139 deletions(-)
> > 
> > Heikki, any thoughts about this series?
> 
> Note I plan to test this series on a device with a fusb302 Type-C
> controller, where it broke role-swappings in a previous version of
> this series. This is supposed to be fixed now but I would like to
> confirm this.
> 
> I've had this on my todo list for a while now. I've
> now put this in my calendar as a task for tomorrow. So please wait
> till you hear back from me (hopefully with a Tested-by) with
> merging this, thanks.

No worries, just wanted to make sure it didn't fall through the cracks.

thanks for testing!

greg k-h
Heikki Krogerus Jan. 12, 2021, 2:04 p.m. UTC | #5
On Wed, Jan 06, 2021 at 12:39:24AM +0800, Kyle Tso wrote:
> This series include previous patch "[v4] AMS and Collision Avoidance"
> https://lore.kernel.org/r/20201217030632.903718-1-kyletso@google.com
> and two more patches "Protocol Error handling" and "Respond Wait if...".
> 
> The patch "AMS and Collision Avoidance" in [v5] is the same as the one
> in [v4] (only rebased to ToT).
> 
> The patch "Protocol Error handling" is based on PD3 6.8.1 to fix the
> wrong handling.
> 
> The patch "Respond Wait if..." is to fix a conflict when 
> DR/PR/VCONN_SWAP occurs just after the state machine enters Ready State.
> 
> Kyle Tso (3):
>   usb: typec: tcpm: AMS and Collision Avoidance
>   usb: typec: tcpm: Protocol Error handling
>   usb: typec: tcpm: Respond Wait if VDM state machine is running
> 
>  drivers/usb/typec/tcpm/tcpm.c | 925 +++++++++++++++++++++++++++++-----
>  include/linux/usb/pd.h        |   2 +
>  include/linux/usb/tcpm.h      |   4 +
>  3 files changed, 792 insertions(+), 139 deletions(-)

These are OK by me. The few comments I had were all minor nitpicks,
but I would appreciate if you could fix them in any case. After that,
FWIW:

Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>


thanks,
Guenter Roeck Jan. 12, 2021, 2:09 p.m. UTC | #6
On 1/12/21 3:59 AM, Heikki Krogerus wrote:
> On Tue, Jan 12, 2021 at 12:53:56PM +0100, Greg KH wrote:
>> On Wed, Jan 06, 2021 at 12:39:24AM +0800, Kyle Tso wrote:
>>> This series include previous patch "[v4] AMS and Collision Avoidance"
>>> https://lore.kernel.org/r/20201217030632.903718-1-kyletso@google.com
>>> and two more patches "Protocol Error handling" and "Respond Wait if...".
>>>
>>> The patch "AMS and Collision Avoidance" in [v5] is the same as the one
>>> in [v4] (only rebased to ToT).
>>>
>>> The patch "Protocol Error handling" is based on PD3 6.8.1 to fix the
>>> wrong handling.
>>>
>>> The patch "Respond Wait if..." is to fix a conflict when 
>>> DR/PR/VCONN_SWAP occurs just after the state machine enters Ready State.
>>>
>>> Kyle Tso (3):
>>>   usb: typec: tcpm: AMS and Collision Avoidance
>>>   usb: typec: tcpm: Protocol Error handling
>>>   usb: typec: tcpm: Respond Wait if VDM state machine is running
>>>
>>>  drivers/usb/typec/tcpm/tcpm.c | 925 +++++++++++++++++++++++++++++-----
>>>  include/linux/usb/pd.h        |   2 +
>>>  include/linux/usb/tcpm.h      |   4 +
>>>  3 files changed, 792 insertions(+), 139 deletions(-)
>>
>> Heikki, any thoughts about this series?
> 
> Sorry, I did yet go over these yet. I'll review them now.
> 
> Guenter, have you had time to take a look at these?
> 

Not yet. I have been been buried lately :-(

Guenter
Heikki Krogerus Jan. 13, 2021, 11:41 a.m. UTC | #7
On Tue, Jan 12, 2021 at 06:09:28AM -0800, Guenter Roeck wrote:
> On 1/12/21 3:59 AM, Heikki Krogerus wrote:
> > On Tue, Jan 12, 2021 at 12:53:56PM +0100, Greg KH wrote:
> >> On Wed, Jan 06, 2021 at 12:39:24AM +0800, Kyle Tso wrote:
> >>> This series include previous patch "[v4] AMS and Collision Avoidance"
> >>> https://lore.kernel.org/r/20201217030632.903718-1-kyletso@google.com
> >>> and two more patches "Protocol Error handling" and "Respond Wait if...".
> >>>
> >>> The patch "AMS and Collision Avoidance" in [v5] is the same as the one
> >>> in [v4] (only rebased to ToT).
> >>>
> >>> The patch "Protocol Error handling" is based on PD3 6.8.1 to fix the
> >>> wrong handling.
> >>>
> >>> The patch "Respond Wait if..." is to fix a conflict when 
> >>> DR/PR/VCONN_SWAP occurs just after the state machine enters Ready State.
> >>>
> >>> Kyle Tso (3):
> >>>   usb: typec: tcpm: AMS and Collision Avoidance
> >>>   usb: typec: tcpm: Protocol Error handling
> >>>   usb: typec: tcpm: Respond Wait if VDM state machine is running
> >>>
> >>>  drivers/usb/typec/tcpm/tcpm.c | 925 +++++++++++++++++++++++++++++-----
> >>>  include/linux/usb/pd.h        |   2 +
> >>>  include/linux/usb/tcpm.h      |   4 +
> >>>  3 files changed, 792 insertions(+), 139 deletions(-)
> >>
> >> Heikki, any thoughts about this series?
> > 
> > Sorry, I did yet go over these yet. I'll review them now.
> > 
> > Guenter, have you had time to take a look at these?
> > 
> 
> Not yet. I have been been buried lately :-(

No worries. It looks like there are now plenty of guys reviewing this.

Br,