[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <DM6PR04MB657552F7D128772D104E3780FCAFA@DM6PR04MB6575.namprd04.prod.outlook.com>
Date: Thu, 9 Nov 2023 09:23:21 +0000
From: Avri Altman <Avri.Altman@....com>
To: Adrian Hunter <adrian.hunter@...el.com>,
Ulf Hansson <ulf.hansson@...aro.org>,
Kornel Dulęba <korneld@...omium.org>,
Radoslaw Biernacki <biernacki@...gle.com>,
Gwendal Grignou <gwendal@...omium.org>,
Asutosh Das <quic_asutoshd@...cinc.com>
CC: Chaotian Jing <chaotian.jing@...iatek.com>,
Bhavya Kapoor <b-kapoor@...com>,
Kamal Dasu <kamal.dasu@...adcom.com>,
Al Cooper <alcooperx@...il.com>,
Haibo Chen <haibo.chen@....com>,
Shaik Sajida Bhanu <quic_c_sbhanu@...cinc.com>,
Sai Krishna Potthuri <sai.krishna.potthuri@....com>,
Victor Shih <victor.shih@...esyslogic.com.tw>,
Ben Chuang <ben.chuang@...esyslogic.com.tw>,
Thierry Reding <thierry.reding@...il.com>,
Aniruddha Tvs Rao <anrao@...dia.com>,
Chun-Hung Wu <chun-hung.wu@...iatek.com>,
"linux-mmc@...r.kernel.org" <linux-mmc@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: RE: [PATCH V2 6/6] mmc: cqhci: Fix task clearing in CQE error
recovery
> If a task completion notification (TCN) is received when there is no
> outstanding task, the cqhci driver issues a "spurious TCN" warning. This was
> observed to happen right after CQE error recovery.
>
> When an error interrupt is received the driver runs recovery logic.
> It halts the controller, clears all pending tasks, and then re-enables it. On
> some platforms, like Intel Jasper Lake, a stale task completion event was
> observed, regardless of the CQHCI_CLEAR_ALL_TASKS bit being set.
>
> This results in either:
> a) Spurious TC completion event for an empty slot.
> b) Corrupted data being passed up the stack, as a result of premature
> completion for a newly added task.
>
> Rather than add a quirk for affected controllers, ensure tasks are cleared by
> toggling CQHCI_ENABLE, which would happen anyway if
> cqhci_clear_all_tasks() timed out. This is simpler and should be safe and
> effective for all controllers.
>
> Fixes: a4080225f51d ("mmc: cqhci: support for command queue enabled
> host")
> Cc: stable@...r.kernel.org
> Reported-by: Kornel Dulęba <korneld@...omium.org>
> Tested-by: Kornel Dulęba <korneld@...omium.org>
> Co-developed-by: Kornel Dulęba <korneld@...omium.org>
> Signed-off-by: Kornel Dulęba <korneld@...omium.org>
> Signed-off-by: Adrian Hunter <adrian.hunter@...el.com>
Reviewed-by: Avri Altman <avri.altman@....com>
Powered by blists - more mailing lists