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-next>] [day] [month] [year] [list]
Message-Id: <1471471476-53251-1-git-send-email-groeck@chromium.org>
Date:	Wed, 17 Aug 2016 15:04:32 -0700
From:	Guenter Roeck <groeck@...omium.org>
To:	Felipe Balbi <felipe.balbi@...ux.intel.com>
Cc:	Chandra Sekhar Anagani <chandra.sekhar.anagani@...el.com>,
	Bruce Ashfield <bruce.ashfield@...driver.com>,
	Bin Gao <bin.gao@...el.com>,
	Pranav Tipnis <pranav.tipnis@...el.com>,
	Heikki Krogerus <heikki.krogerus@...ux.intel.com>,
	linux-kernel@...r.kernel.org, linux-usb@...r.kernel.org,
	Guenter Roeck <groeck@...omium.org>
Subject: [RFC PATCH v2 0/4] Type-C Port Manager

The following series of patches implements a USB Type-C Port Manager
using the pending USB Type-C class code as basis. The code is still WIP,
but I think it is important to get feedback from the community at this point.

There are four patches in the series. The first two patches make necessary
changes to the Type-C class code. The third patch implements the Type-C
Port Manager state machine. The forth patch is an interface between the
Type-C Port Manager and a TCPCI (Type-C Port Controller Interface) compliant
USB Type-C Port Controller.

Patch 4/4 (the interface to a TCPCI compliant chip) is currently untested
since I don't have the necessary hardware available. The port manager code
was tested connecting to an Embedded Controller on a Chromebook, bypassing
the Port Manager implementation in the EC.

Both Source and Sink operation was tested with various Type-C chargers, docks,
and connectors. Alternate mode support is partially implemented (Alternate mode
support is requested from the partner), but alternate modes are actually
selected. Implementing this will require more thought, since the actual
alternate mode support has to be implemented elsewhere, such as in a dedicated
Phy driver. It should be possible to implement the interface between phy driver
and Type-C Port Controller driver using extcon, but I have not further explored
the possibilities, and other options might be possible and/or better.

v2:
- Class code no longer uses locking, so the patch to remove it is no longer
  necessary.
- tcpm: Only update polarity if setting it was successful
  If setting the CC line polarity in the driver was not successful,
  don't update the internal polarity state.
- tcpm: All PD messages are little endian; convert to and from CPU endianness.
- tcpm: Avoid comparisons against NULL.
- tcpm: Use u8/u16/u32 instead of uint8_t/uint16_t/uint32_t consistently.
- tcpm/tcpc: Callbacks into tcpm need to be lockless to avoid timing problems
  in low level drivers.
- tcpm/tcpc: Simplify callbacks; tcpm can request the current state of cc/vbus
  when it is ready to use it.
- Applies to v5 of "USB Type-C Connector class" patch series.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ