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]
Message-ID: <20140124101839.GA26766@pengutronix.de>
Date:	Fri, 24 Jan 2014 11:18:39 +0100
From:	Uwe Kleine-König 
	<u.kleine-koenig@...gutronix.de>
To:	Peter Chen <peter.chen@...escale.com>
Cc:	Chris Ruehl <chris.ruehl@...ys.com.hk>, gregkh@...uxfoundation.org,
	linux-usb@...r.kernel.org, linux-kernel@...r.kernel.org,
	kernel@...gutronix.de
Subject: Re: Regression on next-20140116 [Was: [PATCH 3/3 v4] usb: chipidea:
 hw_phymode_configure moved before ci_usb_phy_init]

Hello Peter,

On Thu, Jan 23, 2014 at 09:22:41AM +0800, Peter Chen wrote:
> On Wed, Jan 22, 2014 at 10:41:33PM +0100, Uwe Kleine-König wrote:
> > On Wed, Jan 22, 2014 at 10:49:51AM +0100, Uwe Kleine-König wrote:
> > > On Tue, Dec 03, 2013 at 04:01:50PM +0800, Chris Ruehl wrote:
> > > > usb: chipidea: hw_phymode_configure moved before ci_usb_phy_init
> > > > hw_phymode_configure configures the PORTSC registers and allow the
> > > > following phy_inits to operate on the right parameters. This fix a problem
> > > > where the UPLI (ISP1504) could not detected, because the Viewport was not
> > > > available and read the viewport return 0's only.
> > > This patch (or a later revision of it to be more exact) made it into
> > > mainline as cd0b42c2a6d2.
> > > 
> > > On an i.MX27 based machine I'm hitting an oops (see below) on
> > > next-20140116 + a few patches. (I didn't switch to 3.13+ yet, as I think
> > > not everything I need has landed there.) The oops goes away (and still
> > > better, lsusb reports my connected devices instead of "unable to
> > > initialize libusb: -99") when I do at least one of the following:
> > > 
> > >  - set CONFIG_USB_CHIPIDEA=y instead of =m
> > >  - revert commit
> > >       cd0b42c2a6d2 (usb: chipidea: put hw_phymode_configure before ci_usb_phy_init)
> > I debugged that a bit further and the problem is that
> > hw_phymode_configure depends on the phy's clk being enabled (i.e.
> > usb_ipg_gate) and this is only enforced in ci_usb_phy_init (via
> > usb_phy_init -> usb_gen_phy_init). When CONFIG_USB_CHIPIDEA=y the init
> > call to disable all unused clocks wasn't run yet and so the clock is
> > still on as this is the boot default.
> 
> I am a little puzzled at your platform
> 
> - Which phy you have used? ulpi phy ,internal phy or other external phy?
I'm using an ISP1504 (i.e. ULPI) phy.

> - If you use ulpi phy, why you still need to use nop phy driver?
I don't need to, that's just how I made it running. If you have a better
suggestion, don't hesitate to tell me. :-)

>  Besides, according to chris patch, the ulpi can only be visited after
> hw_phymode_configure?
It seems so, yes. For writing the PORTSC register the usb_ipg_gate clock
must be on. hw_phymode_configure writes the register and ci_usb_phy_init
enables the clock.

> - Do you have some hardware related operation at phy's probe? If it exists,
> why not move it to phy->init?
I guess that would work and the culprit is that I just took Chris' patch
because I don't have a clue about USB.

Best regards
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ