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]
Message-ID: <1466671138.2556.5.camel@suse.com>
Date:	Thu, 23 Jun 2016 10:38:58 +0200
From:	Oliver Neukum <oneukum@...e.com>
To:	Heikki Krogerus <heikki.krogerus@...ux.intel.com>
Cc:	Felipe Balbi <felipe.balbi@...ux.intel.com>,
	Greg KH <gregkh@...uxfoundation.org>,
	Guenter Roeck <linux@...ck-us.net>,
	linux-kernel@...r.kernel.org, linux-usb@...r.kernel.org
Subject: Re: [PATCHv3 1/2] usb: USB Type-C connector class

On Thu, 2016-06-23 at 11:23 +0300, Heikki Krogerus wrote:
> On Wed, Jun 22, 2016 at 06:44:18PM +0200, Oliver Neukum wrote:

> No it's not. DRP means a port that can operate as _either_ Source
> (host) or Sink (device), but not at the same time..

Yes, but it is unclear what you will be after a connection
and that's the point.

> > And you can be able to become a host and be able to become a device.
> > But not at the same time. These ports are switchable.
> > 
> > The current API cannot express the difference.
> 
> I think you have misunderstood something. The only case where the port
> can be dual-role is if it's set to be DRP. Otherwise it's Source only
> OR Sink only.
> 
> The "Role Supported" bits only tell us how we can program for example
> the ROLE_CONTROL registers. I guess the "Roles Supported" bits in
> DEVICE_CAPABILITIES are not explained properly, so let's go over them
> here:
> 
> 000b = Source _or_ Sink only
> 001b = Source only
> 010b = Sink only
> 011b = Sink only with support for autonomously detected accessory modes
> 100b = DRP only, and this I believe mean we can not program the port
>         to be Sink only or Source only

I think so, too.

> 101b = Source only OR Sink only OR DRP, plus ability to detect
>         accessories and I guess also cables autonomously
> 110b = Source only OR Sink only OR DRP
> 
> So where the spec lists "Source, Sink", it actually should have said
> "Source only OR Sink only".
> 
> But you still have only the following options for a port:
> 1) Source only (host)
> 2) Sink only (device)
> 3) DRP (device, host)

Yes, so you can map "000b = Source _or_ Sink only" to host or device
depending on the current setting. But then you lose the information
that it can be changed. It either will look like "001b" or "010b".
So we throw away information.

And you map "100b = DRP only" and "101b" and "110b" to host, device
which again drops information.

	Regards
		Oliver


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ