From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753606AbdESN2E (ORCPT ); Fri, 19 May 2017 09:28:04 -0400 Received: from bh-25.webhostbox.net ([208.91.199.152]:60222 "EHLO bh-25.webhostbox.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751105AbdESN2B (ORCPT ); Fri, 19 May 2017 09:28:01 -0400 Subject: Re: [PATCH] usb: typec: Defer checking of valid power role swap to low level drivers To: Heikki Krogerus , Badhri Jagan Sridharan Cc: Oliver Neukum , Greg Kroah-Hartman , LKML , USB References: <20170517073219.8315-1-Badhri@google.com> <1495006472.30577.6.camel@suse.com> <2b7e6715-35b8-0d4a-fb28-3a59bd72916e@roeck-us.net> <1495098831.6672.2.camel@suse.com> <20170518165149.GA30223@roeck-us.net> <20170519103551.GD14626@kuha.fi.intel.com> From: Guenter Roeck Message-ID: <9b2b4f5a-d985-7ed4-c169-d42fcd3e95ef@roeck-us.net> Date: Fri, 19 May 2017 06:27:58 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.1.1 MIME-Version: 1.0 In-Reply-To: <20170519103551.GD14626@kuha.fi.intel.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Authenticated_sender: linux@roeck-us.net X-OutGoing-Spam-Status: No, score=-1.0 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - bh-25.webhostbox.net X-AntiAbuse: Original Domain - vger.kernel.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - roeck-us.net X-Get-Message-Sender-Via: bh-25.webhostbox.net: authenticated_id: linux@roeck-us.net X-Authenticated-Sender: bh-25.webhostbox.net: linux@roeck-us.net X-Source: X-Source-Args: X-Source-Dir: Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 05/19/2017 03:35 AM, Heikki Krogerus wrote: > On Thu, May 18, 2017 at 02:08:53PM -0700, Badhri Jagan Sridharan wrote: >> On Thu, May 18, 2017 at 9:51 AM, Guenter Roeck wrote: >>> On Thu, May 18, 2017 at 11:13:51AM +0200, Oliver Neukum wrote: >>>> Am Mittwoch, den 17.05.2017, 02:36 -0700 schrieb Guenter Roeck: >>>>> On 05/17/2017 12:34 AM, Oliver Neukum wrote: >>>>>> >>>>>> Am Mittwoch, den 17.05.2017, 00:32 -0700 schrieb Badhri Jagan >>>>>> Sridharan: >>>>>> >>>>>> Hi, >>>>>> >>>>>>> >>>>>>> "Two independent set of mechanisms are defined to allow a USB Type-C >>>>>>> DRP to functionally swap power and data roles. When USB PD is >>>>>>> supported, power and data role swapping is performed as a subsequent >>>>>>> step following the initial connection process. For non-PD implementations, >>>>>>> power/data role swapping can optionally be dealt with as part of the initial >>>>>>> connection process." >>>>>> >>>>>> Well, as I read it, without PD once a connection is established, you >>>>>> are stuck with your role. So it seems to me that blocking a later >>>>>> attempt to change it makes sense. >>>>>> >>>>> >>>>> That seems to be a harsh and not very user friendly reading of the specification. >>>>> >>>>> I would argue that the user doesn't care if the partner supports PD or not >>>>> when selecting a role, and I would prefer to provide an implementation which is >>>>> as user friendly as possible. >>>> >>>> Data role, no question, you are right. >>>> Power role is a different question. A switch of power role with PD should >>>> not lead to a disconnect. Any other method might. So equating them does >>>> not look like a good idea. >>>> >>> >>> Not really sure I can follow. If a partner does not support PD, there is no >>> real distinction between data role and power role, or am I missing something ? >>> >>> Are you saying that, if a partner does not support PD, user space should >>> request a data role swap instead, and that this would be acceptable for you ? >>> >>> I don't really understand the difference - a data role swap doesn't cause >>> a disconnect either if the partner supports PD, and it would still result >>> in a disconnect/reconnect sequence if the partner does not support PD - >>> but if it works for you, fine with me. >>> >>> Badhri, would that work for us ? >> >> Yes Geunter that should work as well. Requesting non-pd role swap either through >> current_power_role or current_data_role is virtually the same. > > So if I understood this correctly, we'll skip this change, right? > Yes. Thanks, Guenter