Message ID | 20240202115330.wxkbfmvd76sy3a6a@runtux.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel+bounces-49797-ouuuleilei=gmail.com@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:9bc1:b0:106:209c:c626 with SMTP id op1csp371418dyc; Fri, 2 Feb 2024 03:54:09 -0800 (PST) X-Google-Smtp-Source: AGHT+IEfUsPYdfx64Ds0Qv0b4S9TUH9suVIdlmI2xh5KEsUTtf6ZOKZWIVauc/UyVSrFuVNUUvkV X-Received: by 2002:a05:6402:5141:b0:55f:832f:97da with SMTP id n1-20020a056402514100b0055f832f97damr1182128edd.23.1706874849335; Fri, 02 Feb 2024 03:54:09 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706874849; cv=pass; d=google.com; s=arc-20160816; b=jmOu2cTRykCkofa8WMV0hmO2YRNqfdCt5lEV+86Ai5pQpxh2BAATqrk0l8+yrt652u 4AAnUH6dhfiopjUbtu39L1AI/8JHZGWSRfFSzkjGo5c28mfcTfhwOfikXBnr4UsEFZjY JVSJUcv9G1GVi6kUQqLJxGOQfnGbm1txrMLgp0BUK75P37RqeCJ5lLj/Pcv0IcUmsXtn BJRaOlG849DREEdHKYcUE37GpqulYFFir462Nb+iT6Z4mVxRKwZ9/AmR7ctCEX4xArIy +/xPh4W4TeqCUqXTq22Q8JPjlLJ/ZRGP0L52dImPavISTCha/pIRPdY9tFop/gcdj/Qi MFPA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=user-agent:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:subject:to:from:date; bh=5GKDwX8G08AHEu+KVLkvj87DNMfRE2njrepmGH1Q+XY=; fh=9d5oZstP4jX5DPd6GuqFPp+jjp0M5yF62bYihz2zlBE=; b=a+Di31D2Bb2gL0NZ/zIPmxR6e7Co5lZdhweJuYH8Hi9coPnI3kh4dnAET3uDvfNOdU Fx7rBYMGjALCJGI0diJjGvwLV77qTYE3N7adhgk5OP/y43dVaHqvkqLfhF9mfjHCBMBu ytB8NdgN5HNSb7S6bFheoVcURXadoybqgcVdF+IIH8MSkeJa18uM15UC6sP2WiMxBmE6 FIcQfR91huBzTyIc/wCYiFG0JONGNZri1FwaNSpzyaf2rUWpYVk8cpvjYMpBiN6dm1jV 7e3Sk5pHi+1S/0sHhWgEhnDyyiv+rMQ3RDV2gv/EXvuKgpWEiglCvq4IL5baoBFBv+Pp ymCQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=runtux.com); spf=pass (google.com: domain of linux-kernel+bounces-49797-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-49797-ouuuleilei=gmail.com@vger.kernel.org" X-Forwarded-Encrypted: i=1; AJvYcCVCh/bV9aQdqiLloxK3+9pFij58hIjSePJ7bKZx5vG/9gEdOlcUvTQs3LMLQKtCJz3X32HMd9B4+IZl/H3OcgHJg0jllA== Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id y1-20020a50e601000000b0055d156c0b56si740752edm.88.2024.02.02.03.54.09 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 02 Feb 2024 03:54:09 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-49797-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=runtux.com); spf=pass (google.com: domain of linux-kernel+bounces-49797-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-49797-ouuuleilei=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id ED9BA1F2228A for <ouuuleilei@gmail.com>; Fri, 2 Feb 2024 11:54:08 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 2872413E20D; Fri, 2 Feb 2024 11:53:44 +0000 (UTC) Received: from tux.runtux.com (tux.runtux.com [176.9.82.136]) (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 B292113D4F7; Fri, 2 Feb 2024 11:53:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=176.9.82.136 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706874822; cv=none; b=fcgd2yR3Lrs1/62VcT9ccAuyS3B+JbP8NsRToNlGuroDgK6EJ2jP4nUtGzVAzpKstXw5utAW24wugp9is6zcZDUS20mmxE94cjGKxTVvZsS/KAyjV2yx9qgY9npE4/Ik8ryOakhNu8J9Hd2y6PUi9T6V5QigTuPTXVqIq2YiOkQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706874822; c=relaxed/simple; bh=jQIfwxFoKOkcBPKJK6tyu/de2q5LnbkqHpinptTj9HA=; h=Date:From:To:Subject:Message-ID:MIME-Version:Content-Type: Content-Disposition; b=eyatf5t4omJs4fJUlqgImQNWXEG93TY+Lnao5OV7UO0UluhvssjmRlVYGUXSSu5+1G33xCYn9WdM0X4clHv3w1rCSd0aUfiJxFn1qn4LO3hNNKnXZzxhwLo6EDN7HY94OckiUuo5Lbnl9ZxsXWA2aBZxRDKtp/xpMivCS0Pa+Qk= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=runtux.com; spf=pass smtp.mailfrom=runtux.com; arc=none smtp.client-ip=176.9.82.136 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=runtux.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=runtux.com Received: from localhost (localhost [127.0.0.1]) by tux.runtux.com (Postfix) with ESMTP id 7AC3B6EF56; Fri, 2 Feb 2024 12:53:32 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at tux.runtux.com Received: from tux.runtux.com ([127.0.0.1]) by localhost (tux2.runtux.com [127.0.0.1]) (amavisd-new, port 10026) with LMTP id TqhPD8BT3CxP; Fri, 2 Feb 2024 12:53:31 +0100 (CET) Received: from bee.priv.zoo (62-99-217-90.static.upcbusiness.at [62.99.217.90]) (Authenticated sender: postmaster@runtux.com) by tux.runtux.com (Postfix) with ESMTPSA id 453346EF4C; Fri, 2 Feb 2024 12:53:31 +0100 (CET) Received: by bee.priv.zoo (Postfix, from userid 1002) id BD3AD469; Fri, 2 Feb 2024 12:53:30 +0100 (CET) Date: Fri, 2 Feb 2024 12:53:30 +0100 From: Ralf Schlatterbeck <rsc@runtux.com> To: Mark Brown <broonie@kernel.org>, Shawn Guo <shawnguo@kernel.org>, Sascha Hauer <s.hauer@pengutronix.de>, Pengutronix Kernel Team <kernel@pengutronix.de>, Fabio Estevam <festevam@gmail.com>, NXP Linux Team <linux-imx@nxp.com>, linux-spi@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 1/1] spi-mxs: Fix chipselect glitch Message-ID: <20240202115330.wxkbfmvd76sy3a6a@runtux.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: <linux-kernel.vger.kernel.org> List-Subscribe: <mailto:linux-kernel+subscribe@vger.kernel.org> List-Unsubscribe: <mailto:linux-kernel+unsubscribe@vger.kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-ray: beware User-Agent: NeoMutt/20180716 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1789788002103161185 X-GMAIL-MSGID: 1789788002103161185 |
Series |
[v2,1/1] spi-mxs: Fix chipselect glitch
|
|
Commit Message
Ralf Schlatterbeck
Feb. 2, 2024, 11:53 a.m. UTC
There was a change in the mxs-dma engine that uses a new custom flag.
The change was not applied to the mxs spi driver.
This results in chipselect being deasserted too early.
This fixes the chipselect problem by using the new flag in the mxs-spi
driver.
Fixes: ceeeb99cd821 ("dmaengine: mxs: rename custom flag")
Signed-off-by: Ralf Schlatterbeck <rsc@runtux.com>
---
For oscilloscope screenshots and a verbose explanation see my blog post
at https://blog.runtux.com/posts/2024/02/01/
History:
Omit the line break change from patch requested by Marc Kleine-Budde
<mkl@pengutronix.de>
drivers/spi/spi-mxs.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
Comments
On Fri, Feb 02, 2024 at 12:53:30PM +0100, Ralf Schlatterbeck wrote: > There was a change in the mxs-dma engine that uses a new custom flag. > The change was not applied to the mxs spi driver. > This results in chipselect being deasserted too early. > This fixes the chipselect problem by using the new flag in the mxs-spi > driver. > > Fixes: ceeeb99cd821 ("dmaengine: mxs: rename custom flag") > Signed-off-by: Ralf Schlatterbeck <rsc@runtux.com> > --- > For oscilloscope screenshots and a verbose explanation see my blog post > at https://blog.runtux.com/posts/2024/02/01/ > History: > Omit the line break change from patch requested by Marc Kleine-Budde > <mkl@pengutronix.de> > > drivers/spi/spi-mxs.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/drivers/spi/spi-mxs.c b/drivers/spi/spi-mxs.c > index 1bf080339b5a..88cbe4f00cc3 100644 > --- a/drivers/spi/spi-mxs.c > +++ b/drivers/spi/spi-mxs.c > @@ -39,6 +39,7 @@ > #include <linux/spi/spi.h> > #include <linux/spi/mxs-spi.h> > #include <trace/events/spi.h> > +#include <linux/dma/mxs-dma.h> > > #define DRIVER_NAME "mxs-spi" > > @@ -252,7 +253,7 @@ static int mxs_spi_txrx_dma(struct mxs_spi *spi, > desc = dmaengine_prep_slave_sg(ssp->dmach, > &dma_xfer[sg_count].sg, 1, > (flags & TXRX_WRITE) ? DMA_MEM_TO_DEV : DMA_DEV_TO_MEM, > - DMA_PREP_INTERRUPT | DMA_CTRL_ACK); > + DMA_PREP_INTERRUPT | MXS_DMA_CTRL_WAIT4END); > > if (!desc) { > dev_err(ssp->dev, > -- > 2.20.1 > > -- > Dr. Ralf Schlatterbeck Tel: +43/2243/26465-16 > Open Source Consulting www: www.runtux.com > Reichergasse 131, A-3411 Weidling email: office@runtux.com Any news on this, will it be picked up for the next merge window? Thanks + kind regards Ralf Schlatterbeck
Hi Ralf, On Tue, Feb 13, 2024 at 2:07 PM Ralf Schlatterbeck <rsc@runtux.com> wrote: > > On Fri, Feb 02, 2024 at 12:53:30PM +0100, Ralf Schlatterbeck wrote: > > There was a change in the mxs-dma engine that uses a new custom flag. > > The change was not applied to the mxs spi driver. > > This results in chipselect being deasserted too early. > > This fixes the chipselect problem by using the new flag in the mxs-spi > > driver. > > > > Fixes: ceeeb99cd821 ("dmaengine: mxs: rename custom flag") > > Signed-off-by: Ralf Schlatterbeck <rsc@runtux.com> > > --- > > For oscilloscope screenshots and a verbose explanation see my blog post > > at https://blog.runtux.com/posts/2024/02/01/ I suggest putting the link to your detailed explanation into the commit log as this is useful information. Reviewed-by: Fabio Estevam <festevam@gmail.com>
On Tue, Feb 13, 2024 at 06:06:57PM +0100, Ralf Schlatterbeck wrote: > On Fri, Feb 02, 2024 at 12:53:30PM +0100, Ralf Schlatterbeck wrote: > > -- > > Dr. Ralf Schlatterbeck Tel: +43/2243/26465-16 > > Open Source Consulting www: www.runtux.com > > Reichergasse 131, A-3411 Weidling email: office@runtux.com > Any news on this, will it be picked up for the next merge window? Please don't send content free pings and please allow a reasonable time for review. People get busy, go on holiday, attend conferences and so on so unless there is some reason for urgency (like critical bug fixes) please allow at least a couple of weeks for review. If there have been review comments then people may be waiting for those to be addressed. Sending content free pings adds to the mail volume (if they are seen at all) which is often the problem and since they can't be reviewed directly if something has gone wrong you'll have to resend the patches anyway, so sending again is generally a better approach though there are some other maintainers who like them - if in doubt look at how patches for the subsystem are normally handled.
On Fri, 02 Feb 2024 12:53:30 +0100, Ralf Schlatterbeck wrote: > There was a change in the mxs-dma engine that uses a new custom flag. > The change was not applied to the mxs spi driver. > This results in chipselect being deasserted too early. > This fixes the chipselect problem by using the new flag in the mxs-spi > driver. > > > [...] Applied to https://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git for-next Thanks! [1/1] spi-mxs: Fix chipselect glitch commit: 269e31aecdd0b70f53a05def79480f15cbcc0fd6 All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted. You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed. If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced. Please add any relevant lists and maintainers to the CCs when replying to this mail. Thanks, Mark
On Tue, Feb 13, 2024 at 02:22:53PM -0300, Fabio Estevam wrote: > > On Tue, Feb 13, 2024 at 2:07 PM Ralf Schlatterbeck <rsc@runtux.com> wrote: > > > --- > > > For oscilloscope screenshots and a verbose explanation see my blog post > > > at https://blog.runtux.com/posts/2024/02/01/ > > I suggest putting the link to your detailed explanation into the > commit log as this is useful information. > > Reviewed-by: Fabio Estevam <festevam@gmail.com> Thanks for the review! My blog post might go away at some point. And I think when looking at the original patch (in the Fixes: line) it is quite obvious that the file in question was overlooked during the original change. So it was hard to find and I documented it but looking at it in context should be pretty clear. Thanks Ralf
On Tue, Feb 13, 2024 at 06:44:58PM +0000, Mark Brown wrote: > Applied to > > https://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git for-next > > Thanks! Thanks! Sorry for my impatience. Ralf
On Tue, Feb 13, 2024 at 5:02 PM Ralf Schlatterbeck <rsc@runtux.com> wrote: > My blog post might go away at some point. > And I think when looking at the original patch (in the Fixes: line) it > is quite obvious that the file in question was overlooked during the > original change. So it was hard to find and I documented it but looking > at it in context should be pretty clear. Yes, that's fine. Mark has already applied it, so we are all good. Thanks for the fix.
diff --git a/drivers/spi/spi-mxs.c b/drivers/spi/spi-mxs.c index 1bf080339b5a..88cbe4f00cc3 100644 --- a/drivers/spi/spi-mxs.c +++ b/drivers/spi/spi-mxs.c @@ -39,6 +39,7 @@ #include <linux/spi/spi.h> #include <linux/spi/mxs-spi.h> #include <trace/events/spi.h> +#include <linux/dma/mxs-dma.h> #define DRIVER_NAME "mxs-spi" @@ -252,7 +253,7 @@ static int mxs_spi_txrx_dma(struct mxs_spi *spi, desc = dmaengine_prep_slave_sg(ssp->dmach, &dma_xfer[sg_count].sg, 1, (flags & TXRX_WRITE) ? DMA_MEM_TO_DEV : DMA_DEV_TO_MEM, - DMA_PREP_INTERRUPT | DMA_CTRL_ACK); + DMA_PREP_INTERRUPT | MXS_DMA_CTRL_WAIT4END); if (!desc) { dev_err(ssp->dev,