RE: [PATCH v3 0/2] mmc: host: Disable auto-cmd12 during ffu

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

 



> >>> If that is the case, it would be better to fix the ioctl handling
> >>> and make it use mrq.sbc instead of issuing SET_BLOCK_COUNT
> separately.
> >> We can do that.
> >> On the other hand, this doesn't happen on other platforms.
> >> Fwupd has just recently switched to close-ended, but mmc-utils is
> >> using close-ended mode for many years, Performing ffu successfully on
> many different platforms.
> >> My understanding is, that the hw should realize that cmd23 has just sent
> prior to cmd25 and avoid this auto-cmd12.
> >
> > Yes, in principle that's correct.
> >
> > In fact, I think that most host drivers should already support this
> > behavior, although it relies on the CMD23 to be incorporated within
> > the same mmc request (mrq) as the CMD25. We use "mrq.sbc" for this and
> > the host driver uses MMC_CAP_CMD23 to inform the MMC core whether it
> > supports this or not.
> >
> >>
> >> Going back to your proposal, we can ignore cmd23 in close-ended ffu,
> >> but eventually, we will need to change mmc-utils and fwupd to stop send
> cmd23.
> >
> > This is not what we proposed, at least if I understood Adrian correctly.
> >
> > Instead, the idea that could make better sense, is to fix the mmc
> > ioctl handling in the mmc core, so that it can discover that a CMD23
> > command is followed by another CMD18/25 (multiple read/write). And in
> > this case, it should boundle the commands together, using mrq.sbc so
> > that one request gets sent to the mmc host driver instead of two.
> 
> Yes that is what I was thinking.  Perhaps look at
> __mmc_blk_ioctl_cmd() first.  It doesn't have enough information to decide
> what to do, so either something needs to be added to struct
> mmc_blk_ioc_data and set up before hand, or it needs to be passed struct
> mmc_queue_req *mq_rq.
OK. Thanks.
Will work something out and send a new series next week.

Thanks,
Avri

> 
> >
> > In this way, there should be no need for any specific changes to any
> > of the host drivers (assuming they have the CMD23 support implemented
> > correctly), they should just work.
> >
> > [...]
> >
> > 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