On 19 November 2018 at 18:34, Clément Péron <peron.clem@xxxxxxxxx> wrote: > Hi Ulf, > > On Mon, 19 Nov 2018 at 16:01, Ulf Hansson <ulf.hansson@xxxxxxxxxx> wrote: >> >> On 6 November 2018 at 16:13, Clément Péron <peron.clem@xxxxxxxxx> wrote: >> > Hi, >> > >> > On Thu, 18 Oct 2018 at 10:57, Clément Péron <peron.clem@xxxxxxxxx> wrote: >> >> >> >> Hi Avri, >> >> >> >> On Wed, 17 Oct 2018 at 22:00, Avri Altman <Avri.Altman@xxxxxxx> wrote: >> >> > >> >> > >> >> > >I'm using the sdhci-iproc host controller on my board (running linux-4.9). >> >> > >When I try to access to the RPMB partition I get the following message. >> >> > Is this happening while you testing your multi-ioctl code? >> >> > Or are you using single ioctl? >> >> >> >> Yes I use a custom mmc-utils using MMC_IOC_MULTI_CMD ioctl. >> >> >> >> This works fine with another board and a SDHCI controller that didn't >> >> have the auto-cmd12 feature. >> > >> > Can confirm this i have disable the ACMD12 feature in the SDHCI controller. >> > And disable this CAP in the DT and RPMB are fine :). >> > >> > Not sure how to fix it properly however :( >> >> The RPMB partitions are registered only for controllers supporting >> CMD23, which is indicated via MMC_CAP_CMD23. See mmc_decode_ext_csd(). > > Yes you are right, and I check my kernel and I forget but I revert > this check in my kernel long time ago. > d0123ccac55088811bde4f76c4a3fdbd39c3cfba > > The comment of the commit says "SET_BLOCK_COUNT CMD23 is needed for > all access to RPMB partition." > > In the revert I wrote the comment saying : "regarding JEDEC doc, CMD23 > isn't mandatory to talk with RPMB partition (only more reliable)". > Not sure if it's still true but my other cards running a SoCFPGA > CycloneV using DesignWare Platform drivers doesn't support CMD23 but > are dealing fine with RPMB. Well, it works probably because the mmc core manually sends the CMD23 command. It shouldn't do that, simply because that isn't how we designed the interface towards the mmc host drivers in regards to this. Another reason to why it could work, is maybe because of not using "multi" requests, so then the host driver may just be "lucky". > >> >> In other words, the patch looks good to me! >> >> Would you mind re-posting a proper patch, with updated changelog, a >> good commit message header and add your sob tag. > > I also remember that I tested this fix with an i.MX board using i.MX > ESDHC controller which I think support the CMD23 but after this fix > the RPMB are no more usable... Well, in such case there is likely a bug in the mmc host driver, which we need to fix. In either case, I think we should move forward with your suggested patch. If any additional things are needed on top, then let's fix them as well. [...] Kind regards Uffe