From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wr1-f50.google.com (mail-wr1-f50.google.com [209.85.221.50]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5F677326D43 for ; Mon, 18 Aug 2025 13:17:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.50 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1755523081; cv=none; b=olJFmWwrYiiClgnxHsUQoPGhgHb+ttOBrfA/LaY5k5fNSf9YzzcwzZYHuS2V+2ZvZKfNMCO6jEc1Ff8n7cOpJ6iHvK8TslHRJRhgKttxahLS8nO7QK7C5XAyv0Gdu+sj0uAl/n8EDPvU02PF7uLRqAZCzCik4UtWA0EM+f8fzqo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1755523081; c=relaxed/simple; bh=cN2Dr1U3N+epcvzyenIo+98wH45Absd+P6IxmKwk8T0=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=HUgvD9Wse+8ccEJvbzGw+5VPn+EEpSnmp2pskYpkU9tO6VsTb0gO9pzzRH+xXy7Hkmev7bdD90WD7zjy0cEMZ9kHkSZWkWV7RYUBAIPQIIr4GZGtTPzuzEcm5mGM0WFCSEMI+7W+htinBfC29kYUATtbYpvUog6oF2pcD3Bba3U= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=tlJjuuPx; arc=none smtp.client-ip=209.85.221.50 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="tlJjuuPx" Received: by mail-wr1-f50.google.com with SMTP id ffacd0b85a97d-3b9d41cd38dso3313999f8f.0 for ; Mon, 18 Aug 2025 06:17:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1755523078; x=1756127878; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=WD8JY7wGfENB2vQCzVFhM+JL0GSgqtbytlovzqiUGn8=; b=tlJjuuPxNwepZfdmjXoNY4VnN/v1dTsY5AM8fn47PXalgMEcIAE7hhRxeBRe2ir7u2 i/IZzVPRRG5GKgGpuvvYIWn6PK5iHT+u0p67MU5uZDXjYMntz4+pavUZ+x38iS1mFmv/ aj0Ra0HlF+9HliokS3z2g+roDkocQ4CkW+fEQYWjNuw8ka3OQUBGWMn88BPYrIbHDsR5 7iwk1ADbrcK/FCEZnsflDyO4rIITBf/ULudCgaXrN4cpCdJypT/P1rXNm1tUI1XhRI1i VMrk7qvNqFIoS5JCrnNlz48hsZW4NEd4SHt2T6JXqaWiZ3/AQgMqVV7lEsDUfliy5KKz /kBw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1755523078; x=1756127878; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=WD8JY7wGfENB2vQCzVFhM+JL0GSgqtbytlovzqiUGn8=; b=vQdaHqNAPVmzg4AHxIH84Ddwka+nQzVrrM0eNuSbPaqFnnidwYHBsHydPtzt07V+YZ wL2BTzFvz3B+1Nwe+bypxhYg6ee5kddDuvOW5QT5niJ+tNb1YZI8KOyXs/H8GKe8Rmvv zu7ZzAN0ncFpAAJvCsYECSz5dzfIqyKvhc2wcpkzSkT4OL0xgpnKApxraxbMqjdDp4rU eGfhSgDiPu7twxOjnngi/HMB+IK7pLfTM6EWBhB4IM9bANXrYkKkqQ1s+BXIBOEsgaOv 1HwzJHm5SR6rJBVeS3I/Zejv6M0VBmPwebfohlTBjoW/r3rHgX/g0oqcYxLzlHS7XAmg bPOg== X-Forwarded-Encrypted: i=1; AJvYcCXvtFycLKueogWCPFdUb1U/n2hgnL6LQcKJNg9NaU3HxGptpEgTmyjEF7tHZK4lC262v/ZR+U+xhmn7@vger.kernel.org X-Gm-Message-State: AOJu0YxF0JuWTEG2B+9nETXKHFF0FNsvQm3/w1+JCQheIxk+t3qM8roF vmGWYZnaXv8rM9dfvWtaKBCiBYhceQBd8AilXd7R5V4iqvwgToTs++q3CMpazu0WzZw= X-Gm-Gg: ASbGncuLtpvprOVsA1Tcl1nlsa4zm21AOryhuMdWRaimUKwgOws4lety6FhHXt23t10 x2momJtPncogO8NOz3cya/p5bvIKu9aFLOWFRP8vg3jqvE5feDGTn8u8VvT4ZZCXFCHWdcmg1+D wgpKLPxgs4OAHPi9xL2mpWipH2pQXgLaba0NM8Yq+2K4Cih1mNCsLbnkV5U2HtlChiSjr8dUK5X P9YazTHQRD8otXPF6evRUWXChs6nBvNba8mzj9g2TCuDNe3yZF9H2VIC59X1zRtf2/ATRzcf1hu JlV9b3mshd0L4kp94TAaB1myc7y2iNfH1pDuOGQpkbYytL60GT+qop93+rcZZZOHlqW2y9bwyhl z6kcIau7zRZvGMD7rfkml+WLNDjw= X-Google-Smtp-Source: AGHT+IFJio5fCS2fBNF+0hXuSZxnS4K+PQVhd5zP27O8GnG2aQ92KmNgjsK/8qAhqnk6lalVTMRMDQ== X-Received: by 2002:a05:6000:1a89:b0:3b9:717:4bcd with SMTP id ffacd0b85a97d-3bb68b0d589mr9121216f8f.40.1755523077542; Mon, 18 Aug 2025 06:17:57 -0700 (PDT) Received: from [192.168.1.3] ([185.48.76.109]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-45a22321985sm131021375e9.17.2025.08.18.06.17.56 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 18 Aug 2025 06:17:57 -0700 (PDT) Message-ID: <7bd5e0aa-c7fc-4c3f-9e5c-998a1d4f5703@linaro.org> Date: Mon, 18 Aug 2025 14:17:55 +0100 Precedence: bulk X-Mailing-List: devicetree@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 03/13] spi: spi-fsl-lpspi: Reset FIFO and disable module on transfer abort To: Frank Li Cc: Mark Brown , Clark Wang , Fugang Duan , Gao Pan , Fugang Duan , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Shawn Guo , Sascha Hauer , Fabio Estevam , Larisa Grigore , Larisa Grigore , Ghennadi Procopciuc , Ciprianmarian Costea , s32@nxp.com, linux-spi@vger.kernel.org, imx@lists.linux.dev, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org References: <20250814-james-nxp-lpspi-v1-0-9586d7815d14@linaro.org> <20250814-james-nxp-lpspi-v1-3-9586d7815d14@linaro.org> Content-Language: en-US From: James Clark In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 14/08/2025 5:51 pm, Frank Li wrote: > On Thu, Aug 14, 2025 at 05:06:43PM +0100, James Clark wrote: >> From: Larisa Grigore >> >> In DMA mode fsl_lpspi_reset() is always called at the end, even when the >> transfer is aborted. When not using DMA, aborts skip the reset leaving > > Nit: s/"When not using DMA"/In PIO mode Ack > > Reviewed-by: Frank Li > >> 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 >> Signed-off-by: James Clark >> --- >> 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 c65eb6d31ee7..aab92ee7eb94 100644 >> --- a/drivers/spi/spi-fsl-lpspi.c >> +++ b/drivers/spi/spi-fsl-lpspi.c >> @@ -734,12 +734,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.34.1 >>