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: <ff55893f6876fe04de43906db927fbe1139dc4da.camel@nvidia.com>
Date:   Tue, 18 Oct 2022 03:20:32 +0000
From:   Jim Lin <jilin@...dia.com>
To:     Jonathan Hunter <jonathanh@...dia.com>
CC:     "linux-usb@...r.kernel.org" <linux-usb@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "gregkh@...uxfoundation.org" <gregkh@...uxfoundation.org>,
        "linux-tegra@...r.kernel.org" <linux-tegra@...r.kernel.org>,
        "thierry.reding@...il.com" <thierry.reding@...il.com>,
        "mathias.nyman@...el.com" <mathias.nyman@...el.com>
Subject: Re: [PATCH v3] xhci: tegra: USB2 pad power controls

On Mon, 2022-10-17 at 21:17 +0100, Jon Hunter wrote:
> On 17/10/2022 10:36, Jim Lin wrote:
> > On Wed, 2022-10-12 at 12:45 +0100, Jon Hunter wrote:
> > > On 12/10/2022 11:25, Jim Lin wrote:
> > > > Program USB2 pad PD controls during port connect/disconnect,
> > > > port
> > > > suspend/resume, and test mode, to reduce power consumption on
> > > > disconnect or suspend.
> > > > 
> > > > Signed-off-by: Jim Lin <jilin@...dia.com>
> > > > ---
> > > > v2: Fix issue that wrong tegra->phys[] may be accessed on
> > > > tegra124
> > > > v3: No change on copyright
> > > > 
> > > >    drivers/usb/host/xhci-tegra.c | 139
> > > > +++++++++++++++++++++++++++++++++-
> > > >    1 file changed, 138 insertions(+), 1 deletion(-)
> > > > 
> > > > diff --git a/drivers/usb/host/xhci-tegra.c
> > > > b/drivers/usb/host/xhci-
> > > > tegra.c
> > > > index c8af2cd2216d..996182a1959f 100644
> > > > --- a/drivers/usb/host/xhci-tegra.c
> > > > +++ b/drivers/usb/host/xhci-tegra.c
> > > > @@ -189,6 +189,13 @@ struct tegra_xusb_context_soc {
> > > >    	} fpci;
> > > >    };
> > > >    
> > > > +enum tegra_xhci_phy_type {
> > > > +	USB3_PHY,
> > > > +	USB2_PHY,
> > > > +	HSIC_PHY,
> > > > +	MAX_PHY_TYPES,
> > > > +};
> > > > +
> > > >    struct tegra_xusb_soc {
> > > >    	const char *firmware;
> > > >    	const char * const *supply_names;
> > > > @@ -274,9 +281,17 @@ struct tegra_xusb {
> > > >    
> > > >    	bool suspended;
> > > >    	struct tegra_xusb_context context;
> > > > +	u32 enable_utmi_pad_after_lp0_exit;
> > > >    };
> > > >    
> > > >    static struct hc_driver __read_mostly tegra_xhci_hc_driver;
> > > > +static int (*original_xhci_hub_control)(struct usb_hcd *hcd,
> > > > u16
> > > > typeReq, u16 wValue, u16 wIndex,
> > > > +	    char *buf, u16 wLength);
> > > 
> > > Is it better to add this function pointer to the tegra_xusb
> > > structure?
> > > 
> > > Jon
> > > 
> > 
> > Do you mean removing variable "original_xhci_hub_control" and save
> > function pointer to the tegra_xusb structure ?
> > 
> > But that doesn't look possible over here to point to tegra_xusb
> > structure and save pointer (to tegra_xhci_hc_driver.hub_control)
> > into
> > it.
> 
> 
> Ah yes, this is in the init function and so we can't do that. Any
> issue 
> with calling xhci_hub_control() directly in the function 
> tegra_xhci_hub_control()?
> 
> Jon
> 
Thanks, will try.

--nvpublic

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ