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: <1392821911.17130.63.camel@iivanov-dev>
Date:	Wed, 19 Feb 2014 16:58:31 +0200
From:	"Ivan T. Ivanov" <iivanov@...sol.com>
To:	Tim Bird <tbird20d@...il.com>
Cc:	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>,
	Rob Landley <rob@...dley.net>,
	Peter Chen <Peter.Chen@...escale.com>,
	Grant Likely <grant.likely@...aro.org>,
	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	David Brown <davidb@...eaurora.org>,
	"devicetree@...r.kernel.org" <devicetree@...r.kernel.org>,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
	linux-usb@...r.kernel.org, linux-arm-msm@...r.kernel.org
Subject: Re: [PATCH v2 0/3] usb: chipidea: msm: Clean and fix glue layer
 driver


Hi Tim, 

On Tue, 2014-02-18 at 22:21 -0800, Tim Bird wrote: 
> Ivan,
> 
> I'm having tremendous problems getting this driver to initialize.  For
> some reason, I can't get the driver to actually transition the
> hardware into peripheral mode.  At first I was getting a lot of probe
> deferrals, based on not finding the regulators early enough in the
> boot, and I thought it was an issue with the gadget drivers loading
> before the driver could complete its setup.  However, I switched
> everything to loading via modules, and now have less probe deferrals,
> but I still can't get the driver to activate.

My understanding for gadget drivers is that you can have only one 
of them active in particular time. When compiled in kernel you can 
chose only one of them, also you can have only one module (function)
loaded. 


>   I see zero interrupts.

Right, I think that we will not see interrupts until we have
SPMI drivers which could control PMIC chip, PMIC is responsible
to do ID line detection and generate IRQ to APQ/MSM chip.

> In particular the routine hw_device_state (which turns on interrupts
> in the controller) is never called, because I can't get
> msm_otg_start_peripheral to actually kick the hardware.
> 

OTG state machine is not used at all. This phy-"otg" driver is 
working only in "peripheral" mode, because of missing PMIC
communication. 

The only callback which you could see to be executed is 
struct usb_otg::set_peripheral(), when you load gadget driver.


<snip>

(Would you mind sharing your config?).

Sure. Attached. 


> I tried configuring the qcom,otg-control for user controlled mode
> setting (via debugfs), 

Never testes this. It was there before.

> 
> My kernel is based on an internal Sony 3.13-rc6 kernel with clock and
> regulator patches applied, as well as your phy-msm-usb.c patches from
> November and your chipidea patches from yesterday.

You will need also 4th chipidea patch[1]. I have dropped it, because 
I will like to upstream PHY driver changes first. They are depended
anyway.

To reduce dependency to other drivers, I could recommend you to 
use Zero gadget driver. It should be enough to test USB stack, 
where APQ device will be peripheral and development workstation 
will be a host[2]. 


# cat zero.sh 
#!/bin/sh
cd /lib/modules/$(uname -r)/kernel/drivers/usb/gadget
insmod ./libcomposite.ko 
insmod ./usb_f_ss_lb.ko
insmod ./g_zero.ko


> [   22.454287] [<c022afd8>] (warn_slowpath_common+0x68/0x88) from
> [<c022b08c>] (warn_slowpath_fmt+0x30/0x40)
> [   22.463060] [<c022b08c>] (warn_slowpath_fmt+0x30/0x40) from
> [<bf005024>] (msm_otg_probe+0x24/0x904 [phy_msm_usb])
> [   22.472703] [<bf005024>] (msm_otg_probe+0x24/0x904 [phy_msm_usb])

This is know non-fatal issue. I will try to see how to fix it.


Regards,
Ivan

[1] usb: chipidea: msm: Use USB PHY API to control PHY state
[2] http://www.linux-usb.org/usbtest/



View attachment "config-usb2" of type "text/plain" (53562 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ