Re: [PATCH v5] scsi: ufs: core: call hibern8 notify when hibern8 cmd failed

From: Bean Huo

Date: Wed May 06 2026 - 04:53:36 EST


On Wed, 2026-05-06 at 03:29 +0000, Fang Hongjie(方洪杰) wrote:
>
> > From: Bean Huo [mailto:beanhuo@xxxxxxxx]
> > Sent: Tuesday, May 5, 2026 2:41 PM
> > To: Fang Hongjie <hongjiefang@xxxxxxxxxxxx>;
> > alim.akhtar@xxxxxxxxxxx; avri.altman@xxxxxxx; bvanassche@xxxxxxx;
> > James.Bottomley@xxxxxxxxxxxxxxxxxxxxx; martin.petersen@xxxxxxxxxx
> > Cc: linux-scsi@xxxxxxxxxxxxxxx; linux-kernel@xxxxxxxxxxxxxxx
> > Subject: Re: [PATCH v5] scsi: ufs: core: call hibern8 notify when hibern8
> > cmd
> > failed
> >
> > On Sat, 2026-05-02 at 22:30 +0800, Hongjie Fang wrote:
> > > +       default:
> > > +               break;
> > >         }
> > >
> > >         return 0;
> > > diff --git a/include/ufs/ufshcd.h b/include/ufs/ufshcd.h
> > > index 8563b6648976..4f7c619db324 100644
> > > --- a/include/ufs/ufshcd.h
> > > +++ b/include/ufs/ufshcd.h
> > > @@ -270,6 +270,7 @@ struct ufs_clk_info {
> > >  enum ufs_notify_change_status {
> > >         PRE_CHANGE,
> > >         POST_CHANGE,
> > > +       ROLLBACK_CHANGE,
> > >  };
> > >
> > >  struct ufs_pa_layer_attr {
> > > --
> > > 2.25.1
> >
> > Could you include the platform driver that actually handles
> > ROLLBACK_CHANGE in
> > this series? Adding  this new rollback_change without an usage makes it hard
> > to  verify the design is correct.
> >
>
> The platform driver code is still under development, and we plan to submit it
> in the future. The purpose of this patch is to first provide a mechanism that
> allows vendor callbacks perform relevant rollback when hibern8 fails.
>
> > Kind regards,
> > Bean
>
> Best.
>

Thanks for the explanation. However, the kernel development practice is to not
merge infrastructure without at least one in-tree user. Please resubmit this
patch together with your platform driver (or at least the hibern8_notify
callback that handles ROLLBACK_CHANGE) so reviewers can verify the design is
correct and actually works as intended.

@Bart, any idea?

Kind Regards,
Bean