[PATCH v2] scsi: ufs: exynos: call phy_notify_state() from hibern8 callbacks

Peter Griffin peter.griffin at linaro.org
Wed Jan 7 11:47:56 PST 2026


Hi Bart,

Thanks for your review feedback.

On Wed, 7 Jan 2026 at 16:57, Bart Van Assche <bvanassche at acm.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



More information about the linux-arm-kernel mailing list