Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1619396

USB Type-C Port Manager API concern

From Mats Karrman <mats.dev.list@gmail.com>
Newsgroups linux.kernel
Subject USB Type-C Port Manager API concern
Date 2017-04-09 01:20 +0200
Message-ID <tu7Oa-3lR-5@gated-at.bofh.it> (permalink)
References (5 earlier) <tgWGS-2zu-7@gated-at.bofh.it> <th13P-5HD-1@gated-at.bofh.it> <ti1bs-uP-39@gated-at.bofh.it> <tivVU-5Km-27@gated-at.bofh.it> <tiC1k-1GK-5@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


Hi Guenter,

 From a previous thread:

On 03/08/2017 02:38 AM, Guenter Roeck wrote:
> On 03/07/2017 02:30 PM, Mats Karrman wrote:
> [ ... ]
>
>>
>> I'm still struggling to catch up on what you guys have been up to 
>> during the
>> last year or so :-) and came across some patches of Guenter from last 
>> October:
>>
>> http://www.mail-archive.com/linux-kernel@vger.kernel.org/msg1243527.html
>>
>> What happened to them? Has there been any progress since then?
>>
>
> Updates to keep in sync with API changes, bug fixes, and minor 
> improvements,
> for the most part. I can post a current version if there is interest.
> The latest version is also available from
> https://chromium-review.googlesource.com/#/c/389917/

I'm working on a tcpi driver and have some concern about the tcpm api.
The tcpm_register_port() is typically called from the probe function of
tcpi driver where the tcpm_port reference returned is stored in the
driver private data. The problem I ran into is that tcpm_register_port()
calls back to the not yet fully initialized tcpi driver, causing null-
pointer dereferences. This could of course be solved by extra logic in
the tcpi driver but I think it would be more elegant if the registration
of a port could be free of premature callbacks. E.g. it could be required
that the tcpi driver probe called tcpm_tcpc_reset() once it's done
initializing or the necessary data could be supplied in the call to
tcpm_register_port().
What do you think?

BR,
Mats

Back to linux.kernel | Previous | NextNext in thread | Find similar | Unroll thread


Thread

USB Type-C Port Manager API concern Mats Karrman <mats.dev.list@gmail.com> - 2017-04-09 01:20 +0200
  Re: USB Type-C Port Manager API concern Guenter Roeck <linux@roeck-us.net> - 2017-04-09 17:20 +0200
    Re: USB Type-C Port Manager API concern Mats Karrman <mats.dev.list@gmail.com> - 2017-04-09 23:10 +0200

csiph-web