From: Adrian Hunter <adrian.hunter@intel.com>
To: "Jorge Ramirez-Ortiz, Foundries" <jorge@foundries.io>
Cc: CLoehle@hyperstone.com, jinpu.wang@ionos.com, hare@suse.de,
Ulf Hansson <ulf.hansson@linaro.org>,
beanhuo@micron.com, yangyingliang@huawei.com, asuk4.q@gmail.com,
yibin.ding@unisoc.com, victor.shih@genesyslogic.com.tw,
marex@denx.de, rafael.beims@toradex.com, robimarko@gmail.com,
ricardo@foundries.io, linux-mmc@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCHv2] mmc: rpmb: add quirk MMC_QUIRK_BROKEN_RPMB_RETUNE
Date: Thu, 30 Nov 2023 21:12:28 +0200 [thread overview]
Message-ID: <fbc82848-d402-4075-8176-de9ed0345d78@intel.com> (raw)
In-Reply-To: <ZWiNDgUFF8ug7gZf@trax>
On 30/11/23 15:24, Jorge Ramirez-Ortiz, Foundries wrote:
> On 30/11/23 11:34:18, Ulf Hansson wrote:
>> On Wed, 29 Nov 2023 at 17:05, Jorge Ramirez-Ortiz <jorge@foundries.io> wrote:
>>>
>>> On the eMMC SanDisk iNAND 7250 configured with HS200, requesting a
>>> re-tune before switching to the RPMB partition would randomly cause
>>> subsequent RPMB requests to fail with EILSEQ:
>>> * data error -84, tigggered in __mmc_blk_ioctl_cmd()
>>>
>>> This commit skips the retune when switching to RPMB.
>>> Tested over several days with per minute RPMB reads.
>>
>> This sounds weird to me and needs more testing/debugging in my
>> opinion, especially at the host driver level. Perhaps add some new
>> tests in mmc_test, that does a partition switch to/from any partition
>> and then run regular I/O again to see if the problem is easier to
>> reproduce?
>
> hi Uffe
>
> ok I'll have a look - I have never used this driver before, so if you
> have anything in the works I'll be glad to integrated and adapt.
>
>>
>> The point is, I wonder what is so special with RPMB here? Note that,
>> it has been quite common that host drivers/controllers have had issues
>> with their tuning support, so I would not be surprised if that is the
>> case here too.
>
> Right, it is just that the tuning function for of-arasan is the generic
> __sdhci_execute_tuning() - only wrapped around arasan DLL reset
> calls. Hence why I aimed for the card: __sdhci_execute_tuning and ZynqMP
> are not recent functions or architectures.
>
>
>> Certainly I would be surprised if the problem is at
>> the eMMC card side, but I may be wrong.
>
> How do maintainers test the tuning methods? is there anything else for
> me to do other than forcing a retune with different partitions?
>
>>
>> Kind regards
>> Uffe
>
> For completeness this is the error message - notice that we have a
> trusted application (fiovb) going through OP-TEE and back to the TEE
> supplicant issuing an rpmb read of a variable (pretty normal these days,
> we use it on many different platforms - ST, NXP, AMD/Xilinx, TI..).
>
> The issue on this Zynqmp platform is scarily simple to reproduce; you
> can ignore the OP-TEE trace, it is just the TEE way of reporting that
> the RPMB read failed.
>
> root@uz3cg-dwg-sec:/var/rootdirs/home/fio# fiovb_printenv m4hash
> [ 461.775084] sdhci-arasan ff160000.mmc: __mmc_blk_ioctl_cmd: data error -84
> E/TC:? 0
> E/TC:? 0 TA panicked with code 0xffff0000
> E/LD: Status of TA 22250a54-0bf1-48fe-8002-7b20f1c9c9b1
> E/LD: arch: aarch64
> E/LD: region 0: va 0xc0004000 pa 0x7e200000 size 0x002000 flags rw-s (ldelf)
> E/LD: region 1: va 0xc0006000 pa 0x7e202000 size 0x008000 flags r-xs (ldelf)
> E/LD: region 2: va 0xc000e000 pa 0x7e20a000 size 0x001000 flags rw-s (ldelf)
> E/LD: region 3: va 0xc000f000 pa 0x7e20b000 size 0x004000 flags rw-s (ldelf)
> E/LD: region 4: va 0xc0013000 pa 0x7e20f000 size 0x001000 flags r--s
> E/LD: region 5: va 0xc0014000 pa 0x7e22c000 size 0x005000 flags rw-s (stack)
> E/LD: region 6: va 0xc0019000 pa 0x816b31fc8 size 0x001000 flags rw-- (param)
> E/LD: region 7: va 0xc001a000 pa 0x816aa1fc8 size 0x002000 flags rw-- (param)
> E/LD: region 8: va 0xc006b000 pa 0x00001000 size 0x014000 flags r-xs [0]
> E/LD: region 9: va 0xc007f000 pa 0x00015000 size 0x008000 flags rw-s [0]
> E/LD: [0] 22250a54-0bf1-48fe-8002-7b20f1c9c9b1 @ 0xc006b000
> E/LD: Call stack:
> E/LD: 0xc006de58
> E/LD: 0xc006b388
> E/LD: 0xc006ed40
> E/LD: 0xc006b624
> Read persistent value for m4hash failed: Exec format error
Have you tried dynamic debug for mmc
Kernel must be configured:
CONFIG_DYNAMIC_DEBUG=y
To enable mmc debug via sysfs:
echo 'file drivers/mmc/core/* +p' > /sys/kernel/debug/dynamic_debug/control
echo 'file drivers/mmc/host/* +p' > /sys/kernel/debug/dynamic_debug/control
next prev parent reply other threads:[~2023-11-30 19:12 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-29 16:05 [PATCHv2] mmc: rpmb: add quirk MMC_QUIRK_BROKEN_RPMB_RETUNE Jorge Ramirez-Ortiz
2023-11-30 10:34 ` Ulf Hansson
2023-11-30 13:24 ` Jorge Ramirez-Ortiz, Foundries
2023-11-30 17:34 ` Ulf Hansson
2023-11-30 19:12 ` Adrian Hunter [this message]
2023-11-30 22:02 ` Jorge Ramirez-Ortiz, Foundries
2023-11-30 22:19 ` Jorge Ramirez-Ortiz, Foundries
2023-12-01 7:40 ` Jorge Ramirez-Ortiz, Foundries
2023-12-01 11:46 ` Adrian Hunter
2023-12-01 15:54 ` Jorge Ramirez-Ortiz, Foundries
2023-12-01 17:09 ` Jorge Ramirez-Ortiz, Foundries
[not found] ` <DM6PR04MB6575FF9532A9FC0EE91B5B37FC80A@DM6PR04MB6575.namprd04.prod.outlook.com>
2023-12-03 16:26 ` Jorge Ramirez-Ortiz, Foundries
2023-12-04 11:31 ` Avri Altman
[not found] ` <DM6PR04MB6575127DFCEC4C178F7E33B7FC86A@DM6PR04MB6575.namprd04.prod.outlook.com>
2023-12-04 13:58 ` Jorge Ramirez-Ortiz, Foundries
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=fbc82848-d402-4075-8176-de9ed0345d78@intel.com \
--to=adrian.hunter@intel.com \
--cc=CLoehle@hyperstone.com \
--cc=asuk4.q@gmail.com \
--cc=beanhuo@micron.com \
--cc=hare@suse.de \
--cc=jinpu.wang@ionos.com \
--cc=jorge@foundries.io \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mmc@vger.kernel.org \
--cc=marex@denx.de \
--cc=rafael.beims@toradex.com \
--cc=ricardo@foundries.io \
--cc=robimarko@gmail.com \
--cc=ulf.hansson@linaro.org \
--cc=victor.shih@genesyslogic.com.tw \
--cc=yangyingliang@huawei.com \
--cc=yibin.ding@unisoc.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox