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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Tue, 30 Nov 2021 09:47:26 +0000
From:   Neal Liu <neal_liu@...eedtech.com>
To:     Benjamin Herrenschmidt <benh@...nel.crashing.org>,
        Felipe Balbi <balbi@...nel.org>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Joel Stanley <joel@....id.au>,
        Andrew Jeffery <andrew@...id.au>,
        Cai Huoqing <caihuoqing@...du.com>,
        Tao Ren <rentao.bupt@...il.com>,
        Julia Lawall <julia.lawall@...ia.fr>,
        kernel test robot <lkp@...el.com>,
        Sasha Levin <sashal@...nel.org>,
        "linux-usb@...r.kernel.org" <linux-usb@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "linux-arm-kernel@...ts.infradead.org" 
        <linux-arm-kernel@...ts.infradead.org>,
        "linux-aspeed@...ts.ozlabs.org" <linux-aspeed@...ts.ozlabs.org>
Subject: RE: [PATCH 2/3] usb: aspeed-vhub: support remote wakeup feature

> -----Original Message-----
> From: Benjamin Herrenschmidt <benh@...nel.crashing.org>
> Sent: Tuesday, November 30, 2021 7:46 AM
> To: Neal Liu <neal_liu@...eedtech.com>; Felipe Balbi <balbi@...nel.org>;
> Greg Kroah-Hartman <gregkh@...uxfoundation.org>; Joel Stanley
> <joel@....id.au>; Andrew Jeffery <andrew@...id.au>; Cai Huoqing
> <caihuoqing@...du.com>; Tao Ren <rentao.bupt@...il.com>; Julia Lawall
> <julia.lawall@...ia.fr>; kernel test robot <lkp@...el.com>; Sasha Levin
> <sashal@...nel.org>; linux-usb@...r.kernel.org; linux-kernel@...r.kernel.org;
> linux-arm-kernel@...ts.infradead.org; linux-aspeed@...ts.ozlabs.org
> Cc: BMC-SW <BMC-SW@...eedtech.com>
> Subject: Re: [PATCH 2/3] usb: aspeed-vhub: support remote wakeup feature
> 
> On Fri, 2021-11-26 at 19:09 +0800, Neal Liu wrote:
> > Remote wakeup signaling will be automatically issued whenever any
> > write commands has been received in suspend state.
> 
> > --- a/drivers/usb/gadget/udc/aspeed-vhub/core.c
> > +++ b/drivers/usb/gadget/udc/aspeed-vhub/core.c
> > @@ -240,6 +240,9 @@ void ast_vhub_init_hw(struct ast_vhub *vhub)
> >  	if (vhub->force_usb1)
> >  		ctrl |= VHUB_CTRL_FULL_SPEED_ONLY;
> >
> > +	/* Enable auto remote wakeup */
> > +	ctrl |= VHUB_CTRL_AUTO_REMOTE_WAKEUP;
> > +
> >  	ctrl |= VHUB_CTRL_UPSTREAM_CONNECT;
> >  	writel(ctrl, vhub->regs + AST_VHUB_CTRL);
> 
> Should this  be controlled by d->wakeup_en ? IE, we have a feature for the
> host to enable/disable remote wakeup, should we honor it ?
> 
For KVM usage, remote keyboard packet would be sent if user wants to do remote wakeup.
In this case, d->wakeup_en is not used.
Set VHUB_CTRL_AUTO_REMOTE_WAKEUP to enable HW automatically signaling wakeup if
any packet would be transferred.

> > +	} else if (wValue == USB_DEVICE_TEST_MODE) {
> > +		val = readl(d->vhub->regs + AST_VHUB_CTRL);
> > +		val &= ~GENMASK(10, 8);
> > +		val |= VHUB_CTRL_SET_TEST_MODE((wIndex >> 8) & 0x7);
> > +		writel(val, d->vhub->regs + AST_VHUB_CTRL);
> 
> This is unrelated to remote wakeup is it ? In which case it should probably be a
> separate patch.
> 
> Cheers,
> Ben.
> 
Yes, I'll separate this patch.
Thanks

-Neal

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ