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, 28 Nov 2018 14:22:29 +0800
From:   Chunfeng Yun <chunfeng.yun@...iatek.com>
To:     "Hsin-Yi, Wang" <hsinyi@...omium.org>
CC:     <linux-arm-kernel@...ts.infradead.org>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        <linux-usb@...r.kernel.org>, <linux-mediatek@...ts.infradead.org>,
        <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] usb/mtu3: power down device ip at setup

Hi Hsin-Yi,

On Wed, 2018-11-28 at 14:04 +0800, Hsin-Yi, Wang wrote:
> Originally, when dr_mode is USB_DR_MODE_HOST, it didn't power down device ip,
> so host ip sleep will fail at ssusb_host_disable.
> 
> Power down device ip at ssusb_host_setup.
> 
> Signed-off-by: Hsin-Yi, Wang <hsinyi@...omium.org>
> ---
>  drivers/usb/mtu3/mtu3_host.c | 8 ++++++++
>  1 file changed, 8 insertions(+)
> 
> diff --git a/drivers/usb/mtu3/mtu3_host.c b/drivers/usb/mtu3/mtu3_host.c
> index c871b94f3e6f..d17cf43305db 100644
> --- a/drivers/usb/mtu3/mtu3_host.c
> +++ b/drivers/usb/mtu3/mtu3_host.c
> @@ -192,9 +192,17 @@ int ssusb_host_disable(struct ssusb_mtk *ssusb, bool suspend)
>  static void ssusb_host_setup(struct ssusb_mtk *ssusb)
>  {
>  	struct otg_switch_mtk *otg_sx = &ssusb->otg_switch;
> +	void __iomem *ibase = ssusb->ippc_base;
>  
>  	host_ports_num_get(ssusb);
>  
> +	/*
> +	 * device ip is default power-on in fact
The device ip is power-off by default, no need power down it here.

On which platform did you encounter the issue?

> +	 * power down device ip, otherwise ip-sleep will fail
> +	 */
> +	if (ssusb->dr_mode == USB_DR_MODE_HOST)
> +		mtu3_setbits(ibase, U3D_SSUSB_IP_PW_CTRL2, SSUSB_IP_DEV_PDN);
> +


>  	/*
>  	 * power on host and power on/enable all ports
>  	 * if support OTG, gadget driver will switch port0 to device mode


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ