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: <D958900912E20642BCBC71664EFECE3E6DDF6014CF@BGMAIL02.nvidia.com>
Date:	Sat, 22 Sep 2012 14:08:11 +0530
From:	Venu Byravarasu <vbyravarasu@...dia.com>
To:	Stephen Warren <swarren@...dotorg.org>,
	"ABRAHAM, KISHON VIJAY" <kishon@...com>
CC:	"balbi@...com" <balbi@...com>,
	"gregkh@...uxfoundation.org" <gregkh@...uxfoundation.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"linux-usb@...r.kernel.org" <linux-usb@...r.kernel.org>
Subject: RE: [PATCH v3] USB: PHY: Re-organize Tegra USB PHY driver

> -----Original Message-----
> From: Stephen Warren [mailto:swarren@...dotorg.org]
> Sent: Friday, September 21, 2012 9:45 PM
> To: ABRAHAM, KISHON VIJAY
> Cc: Venu Byravarasu; balbi@...com; gregkh@...uxfoundation.org; linux-
> kernel@...r.kernel.org; linux-usb@...r.kernel.org
> Subject: Re: [PATCH v3] USB: PHY: Re-organize Tegra USB PHY driver
> 
> On 09/21/2012 07:09 AM, ABRAHAM, KISHON VIJAY wrote:
> > Hi,
> >
> > On Fri, Sep 21, 2012 at 5:50 PM, Venu Byravarasu
> <vbyravarasu@...dia.com> wrote:
> >> NVIDIA produces several Tegra SoCs viz Tegra20, Tegra30 etc.
> >> In order to support USB PHY drivers on these SoCs, existing
> >> PHY driver is split into SoC agnostic common USB PHY driver
> >> and Tegra20-specific USB phy driver. This will facilitate
> >> easy addition and deletion of phy drivers for Tegra SoCs.
> 
> >> @@ -618,6 +618,9 @@ static int tegra_ehci_probe(struct platform_device
> *pdev)
> ...
> >>         pdata = pdev->dev.platform_data;
> >>         if (!pdata) {
> 
> Some missing lines of context are:
> 
>                 dev_err(&pdev->dev, "Platform data missing\n");
>                 return -EINVAL;
>         }
> 
> ...
> >> +       params.mode = TEGRA_USB_PHY_MODE_HOST;
> >> +       params.config = pdata->phy_config;
> >
> > I fail to understand how pdata is not NULL in dt boot. I know i've
> > already given this comment and you replied that you dint see any
> > crash. But I'd like to know where and how pdata gets populated.
> 
> In practice, the platform uses AUXDATA to provide platform data to the
> driver even when it's instantiated using device tree; see
> arch/arm/mach-tegra/board-dt-tegra20.c variables tegra_ehci*_pdata and
> tegra20_auxdata_lookup[].
> 
> In the slightly (very very slightly, hopefully) longer term, I would
> like to completely remove the AUXDATA setup from board-dt-tegra20.c;
> tegra_ehci_probe() should do something like:
> 
> pdata = pdev->dev.platform_data
> if (!pdata)
>     pdata = parse_pdata_from_dt();
> /* user didn't specify any in DT either */
> if (!pdata)
>     pdata = default_pdata_for_port();
> 
> ... where perhaps the use of defaults could be folded into
> parse_pdata_from_dt().
 

Thanks Stephen for the detailed explanation.

Kishon / Felipe,
Do you have any more questions in this related, before patch can be applied?
--
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