Re: [PATCH v3 1/2] iommu/arm-smmu-v3: Fix CMDQ timeout warning

From: Nicolin Chen

Date: Wed Nov 05 2025 - 14:44:47 EST


On Wed, Nov 05, 2025 at 11:06:37AM -0800, Jacob Pan wrote:
> + ret = queue_poll(qp);
> + if (ret == -ETIMEDOUT) {
> + dev_err_ratelimited(smmu->dev, "CMDQ timed out, cons: %08x, prod: 0x%08x\n",
> + llq->cons, llq->prod);
> + /* Restart the timer */
> + queue_poll_init(smmu, qp);
> + } else if (ret) {
> + dev_err_ratelimited(smmu->dev, "CMDQ poll error %d\n", ret);

I don't think you need this "if (ret)", as queue_poll() returns
either 0 or -ETIMEOUT. And the patch that I shared with you has
this noted clearly.

The other caller arm_smmu_cmdq_poll_until_sync() treats the ret
simply as -ETIMEOUT as well. So, let's just keep it in this way.

Nicolin