Re: [PATCH v7 04/10] mmc: core: Add open-ended Ext memory addressing

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 3 Oct 2024 at 18:44, Avri Altman <Avri.Altman@xxxxxxx> wrote:
>
> > On Sun, 8 Sept 2024 at 12:22, Avri Altman <avri.altman@xxxxxxx> wrote:
> > >
> > > For open-ended read/write - just send CMD22 before issuing the
> > command.
> > >
> > > Reviewed-by: Adrian Hunter <adrian.hunter@xxxxxxxxx>
> > > Signed-off-by: Avri Altman <avri.altman@xxxxxxx>
> > > ---
> > >  drivers/mmc/core/block.c | 5 +++++
> > >  drivers/mmc/core/core.c  | 3 +++
> > >  include/linux/mmc/core.h | 5 +++++
> > >  3 files changed, 13 insertions(+)
> > >
> > > diff --git a/drivers/mmc/core/block.c b/drivers/mmc/core/block.c index
> > > 05a7745c2a68..ba2ed413be5c 100644
> > > --- a/drivers/mmc/core/block.c
> > > +++ b/drivers/mmc/core/block.c
> > > @@ -1759,6 +1759,11 @@ static void mmc_blk_rw_rq_prep(struct
> > mmc_queue_req *mqrq,
> > >                 brq->sbc.flags = MMC_RSP_R1 | MMC_CMD_AC;
> > >                 brq->mrq.sbc = &brq->sbc;
> > >         }
> > > +
> > > +       if (mmc_card_ult_capacity(card)) {
> > > +               brq->cmd.ext_addr = blk_rq_pos(req) >> 32;
> > > +               brq->cmd.has_ext_addr = true;
> > > +       }
> > >  }
> > >
> > >  #define MMC_MAX_RETRIES                5
> > > diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c index
> > > d6c819dd68ed..a0b2999684b3 100644
> > > --- a/drivers/mmc/core/core.c
> > > +++ b/drivers/mmc/core/core.c
> > > @@ -336,6 +336,9 @@ int mmc_start_request(struct mmc_host *host,
> > > struct mmc_request *mrq)  {
> > >         int err;
> > >
> > > +       if (mrq->cmd && mrq->cmd->has_ext_addr)
> > > +               mmc_send_ext_addr(host, mrq->cmd->ext_addr);
> > > +
> > >         init_completion(&mrq->cmd_completion);
> > >
> > >         mmc_retune_hold(host);
> > > diff --git a/include/linux/mmc/core.h b/include/linux/mmc/core.h index
> > > f0ac2e469b32..c86df8443a88 100644
> > > --- a/include/linux/mmc/core.h
> > > +++ b/include/linux/mmc/core.h
> > > @@ -96,6 +96,11 @@ struct mmc_command {
> > >         unsigned int            busy_timeout;   /* busy detect timeout in ms */
> > >         struct mmc_data         *data;          /* data segment associated with
> > cmd */
> > >         struct mmc_request      *mrq;           /* associated request */
> > > +
> > > +       /* for SDUC */
> > > +       bool has_ext_addr;
> > > +       u8 ext_addr;
> > > +       u16 reserved;
> >
> > I don't see this being used, at least in this patch. Perhaps move it to the patch
> > that starts using it?
> In mmc_blk_rw_rq_prep().

I was only pointing at the "u16 reserved", the other new variables are fine.

Looking at the complete series, it seems like the "u16 reserved" is
unused and can be removed.

[...]

Kind regards
Uffe




[Index of Archives]     [Linux Memonry Technology]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux