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]
Date:	Wed, 26 Jun 2013 17:37:19 +0530
From:	George Cherian <george.cherian@...com>
To:	<balbi@...com>
CC:	<linux-usb@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
	<gregkh@...uxfoundation.org>, <linux-omap@...r.kernel.org>
Subject: Re: [PATCH] usb: dwc3: core: continue probe even if usb3 phy is not
 available

On 6/26/2013 3:46 PM, Felipe Balbi wrote:
> Hi,
>
> On Wed, Jun 26, 2013 at 02:59:14PM +0530, George Cherian wrote:
>> There can be configurations in which DWC3 is hoooked up only to USB2 PHY.
>> In such cases we should not return -EPROBE_DEFER, rather continue probe
>> even if there is no USB3 PHY.
>>
>> Signed-off-by: George Cherian <george.cherian@...com>
>> ---
>>   drivers/usb/dwc3/core.c | 31 ++++++++++++++++++++++++-------
>>   1 file changed, 24 insertions(+), 7 deletions(-)
>>
>> diff --git a/drivers/usb/dwc3/core.c b/drivers/usb/dwc3/core.c
>> index c35d49d..d5e6f3e 100644
>> --- a/drivers/usb/dwc3/core.c
>> +++ b/drivers/usb/dwc3/core.c
>> @@ -100,7 +100,9 @@ static void dwc3_core_soft_reset(struct dwc3 *dwc)
>>   	dwc3_writel(dwc->regs, DWC3_GUSB2PHYCFG(0), reg);
>>   
>>   	usb_phy_init(dwc->usb2_phy);
>> -	usb_phy_init(dwc->usb3_phy);
>> +
>> +	if (dwc->usb3_phy)
>> +		usb_phy_init(dwc->usb3_phy);
> I would feel more comfortable if you would move our maximum_speed module
> parameter to DT with a property such as:
>
> snps,maximum_speed = "highspeed";
>
> then on driver you could:
okay
> ret = of_property_read_string(np, "snps,maximum_speed", &maximum_speed);
> if (ret < 0)
> 	bailout();
>
> if (strncmp(maximum_speed, "superspeed", 10) == 0) {
> 	/* grab USB3 PHY, return EPROBE_DEFER if not found */
> 	grab_usb3_phy();
> }
>
> if ((strncmp(maximum_speed, "highspeed", 9) == 0) ||
> 	(strncmp(maximum_speed, "fullspeed", 9) == 0) ||
> 	(strncmp(maximum_speed, "lowspeed", 8) == 0)) {
> 	/* grab USB2 PHY, return EPROBE_DEFER if not found */
> 	grab_usb2_phy();
> }
>
> this way, we depend solely on setting maximum_speed to highspeed for
> AM437x :-)
In dra7xx one instance is superspeed and one instance highspeed.
>
> ps: don't forget to default to superspeed in case no property is passed.
okay
Regards
-George
--
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