RE: [PATCH 2/3] mmc: core: Mark close-ended ffu in progress

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

 



> >
> > +     if ((MMC_EXTRACT_INDEX_FROM_ARG(cmd.arg) ==
> EXT_CSD_MODE_CONFIG) &&
> > +         (cmd.opcode == MMC_SWITCH)) {
> > +             u8 value = MMC_EXTRACT_VALUE_FROM_ARG(cmd.arg);
> > +
> > +             if (value == 1) {
> > +                     md->flags |= MMC_BLK_FFU;
> > +             } else if (value == 0) {
> > +                     /* switch back to normal mode is always happening */
> > +                     md->flags &= ~MMC_BLK_FFU;
> > +                     md->flags &= ~MMC_BLK_CE;
> > +             }
> > +     }
> > +
> > +     if ((md->flags & MMC_BLK_FFU) && cmd.opcode ==
> MMC_SET_BLOCK_COUNT) {
> > +             md->flags &= ~MMC_BLK_FFU;
> > +             md->flags |= MMC_BLK_CE;
> > +     }
> > +
> > +     if ((md->flags & MMC_BLK_CE) && mmc_op_multi(cmd.opcode)) {
> > +             mrq.ffu = true;
> > +             md->flags &= ~MMC_BLK_CE;
> > +     }
> 
> Could it be a separate helper function so it ends up like
> 
>         mrq.ffu = mmc_is_ffu_cmd(&cmd)
> 
> But perhaps then mrq.ffu is not needed and sdhci-msm.c could call
> mmc_is_ffu_cmd() directly?
Yes.  Will do.

Thanks,
Avri




[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