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:   Tue, 7 Jun 2022 09:07:59 +0200
From:   Clément Léger <clement.leger@...tlin.com>
To:     Alan Stern <stern@...land.harvard.edu>
Cc:     Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Nicolas Ferre <nicolas.ferre@...rochip.com>,
        Alexandre Belloni <alexandre.belloni@...tlin.com>,
        Claudiu Beznea <claudiu.beznea@...rochip.com>,
        linux-usb@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] usb: host: ohci-at91: add support to enter suspend
 using SMC

Le Mon, 6 Jun 2022 14:12:52 -0400,
Alan Stern <stern@...land.harvard.edu> a écrit :

> On Mon, Jun 06, 2022 at 04:18:02PM +0200, Clément Léger wrote:
> > When Linux is running under OP-TEE, the SFR is set as secured and thus
> > the AT91_OHCIICR_USB_SUSPEND register isn't accessible. Add a SMC to
> > do the appropriate call to suspend the controller.
> > The SMC id is fetched from the device-tree property
> > "microchip,suspend-smc-id". if present, then the syscon regmap is not
> > used to enter suspend and a SMC is issued.
> > 
> > Signed-off-by: Clément Léger <clement.leger@...tlin.com>
> > ---  
> 
> Acked-by: Alan Stern <stern@...land.harvard.edu>
> 
> However, this is a little weird...  You've written 
> usb_hcd_at91_probe() so that the SMC is detected in preference to the 
> regmap, but then you wrote ohci_at91_port_suspend() so that the regmap 
> is used in preference to the SMC.  It's not wrong, but it is confusing 
> to read.
> 
> Do you want to rewrite the patch to make the two routines agree on which 
> mechanism to use by default?
> 
> Alan Stern

Hi Alan,

I'll rewrite that ! I did it in this specific order in the probe to
allow overloading the device-tree with a SMC ID without removing the
syscon property. This way, the regmap stays the default if no
"microchip,suspend-smc-id" property is provided.

Does it sounds good to you ?

Thanks,

-- 
Clément Léger,
Embedded Linux and Kernel engineer at Bootlin
https://bootlin.com

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ