From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A1A031CDFAC; Sun, 7 Sep 2025 20:08:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1757275738; cv=none; b=cUvwarAl/pXx/BmHBy6ePhkXi7KcdpmPr3yWTKiGxOnySL6Zl2AywrlCpGppn5nk7aBkq5bmp7ctXz+g6YMIGVnbIHgWe2nUghTV1RXlCxLSqFCa25QE7qASwpbOR+2Pc5Da63F/RsoHmamxqI7rBTG7hF91cu7fdUzvUJeakF4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1757275738; c=relaxed/simple; bh=2GEAM/7xKtxhkVDEaj/J2DUJyjekiaILaWbahRk5tK4=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=j/nsldguG742cvgjRBRnZSS5wuVwpB/CGz3gDKINnEQxgcUwYs1k5IMkr8zhyn8bPAbSBYBhiNLdfjLWrHasKDVB6Q/dlqDb6Wb5PlvAPYOB1pC9MmJNKTgYdMYQeyLlK0Smr5Yq7EPYXJctlUe2+DH9SP4GPUtwyGyPIvtg93I= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=rJBjvMgn; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="rJBjvMgn" Received: by smtp.kernel.org (Postfix) with ESMTPSA id CAC74C4CEF0; Sun, 7 Sep 2025 20:08:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1757275738; bh=2GEAM/7xKtxhkVDEaj/J2DUJyjekiaILaWbahRk5tK4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=rJBjvMgnrPMSbBec8uUOzYqNBHfgVeCbUwMToCH83xbcsK17hrR7IT1jq+mHuPwjc +aOAWDhUpLcZy6nMeDnY2+AseeSuyMaJeR1cKM9M1rAx2ThXfk3cgUqsCfcKPm/GM0 VAji7aLWQqO9Bc2gMc/scZ0XLCef/ai9bnXxGNX4= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Larisa Grigore , Frank Li , James Clark , Mark Brown , Sasha Levin Subject: [PATCH 5.10 49/52] spi: spi-fsl-lpspi: Reset FIFO and disable module on transfer abort Date: Sun, 7 Sep 2025 21:58:09 +0200 Message-ID: <20250907195603.381240289@linuxfoundation.org> X-Mailer: git-send-email 2.51.0 In-Reply-To: <20250907195601.957051083@linuxfoundation.org> References: <20250907195601.957051083@linuxfoundation.org> User-Agent: quilt/0.68 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 5.10-stable review patch. If anyone has any objections, please let me know. ------------------ From: Larisa Grigore [ Upstream commit e811b088a3641861fc9d2b2b840efc61a0f1907d ] In DMA mode fsl_lpspi_reset() is always called at the end, even when the transfer is aborted. In PIO mode aborts skip the reset leaving the FIFO filled and the module enabled. Fix it by always calling fsl_lpspi_reset(). Fixes: a15dc3d657fa ("spi: lpspi: Fix CLK pin becomes low before one transfer") Signed-off-by: Larisa Grigore Reviewed-by: Frank Li Signed-off-by: James Clark Link: https://patch.msgid.link/20250828-james-nxp-lpspi-v2-3-6262b9aa9be4@linaro.org Signed-off-by: Mark Brown Signed-off-by: Sasha Levin --- drivers/spi/spi-fsl-lpspi.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/spi/spi-fsl-lpspi.c b/drivers/spi/spi-fsl-lpspi.c index ab096368a1fd5..319cd96bd201b 100644 --- a/drivers/spi/spi-fsl-lpspi.c +++ b/drivers/spi/spi-fsl-lpspi.c @@ -705,12 +705,10 @@ static int fsl_lpspi_pio_transfer(struct spi_controller *controller, fsl_lpspi_write_tx_fifo(fsl_lpspi); ret = fsl_lpspi_wait_for_completion(controller); - if (ret) - return ret; fsl_lpspi_reset(fsl_lpspi); - return 0; + return ret; } static int fsl_lpspi_transfer_one(struct spi_controller *controller, -- 2.51.0