Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp1018774ybt; Fri, 19 Jun 2020 21:48:00 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwxxyKCF2ZCyiGqqPH7axoPk/PFn30t9Afi2hg35MXiD6F1bGbdKBFF2tpkmBgdRRNIKXOT X-Received: by 2002:a17:906:4350:: with SMTP id z16mr6499630ejm.139.1592628480103; Fri, 19 Jun 2020 21:48:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1592628480; cv=none; d=google.com; s=arc-20160816; b=x47KDg4Ce6UQdngYLDKBcszrIJPIzmMk0KQkcNfBi4/mmWrooUvFZ1eTD3eQqWptTy GkDAr3I3LRl+gFMUWrVWeRii2Vn97biVXZZ1tiAQDSBeH7v1iYblgNXbYX0Pl83Dki2M y0xNfOEEBgoAVIClh8YjrOnJ9bfY2rRvmANXeakpCcTx/KGBrThfBJcOv/+jQlo/6zL+ iUzyKvf7+PSS7o/cqW56KUZL360DwClP4N32HcTQD4ciPgnZC0raOit9A0tacsLcKh8w 3ukRW+EHnyJ1D1A06Ty/InxU7BkYzfl7QfY6SQ4txStfmBbG3ziitU6IvJRsNf1AWE6F Dpng== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=FPEa7v7Z295NwWPGfqTFBG/bfMAK8DUkWXdiuyY8+A4=; b=OQFPlYstvgva9XPEwuzo1reT3d01mpvR9NPBSLB9mbieVcAWbsD6XQ7qh5eDKp2wzX LDjvDaKZbV40XqJ//mspskH21XjbhrymJZ99EilZ3BspVc7618+yc5141QBYJ6cuZKc2 fayDrwer01G6CXdrhFb/GccsVOcxMMmAzmBe9+56xeDrAdJSYVYemEHmvPZdCGGxwiCk Zb41XDExj+W4tykzr+1//DU66y5qDASe9VcTyHYc9vHgPogh797qZwQLyNRMYmldTZaB 9W6/So1GnNBaqMridYsq9/jwp0V9mCSZ3ix5DxNyYsaibKOJSAOfTA23QiluQ0bowvtD V1Cg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a9si5459078edm.76.2020.06.19.21.47.38; Fri, 19 Jun 2020 21:48:00 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2391913AbgFSVHX (ORCPT + 99 others); Fri, 19 Jun 2020 17:07:23 -0400 Received: from jabberwock.ucw.cz ([46.255.230.98]:50614 "EHLO jabberwock.ucw.cz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2391572AbgFSVHV (ORCPT ); Fri, 19 Jun 2020 17:07:21 -0400 Received: by jabberwock.ucw.cz (Postfix, from userid 1017) id 0A47C1C0C12; Fri, 19 Jun 2020 23:07:20 +0200 (CEST) Date: Fri, 19 Jun 2020 23:07:19 +0200 From: Pavel Machek To: Greg Kroah-Hartman Cc: linux-kernel@vger.kernel.org, stable@vger.kernel.org, Serge Semin , Georgy Vlasov , Ramil Zaripov , Alexey Malahov , Thomas Bogendoerfer , Arnd Bergmann , Andy Shevchenko , Feng Tang , Rob Herring , linux-mips@vger.kernel.org, devicetree@vger.kernel.org, Mark Brown , Sasha Levin Subject: Re: [PATCH 4.19 182/267] spi: dw: Return any value retrieved from the dma_transfer callback Message-ID: <20200619210719.GB12233@amd> References: <20200619141648.840376470@linuxfoundation.org> <20200619141657.498868116@linuxfoundation.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="NMuMz9nt05w80d4+" Content-Disposition: inline In-Reply-To: <20200619141657.498868116@linuxfoundation.org> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --NMuMz9nt05w80d4+ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri 2020-06-19 16:32:47, Greg Kroah-Hartman wrote: > From: Serge Semin >=20 > [ Upstream commit f0410bbf7d0fb80149e3b17d11d31f5b5197873e ] >=20 > DW APB SSI DMA-part of the driver may need to perform the requested > SPI-transfer synchronously. In that case the dma_transfer() callback > will return 0 as a marker of the SPI transfer being finished so the > SPI core doesn't need to wait and may proceed with the SPI message > trasnfers pumping procedure. This will be needed to fix the problem > when DMA transactions are finished, but there is still data left in > the SPI Tx/Rx FIFOs being sent/received. But for now make dma_transfer > to return 1 as the normal dw_spi_transfer_one() method. As far as I understand, this is support for new SoC, not a fix? > +++ b/drivers/spi/spi-dw.c > @@ -383,11 +383,8 @@ static int dw_spi_transfer_one(struct spi_controller= *master, > =20 > spi_enable_chip(dws, 1); > =20 > - if (dws->dma_mapped) { > - ret =3D dws->dma_ops->dma_transfer(dws, transfer); > - if (ret < 0) > - return ret; > - } > + if (dws->dma_mapped) > + return dws->dma_ops->dma_transfer(dws, transfer); > =20 > if (chip->poll_mode) > return poll_transfer(dws); Mainline patch simply changes return value, but code is different in v4.19, and poll_transfer will now be avoided when dws->dma_mapped. Is that a problem? Best regards, Pavel --=20 (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blo= g.html --NMuMz9nt05w80d4+ Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iEYEARECAAYFAl7tKQcACgkQMOfwapXb+vJ1sgCeOJVyrkyrloM2p+RmL54QRIPJ CLQAn1uKYJOgsc+yYzmNLkQTUJ86pN4t =lPtX -----END PGP SIGNATURE----- --NMuMz9nt05w80d4+--