From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796218427; b=T2wDHitqJLzA0IbqdrYP1djznEiASzVyANOdMqoWYGkCeIcFRQg5uimvcx+X0iW6v21O vU3cUUAFCZ91VdsK+eIgGXLVqbxkfCdxxP+VAT5JWbDwQNDJbgxkICZ/7eBIlkXleuYWi 2Kl+higupr030bAC3BoFbsJSKfQa3kH5qBbHrjEW3KwDIdzovc8lUTLPaOKoeXdiBToji XQ69bhlj2tkr28hp+xno0Qn5bqVihbhZiBY0dzoqLoAJuJmLhuyMmUCRCrUa6ZKSbkSmx U8Lg9boQmUfNb5yqOIMXsegfKBTCCQvhY373qWZRp5ocUt1O7/oxCGYkdAxaM2z8Wtw== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796218427; h=Received:DKIM-Signature:Message-ID:From:Subject:Reply-To:To:Cc: In-Reply-To:References:Content-Type:Content-Transfer-Encoding:Date; bh=8EXiuGPdsVTyW+hZBLgv8+ZLKQsxXqMymGi1eH4x+CI=; b=gAYq+CxzDYjPrBeYj85eiDCPSyX8W8b1X+kqQTrMsQn/mxMgkRpUw2KrDlDoxUS+z4CA XBPAKzFzNVdzK2FxLeKnlLitEipJTaqylHqpmphtFieFS9TWDfKkG/UvUDFaj50Wm5fDl VCmnKMQu3AfkwTrrwMt9HkR5Le+Wxxbi1JAtXYCrehTwCpypKfIPs5mVz1lPjLM2R5Wlt KJMLsYpnVHRXjBn/cI0Nv1dk+Hmt0J6D/LIMKdb5ibBVAfL09CE84diAItm142ZsoUOOZ 0HIH3cffndTJJIT0FjmET5Sl3nZQx2iSxRDKjJVWHJw3ZcBKcTwj+mizVkHv/xZiGcA== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=CsSjotHO; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6F598606A31A for ; Wed, 2 Dec 2026 13:33:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=CsSjotHO Received: by smtp.kernel.org (Postfix) with ESMTPSA id D17811F000C1; Wed, 2 Dec 2026 13:33:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796218427; bh=8EXiuGPdsVTyW+hZBLgv8+ZLKQsxXqMymGi1eH4x+CI=; h=From:Subject:Reply-To:To:Cc:In-Reply-To:References:Date; b=CsSjotHO0+GCdMDFV/Wx5TTh3mOdWjlv2Q0+TsJG1Mlnhw9CMVyznGx6wz/aT+dcY 0USiy73XaKQlBF+0ATVp1GptgMYUZMa9oSFi+ZIHlq1JwPJzzjuymlZEiCBfniV6Xm 6Ewd+Mmi2rIvq0a+locKTssN5B7VghRgL/iPESTaTSD4mhO5E5MGFEh2Nw0boxqn+k 9EX0E0e9YyXVlxMiNPgBd0tsrLov8XwIEJMM+qyG/bXR3aOgfYPvtl+47v9lry3mSz OTkNTBOFnmFGDiBPtOBUDB0ekupBsmHqoWS4aJWfTuT4+Zgqqnkw07l+b5Gxldv14M aJMp4CBlWkEPg== Message-ID: From: sashiko-bot@kernel.org Subject: Re: [PATCH v5 2/4] spi: cadence-xspi: Add irq-less support Reply-To: sashiko-reviews@lists.linux.dev To: "Paul Cercueil" Cc: devicetree@vger.kernel.org, robh@kernel.org, conor+dt@kernel.org In-Reply-To: <20261202132135.470814-3-paul.cercueil@bootlin.com> References: <20261202132135.470814-1-paul.cercueil@bootlin.com> <20261202132135.470814-3-paul.cercueil@bootlin.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Date: Wed, 02 Dec 2026 13:33:46 +0000 X-Mailing-List: devicetree@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list Thank you for your contribution! Sashiko AI review found 1 potential issue to consider: - [Medium] spi: cadence-xspi: uncleared SDMA error bit in cdns_xspi_is_sdma_ready() -- commit b91e40d7ac9f80d3f34f93797643594a93cbc82d Author: Tanmay Jagdale spi: cadence-xspi: Add irq-less support This commit makes the interrupt line optional in spi-cadence-xspi and falls back to polling cdns_xspi_is_sdma_ready() and cdns_xspi_is_stig_ready() when no IRQ is provided. > diff --git a/drivers/spi/spi-cadence-xspi.c b/drivers/spi/spi-cadence-xsp= i.c > index f5106df933552..4a5376e495c6a 100644 > --- a/drivers/spi/spi-cadence-xspi.c > +++ b/drivers/spi/spi-cadence-xspi.c [ ... ] > @@ -687,7 +690,8 @@ static int cdns_xspi_send_stig_command(struct cdns_xs= pi_dev *cdns_xspi, > =20 > reinit_completion(&cdns_xspi->cmd_complete); > reinit_completion(&cdns_xspi->sdma_complete); > - cdns_xspi->set_interrupts_handler(cdns_xspi, true); > + if (cdns_xspi->irq >=3D 0) > + cdns_xspi->set_interrupts_handler(cdns_xspi, true); > cdns_xspi->sdma_error =3D false; > =20 > memset(cmd_regs, 0, sizeof(cmd_regs)); > @@ -716,20 +720,29 @@ static int cdns_xspi_send_stig_command(struct cdns_= xspi_dev *cdns_xspi, > =20 > cdns_xspi_trigger_command(cdns_xspi, cmd_regs); > =20 > - wait_for_completion(&cdns_xspi->sdma_complete); > - if (cdns_xspi->sdma_error) { > - cdns_xspi->set_interrupts_handler(cdns_xspi, false); > + if (cdns_xspi->irq >=3D 0) { > + wait_for_completion(&cdns_xspi->sdma_complete); > + if (cdns_xspi->sdma_error) { > + cdns_xspi->set_interrupts_handler(cdns_xspi, false); > + return -EIO; > + } > + } else if (!cdns_xspi_is_sdma_ready(cdns_xspi, true)) { > return -EIO; > } [Severity: Medium] Does cdns_xspi_is_sdma_ready() leave CDNS_XSPI_SDMA_ERROR latched in CDNS_XSPI_INTR_STATUS_REG when a Slave DMA error occurs? drivers/spi/spi-cadence-xspi.c:cdns_xspi_is_sdma_ready() { ... if (ctrl_stat & CDNS_XSPI_SDMA_ERROR) { dev_err(cdns_xspi->dev, "Slave DMA transaction error\n"); return false; } /* Clear the flag */ writel(CDNS_XSPI_SDMA_TRIGGER, cdns_xspi->iobase + CDNS_XSPI_INTR_STATUS_REG); ... } CDNS_XSPI_INTR_STATUS_REG is write-1-to-clear. In IRQ mode, cdns_xspi_irq_handler() writes irq_status back to CDNS_XSPI_INTR_STATUS_REG, clearing CDNS_XSPI_SDMA_ERROR. In IRQ-less mode, nothing clears CDNS_XSPI_INTR_STATUS_REG between commands, so once CDNS_XSPI_SDMA_ERROR is set, every subsequent cdns_xspi_is_sdma_ready() call will immediately see the stale error bit and fail with -EIO. --=20 Sashiko AI review =C2=B7 https://sashiko.dev/#/patchset/20261202132135.4708= 14-1-paul.cercueil@bootlin.com?part=3D2