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: <CADrjBPrAr2QKej+aVQQua=DKEWNdkdLtPV_7L95Hj7L+kTv-Hg@mail.gmail.com>
Date: Wed, 7 Jan 2026 19:47:56 +0000
From: Peter Griffin <peter.griffin@...aro.org>
To: Bart Van Assche <bvanassche@....org>
Cc: Alim Akhtar <alim.akhtar@...sung.com>, 
	"James E.J. Bottomley" <James.Bottomley@...senpartnership.com>, 
	"Martin K. Petersen" <martin.petersen@...cle.com>, Krzysztof Kozlowski <krzk@...nel.org>, linux-scsi@...r.kernel.org, 
	linux-samsung-soc@...r.kernel.org, linux-arm-kernel@...ts.infradead.org, 
	linux-kernel@...r.kernel.org, kernel-team@...roid.com, 
	andre.draszik@...aro.org, willmcvicker@...gle.com, tudor.ambarus@...aro.org, 
	jyescas@...gle.com
Subject: Re: [PATCH v2] scsi: ufs: exynos: call phy_notify_state() from
 hibern8 callbacks

Hi Bart,

Thanks for your review feedback.

On Wed, 7 Jan 2026 at 16:57, Bart Van Assche <bvanassche@....org> wrote:
>
> On 1/7/26 5:51 AM, Peter Griffin wrote:
> > +     union phy_notify phystate = {
> > +             .ufs_state = PHY_UFS_HIBERN8_EXIT
> > +     };
>
> Should this be declared 'static const'?

Yes, good point, I can update that.

>
> > +             phy_notify_state(ufs->phy, phystate);
>
> Can you please ask the maintainer of include/linux/phy/phy.h why
> phy_notify is a union since it only has a single member? From that
> header file:
>
> union phy_notify {
>         enum phy_ufs_state ufs_state;
> };

Originally in v1 it was proposed as an enum. Some feedback from Mani
was to have it as an 'int state' and let drivers pass their own link
state values to support multiple peripherals. Vinod (phy maintainer)
wanted to lock it down to stop any API abuse (see
https://lore.kernel.org/all/aICKM-ebp9SMAkZ_@vaman/). So we ended up
on a union with peripheral specific values (of which currently UFS is
the only member, but the expectation is more will be added for other
peripheral types).
>
> > +     union phy_notify phystate = {
> > +             .ufs_state = PHY_UFS_HIBERN8_ENTER
> > +     };
>
> Same question here: should this be declared 'static const'?

Will update to 'static const'.

Thanks,

Peter

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ