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: <2fbfc146-a563-fc58-19d2-fc1f43381fa6@gmail.com>
Date:   Sat, 10 Jul 2021 00:29:11 +0300
From:   Dmitry Osipenko <digetx@...il.com>
To:     Michał Mirosław <mirq-linux@...e.qmqm.pl>
Cc:     Thierry Reding <treding@...dia.com>,
        Jonathan Hunter <jonathanh@...dia.com>,
        Mark Brown <broonie@...nel.org>,
        Rob Herring <robh+dt@...nel.org>,
        Sebastian Reichel <sre@...nel.org>,
        Peter Chen <peter.chen@...nel.org>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Felipe Balbi <balbi@...nel.org>,
        David Heidelberg <david@...t.cz>, devicetree@...r.kernel.org,
        linux-pm@...r.kernel.org, linux-usb@...r.kernel.org,
        linux-kernel@...r.kernel.org, linux-tegra@...r.kernel.org
Subject: Re: [PATCH v1 04/12] usb: phy: tegra: Support OTG mode programming

09.07.2021 01:32, Michał Mirosław пишет:
> On Thu, Jul 01, 2021 at 04:55:03PM +0300, Dmitry Osipenko wrote:
>> 01.07.2021 05:23, Dmitry Osipenko пишет:
>>>  static int tegra_usb_phy_init(struct usb_phy *u_phy)
>>> @@ -967,12 +1057,26 @@ static int tegra_usb_phy_init(struct usb_phy *u_phy)
>>>  			goto disable_vbus;
>>>  	}
>>>  
>>> +	err = tegra_usb_phy_configure_pmc(phy);
>>> +	if (err)
>>> +		goto close_phy;
>>> +
>>>  	err = tegra_usb_phy_power_on(phy);
>>>  	if (err)
>>>  		goto close_phy;
>>>  
>>> +	if (phy->irq > 0) {
>>> +		err = request_irq(phy->irq, tegra_usb_phy_isr, IRQF_SHARED,
>>> +				  dev_name(phy->u_phy.dev), phy);
>>> +		if (err)
>>> +			goto pwr_off_phy;
>>> +	}
>>
>> There were reports that this patch was casing an unhandled USB interrupt
>> event on some devices. I thought this problem was fixed already, but
>> looking again at the offending kernel log again, it still should be a
>> problem.
>>
>> The interrupt fires from the usb_add_hcd() of the CI driver before CI
>> driver have requested interrupt in ci_hdrc_probe(). So either CI driver
>> should request interrupt earlier or Tegra PHY driver should keep shared
>> interrupt disabled after requesting it, the latter variant should be
>> more robust. I'll improve it in v2.
> 
> I'd suggest the first solution, as the latter is a workaround for what
> is a normal shared interrupt behaviour. Maybe a controller reset is
> needed in CI driver before going on with PHY init?

I already implemented the second solution. The controller reset should
be okay. We could improve it all later on if will ever be needed, so far
it's unnecessary. I can't really work on improving the CI interrupt
because it requires to have a special testing setup to reproduce the
problem and I don't have that setup.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ