lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Tue, 28 Nov 2017 09:23:50 +0000
From:   Adam Thomson <Adam.Thomson.Opensource@...semi.com>
To:     Badhri Jagan Sridharan <badhri@...gle.com>,
        Adam Thomson <Adam.Thomson.Opensource@...semi.com>
CC:     "heikki.krogerus@...ux.intel.com" <heikki.krogerus@...ux.intel.com>,
        "gregkh@...uxfoundation.org" <gregkh@...uxfoundation.org>,
        "dan.carpenter@...cle.com" <dan.carpenter@...cle.com>,
        "linux@...ck-us.net" <linux@...ck-us.net>,
        "linux-usb@...r.kernel.org" <linux-usb@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: RE: [PATCH 2/2 v7] typec: tcpm: Only request matching pdos

On 28 November 2017 01:38, Badhri Jagan Sridharan wrote:

> > examples in the kernel where this happens. Where are these functions likely to
> > be called from, as wherever that is it will need a reference to the port?
> > Actually should we be adding DT bindings to set supported src/snk PDOs from FW,
> > if you're taking this approach to PDO selection?
> >
> > This patch also seemingly leaves 'max_snk_mv', 'max_snk_ma' and 'max_snk_mv'
> > redundant, although those values can be configured from a PD controller driver
> > (e.g. fusb302 actually supports DT bindings which allow these to be set through
> > FW). Now these DT bindings are basically made redundant by your change as they
> > have no impact. Are we expecting these to be used again in the future, or should
> 
> Yes, I think  'max_snk_mv', 'max_snk_ma' and 'max_snk_mw' etc should be
> removed.
> The problem here is that maintaining these values implies that tcpm is
> not going to
> request pdo based on the sink_caps that are published. All these
> values can be derived from
> the sink_pdo objects that were declared, hence, they are redundant,
> I will update the patch to remove this.

I have no problem really with this approach, other than right now with your
patch there's no way to actually set the PDOs other than the 2 functions to
update source and sink capabilities. Previously you had the option, at least
through the fusb302 driver, to configure the max_snk_* values from DT, but your
patch obviously changes this behaviour. I think we need a FW based method of
configuring these at startup at least, as with your current patch the values
being used are hard coded. As this is generic for TCPM I would guess DT bindings
(and maybe equivalent ACPI properties as well I guess) would be a sensible
approach.
 
> > these be removed? FYI, as part of my PPS patch set I have been using them as
> > part of the PPS APDO selection criteria, based on TCPM code prior to your
> > modifications, as for PPS we're interested in a wide range of voltages and
> > currents but want to stay within the platforms limits.
> 
> Arent you defining a new PDO type similar to PDO_FIXED, PDO_VARIABLE etc ?
> If so values such as " 'max_snk_mv', 'max_snk_ma' and
> 'max_snk_mw' " should be part of the APDO object right ? So why would
> you still need
>  'max_snk_mv', 'max_snk_ma' and 'max_snk_mw'  ?

My initial implementation was based on the approach before your changes, and
actually for PPS this to me made sense, at least from the sink side. We are
dealing with a range of voltages and currents so the important points are the
maximum values. However, if we're now making decisions based on sink PDOs then
I can look at adapting.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ