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: <CAFp+6iH=Q9eBiN7XesPT+L=se6upUrXGxmO9DBC+OkPS0+dMnA@mail.gmail.com>
Date:	Thu, 14 Aug 2014 19:59:07 +0530
From:	Vivek Gautam <gautam.vivek@...sung.com>
To:	Alan Stern <stern@...land.harvard.edu>
Cc:	Linux USB Mailing List <linux-usb@...r.kernel.org>,
	Greg KH <gregkh@...uxfoundation.org>,
	"linux-arm-kernel@...ts.infradead.org" 
	<linux-arm-kernel@...ts.infradead.org>,
	"linux-samsung-soc@...r.kernel.org" 
	<linux-samsung-soc@...r.kernel.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	Kukjin Kim <kgene.kim@...sung.com>,
	Sachin Kamat <sachin.kamat@...sung.com>,
	Jingoo Han <jg1.han@...sung.com>
Subject: Re: [PATCH RESEND] usb: ehci/ohci-exynos: Fix PHY getting sequence

Hi Alan,


On Tue, Aug 5, 2014 at 7:41 PM, Alan Stern <stern@...land.harvard.edu> wrote:
> On Tue, 5 Aug 2014, Vivek Gautam wrote:
>
>> Since we want to keep support for both older usb-phys as well as the
>> newer generic phys, lets first get the generic PHYs and fallback to
>> older USB-PHYs only when we fail to get the former.
>> This should fix the issue with ehci-exynos and ohci-exynos, wherein
>> in the absence of SAMSUNG_USB2PHY config symbol, we end up getting
>> the NOP_USB_XCEIV phy when the same is enabled. And thus the PHYs
>> are not configured properly.
>>
>> Reported-by: Sachin Kamat <sachin.kamat@...sung.com>
>> Signed-off-by: Vivek Gautam <gautam.vivek@...sung.com>
>> Cc: Alan Stern <stern@...land.harvard.edu>
>> Cc: Jingoo Han <jg1.han@...sung.com>
>> ---
>>
>> Based on 'usb-next' branch.
>> Resending it after adding 'Reported-by' tag.
>>
>>  drivers/usb/host/ehci-exynos.c |   40 +++++++++++++++++-----------------
>>  drivers/usb/host/ohci-exynos.c |   47 +++++++++++++++++++---------------------
>>  2 files changed, 42 insertions(+), 45 deletions(-)
>>
>> diff --git a/drivers/usb/host/ehci-exynos.c b/drivers/usb/host/ehci-exynos.c
>> index cda0a2f..2eed9a4 100644
>> --- a/drivers/usb/host/ehci-exynos.c
>> +++ b/drivers/usb/host/ehci-exynos.c
>> @@ -62,18 +62,6 @@ static int exynos_ehci_get_phy(struct device *dev,
>>       int phy_number;
>>       int ret = 0;
>>
>> -     exynos_ehci->phy = devm_usb_get_phy(dev, USB_PHY_TYPE_USB2);
>> -     if (IS_ERR(exynos_ehci->phy)) {
>> -             ret = PTR_ERR(exynos_ehci->phy);
>> -             if (ret != -ENXIO && ret != -ENODEV) {
>> -                     dev_err(dev, "no usb2 phy configured\n");
>> -                     return ret;
>> -             }
>> -             dev_dbg(dev, "Failed to get usb2 phy\n");
>> -     } else {
>> -             exynos_ehci->otg = exynos_ehci->phy->otg;
>> -     }
>> -
>>       for_each_available_child_of_node(dev->of_node, child) {
>>               ret = of_property_read_u32(child, "reg", &phy_number);
>>               if (ret) {
>> @@ -90,15 +78,27 @@ static int exynos_ehci_get_phy(struct device *dev,
>
> What about the code that you skipped here?  Suppose the
> of_property_read_32() call returns an error.  Do you then want to abort
> the whole thing, or should you go on to try the old usb_phy?

I have posted a patch-series [1] which cleans up the entire samsug
usb2 phy from older usb-phy
layer, and further removes the support for these older usb-phy from
ehci-exynos and ohci-exynos.
Please let me know your comments.


[1]:  [PATCH 0/7] usb-phy: samsung: Cleanup the unused drivers



-- 
Best Regards
Vivek Gautam
Samsung R&D Institute, Bangalore
India
--
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