Re: [PATCH 4/5] memstick: ms_block: keep the power off during a full msb_reset()
From: Ulf Hansson
Date: Mon Nov 30 2026 - 12:12:50 EST
On Mon, Nov 30, 2026 at 5:58 PM Jie Feng <hjf3108@xxxxxxxxx> wrote:
>
> On Mon, 30 Nov 2026 at 18:49, Ulf Hansson <ulf.hansson@xxxxxxxxxxxxxxxx> wrote:
> >
> > On Mon, Nov 9, 2026 at 4:39 PM Ho Jie Feng <hjf3108@xxxxxxxxx> wrote:
> > >
> > > Keep the power off for long enough so that the card properly
> > > power cycles.
> > >
> > > Fixes: 0ab30494bc4f ("memstick: add support for legacy memorysticks")
> > > Signed-off-by: Ho Jie Feng <hjf3108@xxxxxxxxx>
> > > ---
> > > drivers/memstick/core/ms_block.c | 3 +++
> > > 1 file changed, 3 insertions(+)
> > >
> > > diff --git a/drivers/memstick/core/ms_block.c b/drivers/memstick/core/ms_block.c
> > > index e373eaf92530f..66672235a4584 100644
> > > --- a/drivers/memstick/core/ms_block.c
> > > +++ b/drivers/memstick/core/ms_block.c
> > > @@ -740,6 +740,9 @@ static int msb_reset(struct msb_data *msb, bool full)
> > >
> > > msb_invalidate_reg_window(msb);
> > >
> > > + /* Allow enough time for the card to fully power off */
> > > + msleep(20);
> > > +
> >
> > Why 20ms?
> It is just a random number I picked. I can change it to mspro_block.c 10ms:
> https://elixir.bootlin.com/linux/v7.4-rc2/source/drivers/memstick/core/mspro_block.c#L867
Okay, in that case let's at least make it a define, so it can be used
at both places.
>
> > > error = host->set_param(host,
> > > MEMSTICK_POWER, MEMSTICK_POWER_ON);
> > > if (error)
> > > --
> > > 2.56.0
> > >
Kind regards
Uffe