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] [day] [month] [year] [list]
Date:	Mon, 9 May 2016 17:47:59 -0500
From:	David Lechner <david@...hnology.com>
To:	Bin Liu <b-liu@...com>, petr@...ix.com,
	sergei.shtylyov@...entembedded.com, khilman@...nel.org,
	nsekhar@...com, Rob Herring <robh+dt@...nel.org>,
	Pawel Moll <pawel.moll@....com>,
	Mark Rutland <mark.rutland@....com>,
	Ian Campbell <ijc+devicetree@...lion.org.uk>,
	Kumar Gala <galak@...eaurora.org>,
	Kishon Vijay Abraham I <kishon@...com>,
	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	Alan Stern <stern@...land.harvard.edu>,
	Lee Jones <lee.jones@...aro.org>, devicetree@...r.kernel.org,
	linux-kernel@...r.kernel.org, linux-usb@...r.kernel.org
Subject: Re: [PATCH v4 3/7] phy: Add set_mode callback

On 05/04/2016 01:39 PM, Bin Liu wrote:
> On Wed, May 04, 2016 at 01:20:36PM -0500, David Lechner wrote:
>> This is something I actually plan on using because the device I am
>> using (LEGO MINDSTORMS EV3) is not wired for OTG, so the callback is
>> needed to override the ID and VBUS signals when switching between
>> host and peripheral mode.
>
> Have you already tested this? I never tried changing mode via sysfs, but
> by quickly reviewing the code, I am wondering how it works. the core
> only calls ops->set_mode() but nothing else. To really switch the mode,
> the driver has to talk to the root hub, and manipulate the SESSION
> bit...
>

I have tested this now and it works. It works because by setting the 
mode, we are overriding the VBUS and ID signals, which in turn triggers 
interrupts. I have tested switching to both peripheral mode and host 
mode via sysfs. Host mode has some issues if you are using a 
self-powered device, but that is a bug in the da8xx glue layer and 
shouldn't hold up this patch series. Aside from that, it works exactly 
as expected.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ